Maths Olympiad Prep

Library / /17 of 22

Combinatorics Difficulty 7.0 National olympiad Prove it Croatia

Cryptogram of a positive integer nn is an nn-tuple a=(a1,a2,,an)a = (a_1, a_2, \dots, a_n) of non-negative integers such that
a1+2a2++nan=n. a_1 + 2a_2 + \dots + n a_n = n.
Let Kn\mathcal{K}_n be the set of all cryptograms of the number nn. For aKna \in \mathcal{K}_n let J(a)J(a) denote the number of occurrences of the number 1 in the cryptogram aa. Prove that
aKnJ(a)=aKn+1a2. \sum_{a \in \mathcal{K}_n} J(a) = \sum_{a \in \mathcal{K}_{n+1}} a_2.

Solution

Let kn=Knk_n = |\mathcal{K}_n|, jn=aKnJ(a)j_n = \sum_{a \in \mathcal{K}_n} J(a) and dn+1=aKn+1a2d_{n+1} = \sum_{a \in \mathcal{K}_{n+1}} a_2. We need to prove that jn=dn+1j_n = d_{n+1} for every positive integer nn. We prove the statement by complete mathematical induction.

It is clear that j1=1=d2j_1 = 1 = d_2 and j2=1=d3j_2 = 1 = d_3.

Let us assume that n2n \ge 2 is a positive integer such that ji=di+1j_i = d_{i+1} for all ini \le n.

First, we note that dn+2=kn+dnd_{n+2} = k_n + d_n. Indeed, for each cryptogram aa of n+2n+2 for which a2>0a_2 > 0, we decrease a2a_2 by 1 and obtain a cryptogram of nn. It follows that dn+2d_{n+2} is equal to the number of cryptograms of nn increased by dnd_n.

Let us also prove that jn+1=kn+dnj_{n+1} = k_n + d_n. By the induction assumption, we need to prove that jn+1=kn+jn1j_{n+1} = k_n + j_{n-1}.

We partition all cryptograms of n+1n + 1 into two disjoint subsets: set A consisting of cryptograms having the last non-zero element equal to 1, and set B consisting of cryptograms having the last non-zero element greater than 1.

Cryptograms in A are in bijection with the cryptograms of nn. Indeed, we can delete the last non-zero element of a cryptogram in A and add 1 to the element just in front of it. Conversely, for each cryptogram of nn, we decrease the last non-zero element and add 1 to the element right after it.

It remains to prove that the set B contains in total jn1j_{n-1} ones. Let aBa \in B be such that ai=1a_i = 1 for some i{1,2,,n}i \in \{1, 2, \dots, n\}. Let ai=0a_i = 0 and let us increase ai1a_{i-1} by 1. If i=1i = 1, let a1=0a_1 = 0. Furthermore, let >i\ell > i be the smallest index such that a>0a_\ell > 0, which exists because the last non-zero element is not 1. We decrease aa_\ell by 1 and increase a1a_{\ell-1} by 1. Note that we obtain a cryptogram of n1n-1 which has 1 at the index 1\ell-1. This shows that each one occurring in B corresponds bijectively to a one in the set of cryptograms of n1n-1.

Finally, jn+1=kn+jn1j_{n+1} = k_n + j_{n-1} and the proof is finished.

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 and solution reproduced as published; topic and difficulty added by this site.