Maths Olympiad Prep

Library / Canadian Mathematical Olympiad /20 of 57

Canadian Mathematical Olympiad

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 k−1k-1 to the rest, plus the number of ways of distributing 22 to the particular child and k−2k-2 to the rest. Thus f(2006,k)=f(2005,k)+f(2005,k−1)+f(2005,k−2)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 k−2rk-2r candies from which at most one is given to each of n−rn-r children. Hence
f(n,k)=∑r=0⌊k/2⌋(nr)(n−rk−2r)=∑r=0∞(nr)(n−rk−2r) 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=01003∑r=0∞(2005r)(2005−rk−2r)=∑r=0∞(2005r)∑k=01003(2005−rk−2r) \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)=[(1−x3)2005(1−x)−2005](1−x1004)(1−x)−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}
=(1−x3)2005(1−x)−2006−(1−x3)2005(1−x)−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:
(1−x3)2005(1−x)−2006=∑i=02005(−1)i(2005i)x3i∑j=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=02005∑j=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+k−3i2005))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)(3008−3i2005)=∑i=1334(−1)i(3008−3i)!i!(2005−i)!(1003−3i)! \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 (3008−3i2005)=0\binom{3008-3i}{2005} = 0 when i≥335i \geq 335.)

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

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