Number of integer solutions of the equation $x + y + z = 30$ if $x geq 2$, $y geq 0$, $z geq -3$

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite
1












I am trying to solve a problem using permutation/combination but cannot figure out how to proceed.




Suppose the sum of three variables $x, y, z$ is $30$. If $xge2, yge0, zge-3$, how many integer solutions exist?




I understand that $2le xle33, 0le yle31, -3le zle28$. A simple simulation shows that there are $528$ solutions. However, I am unable to calculate this mathematically. I would like a hint so that I can try this on my own.










share|cite|improve this question























  • There is a way to count solutions to $x+y+z=n$, where $x,y,z$ are the variables and $n$ is constant, and you are given $x,y,zge 0$, using stars and bars. See if you can transform your question into this one.
    – Mike Earnest
    Sep 7 at 21:24














up vote
2
down vote

favorite
1












I am trying to solve a problem using permutation/combination but cannot figure out how to proceed.




Suppose the sum of three variables $x, y, z$ is $30$. If $xge2, yge0, zge-3$, how many integer solutions exist?




I understand that $2le xle33, 0le yle31, -3le zle28$. A simple simulation shows that there are $528$ solutions. However, I am unable to calculate this mathematically. I would like a hint so that I can try this on my own.










share|cite|improve this question























  • There is a way to count solutions to $x+y+z=n$, where $x,y,z$ are the variables and $n$ is constant, and you are given $x,y,zge 0$, using stars and bars. See if you can transform your question into this one.
    – Mike Earnest
    Sep 7 at 21:24












up vote
2
down vote

favorite
1









up vote
2
down vote

favorite
1






1





I am trying to solve a problem using permutation/combination but cannot figure out how to proceed.




Suppose the sum of three variables $x, y, z$ is $30$. If $xge2, yge0, zge-3$, how many integer solutions exist?




I understand that $2le xle33, 0le yle31, -3le zle28$. A simple simulation shows that there are $528$ solutions. However, I am unable to calculate this mathematically. I would like a hint so that I can try this on my own.










share|cite|improve this question















I am trying to solve a problem using permutation/combination but cannot figure out how to proceed.




Suppose the sum of three variables $x, y, z$ is $30$. If $xge2, yge0, zge-3$, how many integer solutions exist?




I understand that $2le xle33, 0le yle31, -3le zle28$. A simple simulation shows that there are $528$ solutions. However, I am unable to calculate this mathematically. I would like a hint so that I can try this on my own.







combinatorics combinations






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Sep 8 at 7:20









N. F. Taussig

39.7k93153




39.7k93153










asked Sep 7 at 21:20









an4s

2,0812417




2,0812417











  • There is a way to count solutions to $x+y+z=n$, where $x,y,z$ are the variables and $n$ is constant, and you are given $x,y,zge 0$, using stars and bars. See if you can transform your question into this one.
    – Mike Earnest
    Sep 7 at 21:24
















  • There is a way to count solutions to $x+y+z=n$, where $x,y,z$ are the variables and $n$ is constant, and you are given $x,y,zge 0$, using stars and bars. See if you can transform your question into this one.
    – Mike Earnest
    Sep 7 at 21:24















There is a way to count solutions to $x+y+z=n$, where $x,y,z$ are the variables and $n$ is constant, and you are given $x,y,zge 0$, using stars and bars. See if you can transform your question into this one.
– Mike Earnest
Sep 7 at 21:24




There is a way to count solutions to $x+y+z=n$, where $x,y,z$ are the variables and $n$ is constant, and you are given $x,y,zge 0$, using stars and bars. See if you can transform your question into this one.
– Mike Earnest
Sep 7 at 21:24










4 Answers
4






active

oldest

votes

















up vote
2
down vote













From
$$x+y+z=30 Rightarrow (x-2)+y+(z+3)=31 Rightarrow x_1+y+z_1=31\
x_1geq0,ygeq0,z_1geq0$$
which has $binom332=528$ integer solutions.



With more details, this is the generating function:



$$(1+x+x^2+...+x^k+...)^3=frac1(1-x)^3=
frac12left(frac11-xright)^''=\
frac12left(sumlimits_k=0x^kright)^''=
sumlimits_k=2frack(k-1)2x^k-2$$
and the coefficient of $x^31$ is the answer.






