1

In the comment section of this post the following property came up: $$\prod_{i=1}^n\left(c_{i,1}+c_{i,2}\right) = \sum_{f:\left\{1,2,\ldots,n\right\}\to \left\{1,2\right\}} \prod_{i=1}^n c_{i,f\left(i\right)},$$ where $c_{i, j}\in \mathbb{R}$ for $i=\overline{1, n}$ and $j=1,2$.

I initially thought that this is pretty obvious, but then I realized that I actually have trouble writing down a formal proof. I tried showing this by induction, but I have trouble going from $n$ to $n+1$ when it comes to the RHS. I am not really able to see how adding one value in the domain of my function should affect the summation. Intuitively, for $f(n+1)$ I have two choices, so having $c_{n+1, 1}+c_{n+1, 2}$ in the LHS kind of makes sense, but I am not able to actually formalize this.

RobPratt
  • 50,938
QuantumBoy
  • 469
  • 2
  • 7

3 Answers3

2

Some notations first. I will write $[n]$ for the set $\{1,2,3,\dots, n\}$ of all integers from $1$ to $n$. (For $n\le 3$ we have for instance $[1]=\{1\}$, and $[2]=\{1,2\}$, and $[3]=\{1,2,3\}$.) For two functions with the same codomain $Z$, $f:X\to Z$, $g:Y\to Z$, which have disjoint domains, $X\cap Y=\{\}$, we denote by $f\sqcup g$ the function defined on the (disjoint) union $X\sqcup Y$ with values in $Z$ which coincides with $f$, when restricted to $X$, respectively to $g$, when restricted to $Y$.

Instead of $\{1,2\}$ i will use $\{0,1\}$, and let $Z$ be this set.


The proposition is true for $n=1$, the L.H.S. product (has one factor and thus) is $c_{i0}+c_{i1}$ (the comma in the index is omitted - if a separation is really needed, some space will be there). On the R.H.S. we have a sum over the index set consisting of the two functions $1\to 0$ and $1\to 1$, so the sum is also $c_{i0}+c_{i1}$.

Let us fix now some $n\ge 1$ and assume that the relation is true: $$ \tag{$*_n$} \prod_{1\le i\le n}\left(c_{i0}+c_{i1}\right) = \sum_{f:[n]\to Z} \prod_{1\le i\le n} c_{i\ f(i)} \ . $$ Consider two new variables $c_{n+1\ 0}$, $c_{n+1\ 1}$, and now we compute: $$ \begin{aligned} \prod_{1\le i\le n+1}\left(c_{i0}+c_{i1}\right) &= \underbrace{\left[\prod_{1\le i\le n}\left(c_{i0}+c_{i1}\right)\right]}_{ \substack{ \text{use the relation $(*_n)$ for this product}\\ \text{assumed to be true}}} \cdot \left[\prod_{n+1\le i\le n+1}\left(c_{i0}+c_{i1}\right)\right] \\ &= \left[\sum_{f:[n]\to Z} \prod_{1\le i\le n} c_{i\ f(i)}\right] \cdot \left[\sum_{g:\{n+1\}\to Z} c_{(n+1)\ g(n+1)}\right] \\ &= \sum_{\substack{f:[n]\to Z\\g:\{n+1\}\to Z}} \left(\prod_{1\le i\le n} c_{i\ f(i)}\right)\cdot c_{(n+1)\ g(n+1)} \\ &\qquad\text{... and for indices $f,g$ above introduce $h:=f\sqcup g$ at this step} \\ &=\sum_{h:[n]\sqcup{\{n+1\}\to Z}} \left(\prod_{1\le i\le n} c_{i\ h(i)}\right)\cdot c_{(n+1)\ h(n+1)} \\ &=\sum_{h:[n+1]\to Z} \prod_{1\le i\le n+1} c_{i\ h(i)}\ . \end{aligned} $$ We thus show that the relation $(*_{n+1})$ is true.

By induction, the relation $(*_n)$ is true for all integers $n\ge 1$.

$\square$

