Sum of each combination

combinationscombinatorics

A notation question.

Let's say I have a group of $N$ elements. I want to pick $n$ elements within that group and make the following computation (let's assume $N=3$, $n=1$, and the elements are $x_i$, where $i$ is between $0$ and $N$):
$$ x_1\cdot(1-x_2)\cdot(1-x_3)+x_2\cdot (1-x_1)\cdot (1-x_3)+x_3\cdot(1-x_1)\cdot(1-x_2).$$
As you probably understand, when $n=1$ I pick one element from the group and multiply it with the "one minus" of all the rest in the group (which weren't picked). I do so for each combination.

Another example, for $n=2$, I would do:
$$x_1\cdot x_2 \cdot (1-x_3) + x_1\cdot x_3 \cdot (1-x_2) + x_2\cdot x_3 \cdot (1-x_1).$$

I want to formulate it for a general $N$ and $n$.
Obviously, there suppose to be a $\sum$, and then a multiplication between two groups of $\prod$, something like:
$$ \sum_{all-combinations}\left[\prod_{picked-elements}x_i\cdot \prod_{non-picked-elements}(1-x_j)\right].$$
The thing is that I do not know how to write the groups properly.

Can someone please advise? Thanks!

Best Answer

I think the cleanest way is$$\sum_{\substack A\subseteq [N]\\|A|=n}\Bigg(\prod_{i\in A}x_i\Bigg)\Bigg(\prod_{i\in [n]\setminus A}(1-x_i)\Bigg),$$ where $[N]=\{1,2,\dots,N\}$.