Maximizing $ P\{X=Y\}$ where $X$ and $Y$ are Binomial $X\sim \text{Binomial}(N = 100, p=0.5)$
$Y\sim \text{Binomial}(N = 120, p=0.5)$
What is the  largest possible numerical value of $P\{X=Y\}$. $X$ and $Y$ are not necessarily independent. 
 A: A general result is that the minimal possible value of $P(X\ne Y)$ is $$\frac12\sum_{k\in\mathbb Z}|p_X(k)-p_Y(k)|.$$
This number is the total variation distance between the distribution $(p_X(k))_k$ of $X$ and the distribution $(p_Y(k))_k$ of $Y$, and the result explains the logic of @Ewan's computations.
Thus, the maximal possible value of $P(X=Y)$ is $$1-\frac12\sum_{k\in\mathbb Z}|p_X(k)-p_Y(k)|=\sum_{k\in\mathbb Z}\min\{p_X(k),p_Y(k)\}.$$
A: The exact answer is 
$$M=\sum_{k=0}^{55} \frac{\binom{120}{k}}{2^{120}}+
\sum_{k=56}^{100} \frac{\binom{100}{k}}{2^{100}} \approx 0.3413$$
We show first that $M$ is an upper bound : we have
$$
P(X=Y)=\sum_{k=0}^{100}P(X=Y=k)
\leq \sum_{k=0}^{55}P(Y=k)+\sum_{k=56}^{100}P(X=k)=M. \tag{1}
$$
Let us now show that $M$ is attained. For ease of notation,  put
$$
\begin{array}{lcl}
x_i &=& P(X=i)=\frac{\binom{100}{i}}{2^{100}} \ (0\leq i\leq 100),\\
x_i &=& 0 \ (101\leq i \leq 120), \\
y_j &=& P(Y=j)=\frac{\binom{120}{j}}{2^{120}} \ (0\leq j\leq 120), \\
A&=& \sum_{i=0}^{55}(x_i-y_i)=\sum_{j=56}^{120}(y_j-x_j)\\
\end{array}
\tag{2}
$$ 
Note that the last equality follows from $\sum_{i=0}^{120}x_i=\sum_{j=0}^{120}y_j=1$.
Lemma. We have $y_k\leq x_k$ for $1\leq k \leq 55$ and $x_k\leq y_k$ for $56\leq k \leq 120$.
The lemma is shown at the end of this answer. We now explain how it is used : define
a map $\pi : \lbrace 0,1,2,\ldots,100\rbrace \times \lbrace 0,1,2,\ldots,120\rbrace \to {\mathbb R}$ by 
$$
\pi(i,j)=
\left\lbrace\begin{array}{lcl}
y_k & \text{if} & i=j=k,\ 0\leq k \leq 55 \\
\frac{(x_i-y_i)(y_j-x_j)}{A}   & \text{if} & 0\leq i \leq 55, 56\leq j \leq 120 \\
x_k & \text{if} & i=j=k,\ 56\leq k \leq 100, \\
0 & \text{otherwise} &
\end{array}\right.
$$
It follows easily from the lemma that $\pi\geq 0$ and $\sum_{j}\pi(i,j)=x_i$, $\sum_{i}\pi(i,j)=y_j$,$\sum_{i,j}\pi(i,j)=1$, so that
$\pi$ is a probability distribution. We are then done, by considering $Z=(X,Y)$, a random variable with values in
$\lbrace 0,1,2,\ldots,100\rbrace \times \lbrace 0,1,2,\ldots,120\rbrace$ and
distributed according to $\pi$.
Proof of lemma. Let $u_k=\frac{y_k}{x_k}$. We have $u_k=\frac{1}{2^{20}}\prod_{j=101}^{120}\frac{j}{j-k}$, 
and hence $\frac{u_{k+1}}{u_k}=\frac{120-k}{100-k}$, so that the sequence $u_k$ is increasing. We conclude by
noticing that $u_{55}<1$ and $u_{56}>1$.
