Finding generating function or closed formula for star and bar problem where order of distribution does not matters

630 Views Asked by At

I was thinking of star and bar problem with order of distribution does not matters. But before that let me state the star and bar problem where distribution order matters:

Problem 1. Star and bar problem where distribution order matters
Number of ways to distribute $n$ indistinguishable balls to $r$ boys is $\binom{n+r-1}{r-1}$. This is same as the coefficient of $x^n$ in $(1+x+x^2+...)^r=\frac{1}{(1-x)^r}=\sum_{k=0}^\infty \binom{k+r-1}{r-1}x^k$. That is, we have to put $k=n$ in $\binom{k+r-1}{r-1}$ to get $\binom{n+r-1}{r-1}$.

Now I came to know that it is not possible to have closed formula for the same where distribution order does not matters.

But then I came across following problem:

Problem 2. Use generating functions to determine the number of ways to insert tokens worth \$1, \$2, and \$5 into a vending machine to pay for an item that costs r dollars in both the cases when (a) the order in which the tokens are inserted does not matter and (b) when the order does matter.

Solution 2(a): The generating function given for case (a) that is when distribution order does not matter was: $(1+x+x^2+x^3+· · · )(1+x^2+x^4+x^6+· · · )(1+x^5+x^{10}+x^{15}+· · · )$

Q1. I am surprised to see that this looks same as $(1+x+x^2+...)^r$ in problem 1, but it says distribution order does not matters, while in problem 1 distribution order matters. While the solutions individually makes sense to me, I am not able to cleanly understand why orders are differently considered in them. Is it because in Problem 1, all $r$ series are same and hence they lead to consideration of distribution order, while in Problem 2, series are different and hence they lead to non-consideration of order?

Solution 2(b): The generating function given for Problem 2(b), that is when distribution order matters was: $1+(x+x^2+x^5 )+(x+x^2+x^5 )^2+⋯=\frac{1}{1-(x+x^2+x^5)} =\frac{1}{1-x-x^2-x^5} $

Now I understand how this come up, but I am guessing

Q2. What could be problem-1 counterpart for this? I feel there is none since problem 1 itself talks about considering order. Am I right?

Q3. The difference between Problem 1 and Problem 2 is that in problem 1, all series are same and have 1 as a difference between successive powers of $x$, whereas in problem 2, all series are different and have different differences between their successive powers of $x$. Can we find closed formula or generating function for ("without considering distribution order")-counterpart for problem 1 using the logic behind generating functions of both "with and without considering distribution order" versions of problem 2?

Addition

Q4. I feel that we cannot have generating function for problem 1 with distribution order ignored. Whereas we have generating function for problem 2(a) (which consider distribution order), but here we dont have closed formula. Can we have this as a final conclusion? Or anymore insight can be drawn?