dan_fulea
  • 37,952
1

To simplify the notation, write $[n] = \{1,2,\ldots, n\}$, so that, for instance, $f : \{1,2,\ldots, n\} \to \{1,2\}$ becomes $f : [n] \to [2]$.

For the moment, assume for each choice of $k \in [2]$, $$\sum_{\substack{f : [n+1] \to [2] \\ f(n+1) = k}} \prod_{i=1}^{n}c_{i,f(i)} = \sum_{f : [n] \to [2]} \prod_{i=1}^n c_{i,f(i)}. \tag{$*$}$$

Then we show the inductive step holds by $$\begin{align*} \sum_{f : [n+1] \to [2]} \prod_{i=1}^{n+1}c_{i,f(i)} &= \sum_{k\in [2]}\sum_{\substack{f : [n+1] \to [2] \\ f(n+1) = k}} \prod_{i=1}^{n+1}c_{i,f(i)}\\ &= \sum_{k\in [2]}c_{n+1,k}\sum_{\substack{f : [n+1] \to [2] \\ f(n+1) = k}} \prod_{i=1}^{n}c_{i,f(i)} \\ &= \sum_{k\in [2]}c_{n+1,k}\sum_{f : [n] \to [2]} \prod_{i=1}^n c_{i,f(i)} \\ &= (c_{n+1,1} + c_{n+1,2})\sum_{f : [n] \to [2]} \prod_{i=1}^n c_{i,f(i)}. \end{align*}$$ (note the one use of $(*)$ and the two uses of the distributive property)


Therefore, to complete the proof of the inductive step, we just need to show $(*)$. For this, fix $k \in [2]$ and define the map $$\Phi : \{f : [n+1] \to [2] \text{ such that } f(n+1)=k\} \to \{f : [n]\to [2]\}$$ by the restriction $\Phi(f) = f|_{[n]}$. That is, $\Phi(f)(i) = f(i)$ for each $i \in [n]$. Then

  • $\Phi$ is a bijection and
  • $\prod_{i=1}^n c_{i,f(i)} = \prod_{i=1}^n c_{i,\Phi(f)(i)}.$

The above two facts are sufficient to prove $(*)$.

1

We can also show the validity of this identity directly by adding some intermediate steps. We use $[n]=\{1,2,3,\ldots,n\}$ to denote the first $n$ positive integers.

We start with the right hand side. We obtain \begin{align*} {\color{blue}{\sum_{f:[n]\to \{1,2\}\,}}}{\color{blue}{ \prod_{i=1}^n c_{i,f(i)}}} &=\sum_{f:[n]\to \{1,2\}\,}\prod_{i\in f^{-1}(1)}c_{i,1}\prod_{i\in f^{-1}(2)}c_{i,2}\tag{1}\\ &=\sum_{S\subseteq [n]\,}\prod_{i\in S}c_{i,1}\prod_{i\in [n]\setminus S}c_{i,2}\tag{2}\\ &=\prod_{i\in [n]}\left(c_{i,1}+c_{i,2}\right)\tag{3}\\ &\,\,\color{blue}{=\prod_{i=1}^n\left(c_{i,1}+c_{i,2}\right)} \end{align*} and the claim follows.

Comment:

  • In (1) we reorder the factors of the product by partitioning the set into the subset of elements of $[n]$ which is mapped by $f$ to $\{1\}$ and the subset of $[n]$ which is mapped by $f$ to $\{2\}$.

  • In (2) we note that we are summing over all $2^n$ functions $f$ which map subsets of $[n]$ to $\{1,2\}$. We shift the focus to $f^{-1}(1)$ and say: We set $S:=f^{-1}(1)$ and sum over all subsets $S\subseteq [n]$. This is admissible, since $[n]=f^{-1}(1)\cup f^{-1}(2)$ is a partition of $[n]$.

  • In (3), we write the sum as a product of binomials, noting that the indices $i$ of the factors $c_{i,1}$ of each term form a subset $S\subseteq [n]$ when multiplied out.

Markus Scheuer
  • 112,413