Maths Olympiad Prep

Library / /21 of 61

Combinatorics Difficulty 6.2 National Olympiad Prove it Canada

Problem:
Let f(n,k)f(n, k) be the number of ways of distributing kk candies to nn children so that each child receives at most 2 candies. For example, if n=3n=3, then f(3,7)=0f(3,7)=0, f(3,6)=1f(3,6)=1 and f(3,4)=6f(3,4)=6.
Determine the value of
f(2006,1)+f(2006,4)+f(2006,7)++f(2006,1000)+f(2006,1003). f(2006,1)+f(2006,4)+f(2006,7)+\cdots+f(2006,1000)+f(2006,1003) .

Solutions — 2

Solution 1

Solution:
The number of ways of distributing kk candies to 20062006 children is equal to the number of ways of distributing 00 to a particular child and kk to the rest, plus the number of ways of distributing 11 to the particular child and k1k-1 to the rest, plus the number of ways of distributing 22 to the particular child and k2k-2 to the rest. Thus f(2006,k)=f(2005,k)+f(2005,k1)+f(2005,k2)f(2006, k) = f(2005, k) + f(2005, k-1) + f(2005, k-2), so that the required sum is
1+k=11003f(2005,k) 1 + \sum_{k=1}^{1003} f(2005, k)
In evaluating f(n,k)f(n, k), suppose that there are rr children who receive 22 candies; these rr children can be chosen in (nr)\binom{n}{r} ways. Then there are k2rk-2r candies from which at most one is given to each of nrn-r children. Hence
f(n,k)=r=0k/2(nr)(nrk2r)=r=0(nr)(nrk2r) f(n, k) = \sum_{r=0}^{\lfloor k/2 \rfloor} \binom{n}{r} \binom{n-r}{k-2r} = \sum_{r=0}^{\infty} \binom{n}{r} \binom{n-r}{k-2r}
with (xy)=0\binom{x}{y} = 0 when x<yx < y and when y<0y < 0. The answer is
k=01003r=0(2005r)(2005rk2r)=r=0(2005r)k=01003(2005rk2r) \sum_{k=0}^{1003} \sum_{r=0}^{\infty} \binom{2005}{r} \binom{2005-r}{k-2r} = \sum_{r=0}^{\infty} \binom{2005}{r} \sum_{k=0}^{1003} \binom{2005-r}{k-2r}

Solution 2

Solution:
The desired number is the sum of the coefficients of the terms of degree not exceeding 10031003 in the expansion of (1+x+x2)2005\left(1+x+x^{2}\right)^{2005}, which is equal to the coefficient of x1003x^{1003} in the expansion of
(1+x+x2)2005(1+x++x1003)=[(1x3)2005(1x)2005](1x1004)(1x)1 \left(1+x+x^{2}\right)^{2005}\left(1+x+\cdots+x^{1003}\right) = \left[\left(1-x^{3}\right)^{2005}(1-x)^{-2005}\right]\left(1-x^{1004}\right)(1-x)^{-1}
=(1x3)2005(1x)2006(1x3)2005(1x)2006x1004 = \left(1-x^{3}\right)^{2005}(1-x)^{-2006} - \left(1-x^{3}\right)^{2005}(1-x)^{-2006} x^{1004}
Since the degree of every term in the expansion of the second member on the right exceeds 10031003, we are looking for the coefficient of x1003x^{1003} in the expansion of the first member:
(1x3)2005(1x)2006=i=02005(1)i(2005i)x3ij=0(1)j(2006j)xj \left(1-x^{3}\right)^{2005}(1-x)^{-2006} = \sum_{i=0}^{2005} (-1)^i \binom{2005}{i} x^{3i} \sum_{j=0}^{\infty} (-1)^j \binom{-2006}{j} x^j
=i=02005j=0(1)i(2005i)(2005+jj)x3i+j = \sum_{i=0}^{2005} \sum_{j=0}^{\infty} (-1)^i \binom{2005}{i} \binom{2005+j}{j} x^{3i+j}
=k=0(i=12005(1)i(2005i)(2005+k3i2005))xk = \sum_{k=0}^{\infty} \left( \sum_{i=1}^{2005} (-1)^i \binom{2005}{i} \binom{2005+k-3i}{2005} \right) x^k
The desired number is
i=1334(1)i(2005i)(30083i2005)=i=1334(1)i(30083i)!i!(2005i)!(10033i)! \sum_{i=1}^{334} (-1)^i \binom{2005}{i} \binom{3008-3i}{2005} = \sum_{i=1}^{334} (-1)^i \frac{(3008-3i)!}{i!(2005-i)!(1003-3i)!}
(Note that (30083i2005)=0\binom{3008-3i}{2005} = 0 when i335i \geq 335.)

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.