How many integer solutions are there to this equation?












2












$begingroup$


How many nonnegative integer solutions are there to: $x_1 + 2x_2 + x_3 = 10$? I am able to do this when it is simply $x_1 + x_2 + x_3 = 10$ but by multiplying $x_2$ by 2 has confused me.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Did you mean integer solutions (there are infinitely many) or perhaps nonnegative integer solutions?
    $endgroup$
    – hardmath
    Dec 2 '18 at 16:09










  • $begingroup$
    I assume you mean either positive or non-negative integers? Either way, given how small the values are, easiest is probably to run through the possible values of $x_2$ and work case by case.
    $endgroup$
    – lulu
    Dec 2 '18 at 16:09










  • $begingroup$
    I meant non negative integers sorry
    $endgroup$
    – Noobcoder
    Dec 2 '18 at 16:24










  • $begingroup$
    @lulu I understand we can go case by case, but I would like to learn how to do it using combinations and permutations as it will help me in other future problems where I wouldn't be able to go case by case.
    $endgroup$
    – Noobcoder
    Dec 2 '18 at 16:41








  • 1




    $begingroup$
    Problems with this sort of constraint can be very hard to count for large collections. In this case, with only three variables, it is easy since, for any fixed $x_2$ the possible $(x_1,x_3)$ are determined by $x_1$, say. I don't think there is any sort of one-size-fits-all approach to all possible linear constraints, in general.
    $endgroup$
    – lulu
    Dec 2 '18 at 17:04
















2












$begingroup$


How many nonnegative integer solutions are there to: $x_1 + 2x_2 + x_3 = 10$? I am able to do this when it is simply $x_1 + x_2 + x_3 = 10$ but by multiplying $x_2$ by 2 has confused me.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Did you mean integer solutions (there are infinitely many) or perhaps nonnegative integer solutions?
    $endgroup$
    – hardmath
    Dec 2 '18 at 16:09










  • $begingroup$
    I assume you mean either positive or non-negative integers? Either way, given how small the values are, easiest is probably to run through the possible values of $x_2$ and work case by case.
    $endgroup$
    – lulu
    Dec 2 '18 at 16:09










  • $begingroup$
    I meant non negative integers sorry
    $endgroup$
    – Noobcoder
    Dec 2 '18 at 16:24










  • $begingroup$
    @lulu I understand we can go case by case, but I would like to learn how to do it using combinations and permutations as it will help me in other future problems where I wouldn't be able to go case by case.
    $endgroup$
    – Noobcoder
    Dec 2 '18 at 16:41








  • 1




    $begingroup$
    Problems with this sort of constraint can be very hard to count for large collections. In this case, with only three variables, it is easy since, for any fixed $x_2$ the possible $(x_1,x_3)$ are determined by $x_1$, say. I don't think there is any sort of one-size-fits-all approach to all possible linear constraints, in general.
    $endgroup$
    – lulu
    Dec 2 '18 at 17:04














2












2








2





$begingroup$


How many nonnegative integer solutions are there to: $x_1 + 2x_2 + x_3 = 10$? I am able to do this when it is simply $x_1 + x_2 + x_3 = 10$ but by multiplying $x_2$ by 2 has confused me.










share|cite|improve this question











$endgroup$




How many nonnegative integer solutions are there to: $x_1 + 2x_2 + x_3 = 10$? I am able to do this when it is simply $x_1 + x_2 + x_3 = 10$ but by multiplying $x_2$ by 2 has confused me.







combinatorics






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 3 '18 at 11:38









N. F. Taussig

44.3k93357




44.3k93357










asked Dec 2 '18 at 16:08









NoobcoderNoobcoder

274