share|cite|improve this answer





























    up vote
    1
    down vote













    Set $a=x-2$, $b=y$ and $c=z+3$.



    The problem is the same as finding the number of sums $a+b+c=31$ where $a,b,c$ are nonnegative integers.



    Now apply stars and bars.






    share|cite|improve this answer



























      up vote
      1
      down vote













      I started by fixing x=2, and counting all the solutions in y and z. For x = 2, we need $y+z=28$. Now, fixing y determines z. For y=0, z=28; y=1, z=27; ...; y=31, z = -3. So, we can count 32 solutions when x=2.



      Then, I fixed x=3 and counted all the solutions in y and z again. A pattern emerges quickly.



      Another hint:




      $sum_i=0^32$ i = 528$







      share|cite|improve this answer
















      • 1




        So as we increase the value of $x$ by $1$, the number of solutions for that value of $x$ decreases by $1$ as well until we are left with $x = 33, y = 0, z = -3$. Therefore, the total number of solutions is essentially $32 + 31 + 30 + cdots + 1$.
        – an4s
        Sep 7 at 21:41

















      up vote
      1
      down vote













      We wish to find the number of solutions of the equation
      $$x + y + z = 30 tag1$$
      in the integers subject to the restrictions that $x geq 2$, $y geq 0$, and $z geq -3$.



      Let $x' = x - 2$, $y' = y$, and $z' = z + 3$. Then $x', y', z'$ are nonnegative integers. Substituting $x' + 2$ for $x$, $y'$ for $y$, and $z' - 3$ for $z$ in equation 1 yields
      beginalign*
      x' - 2 + y' + z' + 3 & = 30\
      x' + y' + z' & = 31 tag2
      endalign*
      Equation 2 is an equation in the nonnegative integers. A particular solution of equation 2 corresponds to the placement of two addition signs in a row of $31$ ones. For instance,
      $$1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 +$$
      corresponds to the solution $x_1 = 21$, $x_2 = 10$, $x_3 = 0$, while
      $$1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1$$
      corresponds to the solution $x_1 = 7$, $x_2 = 11$, $x_3 = 13$. The number of solutions of equation 2 is the number of ways we can place two addition signs in a row of $31$ ones, which is equal to the number of ways we can select which $2$ of the $33$ positions required for $31$ ones and $2$ addition signs will be filled with addition signs.




      $$binom31 + 22 = binom332 = frac33!2!31! = frac33 cdot 32 cdot 31!2 cdot 1 cdot 31! = frac33 cdot 322 = 33 cdot 16 = 528$$







      share|cite|improve this answer




















        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',
        convertImagesToLinks: true,
        noModals: false,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        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%2f2909070%2fnumber-of-integer-solutions-of-the-equation-x-y-z-30-if-x-geq-2-y%23new-answer', 'question_page');

        );

        Post as a guest






























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes








        up vote
        2
        down vote













        From
        $$x+y+z=30 Rightarrow (x-2)+y+(z+3)=31 Rightarrow x_1+y+z_1=31\
        x_1geq0,ygeq0,z_1geq0$$
        which has $binom332=528$ integer solutions.



        With more details, this is the generating function:



        $$(1+x+x^2+...+x^k+...)^3=frac1(1-x)^3=
        frac12left(frac11-xright)^''=\
        frac12left(sumlimits_k=0x^kright)^''=
        sumlimits_k=2frack(k-1)2x^k-2$$
        and the coefficient of $x^31$ is the answer.






        share|cite|improve this answer


























          up vote
          2
          down vote













          From
          $$x+y+z=30 Rightarrow (x-2)+y+(z+3)=31 Rightarrow x_1+y+z_1=31\
          x_1geq0,ygeq0,z_1geq0$$
          which has $binom332=528$ integer solutions.



          With more details, this is the generating function:



          $$(1+x+x^2+...+x^k+...)^3=frac1(1-x)^3=
          frac12left(frac11-xright)^''=\
          frac12left(sumlimits_k=0x^kright)^''=
          sumlimits_k=2frack(k-1)2x^k-2$$
          and the coefficient of $x^31$ is the answer.






          share|cite|improve this answer
























            up vote
            2
            down vote










            up vote
            2
            down vote









            From
            $$x+y+z=30 Rightarrow (x-2)+y+(z+3)=31 Rightarrow x_1+y+z_1=31\
            x_1geq0,ygeq0,z_1geq0$$
            which has $binom332=528$ integer solutions.



            With more details, this is the generating function:



            $$(1+x+x^2+...+x^k+...)^3=frac1(1-x)^3=
            frac12left(frac11-xright)^''=\
            frac12left(sumlimits_k=0x^kright)^''=
            sumlimits_k=2frack(k-1)2x^k-2$$
            and the coefficient of $x^31$ is the answer.






            share|cite|improve this answer














            From
            $$x+y+z=30 Rightarrow (x-2)+y+(z+3)=31 Rightarrow x_1+y+z_1=31\
            x_1geq0,ygeq0,z_1geq0$$
            which has $binom332=528$ integer solutions.



            With more details, this is the generating function:



            $$(1+x+x^2+...+x^k+...)^3=frac1(1-x)^3=
            frac12left(frac11-xright)^''=\
            frac12left(sumlimits_k=0x^kright)^''=
            sumlimits_k=2frack(k-1)2x^k-2$$
            and the coefficient of $x^31$ is the answer.







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            edited Sep 7 at 21:54

























            answered Sep 7 at 21:45









            rtybase

            9,21721433




            9,21721433




















                up vote
                1
                down vote













                Set $a=x-2$, $b=y$ and $c=z+3$.



                The problem is the same as finding the number of sums $a+b+c=31$ where $a,b,c$ are nonnegative integers.



                Now apply stars and bars.






                share|cite|improve this answer
























                  up vote
                  1
                  down vote













                  Set $a=x-2$, $b=y$ and $c=z+3$.



                  The problem is the same as finding the number of sums $a+b+c=31$ where $a,b,c$ are nonnegative integers.



                  Now apply stars and bars.






                  share|cite|improve this answer






















                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote









                    Set $a=x-2$, $b=y$ and $c=z+3$.



                    The problem is the same as finding the number of sums $a+b+c=31$ where $a,b,c$ are nonnegative integers.



                    Now apply stars and bars.






                    share|cite|improve this answer












                    Set $a=x-2$, $b=y$ and $c=z+3$.



                    The problem is the same as finding the number of sums $a+b+c=31$ where $a,b,c$ are nonnegative integers.



                    Now apply stars and bars.







                    share|cite|improve this answer












                    share|cite|improve this answer



                    share|cite|improve this answer










                    answered Sep 7 at 21:31









                    drhab

                    89.3k541123




                    89.3k541123




















                        up vote
                        1
                        down vote













                        I started by fixing x=2, and counting all the solutions in y and z. For x = 2, we need $y+z=28$. Now, fixing y determines z. For y=0, z=28; y=1, z=27; ...; y=31, z = -3. So, we can count 32 solutions when x=2.



                        Then, I fixed x=3 and counted all the solutions in y and z again. A pattern emerges quickly.



                        Another hint:




                        $sum_i=0^32$ i = 528$







                        share|cite|improve this answer
















                        • 1




                          So as we increase the value of $x$ by $1$, the number of solutions for that value of $x$ decreases by $1$ as well until we are left with $x = 33, y = 0, z = -3$. Therefore, the total number of solutions is essentially $32 + 31 + 30 + cdots + 1$.
                          – an4s
                          Sep 7 at 21:41














                        up vote
                        1
                        down vote













                        I started by fixing x=2, and counting all the solutions in y and z. For x = 2, we need $y+z=28$. Now, fixing y determines z. For y=0, z=28; y=1, z=27; ...; y=31, z = -3. So, we can count 32 solutions when x=2.



                        Then, I fixed x=3 and counted all the solutions in y and z again. A pattern emerges quickly.



                        Another hint:




                        $sum_i=0^32$ i = 528$







                        share|cite|improve this answer
















                        • 1




                          So as we increase the value of $x$ by $1$, the number of solutions for that value of $x$ decreases by $1$ as well until we are left with $x = 33, y = 0, z = -3$. Therefore, the total number of solutions is essentially $32 + 31 + 30 + cdots + 1$.
                          – an4s
                          Sep 7 at 21:41












                        up vote
                        1
                        down vote










                        up vote
                        1
                        down vote









                        I started by fixing x=2, and counting all the solutions in y and z. For x = 2, we need $y+z=28$. Now, fixing y determines z. For y=0, z=28; y=1, z=27; ...; y=31, z = -3. So, we can count 32 solutions when x=2.



                        Then, I fixed x=3 and counted all the solutions in y and z again. A pattern emerges quickly.



                        Another hint:




                        $sum_i=0^32$ i = 528$







                        share|cite|improve this answer












                        I started by fixing x=2, and counting all the solutions in y and z. For x = 2, we need $y+z=28$. Now, fixing y determines z. For y=0, z=28; y=1, z=27; ...; y=31, z = -3. So, we can count 32 solutions when x=2.



                        Then, I fixed x=3 and counted all the solutions in y and z again. A pattern emerges quickly.



                        Another hint:




                        $sum_i=0^32$ i = 528$








                        share|cite|improve this answer












                        share|cite|improve this answer



                        share|cite|improve this answer










                        answered Sep 7 at 21:33









                        JockoCigarNab

                        1266




                        1266







                        • 1




                          So as we increase the value of $x$ by $1$, the number of solutions for that value of $x$ decreases by $1$ as well until we are left with $x = 33, y = 0, z = -3$. Therefore, the total number of solutions is essentially $32 + 31 + 30 + cdots + 1$.
                          – an4s
                          Sep 7 at 21:41












                        • 1




                          So as we increase the value of $x$ by $1$, the number of solutions for that value of $x$ decreases by $1$ as well until we are left with $x = 33, y = 0, z = -3$. Therefore, the total number of solutions is essentially $32 + 31 + 30 + cdots + 1$.
                          – an4s
                          Sep 7 at 21:41







                        1




                        1




                        So as we increase the value of $x$ by $1$, the number of solutions for that value of $x$ decreases by $1$ as well until we are left with $x = 33, y = 0, z = -3$. Therefore, the total number of solutions is essentially $32 + 31 + 30 + cdots + 1$.
                        – an4s
                        Sep 7 at 21:41




                        So as we increase the value of $x$ by $1$, the number of solutions for that value of $x$ decreases by $1$ as well until we are left with $x = 33, y = 0, z = -3$. Therefore, the total number of solutions is essentially $32 + 31 + 30 + cdots + 1$.
                        – an4s
                        Sep 7 at 21:41










                        up vote
                        1
                        down vote













                        We wish to find the number of solutions of the equation
                        $$x + y + z = 30 tag1$$
                        in the integers subject to the restrictions that $x geq 2$, $y geq 0$, and $z geq -3$.



                        Let $x' = x - 2$, $y' = y$, and $z' = z + 3$. Then $x', y', z'$ are nonnegative integers. Substituting $x' + 2$ for $x$, $y'$ for $y$, and $z' - 3$ for $z$ in equation 1 yields
                        beginalign*
                        x' - 2 + y' + z' + 3 & = 30\
                        x' + y' + z' & = 31 tag2
                        endalign*
                        Equation 2 is an equation in the nonnegative integers. A particular solution of equation 2 corresponds to the placement of two addition signs in a row of $31$ ones. For instance,
                        $$1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 +$$
                        corresponds to the solution $x_1 = 21$, $x_2 = 10$, $x_3 = 0$, while
                        $$1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1$$
                        corresponds to the solution $x_1 = 7$, $x_2 = 11$, $x_3 = 13$. The number of solutions of equation 2 is the number of ways we can place two addition signs in a row of $31$ ones, which is equal to the number of ways we can select which $2$ of the $33$ positions required for $31$ ones and $2$ addition signs will be filled with addition signs.




                        $$binom31 + 22 = binom332 = frac33!2!31! = frac33 cdot 32 cdot 31!2 cdot 1 cdot 31! = frac33 cdot 322 = 33 cdot 16 = 528$$







                        share|cite|improve this answer
























                          up vote
                          1
                          down vote













                          We wish to find the number of solutions of the equation
                          $$x + y + z = 30 tag1$$
                          in the integers subject to the restrictions that $x geq 2$, $y geq 0$, and $z geq -3$.



                          Let $x' = x - 2$, $y' = y$, and $z' = z + 3$. Then $x', y', z'$ are nonnegative integers. Substituting $x' + 2$ for $x$, $y'$ for $y$, and $z' - 3$ for $z$ in equation 1 yields
                          beginalign*
                          x' - 2 + y' + z' + 3 & = 30\
                          x' + y' + z' & = 31 tag2
                          endalign*
                          Equation 2 is an equation in the nonnegative integers. A particular solution of equation 2 corresponds to the placement of two addition signs in a row of $31$ ones. For instance,
                          $$1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 +$$
                          corresponds to the solution $x_1 = 21$, $x_2 = 10$, $x_3 = 0$, while
                          $$1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1$$
                          corresponds to the solution $x_1 = 7$, $x_2 = 11$, $x_3 = 13$. The number of solutions of equation 2 is the number of ways we can place two addition signs in a row of $31$ ones, which is equal to the number of ways we can select which $2$ of the $33$ positions required for $31$ ones and $2$ addition signs will be filled with addition signs.




                          $$binom31 + 22 = binom332 = frac33!2!31! = frac33 cdot 32 cdot 31!2 cdot 1 cdot 31! = frac33 cdot 322 = 33 cdot 16 = 528$$







                          share|cite|improve this answer






















                            up vote
                            1
                            down vote










                            up vote
                            1
                            down vote









                            We wish to find the number of solutions of the equation
                            $$x + y + z = 30 tag1$$
                            in the integers subject to the restrictions that $x geq 2$, $y geq 0$, and $z geq -3$.



                            Let $x' = x - 2$, $y' = y$, and $z' = z + 3$. Then $x', y', z'$ are nonnegative integers. Substituting $x' + 2$ for $x$, $y'$ for $y$, and $z' - 3$ for $z$ in equation 1 yields
                            beginalign*
                            x' - 2 + y' + z' + 3 & = 30\
                            x' + y' + z' & = 31 tag2
                            endalign*
                            Equation 2 is an equation in the nonnegative integers. A particular solution of equation 2 corresponds to the placement of two addition signs in a row of $31$ ones. For instance,
                            $$1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 +$$
                            corresponds to the solution $x_1 = 21$, $x_2 = 10$, $x_3 = 0$, while
                            $$1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1$$
                            corresponds to the solution $x_1 = 7$, $x_2 = 11$, $x_3 = 13$. The number of solutions of equation 2 is the number of ways we can place two addition signs in a row of $31$ ones, which is equal to the number of ways we can select which $2$ of the $33$ positions required for $31$ ones and $2$ addition signs will be filled with addition signs.




                            $$binom31 + 22 = binom332 = frac33!2!31! = frac33 cdot 32 cdot 31!2 cdot 1 cdot 31! = frac33 cdot 322 = 33 cdot 16 = 528$$







                            share|cite|improve this answer












                            We wish to find the number of solutions of the equation
                            $$x + y + z = 30 tag1$$
                            in the integers subject to the restrictions that $x geq 2$, $y geq 0$, and $z geq -3$.



                            Let $x' = x - 2$, $y' = y$, and $z' = z + 3$. Then $x', y', z'$ are nonnegative integers. Substituting $x' + 2$ for $x$, $y'$ for $y$, and $z' - 3$ for $z$ in equation 1 yields
                            beginalign*
                            x' - 2 + y' + z' + 3 & = 30\
                            x' + y' + z' & = 31 tag2
                            endalign*
                            Equation 2 is an equation in the nonnegative integers. A particular solution of equation 2 corresponds to the placement of two addition signs in a row of $31$ ones. For instance,
                            $$1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 +$$
                            corresponds to the solution $x_1 = 21$, $x_2 = 10$, $x_3 = 0$, while
                            $$1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1$$
                            corresponds to the solution $x_1 = 7$, $x_2 = 11$, $x_3 = 13$. The number of solutions of equation 2 is the number of ways we can place two addition signs in a row of $31$ ones, which is equal to the number of ways we can select which $2$ of the $33$ positions required for $31$ ones and $2$ addition signs will be filled with addition signs.




                            $$binom31 + 22 = binom332 = frac33!2!31! = frac33 cdot 32 cdot 31!2 cdot 1 cdot 31! = frac33 cdot 322 = 33 cdot 16 = 528$$








                            share|cite|improve this answer












                            share|cite|improve this answer



                            share|cite|improve this answer










                            answered Sep 10 at 8:23









                            N. F. Taussig

                            39.7k93153




                            39.7k93153



























                                 

                                draft saved


                                draft discarded















































                                 


                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2909070%2fnumber-of-integer-solutions-of-the-equation-x-y-z-30-if-x-geq-2-y%23new-answer', 'question_page');

                                );

                                Post as a guest













































































                                這個網誌中的熱門文章

                                How to combine Bézier curves to a surface?

                                Carbon dioxide

                                Why am i infinitely getting the same tweet with the Twitter Search API?