Maths Olympiad Prep

Library / /7 of 8

Combinatorics Difficulty 6.7 National olympiad Prove it Ireland

Given k{0,1,2,3}k \in \{0, 1, 2, 3\} and a positive integer nn, let fk(n)f_k(n) be the number of sequences x1,,xnx_1, \dots, x_n, where xi{1,0,1}x_i \in \{-1, 0, 1\} for i=1,,ni = 1, \dots, n, and
x1++xnkmod4. x_1 + \cdots + x_n \equiv k \mod 4.

a. Prove that f1(n)=f3(n)f_1(n) = f_3(n) for all positive integers nn.

b. Prove that
f0(n)=3n+2+(1)n4 f_0(n) = \frac{3^n + 2 + (-1)^n}{4}
for all positive integers nn.

Solution

a. Let Fk(n)F_k(n) be the collection of sequences/vectors xx corresponding to fk(n)f_k(n). Suppose x=(x1,...,xn)F1(n)x = (x_1, ..., x_n) \in F_1(n). Then at least one of the entries xi0x_i \ne 0. For the first such nonzero value, change its sign and call the resulting sequence α(x)\alpha(x). Since xi1(mod4)\sum x_i \equiv 1 \pmod 4, we have α(x)3(mod4)\sum \alpha(x) \equiv 3 \pmod 4. The map α\alpha is also an involution. Thus
f1(n)=f3(n).(5) f_1(n) = f_3(n). \qquad (5)

b. Applying the same map α\alpha to the set F0(n)0ˉF_0(n) - \bar{0} (where 0ˉ\bar{0} is the sequence of all zero's) gives a bijection between F0(n)0ˉF_0(n) - \bar{0} and F2(n)F_2(n). Thus
f0(n)1=f2(n).(6) f_0(n) - 1 = f_2(n). \quad (6)
Since these sum residue classes partition all such sequences we have
f0(n)+f1(n)+f2(n)+f3(n)=3n.(7) f_0(n) + f_1(n) + f_2(n) + f_3(n) = 3^n. \quad (7)
One more equation is required. Let An=F0(n)F2(n)A_n = F_0(n) \cup F_2(n), the set of all sequences that have an even sum, and let Bn=F1(n)F3(n)B_n = F_1(n) \cup F_3(n), the set of all sequences that have an odd sum.
For a sequence x=(x1,,xn)x = (x_1, \dots, x_n), let β(x)\beta(x) be the sequence obtained by finding the first element of the sequence xx that is not 1, and changing it with the third entry (i.e. 10-1 \mapsto 0 or 010 \mapsto -1). The operation β(x)\beta(x) is well defined for x(1,,1)x \neq (1, \dots, 1). It also changes the parity of the sum.
Thus β:An1ˉBn1ˉ\beta: A_n - \bar{1} \mapsto B_n - \bar{1} is a bijection. The parity of nn tells us which of AnA_n and BnB_n the vector 1ˉ\bar{1} is in, hence
f0(n)+f2(n)=f1(n)+f3(n)+(1)n.(8) f_0(n) + f_2(n) = f_1(n) + f_3(n) + (-1)^n. \quad (8)
Combining (1), (2), (3) and (4) give
f0(n)=3n+2+(1)n4.(9) f_0(n) = \frac{3^n + 2 + (-1)^n}{4}. \quad (9)

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.