Combinatorics of sums












2












$begingroup$


Let's say that we have a number S that represents a sum. This sum can be broken down into a sum of terms. I want to calculate how many expressions I can write that represent that sum where terms are in the range from $ 1 $ to $ S $.




Example:
$$begin{align}
4 &= 1 + 1 + 1 + 1\
4 &= 2 + 1 + 1\
4 &= 1 + 2 + 1\
4 &= 1 + 1 + 2\
4 &= 2 + 2\
4 &= 3 + 1\
4 &= 1 + 3\
4 &= 4
end{align}
$$

For $S=4$ we have $N=8$ .

For $S=3$, we have $N=4$




Although I figured out that I can calculate that with this formula:



$N = 2^{S-1}$



I can't really tell why is that. I can count them for few sums and see the rule but is there a better way to explain this?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    en.wikipedia.org/wiki/Composition_(combinatorics)
    $endgroup$
    – Lord Shark the Unknown
    Jan 20 at 6:25
















2












$begingroup$


Let's say that we have a number S that represents a sum. This sum can be broken down into a sum of terms. I want to calculate how many expressions I can write that represent that sum where terms are in the range from $ 1 $ to $ S $.




Example:
$$begin{align}
4 &= 1 + 1 + 1 + 1\
4 &= 2 + 1 + 1\
4 &= 1 + 2 + 1\
4 &= 1 + 1 + 2\
4 &= 2 + 2\
4 &= 3 + 1\
4 &= 1 + 3\
4 &= 4
end{align}
$$

For $S=4$ we have $N=8$ .

For $S=3$, we have $N=4$




Although I figured out that I can calculate that with this formula:



$N = 2^{S-1}$



I can't really tell why is that. I can count them for few sums and see the rule but is there a better way to explain this?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    en.wikipedia.org/wiki/Composition_(combinatorics)
    $endgroup$
    – Lord Shark the Unknown
    Jan 20 at 6:25














2












2








2


0



$begingroup$


Let's say that we have a number S that represents a sum. This sum can be broken down into a sum of terms. I want to calculate how many expressions I can write that represent that sum where terms are in the range from $ 1 $ to $ S $.




Example:
$$begin{align}
4 &= 1 + 1 + 1 + 1\
4 &= 2 + 1 + 1\
4 &= 1 + 2 + 1\
4 &= 1 + 1 + 2\
4 &= 2 + 2\
4 &= 3 + 1\
4 &= 1 + 3\
4 &= 4
end{align}
$$

For $S=4$ we have $N=8$ .

For $S=3$, we have $N=4$




Although I figured out that I can calculate that with this formula:



$N = 2^{S-1}$



I can't really tell why is that. I can count them for few sums and see the rule but is there a better way to explain this?










share|cite|improve this question











$endgroup$




Let's say that we have a number S that represents a sum. This sum can be broken down into a sum of terms. I want to calculate how many expressions I can write that represent that sum where terms are in the range from $ 1 $ to $ S $.




Example:
$$begin{align}
4 &= 1 + 1 + 1 + 1\
4 &= 2 + 1 + 1\
4 &= 1 + 2 + 1\
4 &= 1 + 1 + 2\
4 &= 2 + 2\
4 &= 3 + 1\
4 &= 1 + 3\
4 &= 4
end{align}
$$

For $S=4$ we have $N=8$ .

For $S=3$, we have $N=4$




Although I figured out that I can calculate that with this formula:



$N = 2^{S-1}$



I can't really tell why is that. I can count them for few sums and see the rule but is there a better way to explain this?







combinatorics combinations






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 20 at 3:05









user549397

1,5101418




1,5101418










asked Jan 20 at 1:36









shadoxshadox

1133




1133








  • 1




    $begingroup$
    en.wikipedia.org/wiki/Composition_(combinatorics)
    $endgroup$
    – Lord Shark the Unknown
    Jan 20 at 6:25














  • 1




    $begingroup$
    en.wikipedia.org/wiki/Composition_(combinatorics)
    $endgroup$
    – Lord Shark the Unknown
    Jan 20 at 6:25








1




1




$begingroup$
en.wikipedia.org/wiki/Composition_(combinatorics)
$endgroup$
– Lord Shark the Unknown
Jan 20 at 6:25




$begingroup$
en.wikipedia.org/wiki/Composition_(combinatorics)
$endgroup$
– Lord Shark the Unknown
Jan 20 at 6:25










2 Answers
2






active

oldest

votes


















1












$begingroup$

See Pascal's triangle. Notice how each subsequent line is created by summing up its previous lines. For example, let's see the 4 example. See the fourth line, which says 1 3 3 1. This means there are 1 way to sum 4 with 4 integers, 3 ways to sum 4 with 3 integers, 3 ways to sum 4 with 2 integers, and 1 way to sum 4 into 1 integer. And the sum of each row of Pascal's triangle is $2^{S-1}$.






share|cite|improve this answer









$endgroup$









  • 1




    $begingroup$
    Oh, I should've thought about that! It seems to be closest to a theory I need.
    $endgroup$
    – shadox
    Jan 20 at 12:56



















7












$begingroup$

Hint: Imagine $S$ balls lined up in a row. Between each pair of adjacent balls, you can choose whether to put a "divider" between them or not. After considering all such possible pairs, you can group the balls according to the dividers. For example, $4=1+1+2$ can be depicted as *|*|** where | denotes a divider, and * denotes a ball.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    I figured this out but wasn't really aware if there is a theory in place that explains that or I have to prove through mathematical induction that my formula stands for any number S.
    $endgroup$
    – shadox
    Jan 20 at 13:00











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%2f3080067%2fcombinatorics-of-sums%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$