274








  • 1




    $begingroup$
    Did you mean integer solutions (there are infinitely many) or perhaps nonnegative integer solutions?
    $endgroup$
    – hardmath
    Dec 2 '18 at 16:09










  • $begingroup$
    I assume you mean either positive or non-negative integers? Either way, given how small the values are, easiest is probably to run through the possible values of $x_2$ and work case by case.
    $endgroup$
    – lulu
    Dec 2 '18 at 16:09










  • $begingroup$
    I meant non negative integers sorry
    $endgroup$
    – Noobcoder
    Dec 2 '18 at 16:24










  • $begingroup$
    @lulu I understand we can go case by case, but I would like to learn how to do it using combinations and permutations as it will help me in other future problems where I wouldn't be able to go case by case.
    $endgroup$
    – Noobcoder
    Dec 2 '18 at 16:41








  • 1




    $begingroup$
    Problems with this sort of constraint can be very hard to count for large collections. In this case, with only three variables, it is easy since, for any fixed $x_2$ the possible $(x_1,x_3)$ are determined by $x_1$, say. I don't think there is any sort of one-size-fits-all approach to all possible linear constraints, in general.
    $endgroup$
    – lulu
    Dec 2 '18 at 17:04














  • 1




    $begingroup$
    Did you mean integer solutions (there are infinitely many) or perhaps nonnegative integer solutions?
    $endgroup$
    – hardmath
    Dec 2 '18 at 16:09










  • $begingroup$
    I assume you mean either positive or non-negative integers? Either way, given how small the values are, easiest is probably to run through the possible values of $x_2$ and work case by case.
    $endgroup$
    – lulu
    Dec 2 '18 at 16:09










  • $begingroup$
    I meant non negative integers sorry
    $endgroup$
    – Noobcoder
    Dec 2 '18 at 16:24










  • $begingroup$
    @lulu I understand we can go case by case, but I would like to learn how to do it using combinations and permutations as it will help me in other future problems where I wouldn't be able to go case by case.
    $endgroup$
    – Noobcoder
    Dec 2 '18 at 16:41








  • 1




    $begingroup$
    Problems with this sort of constraint can be very hard to count for large collections. In this case, with only three variables, it is easy since, for any fixed $x_2$ the possible $(x_1,x_3)$ are determined by $x_1$, say. I don't think there is any sort of one-size-fits-all approach to all possible linear constraints, in general.
    $endgroup$
    – lulu
    Dec 2 '18 at 17:04








1




1




$begingroup$
Did you mean integer solutions (there are infinitely many) or perhaps nonnegative integer solutions?
$endgroup$
– hardmath
Dec 2 '18 at 16:09




$begingroup$
Did you mean integer solutions (there are infinitely many) or perhaps nonnegative integer solutions?
$endgroup$
– hardmath
Dec 2 '18 at 16:09












$begingroup$
I assume you mean either positive or non-negative integers? Either way, given how small the values are, easiest is probably to run through the possible values of $x_2$ and work case by case.
$endgroup$
– lulu
Dec 2 '18 at 16:09




$begingroup$
I assume you mean either positive or non-negative integers? Either way, given how small the values are, easiest is probably to run through the possible values of $x_2$ and work case by case.
$endgroup$
– lulu
Dec 2 '18 at 16:09












$begingroup$
I meant non negative integers sorry
$endgroup$
– Noobcoder
Dec 2 '18 at 16:24




$begingroup$
I meant non negative integers sorry
$endgroup$
– Noobcoder
Dec 2 '18 at 16:24












$begingroup$
@lulu I understand we can go case by case, but I would like to learn how to do it using combinations and permutations as it will help me in other future problems where I wouldn't be able to go case by case.
$endgroup$
– Noobcoder
Dec 2 '18 at 16:41






$begingroup$
@lulu I understand we can go case by case, but I would like to learn how to do it using combinations and permutations as it will help me in other future problems where I wouldn't be able to go case by case.
$endgroup$
– Noobcoder
Dec 2 '18 at 16:41






1




1




$begingroup$
Problems with this sort of constraint can be very hard to count for large collections. In this case, with only three variables, it is easy since, for any fixed $x_2$ the possible $(x_1,x_3)$ are determined by $x_1$, say. I don't think there is any sort of one-size-fits-all approach to all possible linear constraints, in general.
$endgroup$
– lulu
Dec 2 '18 at 17:04




