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









New contributor




shadox is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$

















    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









    New contributor




    shadox is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.







    $endgroup$















      2












      2








      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









      New contributor




      shadox is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.







      $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









      New contributor




      shadox is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|cite|improve this question









      New contributor




      shadox is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|cite|improve this question




      share|cite|improve this question








      edited 42 mins ago









      Philip

      1,1941315




      1,1941315






      New contributor




      shadox is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 hours ago









      shadoxshadox

      1112




      1112




      New contributor




      shadox is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      shadox is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      shadox is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          2 Answers
          2






          active

          oldest

          votes


















          3












          $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$





















            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$













              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
              });


              }
              });






              shadox is a new contributor. Be nice, and check out our Code of Conduct.










              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









              3












              $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$


















                3












                $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$
















                  3












                  3








                  3





                  $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 2 hours ago









                  angryavianangryavian

                  40.2k23280




                  40.2k23280























                      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$

                        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












                          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 1 hour ago









                          Michael WangMichael Wang

                          10210




                          10210






















                              shadox is a new contributor. Be nice, and check out our Code of Conduct.










                              draft saved

                              draft discarded


















                              shadox is a new contributor. Be nice, and check out our Code of Conduct.













                              shadox is a new contributor. Be nice, and check out our Code of Conduct.












                              shadox is a new contributor. Be nice, and check out our Code of Conduct.
















                              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

                              Le Mesnil-Réaume

                              Ida-Boy-Ed-Garten

                              web3.py web3.isConnected() returns false always