Sum of each combination












0












$begingroup$


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_1cdot(1-x_2)cdot(1-x_3)+x_2cdot (1-x_1)cdot (1-x_3)+x_3cdot(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_1cdot x_2 cdot (1-x_3) + x_1cdot x_3 cdot (1-x_2) + x_2cdot 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_icdot 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!










share|cite|improve this question









$endgroup$












  • $begingroup$
    Let $X$ be your group of $N$ elements. Define $P$ (short for pairs) to be the set of ordered pairs $P = {(A,B)~:~Acap B = emptyset,~Acup B = X,~|A|=n}$. Your sum can then be written as $sumlimits_{(A,B)in P}left(prodlimits_{xin A}x~cdot~prodlimits_{xin B}(1-x)right)$. There are surely other ways to write this, but this is just one of the first to come to my mind.
    $endgroup$
    – JMoravitz
    Jan 4 at 23:21


















0












$begingroup$


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_1cdot(1-x_2)cdot(1-x_3)+x_2cdot (1-x_1)cdot (1-x_3)+x_3cdot(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_1cdot x_2 cdot (1-x_3) + x_1cdot x_3 cdot (1-x_2) + x_2cdot 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_icdot 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!










share|cite|improve this question









$endgroup$












  • $begingroup$
    Let $X$ be your group of $N$ elements. Define $P$ (short for pairs) to be the set of ordered pairs $P = {(A,B)~:~Acap B = emptyset,~Acup B = X,~|A|=n}$. Your sum can then be written as $sumlimits_{(A,B)in P}left(prodlimits_{xin A}x~cdot~prodlimits_{xin B}(1-x)right)$. There are surely other ways to write this, but this is just one of the first to come to my mind.
    $endgroup$
    – JMoravitz
    Jan 4 at 23:21
















0












0








0





$begingroup$


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_1cdot(1-x_2)cdot(1-x_3)+x_2cdot (1-x_1)cdot (1-x_3)+x_3cdot(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_1cdot x_2 cdot (1-x_3) + x_1cdot x_3 cdot (1-x_2) + x_2cdot 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_icdot 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!










share|cite|improve this question









$endgroup$




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_1cdot(1-x_2)cdot(1-x_3)+x_2cdot (1-x_1)cdot (1-x_3)+x_3cdot(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_1cdot x_2 cdot (1-x_3) + x_1cdot x_3 cdot (1-x_2) + x_2cdot 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_icdot 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!







combinatorics combinations






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 4 at 23:13









GilshoGilsho

33




33












  • $begingroup$
    Let $X$ be your group of $N$ elements. Define $P$ (short for pairs) to be the set of ordered pairs $P = {(A,B)~:~Acap B = emptyset,~Acup B = X,~|A|=n}$. Your sum can then be written as $sumlimits_{(A,B)in P}left(prodlimits_{xin A}x~cdot~prodlimits_{xin B}(1-x)right)$. There are surely other ways to write this, but this is just one of the first to come to my mind.
    $endgroup$
    – JMoravitz
    Jan 4 at 23:21




















  • $begingroup$
    Let $X$ be your group of $N$ elements. Define $P$ (short for pairs) to be the set of ordered pairs $P = {(A,B)~:~Acap B = emptyset,~Acup B = X,~|A|=n}$. Your sum can then be written as $sumlimits_{(A,B)in P}left(prodlimits_{xin A}x~cdot~prodlimits_{xin B}(1-x)right)$. There are surely other ways to write this, but this is just one of the first to come to my mind.
    $endgroup$
    – JMoravitz
    Jan 4 at 23:21


















$begingroup$
Let $X$ be your group of $N$ elements. Define $P$ (short for pairs) to be the set of ordered pairs $P = {(A,B)~:~Acap B = emptyset,~Acup B = X,~|A|=n}$. Your sum can then be written as $sumlimits_{(A,B)in P}left(prodlimits_{xin A}x~cdot~prodlimits_{xin B}(1-x)right)$. There are surely other ways to write this, but this is just one of the first to come to my mind.
$endgroup$
– JMoravitz
Jan 4 at 23:21






$begingroup$
Let $X$ be your group of $N$ elements. Define $P$ (short for pairs) to be the set of ordered pairs $P = {(A,B)~:~Acap B = emptyset,~Acup B = X,~|A|=n}$. Your sum can then be written as $sumlimits_{(A,B)in P}left(prodlimits_{xin A}x~cdot~prodlimits_{xin B}(1-x)right)$. There are surely other ways to write this, but this is just one of the first to come to my mind.
$endgroup$
– JMoravitz
Jan 4 at 23:21












1 Answer
1






active

oldest

votes


















0












$begingroup$

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






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Thanks Mike, but I do not understand the relation between $[n]$ to the combinations. For example, for $N=4$ and $n=2$ the number of sum elements will be equal to ${4 choose 2}=3$. So did you mean that $[n]$ contains all combinations?
    $endgroup$
    – Gilsho
    Jan 5 at 7:52












  • $begingroup$
    My bad, ${4 choose 2}=6$, but still more than $n=2$.
    $endgroup$
    – Gilsho
    Jan 5 at 8:45










  • $begingroup$
    I had some mistakes which are fixed now. $A$ ranges over all subsets of the numbers $1$ to $N$ of size $n$.
    $endgroup$
    – Mike Earnest
    Jan 5 at 15:38











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3062223%2fsum-of-each-combination%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0












$begingroup$

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






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Thanks Mike, but I do not understand the relation between $[n]$ to the combinations. For example, for $N=4$ and $n=2$ the number of sum elements will be equal to ${4 choose 2}=3$. So did you mean that $[n]$ contains all combinations?
    $endgroup$
    – Gilsho
    Jan 5 at 7:52












  • $begingroup$
    My bad, ${4 choose 2}=6$, but still more than $n=2$.
    $endgroup$
    – Gilsho
    Jan 5 at 8:45










  • $begingroup$
    I had some mistakes which are fixed now. $A$ ranges over all subsets of the numbers $1$ to $N$ of size $n$.
    $endgroup$
    – Mike Earnest
    Jan 5 at 15:38
















0












$begingroup$

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






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Thanks Mike, but I do not understand the relation between $[n]$ to the combinations. For example, for $N=4$ and $n=2$ the number of sum elements will be equal to ${4 choose 2}=3$. So did you mean that $[n]$ contains all combinations?
    $endgroup$
    – Gilsho
    Jan 5 at 7:52












  • $begingroup$
    My bad, ${4 choose 2}=6$, but still more than $n=2$.
    $endgroup$
    – Gilsho
    Jan 5 at 8:45










  • $begingroup$
    I had some mistakes which are fixed now. $A$ ranges over all subsets of the numbers $1$ to $N$ of size $n$.
    $endgroup$
    – Mike Earnest
    Jan 5 at 15:38














0












0








0





$begingroup$

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






share|cite|improve this answer











$endgroup$



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







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Jan 5 at 15:37

























answered Jan 5 at 0:23









Mike EarnestMike Earnest

21.4k11951




21.4k11951












  • $begingroup$
    Thanks Mike, but I do not understand the relation between $[n]$ to the combinations. For example, for $N=4$ and $n=2$ the number of sum elements will be equal to ${4 choose 2}=3$. So did you mean that $[n]$ contains all combinations?
    $endgroup$
    – Gilsho
    Jan 5 at 7:52












  • $begingroup$
    My bad, ${4 choose 2}=6$, but still more than $n=2$.
    $endgroup$
    – Gilsho
    Jan 5 at 8:45










  • $begingroup$
    I had some mistakes which are fixed now. $A$ ranges over all subsets of the numbers $1$ to $N$ of size $n$.
    $endgroup$
    – Mike Earnest
    Jan 5 at 15:38


















  • $begingroup$
    Thanks Mike, but I do not understand the relation between $[n]$ to the combinations. For example, for $N=4$ and $n=2$ the number of sum elements will be equal to ${4 choose 2}=3$. So did you mean that $[n]$ contains all combinations?
    $endgroup$
    – Gilsho
    Jan 5 at 7:52












  • $begingroup$
    My bad, ${4 choose 2}=6$, but still more than $n=2$.
    $endgroup$
    – Gilsho
    Jan 5 at 8:45










  • $begingroup$
    I had some mistakes which are fixed now. $A$ ranges over all subsets of the numbers $1$ to $N$ of size $n$.
    $endgroup$
    – Mike Earnest
    Jan 5 at 15:38
















$begingroup$
Thanks Mike, but I do not understand the relation between $[n]$ to the combinations. For example, for $N=4$ and $n=2$ the number of sum elements will be equal to ${4 choose 2}=3$. So did you mean that $[n]$ contains all combinations?
$endgroup$
– Gilsho
Jan 5 at 7:52






$begingroup$
Thanks Mike, but I do not understand the relation between $[n]$ to the combinations. For example, for $N=4$ and $n=2$ the number of sum elements will be equal to ${4 choose 2}=3$. So did you mean that $[n]$ contains all combinations?
$endgroup$
– Gilsho
Jan 5 at 7:52














$begingroup$
My bad, ${4 choose 2}=6$, but still more than $n=2$.
$endgroup$
– Gilsho
Jan 5 at 8:45




$begingroup$
My bad, ${4 choose 2}=6$, but still more than $n=2$.
$endgroup$
– Gilsho
Jan 5 at 8:45












$begingroup$
I had some mistakes which are fixed now. $A$ ranges over all subsets of the numbers $1$ to $N$ of size $n$.
$endgroup$
– Mike Earnest
Jan 5 at 15:38




$begingroup$
I had some mistakes which are fixed now. $A$ ranges over all subsets of the numbers $1$ to $N$ of size $n$.
$endgroup$
– Mike Earnest
Jan 5 at 15:38


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3062223%2fsum-of-each-combination%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith