0
$\begingroup$

Here is a linear equation $$a+b+c+d=12$$ where $a,b,c,d$ are restricted to be greater than zero and less than or equal to 6.

How many set of positive integer solutions are possible using partitions and permutations?

  • 0
    I assume you're talking about a [stars and bars problem](https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics)), but you're wording is a little unclear. By partition, I assume you just mean a way to separate the $1$s, and not talking about integer partitions. If that's the case, you should probably use generating functions.2017-02-28
  • 0
    I am total beginner in Partitions.But I want to solve this question using partitions,"Find the probability of getting a sum of 12 in 4 throws of an ordinary dice?" We need to solve a+b+c+d=12, so I need help regarding solutionn set for a,b,c,d.2017-02-28
  • 0
    I have no idea about generating function.How can I do it using stars and bars method?2017-02-28

2 Answers 2

1

Generating Function Approach $$ \begin{align} &\left[x^{12}\right]\left(x+x^2+x^3+x^4+x^5+x^6\right)^4\\ &=\left[x^{12}\right]\left(\frac{x-x^7}{1-x}\right)^4\\ &=\left[x^8\right]\left(\frac{1-x^6}{1-x}\right)^4\\ &=\left[x^8\right]\left(\sum_{k=0}^4\binom{4}{k}\left(-x^6\right)^k\sum_{j=0}^\infty\binom{-4}{j}(-x)^{j}\right)\\ &=\sum_{k=0}^1(-1)^k\binom{4}{k}\binom{-4}{8-6k}\\ &=\sum_{k=0}^1(-1)^k\binom{4}{k}\binom{11-6k}{3}\\ &=\binom{4}{0}\binom{11}{3}-\binom{4}{1}\binom{5}{3}\\[6pt] &=125 \end{align} $$


Stars and Bars Approach

Without the restriction of the minimum of $1$ and the maximum of $6$, Stars and Bars would give $\binom{15}{3}$ for $12$ stars and $3$ bars.

To get a minimum of $1$, we prefill all the partitions with $1$ leaving $8$ stars and $3$ bars which gives $\binom{11}{3}$.

Now, as mentioned in Kevin Long's answer, we can only account for the maximum of $6$ by subtracting the cases where some partitions have more than $6$. Only one partition can have more than $6$ if all have at least $1$, so there are $4$ choices of where to have more than $6$. For each of those choices, we prefill $7$ in that one and $1$ in each of the others, leaving $2$ stars and $3$ bars; that is, $\binom{5}{3}$. Thus, the number of good arrangements is $$ \binom{11}{3}-4\binom{5}{3}=125 $$

  • 0
    I dont understand this solution can you please help me using Stars and Bars method, if it is possible to solve through that way?2017-02-28
  • 0
    I thought I had submitted the stars and bars approach before I left for the day.. Now I have.2017-03-01
  • 0
    Without restrictions number of solutions we get is 23c3; Now if we put a restriction of a,b,c,d greater than 1, we have (a'+1)+(b'+1)+(c'+1)+(d'+1)=20,which gives a'+b'+c'+d'=19, so number solution sets are 21c3; My concern is what is the way to put restriction of less than or equal to 6 by the way I did for each a,b,c,d greater than 1? Will I get required answer but having this equation, (6-a')+1+(6-b')+1+(6-c')+1+(6-d')+1=20 ?2017-03-01
  • 0
    @SubhashChaganti: Without restrictions, $4$ numbers summing to $12$ can be done in $\binom{15}{3}$ ways. I don't see how you get $\binom{23}{3}$.2017-03-01
  • 0
    Sorry, I was taking other numbers,Now I have updated the comment.Without restrictions number of solutions we get is 11c3; Now if we put a restriction of a,b,c,d greater than 1, we have (a'+1)+(b'+1)+(c'+1)+(d'+1)=12,which gives a'+b'+c'+d'=8, so number of solution sets are 11c3; My concern is what is the way to put restriction of less than or equal to 6 by the way I did for each a,b,c,d greater than 1? Will I get required answer by having this equation, ((6-a')+1)+((6-b')+1)+((6-c')+1)+((6-d')+1)=12 ? Is this equation going to work ?2017-03-01
  • 0
    @SubhashChaganti: The last equation is $a'+b'+c'+d'=16$. I'm not sure how that relates to the original equation with restrictions. Read the part of my answer where it mentions prefilling one of the four numbers with $7$ and the others with $1$. This leaves $2$ to be distributed among the $4$ terms, which gives $\binom{5}{3}$ ways to write the sum with some term greater than $6$. That needs to be multiplied by $4$ to account for the choice of which number is greater than $6$.2017-03-01
  • 0
    Since we have added 1 for a,b,c,d so as to meet the criteria that a,b,c,d need to be greater than zero I just want to know if subtracting a,b,c,d from six meets the criteria that a,b,c,d should be less than six?2017-03-03
  • 0
    No. Please read the Stars and Bars approach I have written above or the one that Kevin Long wrote. Both describe how to handle the limitation on the size of each term.2017-03-03
  • 0
    Thanks, I finally understood the way it works.2017-03-06
0

I wrote up a proof using generating functions, but after your comment that you didn't know them, I realized that they were unnecessary. I didn't want to waste the writing, so I left it, but feel free to ignore it. The first two paragraphs use only basic combinatorics.

We know how to find compositions of $n$ into $k$ nonnegative parts- ${n+k-1\choose k-1}$. If we assume each part is positive, we can put $1$ in each part and get back to the same case. In other words, the number of compositions of $n$ into $k$ positive parts is equal to the number of compositions of $n-k$ into $k$ nonnegative parts. Here, compositions of $12$ into $4$ positive parts are the same as compositions of $8$ into $4$ nonnegative parts, since we just put $1$ in each part. This gives us ${11\choose 3}$ ways to get $12$ with $4$ positive parts.

However, a part also cannot be greater than $6$, so we want to remove these parts. The number of "bad" compositions can be found by putting $7$ into one of the parts and $1$ into the rest. In other words, we assume that a part is bad at the start. Then there are $2$ stars left and still $3$ bars, so there are ${5\choose 3}$ ways to add in the last $2$ stars. However, there are $4$ different ways to choose which part is the "bad" part, since it can be any of the $4$. Hence, there are $4{5\choose 3}$ bad compositions. Hence, the difference ${11\choose 3}-4{5\choose 3}$ is the number of good compositions. Note that I can only have one "bad" part, thanks to the nice choice of numbers in this problem. If I had $13$ stars, there could be $2$ bad parts, and I'd be double counting when I take them out.

Consider the function $f(x)=x+x^2+x^3+x^4+x^5+x^6=x(1+x+x^2+...x^5)=x\frac{1-x^6}{1-x}$. The coefficient of $x^n$ of this function is the number of ways each block in this composition can have value $n$. In other words, a part can be anywhere from $1$ to $6$, and in only one way, but nothing else. Then the coefficient of $x^{12}$ in $f^4(x)$ is the number of ways to get a composition of $12$, since this counts compositions into $4$ parts where each part is from $1$ to $6$.

  • 0
    Thanks a lot , your answer helped me.2017-03-06