Maths Olympiad Prep

Track / Stage 5 / 316 of 400 #1396 of 2444

Problem 1396

AIME late
Combinatorics Difficulty 5.7 Prove it Harvard-MIT Mathematics Tournament · United States

For a string of PP 's and QQ 's, the value is defined to be the product of the positions of the PP 's. For example, the string PPQPQQP P Q P Q Q has value 124=81 \cdot 2 \cdot 4=8.

Also, a string is called antipalindromic if writing it backwards, then turning all the PP 's into QQ 's and vice versa, produces the original string. For example, PPQPQQP P Q P Q Q is antipalindromic.

There are 210022^{1002} antipalindromic strings of length 20042004. Find the sum of the reciprocals of their values.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

Solution:
20051002/20042005^{1002} / 2004 !
Consider the product
(11+12004)(12+12003)(13+12002)(11002+11003). \left(\frac{1}{1}+\frac{1}{2004}\right)\left(\frac{1}{2}+\frac{1}{2003}\right)\left(\frac{1}{3}+\frac{1}{2002}\right) \cdots\left(\frac{1}{1002}+\frac{1}{1003}\right) .
This product expands to 210022^{1002} terms, and each term gives the reciprocal of the value of a corresponding antipalindromic string of PP 's and QQ 's as follows: if we choose the term 1/n1 / n for the nnth factor, then our string has a PP in position nn and QQ in position 2005n2005-n; if we choose the term 1/(2005n)1 /(2005-n), then we get a QQ in position nn and PP in position 2005n2005-n. Conversely, each antipalindromic string has its value represented by exactly one of our 210022^{1002} terms. So the value of the product is the number we are looking for. But when we simplify this product, the nnth factor becomes 1/n+1/(2005n)=2005/n(2005n)1 / n+1 /(2005-n)=2005 / n(2005-n). Multiplying these together, we get 1002 factors of 2005 in the numerator and each integer from 1 to 2004 exactly once in the denominator, for a total of 200510022005^{1002} / 2004!2004!.

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