-1

No. of ways of selecting $4$ different numbers from the set $A=\{1, 2, 3, 4, \ldots, 18\}$ whose sum is $31$.

I know combinations with multinomial theorem but here how to eliminate the ways when $2$ or $3$ numbers are repeated?

Rócherz
  • 3,976
  • In first paragraph the four numbers are said to be different. But in second paragraph it asks about when 2 or 3 can be repeated. That seems at odds with first paragraph. Also I don't see how multinomial theorem can handle cases where the sum of numbers has to be a specific number like 31. Maybe some modification of stars and bars, but I don't see it now. – coffeemath Mar 16 '19 at 06:52
  • 1
    I was taught to solve problems like these using generating functions; that might be worth looking into as an alternate method. – PrincessEev Mar 16 '19 at 07:11
  • Do you consider $4+8+9+10$ to be a different sum than $10+9+8+4$? – awkward Mar 16 '19 at 13:10
  • No 10+9+8+4 is same as 4+8+9+10 – RUTAN GALENO Mar 16 '19 at 13:13
  • In that case, what you are asking for is the number of partitions of 31 into 4 distinct parts with each part less than or equal to 18. There is a considerable amount of literature on partitions, but overall it is a difficult subject. Wikipedia article: https://en.wikipedia.org/wiki/Partition_(number_theory) – awkward Mar 16 '19 at 14:49
  • I tried by a different method using multinomial theorem and I got the answer as 97. – RUTAN GALENO Mar 16 '19 at 14:54
  • Can I share my answer? – RUTAN GALENO Mar 16 '19 at 14:54

1 Answers1

1

$$x_1+x_2+x_3+x_4=31 \quad \& \quad x_1, x_2, x_3, x_4 \in A$$ $\implies$ No. of ways $=$ coefficient of $t^{31}$ in $(t+t^2+t^3+\ldots+t^{18})^4$ which equals $\binom {30} 3 - 4\binom {12} 9$ (By Multinomial Theorem).

Here, $\binom {30} 3 - 4\binom {12} 9$ contains selected no.s that can be repeated and are also permuted. I want only selected non repeated for $x_1+x_2+x_3+x_4=31$.

$1$) When any $2$ numbers are repeated (includes the case when $3$ are repeated)

Say, $2x+y+z=31$

$Y+z$ can be $\{29, 27, 25, 23, \ldots, 3\}$. Then, (coefficient of $t^{29}$ +coefficient of $t^{27}$ +coefficient of $t^{25}$ +$\ldots$ +coefficient of $t^3$) in $(t+t^2+t^3+\ldots+t^{18})^2 = 150$ (By Multinomial theorem). But in those $150$, $y$ and $z$ will swap, so $150/2=75$.

$2$) $2x+2y=31$ is not possible

$3$) When any $3$ numbers are repeated, say, $3x+y=31$

$Y=\{1,4,7,10,13,16\}$, i.e., $6$. So $75-6=69$ have only $2$no.s repeated & $6$ have $3$ no.s repeated.

$4$) Clearly, $4x=31$ is not possible.

Now, equating permutations:

$\implies \binom {30} 3 -4\binom {12} 9 = 4!$ (No. of selections with distinct no.s non repeating, i.e., the required answer) $+(69 \binom42 (2!))$ [selecting $2$no.s from $x_1, x_2, x_3, x_4$ when only $2$ no.s are repeated and $2!$ when remaining $2$ are interchanged] $+(6 \binom41 )$ [when any $3$ are repeating]

$\implies \binom {30} 3 -4\binom {12} 9 = 4!$ (Required Answer) $+(69 \binom42 (2!))+24$

Therefore: $\implies$ Required answer ${}= 97$.

Explanation to the very first step:

Co-efficient of t^31 in (t+t^2+t^3+..+t^18)^4 i,e t^4((t^18)-1)^4/(t-1))^4 = t^4((t^18)-1)^4(1-t)^(-4) (By the sum of gp) t^4(t^72-4t^54+6t^36-4t^18+1)(1-t)^(-4)

Now, (1-t)^(-4)=1+(4C1)t+(5C2)t^2+(6C3)t^3+ ... (By negative index)

Therefore, Co-efficient of t^31 = Co-efficient of t^27 in (1-t)^(-4) - 4(Co-efficient of t^9 in (1-t)^(-4)) = ((4+27-1)C(27)) - 4((4+9-1)C(9))= (30C3) - 4(12C9).

  • agreed that $3180$ is coefficient of $t^{31}.$ But the $75$ ways for $aa+a+b+c=31$ have to be multiplied by the $12$ ways to re-arrange $aabc,$ and also the $6$ ways for $a+a+a+b=31$ need to be multiplied by the $4$ ways to re-arrange $aaab.$ So I get $(3180-75\cdot 12-6 \cdot 4)/24=94,$ rather than your $97.$ But I'll upvote your approach as it's good; surprising you got $97$ so close to $94.$ – coffeemath Mar 18 '19 at 00:27
  • How did you get $\binom{30}{3}-4\binom{12}{9}$ for the coefficient of $t^{31}$? [not doubting it's right, matches $3180$ gotten by CAS, just wondering how yours was set up.] – coffeemath Mar 22 '19 at 11:43
  • Still wondering about how you got the $t^{31}$ coefficient. – coffeemath Mar 24 '19 at 06:03
  • 1
    I have added the explanation in the edit – RUTAN GALENO Mar 24 '19 at 06:24