Maths Olympiad Prep

Library / /43 of 86

Combinatorics Difficulty 6.7 National Olympiad Prove it United States

Problem:

Consider the n×nn \times n "multiplication table" below. The numbers in the first column multiplied by the numbers in the first row give the remaining numbers in the table.

123\cdotsnn
246\cdots2n2 n
369\cdots3n3 n
\vdots\vdots\vdots\ddots\vdots
nn2n2 n3n3 n\cdotsn2n^{2}

We create a path from the upper-left square to the lower-right square by always moving one cell either to the right or down. For example, in the case n=5n=5, here is one such possible path, with all the numbers along the path circled:
12345
246810
3691215
48121620
510152025

If we add up the circled numbers in the example above (including the start and end squares), we get 93. Considering all such possible paths on the n×nn \times n grid:

a. What is the smallest sum we can possibly get when we add up the numbers along such a path? Express your answer in terms of nn, and prove that it is correct.

b. What is the largest sum we can possibly get when we add up the numbers along such a path? Express your answer in terms of nn, and prove that it is correct.

Solution

Solution:

The minimum is achieved by staying on the perimeter of the grid, and the maximum by staying as close to the main diagonal as possible. To see why this is true, tilt the grid 45 degrees:

Figure 1

Now every path must include exactly one number from each row. The nthn^{\text{th}} row consists of the numbers k(n+1k)k(n+1-k) for k=1,2,,nk=1,2, \ldots, n. As a quadratic function of kk, this expression is greatest when k=(n+1)/2k=(n+1)/2, and gets smaller as kk gets farther from (n+1)/2(n+1)/2 in either direction. Thus the smallest number in row nn of our tilted grid is the number on either end of the row, which is nn, and the largest number in row nn is the number closest to the center, which is n+12n+12\left\lfloor\frac{n+1}{2}\right\rfloor \cdot\left\lceil\frac{n+1}{2}\right\rceil. By staying on the perimeter of the grid, we may select the smallest entry from every row, and so accumulate the smallest possible total. By staying in the middle, we may select the largest entry from every row and accumulate the largest possible total.

All that remains is to calculate these totals in terms of nn.

The minimum total is
(1+2+3++(n1))+(n+2n+3n++n2)=(1+2++(n1))+n(1+2++n)=n(n1)2+nn(n+1)2=n(n2+2n1)2. \begin{aligned} (1+2+3+\cdots+(n-1))+(n+2n+3n+\cdots+n^{2}) &= (1+2+\cdots+(n-1))+n(1+2+\cdots+n) \\ &= \frac{n(n-1)}{2} + n \cdot \frac{n(n+1)}{2} \\ &= \frac{n\left(n^{2}+2n-1\right)}{2}. \end{aligned}

The maximum total is
12+12+22+23++(n1)n+n2=(12+22++n2)+(12+23++(n1)n)=n(n+1)(2n+1)6+2[(22)+(32)++(n2)]=n(n+1)(2n+1)6+2(n+13)=n(n+1)(2n+1)6+2(n1)n(n+1)6=n(n+1)(4n1)6 \begin{aligned} 1^{2} + 1 \cdot 2 + 2^{2} + 2 \cdot 3 + \cdots + (n-1) \cdot n + n^{2} &= \left(1^{2} + 2^{2} + \cdots + n^{2}\right) + (1 \cdot 2 + 2 \cdot 3 + \cdots + (n-1) \cdot n) \\ &= \frac{n(n+1)(2n+1)}{6} + 2 \cdot \left[\binom{2}{2} + \binom{3}{2} + \cdots + \binom{n}{2}\right] \\ &= \frac{n(n+1)(2n+1)}{6} + 2\binom{n+1}{3} \\ &= \frac{n(n+1)(2n+1)}{6} + \frac{2(n-1)n(n+1)}{6} \\ &= \frac{n(n+1)(4n-1)}{6} \end{aligned}
and we are 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 reproduced verbatim; metadata (topic, difficulty) added by this project.