Sum of each combination
$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!
combinatorics combinations
$endgroup$
add a comment |
$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!
combinatorics combinations
$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
add a comment |
$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!
combinatorics combinations
$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
combinatorics combinations
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
add a comment |
$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
add a comment |
1 Answer
1
active
oldest
votes
$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}$.
$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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
$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}$.
$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
add a comment |
$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}$.
$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
add a comment |
$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}$.
$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}$.
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
add a comment |
$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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
$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