There are two sets, $A=\{a_1, \dots, a_n\}$ and $B=\{b_1, \dots, b_m\}$, for some $m$ and $n$.
The elements $a_1, \dots, a_n$ and $b_1, \dots, b_m$ are all $x$-bit binary strings, and they are all uniformly sampled from $X$, which is defined as the set of all $x$-bit binary strings.
Let $I_{n,m}$ be the value $|A\cap B|$. Obviously, $I_{n,m}$ is a random variable.
So, how can I calculate $E[I_{n,m}]$?
Note that $A$ and $B$ are multisets. Besides, given $x=3$, if $A$ and $B$ happen to have two $111$'s and three $111$'s, respectively ($\{111,111\}\subseteq A$ and $\{111,111,111\}\subseteq B$), then they only contribute $1$ to $I_{n,m}$.