See Pascal's triangle. Notice how each subsequent line is created by summing up its previous lines. For example, let's see the 4 example. See the fourth line, which says 1 3 3 1. This means there are 1 way to sum 4 with 4 integers, 3 ways to sum 4 with 3 integers, 3 ways to sum 4 with 2 integers, and 1 way to sum 4 into 1 integer. And the sum of each row of Pascal's triangle is $2^{S-1}$.






share|cite|improve this answer









$endgroup$









  • 1




    $begingroup$
    Oh, I should've thought about that! It seems to be closest to a theory I need.
    $endgroup$
    – shadox
    Jan 20 at 12:56
















1












$begingroup$

See Pascal's triangle. Notice how each subsequent line is created by summing up its previous lines. For example, let's see the 4 example. See the fourth line, which says 1 3 3 1. This means there are 1 way to sum 4 with 4 integers, 3 ways to sum 4 with 3 integers, 3 ways to sum 4 with 2 integers, and 1 way to sum 4 into 1 integer. And the sum of each row of Pascal's triangle is $2^{S-1}$.






share|cite|improve this answer









$endgroup$









  • 1




    $begingroup$
    Oh, I should've thought about that! It seems to be closest to a theory I need.
    $endgroup$
    – shadox
    Jan 20 at 12:56














1












1








1





$begingroup$

See Pascal's triangle. Notice how each subsequent line is created by summing up its previous lines. For example, let's see the 4 example. See the fourth line, which says 1 3 3 1. This means there are 1 way to sum 4 with 4 integers, 3 ways to sum 4 with 3 integers, 3 ways to sum 4 with 2 integers, and 1 way to sum 4 into 1 integer. And the sum of each row of Pascal's triangle is $2^{S-1}$.






share|cite|improve this answer









$endgroup$



See Pascal's triangle. Notice how each subsequent line is created by summing up its previous lines. For example, let's see the 4 example. See the fourth line, which says 1 3 3 1. This means there are 1 way to sum 4 with 4 integers, 3 ways to sum 4 with 3 integers, 3 ways to sum 4 with 2 integers, and 1 way to sum 4 into 1 integer. And the sum of each row of Pascal's triangle is $2^{S-1}$.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Jan 20 at 1:49









Michael WangMichael Wang

186215




186215








  • 1




    $begingroup$
    Oh, I should've thought about that! It seems to be closest to a theory I need.
    $endgroup$
    – shadox
    Jan 20 at 12:56














  • 1




    $begingroup$
    Oh, I should've thought about that! It seems to be closest to a theory I need.
    $endgroup$
    – shadox
    Jan 20 at 12:56








1




1




$begingroup$
Oh, I should've thought about that! It seems to be closest to a theory I need.
$endgroup$
– shadox
Jan 20 at 12:56




$begingroup$
Oh, I should've thought about that! It seems to be closest to a theory I need.
$endgroup$
– shadox
Jan 20 at 12:56











7












$begingroup$

Hint: Imagine $S$ balls lined up in a row. Between each pair of adjacent balls, you can choose whether to put a "divider" between them or not. After considering all such possible pairs, you can group the balls according to the dividers. For example, $4=1+1+2$ can be depicted as *|*|** where | denotes a divider, and * denotes a ball.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    I figured this out but wasn't really aware if there is a theory in place that explains that or I have to prove through mathematical induction that my formula stands for any number S.
    $endgroup$
    – shadox
    Jan 20 at 13:00
















7












$begingroup$

Hint: Imagine $S$ balls lined up in a row. Between each pair of adjacent balls, you can choose whether to put a "divider" between them or not. After considering all such possible pairs, you can group the balls according to the dividers. For example, $4=1+1+2$ can be depicted as *|*|** where | denotes a divider, and * denotes a ball.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    I figured this out but wasn't really aware if there is a theory in place that explains that or I have to prove through mathematical induction that my formula stands for any number S.
    $endgroup$
    – shadox
    Jan 20 at 13:00














7












7








7





$begingroup$

Hint: Imagine $S$ balls lined up in a row. Between each pair of adjacent balls, you can choose whether to put a "divider" between them or not. After considering all such possible pairs, you can group the balls according to the dividers. For example, $4=1+1+2$ can be depicted as *|*|** where | denotes a divider, and * denotes a ball.






share|cite|improve this answer









$endgroup$



Hint: Imagine $S$ balls lined up in a row. Between each pair of adjacent balls, you can choose whether to put a "divider" between them or not. After considering all such possible pairs, you can group the balls according to the dividers. For example, $4=1+1+2$ can be depicted as *|*|** where | denotes a divider, and * denotes a ball.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Jan 20 at 1:40









angryavianangryavian

41.3k23380




41.3k23380












  • $begingroup$
    I figured this out but wasn't really aware if there is a theory in place that explains that or I have to prove through mathematical induction that my formula stands for any number S.
    $endgroup$
    – shadox
    Jan 20 at 13:00


















  • $begingroup$
    I figured this out but wasn't really aware if there is a theory in place that explains that or I have to prove through mathematical induction that my formula stands for any number S.
    $endgroup$
    – shadox
    Jan 20 at 13:00
















$begingroup$
I figured this out but wasn't really aware if there is a theory in place that explains that or I have to prove through mathematical induction that my formula stands for any number S.
$endgroup$
– shadox
Jan 20 at 13:00




$begingroup$
I figured this out but wasn't really aware if there is a theory in place that explains that or I have to prove through mathematical induction that my formula stands for any number S.
$endgroup$
– shadox
Jan 20 at 13:00


















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%2f3080067%2fcombinatorics-of-sums%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

Mario Kart Wii

The Binding of Isaac: Rebirth/Afterbirth

What does “Dominus providebit” mean?