$begingroup$
Problems with this sort of constraint can be very hard to count for large collections. In this case, with only three variables, it is easy since, for any fixed $x_2$ the possible $(x_1,x_3)$ are determined by $x_1$, say. I don't think there is any sort of one-size-fits-all approach to all possible linear constraints, in general.
$endgroup$
– lulu
Dec 2 '18 at 17:04










3 Answers
3






active

oldest

votes


















2












$begingroup$

Like mentioned in the comments, this sort of problems must be solved pretty much case by case, but let's try to solve at least a little bit more general problem than the particular one asked, namely how many non-negative integer solutions does the equation



$$x_1 + tx_2 + x_3 = n$$



have, where $t, ninmathbb{N}$.



This can be done by letting $x_1$ run through $1, 2, dots, n$ and checking how many values the variable $x_2$ can take, so that $x_1+tx_2 leq n$. The third variable $x_3$ will then always be forced and the solution will work (this happens because the coefficient of $x_3$ is $1$, otherwise $n-x_1-tx_2$ would need to be a multiple of the coefficient of $x_3$ to get an integer solution).



Ok, so if $x_1 = j$, for $n-j-tx_2$ to remain nonnegative, we must have



$$x_2 leq frac{n-j}{t}$$



and $x_2$ can take the values $0, 1, dots, lfloor frac{n-j}{t} rfloor$. Therefore the number of solutions is



$$sum_{j=0}^n left( 1 + leftlfloor frac{n-j}{t} rightrfloor right)
= sum_{j=0}^n left( 1 + leftlfloor frac{j}{t} rightrfloor right)
$$

$$
=n+1 + sum_{j=0}^n leftlfloor frac{j}{t} rightrfloor
$$



(Above we just flipped the sum, i.e change of index $jto n-j$ for a nicer looking formula).



For the particular case $t=2$, we can simplify this by considering cases $n$ even and $n$ odd, splitting the sum to even and odd parts and using the fact that $sum_{k=0}^r k= frac{r(r+1)}{2}$ to



$$n+1 + left lfloor frac{n^2}{4} right rfloor$$



and for $n=10$ we get $36$ solutions.






share|cite|improve this answer











