I have the following equation for a bipartite graph, where each vertex $v_i$ is connected to every vertex $h_j$. Each value in either $H$ or $V$ could take one of two possible values $\{0,1\}$. We have $n$ factors of $H$ and $m$ factors of $V$,
$$ \sum_V{\sum_H{\prod_i{\prod_j{\left( v_ih_j \right)}}\prod_i{\left( v_i \right)}\prod_j{\left( h_j \right)}}} $$
Question: How many terms this factor has? I guess it should have $(m*n)*(m*n)*(m)*(n)$, but the solution says that we should have $2^n *2^m$. Can you please explain the reason?