1

Q) There are $4$ types of coins 1 paisa, 5 paise, 10 paise, 25 paise. Using these coins we have to make 50 paisa, how many combinations can we make ?

I want to know whether this problem can be solved using generating function or not. Is the problem same as finding coefficient of $x^{50}$ in $[(x^0 + x^1 + x^2 + x^3 + x^4 + x^5 + ....)(x^0 + x^5 + x^{10} + x^{15} + x^{20} + ...)(x^0 + x^{10} + x^{20} + .. )(x^0 + x^{25} + x^{50} +....)]$
Please help.

ankit
  • 365
  • 2
  • 17
  • 1
    That is the correct approach. – N. F. Taussig Apr 02 '19 at 08:13
  • 1
    See https://math.stackexchange.com/questions/1342846/generating-functions-of-bills or https://math.stackexchange.com/questions/15521/making-change-for-a-dollar-and-other-number-partitioning-problems or any of several other similar questions. – Gerry Myerson Apr 02 '19 at 08:19

1 Answers1

3

Your work is correct, though I feel like explaining why might help to dispel any potential doubts on the matter (and help future, confused readers).


The number of solutions to the problem given is effectively the number of solutions to

$$x_1 + 5x_5 + 10x_{10} + 25x_{25} = 50$$

where $x_k$ are non-negative integers for all $k$, with no restrictions. This is not unlike the standard situation with finding the number of non-negative integer solutions to an equation

$$x_1 + x_2 + x_3 + ... + x_n = r$$

but the weird thing here is that we have coefficients for various $x_k$! This can be fixed though! Let's make some substitutions:

  • $y_1 = x_1$
  • $y_5 = 5x_5$
  • $y_{10} = 10x_{10}$
  • $y_{25} = 25x_{25}$

Then we seek the number of solutions to the equation, in non-negative integers for $y_k$,

$$y_1 + y_5 + y_{10} + y_{25} = 50$$

The substitutions mean that we have restrictions other than $0 \le y_k (\le 50$ if you choose to do finite sums in the generating function). Namely, since $x_k$ are also integers, this means that $y_5 = 5x_5$ must be a multiple of five, $y_{10} = 10x_{10}$ must be a multiple of $10$, and so on. This defines a set of restrictions for our new equation:

  • $0 \le y_k (\le 50)$
  • $y_1$ has no further restrictions
  • $y_5$ must be a multiple of five, i.e. $0,5,10,15,$ and so on, with a max of $50$ if you use finite sums
  • $y_{10}$ must be a multiple of ten, i.e. $0,10,20,...$, capping at $50$ if you opt for finite sums
  • $y_{25}$ must be a multiple of $25$, i.e. $0,25,50$, and higher if you want an infinite sum

With this reframing, we have now turned the original question into one about finding a generating function that corresponds to this situation, in which we find the number of non-negative solutions within the restrictions above.

Define your generating function in terms of polynomials, one per variable, where the exponents correspond to the allowed values for that variable. Your generating function is then the product of all the polynomials, and the number of solutions is the coefficient of $x^{50}$ in the resulting expansion.

You have done so in the OP correctly, luckily. :)

PrincessEev
  • 50,606