$endgroup$





















    0












    $begingroup$

    $x_2$ may be $0...5$. $x_1$ may be $0.. ,10-2x_2$ and $x_3$ is fixed at $10-2x_2 - x_1$



    So there are



    $sumlimits_{x_2=0}^5 sumlimits_{x_1=0}^{10-2x_2} 1$



    Which may be reindexed as



    $sumlimits_{x_2=0}^5 sumlimits_{x_1=10; -1}^{2x_2} 1=$



    $sumlimits_{x_2=0}^5 sumlimits_{x_1=0}^{2x_2} 1=$



    $sumlimits_{x_2=0}^5 (2x+1) = $



    $6^2 = 36$






    share|cite|improve this answer









    $endgroup$





















      0












      $begingroup$

      Perhaps the hope for any general methods was too hastily discarded. We can use generating functions.



      If $a_n$ denotes the number of solutions to



      $$c_1x_1 + c_2x_2+dots + c_kx_k = n$$
      $$x_j geq 0$$



      Then the generating function $A(z) = sum_{n=0}^{infty} a_nz^n$ is given by



      $$A(z) = frac{1}{(1-z^{c_1})(1-z^{c_2})dots(1-z^{c_k})}$$



      This comes from the fact that compositions of $n$ into $k$ parts corresponds to a integer-sequence of length $k$. Now, you can use a size-function $xmapsto c_jx$ for each class of integers $cal{I}_j$ in the product $cal{I}_1 times cal{I}_2 dots times cal{I}_k$, so you have the correct equation. The generating function of the class $cal{I}_j$ is $frac{1}{1-z^{c_j}}$ because ${cal{I}}_j = text{SEQ}({ Z })$ and the element $Z$ has size $c_j$.



      I don't know if this actually helps, maybe you can do partial fraction expansion of $A(z)$.



      By the way, notice how in the case when all $c_j=1$ this amounts to the usual compositions:



      $$A(z) = left( frac{1}{1-z} right)^k = (1-z)^{-k} = sum_{j=0}^infty {{-k}choose{j}} (-z)^{j}$$



      so $a_j = {{-k}choose{j}} (-1)^{j} = {{k+j-1}choose{k-1}}$.






      share|cite|improve this answer









      $endgroup$













      • $begingroup$
        I realized this when reading 1.17 (on page 46) of algo.inria.fr/flajolet/Publications/book.pdf There inequality constraints between the variables are considered but similarly we can adjust the coefficients in when considering how the combinatorial class in question is constructed.
        $endgroup$
        – ploosu2
        Dec 10 '18 at 13:55













      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%2f3022817%2fhow-many-integer-solutions-are-there-to-this-equation%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2












      $begingroup$

      Like mentioned in the comments, this sort of problems must be solved pretty much case by case, but let's try to solve at least a little bit more general problem than the particular one asked, namely how many non-negative integer solutions does the equation



      $$x_1 + tx_2 + x_3 = n$$



      have, where $t, ninmathbb{N}$.



      This can be done by letting $x_1$ run through $1, 2, dots, n$ and checking how many values the variable $x_2$ can take, so that $x_1+tx_2 leq n$. The third variable $x_3$ will then always be forced and the solution will work (this happens because the coefficient of $x_3$ is $1$, otherwise $n-x_1-tx_2$ would need to be a multiple of the coefficient of $x_3$ to get an integer solution).



      Ok, so if $x_1 = j$, for $n-j-tx_2$ to remain nonnegative, we must have



      $$x_2 leq frac{n-j}{t}$$



      and $x_2$ can take the values $0, 1, dots, lfloor frac{n-j}{t} rfloor$. Therefore the number of solutions is



      $$sum_{j=0}^n left( 1 + leftlfloor frac{n-j}{t} rightrfloor right)
      = sum_{j=0}^n left( 1 + leftlfloor frac{j}{t} rightrfloor right)
      $$

      $$
      =n+1 + sum_{j=0}^n leftlfloor frac{j}{t} rightrfloor
      $$



      (Above we just flipped the sum, i.e change of index $jto n-j$ for a nicer looking formula).



      For the particular case $t=2$, we can simplify this by considering cases $n$ even and $n$ odd, splitting the sum to even and odd parts and using the fact that $sum_{k=0}^r k= frac{r(r+1)}{2}$ to



      $$n+1 + left lfloor frac{n^2}{4} right rfloor$$



      and for $n=10$ we get $36$ solutions.






      share|cite|improve this answer











      $endgroup$


















        2












        $begingroup$

        Like mentioned in the comments, this sort of problems must be solved pretty much case by case, but let's try to solve at least a little bit more general problem than the particular one asked, namely how many non-negative integer solutions does the equation



        $$x_1 + tx_2 + x_3 = n$$



        have, where $t, ninmathbb{N}$.



        This can be done by letting $x_1$ run through $1, 2, dots, n$ and checking how many values the variable $x_2$ can take, so that $x_1+tx_2 leq n$. The third variable $x_3$ will then always be forced and the solution will work (this happens because the coefficient of $x_3$ is $1$, otherwise $n-x_1-tx_2$ would need to be a multiple of the coefficient of $x_3$ to get an integer solution).



        Ok, so if $x_1 = j$, for $n-j-tx_2$ to remain nonnegative, we must have



        $$x_2 leq frac{n-j}{t}$$



        and $x_2$ can take the values $0, 1, dots, lfloor frac{n-j}{t} rfloor$. Therefore the number of solutions is



        $$sum_{j=0}^n left( 1 + leftlfloor frac{n-j}{t} rightrfloor right)
        = sum_{j=0}^n left( 1 + leftlfloor frac{j}{t} rightrfloor right)
        $$

        $$
        =n+1 + sum_{j=0}^n leftlfloor frac{j}{t} rightrfloor
        $$



        (Above we just flipped the sum, i.e change of index $jto n-j$ for a nicer looking formula).



        For the particular case $t=2$, we can simplify this by considering cases $n$ even and $n$ odd, splitting the sum to even and odd parts and using the fact that $sum_{k=0}^r k= frac{r(r+1)}{2}$ to



        $$n+1 + left lfloor frac{n^2}{4} right rfloor$$



        and for $n=10$ we get $36$ solutions.






        share|cite|improve this answer











        $endgroup$
















          2












          2








          2





          $begingroup$

          Like mentioned in the comments, this sort of problems must be solved pretty much case by case, but let's try to solve at least a little bit more general problem than the particular one asked, namely how many non-negative integer solutions does the equation



          $$x_1 + tx_2 + x_3 = n$$



          have, where $t, ninmathbb{N}$.



          This can be done by letting $x_1$ run through $1, 2, dots, n$ and checking how many values the variable $x_2$ can take, so that $x_1+tx_2 leq n$. The third variable $x_3$ will then always be forced and the solution will work (this happens because the coefficient of $x_3$ is $1$, otherwise $n-x_1-tx_2$ would need to be a multiple of the coefficient of $x_3$ to get an integer solution).



          Ok, so if $x_1 = j$, for $n-j-tx_2$ to remain nonnegative, we must have



          $$x_2 leq frac{n-j}{t}$$



          and $x_2$ can take the values $0, 1, dots, lfloor frac{n-j}{t} rfloor$. Therefore the number of solutions is



          $$sum_{j=0}^n left( 1 + leftlfloor frac{n-j}{t} rightrfloor right)
          = sum_{j=0}^n left( 1 + leftlfloor frac{j}{t} rightrfloor right)
          $$

          $$
          =n+1 + sum_{j=0}^n leftlfloor frac{j}{t} rightrfloor
          $$



          (Above we just flipped the sum, i.e change of index $jto n-j$ for a nicer looking formula).



          For the particular case $t=2$, we can simplify this by considering cases $n$ even and $n$ odd, splitting the sum to even and odd parts and using the fact that $sum_{k=0}^r k= frac{r(r+1)}{2}$ to



          $$n+1 + left lfloor frac{n^2}{4} right rfloor$$



          and for $n=10$ we get $36$ solutions.






          share|cite|improve this answer











          $endgroup$



          Like mentioned in the comments, this sort of problems must be solved pretty much case by case, but let's try to solve at least a little bit more general problem than the particular one asked, namely how many non-negative integer solutions does the equation



          $$x_1 + tx_2 + x_3 = n$$



          have, where $t, ninmathbb{N}$.



          This can be done by letting $x_1$ run through $1, 2, dots, n$ and checking how many values the variable $x_2$ can take, so that $x_1+tx_2 leq n$. The third variable $x_3$ will then always be forced and the solution will work (this happens because the coefficient of $x_3$ is $1$, otherwise $n-x_1-tx_2$ would need to be a multiple of the coefficient of $x_3$ to get an integer solution).



          Ok, so if $x_1 = j$, for $n-j-tx_2$ to remain nonnegative, we must have



          $$x_2 leq frac{n-j}{t}$$



          and $x_2$ can take the values $0, 1, dots, lfloor frac{n-j}{t} rfloor$. Therefore the number of solutions is



          $$sum_{j=0}^n left( 1 + leftlfloor frac{n-j}{t} rightrfloor right)
          = sum_{j=0}^n left( 1 + leftlfloor frac{j}{t} rightrfloor right)
          $$

          $$
          =n+1 + sum_{j=0}^n leftlfloor frac{j}{t} rightrfloor
          $$



          (Above we just flipped the sum, i.e change of index $jto n-j$ for a nicer looking formula).



          For the particular case $t=2$, we can simplify this by considering cases $n$ even and $n$ odd, splitting the sum to even and odd parts and using the fact that $sum_{k=0}^r k= frac{r(r+1)}{2}$ to



          $$n+1 + left lfloor frac{n^2}{4} right rfloor$$



          and for $n=10$ we get $36$ solutions.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Dec 3 '18 at 15:24

























          answered Dec 3 '18 at 15:17









          ploosu2ploosu2

          4,6451024




          4,6451024























              0












              $begingroup$

              $x_2$ may be $0...5$. $x_1$ may be $0.. ,10-2x_2$ and $x_3$ is fixed at $10-2x_2 - x_1$



              So there are



              $sumlimits_{x_2=0}^5 sumlimits_{x_1=0}^{10-2x_2} 1$



              Which may be reindexed as



              $sumlimits_{x_2=0}^5 sumlimits_{x_1=10; -1}^{2x_2} 1=$



              $sumlimits_{x_2=0}^5 sumlimits_{x_1=0}^{2x_2} 1=$



              $sumlimits_{x_2=0}^5 (2x+1) = $



              $6^2 = 36$






              share|cite|improve this answer









              $endgroup$


















                0












                $begingroup$

                $x_2$ may be $0...5$. $x_1$ may be $0.. ,10-2x_2$ and $x_3$ is fixed at $10-2x_2 - x_1$



                So there are



                $sumlimits_{x_2=0}^5 sumlimits_{x_1=0}^{10-2x_2} 1$



                Which may be reindexed as



                $sumlimits_{x_2=0}^5 sumlimits_{x_1=10; -1}^{2x_2} 1=$



                $sumlimits_{x_2=0}^5 sumlimits_{x_1=0}^{2x_2} 1=$



                $sumlimits_{x_2=0}^5 (2x+1) = $



                $6^2 = 36$






                share|cite|improve this answer









                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  $x_2$ may be $0...5$. $x_1$ may be $0.. ,10-2x_2$ and $x_3$ is fixed at $10-2x_2 - x_1$



                  So there are



                  $sumlimits_{x_2=0}^5 sumlimits_{x_1=0}^{10-2x_2} 1$



                  Which may be reindexed as



                  $sumlimits_{x_2=0}^5 sumlimits_{x_1=10; -1}^{2x_2} 1=$



                  $sumlimits_{x_2=0}^5 sumlimits_{x_1=0}^{2x_2} 1=$



                  $sumlimits_{x_2=0}^5 (2x+1) = $



                  $6^2 = 36$






                  share|cite|improve this answer









                  $endgroup$



                  $x_2$ may be $0...5$. $x_1$ may be $0.. ,10-2x_2$ and $x_3$ is fixed at $10-2x_2 - x_1$



                  So there are



                  $sumlimits_{x_2=0}^5 sumlimits_{x_1=0}^{10-2x_2} 1$



                  Which may be reindexed as



                  $sumlimits_{x_2=0}^5 sumlimits_{x_1=10; -1}^{2x_2} 1=$



                  $sumlimits_{x_2=0}^5 sumlimits_{x_1=0}^{2x_2} 1=$



                  $sumlimits_{x_2=0}^5 (2x+1) = $



                  $6^2 = 36$







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Dec 3 '18 at 16:04









                  fleabloodfleablood

                  71k22686




                  71k22686























                      0












                      $begingroup$

                      Perhaps the hope for any general methods was too hastily discarded. We can use generating functions.



                      If $a_n$ denotes the number of solutions to



                      $$c_1x_1 + c_2x_2+dots + c_kx_k = n$$
                      $$x_j geq 0$$



                      Then the generating function $A(z) = sum_{n=0}^{infty} a_nz^n$ is given by



                      $$A(z) = frac{1}{(1-z^{c_1})(1-z^{c_2})dots(1-z^{c_k})}$$



                      This comes from the fact that compositions of $n$ into $k$ parts corresponds to a integer-sequence of length $k$. Now, you can use a size-function $xmapsto c_jx$ for each class of integers $cal{I}_j$ in the product $cal{I}_1 times cal{I}_2 dots times cal{I}_k$, so you have the correct equation. The generating function of the class $cal{I}_j$ is $frac{1}{1-z^{c_j}}$ because ${cal{I}}_j = text{SEQ}({ Z })$ and the element $Z$ has size $c_j$.



                      I don't know if this actually helps, maybe you can do partial fraction expansion of $A(z)$.



                      By the way, notice how in the case when all $c_j=1$ this amounts to the usual compositions:



                      $$A(z) = left( frac{1}{1-z} right)^k = (1-z)^{-k} = sum_{j=0}^infty {{-k}choose{j}} (-z)^{j}$$



                      so $a_j = {{-k}choose{j}} (-1)^{j} = {{k+j-1}choose{k-1}}$.






                      share|cite|improve this answer









                      $endgroup$













                      • $begingroup$
                        I realized this when reading 1.17 (on page 46) of algo.inria.fr/flajolet/Publications/book.pdf There inequality constraints between the variables are considered but similarly we can adjust the coefficients in when considering how the combinatorial class in question is constructed.
                        $endgroup$
                        – ploosu2
                        Dec 10 '18 at 13:55


















                      0












                      $begingroup$

                      Perhaps the hope for any general methods was too hastily discarded. We can use generating functions.



                      If $a_n$ denotes the number of solutions to



                      $$c_1x_1 + c_2x_2+dots + c_kx_k = n$$
                      $$x_j geq 0$$



                      Then the generating function $A(z) = sum_{n=0}^{infty} a_nz^n$ is given by



                      $$A(z) = frac{1}{(1-z^{c_1})(1-z^{c_2})dots(1-z^{c_k})}$$



                      This comes from the fact that compositions of $n$ into $k$ parts corresponds to a integer-sequence of length $k$. Now, you can use a size-function $xmapsto c_jx$ for each class of integers $cal{I}_j$ in the product $cal{I}_1 times cal{I}_2 dots times cal{I}_k$, so you have the correct equation. The generating function of the class $cal{I}_j$ is $frac{1}{1-z^{c_j}}$ because ${cal{I}}_j = text{SEQ}({ Z })$ and the element $Z$ has size $c_j$.



                      I don't know if this actually helps, maybe you can do partial fraction expansion of $A(z)$.



                      By the way, notice how in the case when all $c_j=1$ this amounts to the usual compositions:



                      $$A(z) = left( frac{1}{1-z} right)^k = (1-z)^{-k} = sum_{j=0}^infty {{-k}choose{j}} (-z)^{j}$$



                      so $a_j = {{-k}choose{j}} (-1)^{j} = {{k+j-1}choose{k-1}}$.






                      share|cite|improve this answer









                      $endgroup$













                      • $begingroup$
                        I realized this when reading 1.17 (on page 46) of algo.inria.fr/flajolet/Publications/book.pdf There inequality constraints between the variables are considered but similarly we can adjust the coefficients in when considering how the combinatorial class in question is constructed.
                        $endgroup$
                        – ploosu2
                        Dec 10 '18 at 13:55
















                      0












                      0








                      0





                      $begingroup$

                      Perhaps the hope for any general methods was too hastily discarded. We can use generating functions.



                      If $a_n$ denotes the number of solutions to



                      $$c_1x_1 + c_2x_2+dots + c_kx_k = n$$
                      $$x_j geq 0$$



                      Then the generating function $A(z) = sum_{n=0}^{infty} a_nz^n$ is given by



                      $$A(z) = frac{1}{(1-z^{c_1})(1-z^{c_2})dots(1-z^{c_k})}$$



                      This comes from the fact that compositions of $n$ into $k$ parts corresponds to a integer-sequence of length $k$. Now, you can use a size-function $xmapsto c_jx$ for each class of integers $cal{I}_j$ in the product $cal{I}_1 times cal{I}_2 dots times cal{I}_k$, so you have the correct equation. The generating function of the class $cal{I}_j$ is $frac{1}{1-z^{c_j}}$ because ${cal{I}}_j = text{SEQ}({ Z })$ and the element $Z$ has size $c_j$.



                      I don't know if this actually helps, maybe you can do partial fraction expansion of $A(z)$.



                      By the way, notice how in the case when all $c_j=1$ this amounts to the usual compositions:



                      $$A(z) = left( frac{1}{1-z} right)^k = (1-z)^{-k} = sum_{j=0}^infty {{-k}choose{j}} (-z)^{j}$$



                      so $a_j = {{-k}choose{j}} (-1)^{j} = {{k+j-1}choose{k-1}}$.






                      share|cite|improve this answer









                      $endgroup$



                      Perhaps the hope for any general methods was too hastily discarded. We can use generating functions.



                      If $a_n$ denotes the number of solutions to



                      $$c_1x_1 + c_2x_2+dots + c_kx_k = n$$
                      $$x_j geq 0$$



                      Then the generating function $A(z) = sum_{n=0}^{infty} a_nz^n$ is given by



                      $$A(z) = frac{1}{(1-z^{c_1})(1-z^{c_2})dots(1-z^{c_k})}$$



                      This comes from the fact that compositions of $n$ into $k$ parts corresponds to a integer-sequence of length $k$. Now, you can use a size-function $xmapsto c_jx$ for each class of integers $cal{I}_j$ in the product $cal{I}_1 times cal{I}_2 dots times cal{I}_k$, so you have the correct equation. The generating function of the class $cal{I}_j$ is $frac{1}{1-z^{c_j}}$ because ${cal{I}}_j = text{SEQ}({ Z })$ and the element $Z$ has size $c_j$.



                      I don't know if this actually helps, maybe you can do partial fraction expansion of $A(z)$.



                      By the way, notice how in the case when all $c_j=1$ this amounts to the usual compositions:



                      $$A(z) = left( frac{1}{1-z} right)^k = (1-z)^{-k} = sum_{j=0}^infty {{-k}choose{j}} (-z)^{j}$$



                      so $a_j = {{-k}choose{j}} (-1)^{j} = {{k+j-1}choose{k-1}}$.







                      share|cite|improve this answer












                      share|cite|improve this answer



                      share|cite|improve this answer










                      answered Dec 10 '18 at 13:48









                      ploosu2ploosu2

                      4,6451024




                      4,6451024












                      • $begingroup$
                        I realized this when reading 1.17 (on page 46) of algo.inria.fr/flajolet/Publications/book.pdf There inequality constraints between the variables are considered but similarly we can adjust the coefficients in when considering how the combinatorial class in question is constructed.
                        $endgroup$
                        – ploosu2
                        Dec 10 '18 at 13:55




















                      • $begingroup$
                        I realized this when reading 1.17 (on page 46) of algo.inria.fr/flajolet/Publications/book.pdf There inequality constraints between the variables are considered but similarly we can adjust the coefficients in when considering how the combinatorial class in question is constructed.
                        $endgroup$
                        – ploosu2
                        Dec 10 '18 at 13:55


















                      $begingroup$
                      I realized this when reading 1.17 (on page 46) of algo.inria.fr/flajolet/Publications/book.pdf There inequality constraints between the variables are considered but similarly we can adjust the coefficients in when considering how the combinatorial class in question is constructed.
                      $endgroup$
                      – ploosu2
                      Dec 10 '18 at 13:55






                      $begingroup$
                      I realized this when reading 1.17 (on page 46) of algo.inria.fr/flajolet/Publications/book.pdf There inequality constraints between the variables are considered but similarly we can adjust the coefficients in when considering how the combinatorial class in question is constructed.
                      $endgroup$
                      – ploosu2
                      Dec 10 '18 at 13:55




















                      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%2f3022817%2fhow-many-integer-solutions-are-there-to-this-equation%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

                      How to change which sound is reproduced for terminal bell?

                      Can I use Tabulator js library in my java Spring + Thymeleaf project?

                      Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents