Maths Olympiad Prep

Library / /50 of 61

Combinatorics Difficulty 7.4 National Olympiad, round 2 Prove it Canada

Let nn be a positive integer. For any positive integer jj and positive real number rr, define fj(r)f_j(r) and gj(r)g_j(r) by
fj(r)=min(jr,n)+min(jr,n),andgj(r)=min(jr,n)+min(jr,n), f_j(r) = \min(jr, n) + \min\left(\frac{j}{r}, n\right), \quad \text{and} \quad g_j(r) = \min(\lceil jr \rceil, n) + \min\left(\left\lfloor \frac{j}{r} \right\rfloor, n\right),
where x\lceil x \rceil denotes the smallest integer greater than or equal to xx. Prove that
j=1nfj(r)n2+nj=1ngj(r) \sum_{j=1}^{n} f_j(r) \le n^2 + n \le \sum_{j=1}^{n} g_j(r)
for all positive real numbers rr.

Solution

Solution 1: We first prove the left hand side inequality. We begin by drawing an n×nn \times n board, with corners at (0,0)(0,0), (n,0)(n,0), (0,n)(0,n) and (n,n)(n,n) on the Cartesian plane.
Consider the line \ell with slope rr passing through (0,0)(0,0). For each j{1,,n}j \in \{1, \dots, n\}, consider the point (j,min(jr,n))(j, \min(jr, n)). Note that each such point either lies on \ell or the top edge of the board. In the jthj^{th} column from the left, draw the rectangle of height min(jr,n)\min(jr, n). Note that the sum of the nn rectangles is equal to the area of the board under the line \ell plus nn triangles (possibly with area 0) each with width at most 1 and whose sum of the heights is at most nn. Therefore, the sum of the areas of these nn triangles is at most n/2n/2. Therefore, j=1nmin(jr,n)\sum_{j=1}^n \min(jr, n) is at most the area of the square under \ell plus n/2n/2.
Consider the line with slope 1/r1/r. By symmetry about the line y=xy=x, the area of the square under the line with slope 1/r1/r is equal to the area of the square above the line \ell. Therefore, using the same reasoning as before, j=1nmin(j/r,n)\sum_{j=1}^n \min(j/r, n) is at most the area of the square above \ell plus n/2n/2.
Therefore, j=1nfj(r)=j=1n(min(jr,n)+min(jr,n))\sum_{j=1}^n f_j(r) = \sum_{j=1}^n (\min(jr, n) + \min(\frac{j}{r}, n)) is at most the area of the board plus nn, which is n2+nn^2+n. This proves the left hand side inequality.
To prove the right hand side inequality, we will use the following lemma:
Lemma: Consider the line \ell with slope ss passing through (0,0)(0,0). Then the number of squares on the board that contain an interior point below \ell is j=1nmin(js,n)\sum_{j=1}^n \min(\lceil js \rceil, n).
Proof of Lemma: For each j{1,,n}j \in \{1, \dots, n\}, we count the number of squares in the jthj^{th} column (from the left) that contain an interior point lying below the line \ell. The line x=jx=j intersect the line \ell at (j,js)(j, js). Hence, since each column contains nn squares total, the number of such squares is min(js,n)\min(\lfloor js \rfloor, n). Summing over all j{1,2,,n}j \in \{1, 2, \dots, n\} proves the lemma. End Proof of Lemma
By the lemma, the rightmost expression of the inequality is equal to the number of squares containing an interior point below the line with slope rr plus the number of squares containing an interior point below the line with slope 1/r1/r. By symmetry about the line y=xy = x, the latter number is equal to the number of squares containing an interior point above the line with slope rr. Therefore, the rightmost expression of the inequality is equal to the number of squares of the board plus the number of squares of which \ell passes through the interior. The former is equal to n2n^2. Hence, to prove the inequality, it suffices to show that every line passes through the interior of at least nn squares. Since \ell has positive slope, each \ell passes through either nn rows and/or nn columns. In either case, \ell passes through the interior of at least nn squares. Hence, the right inequality holds. \square

Solution 2: We first prove the left inequality. Define the function f(r)=j=1nfj(r)f(r) = \sum_{j=1}^{n} f_j(r). Note that f(r)=f(1/r)f(r) = f(1/r) for all r>0r > 0. Therefore, we may assume that r1r \ge 1.
Let m=n/rm = \lfloor n/r \rfloor, where x\lfloor x \rfloor denotes the largest integer less than or equal to xx. Then min(jr,n)=jr\min(jr, n) = jr for all j{1,,m}j \in \{1, \dots, m\} and min(jr,n)=n\min(jr, n) = n for all j{m+1,,n}j \in \{m+1, \dots, n\}. Note that since r1r \ge 1, min(j/r,n)n\min(j/r, n) \le n for all j{1,,n}j \in \{1, \dots, n\}. Therefore,
f(r)=j=1nfj(r)=(1+2++m)r+(nm)n+(1+2++n)1r=m(m+1)2r+n(n+1)21r+n(nm)(1) \begin{aligned} f(r) &= \sum_{j=1}^{n} f_j(r) = (1+2+\dots+m)r + (n-m)n + (1+2+\dots+n) \cdot \frac{1}{r} \\ &= \frac{m(m+1)}{2} \cdot r + \frac{n(n+1)}{2} \cdot \frac{1}{r} + n(n-m) \end{aligned} \quad (1)
Then by (2), note that f(r)n2+nf(r) \le n^2 + n if and only if
m(m+1)r2+n(n+1)2rn(m+1) \frac{m(m+1)r}{2} + \frac{n(n+1)}{2r} \le n(m+1)
if and only if
m(m+1)r2+n(n+1)2rn(m+1)(2) m(m+1)r^2 + n(n+1) \le 2rn(m+1) \quad (2)
Since m=n/rm = \lfloor n/r \rfloor, there exist a real number bb satisfying 0b<r0 \le b < r such that n=mr+bn = mr + b. Substituting this into (2) yields
m(m+1)r2+(mr+b)(mr+b+1)2r(mr+b)(m+1), m(m+1)r^2 + (mr+b)(mr+b+1) \le 2r(mr+b)(m+1),
2m2r2+mr2+(2mb+m)r+b2+b2m2r2+2mr2+2mbr+2br, 2m^2r^2 + mr^2 + (2mb + m)r + b^2 + b \leq 2m^2r^2 + 2mr^2 + 2mbr + 2br,
which simplifies to mr+b2+bmr2+2brb(b+12r)mr(r1)b((br)+(1r))mr(r1)mr + b^2 + b \leq mr^2 + 2br \Leftrightarrow b(b + 1 - 2r) \leq mr(r - 1) \Leftrightarrow b((b - r) + (1 - r)) \leq mr(r - 1). This is true since
b((br)+(1r))0mr(r1), b((b - r) + (1 - r)) \leq 0 \leq mr(r - 1),
which holds since r1r \geq 1 and b<rb < r. Therefore, the left inequality holds.

We now prove the right inequality. Define the function g(r)=j=1n=gj(r)g(r) = \sum_{j=1}^{n} = g_j(r). Note that g(r)=g(1/r)g(r) = g(1/r) for all r>0r > 0. Therefore, we may assume that r1r \geq 1. We will consider two cases; rnr \geq n and 1r<n1 \leq r < n.
If rnr \geq n, then min(jr,n)=n\min(\lceil jr \rceil, n) = n and min(j/r,n)=1\min(\lceil j/r \rceil, n) = 1 for all j{1,,n}j \in \{1, \dots, n\}. Hence, gj(r)=n+1g_j(r) = n + 1 for all j{1,,n}j \in \{1, \dots, n\}. Therefore, g(r)=n(n+1)=n2+ng(r) = n(n + 1) = n^2 + n, implying that the inequality is true.
Now we consider the case 1r<n1 \leq r < n. Let m=n/rm = \lfloor n/r \rfloor. Hence, jrnjr \leq n for all j{1,,m}j \in \{1, \dots, m\}, i.e. min(jr,n)=jr\min(\lceil jr \rceil, n) = \lceil jr \rceil and jrnjr \geq n for all j{m+1,,n}j \in \{m + 1, \dots, n\}, i.e. min(jr,n)=n\min(\lceil jr \rceil, n) = n. Therefore,
j=1nmin(jr,n)=j=1mjr+(nm)n.(3) \sum_{j=1}^{n} \min(\lceil jr \rceil, n) = \sum_{j=1}^{m} \lceil jr \rceil + (n - m)n. \quad (3)
We will now consider the second sum j=1nmin{j/r,n}\sum_{j=1}^{n} \min\{\lceil j/r \rceil, n\}.
Since r1r \geq 1, min(j/r,n)min(n/r,n)n\min(\lceil j/r \rceil, n) \leq \min(\lceil n/r \rceil, n) \leq n. Therefore, min(j/r,n)=j/r\min(\lceil j/r \rceil, n) = \lceil j/r \rceil. Since m=n/rm = \lfloor n/r \rfloor, n/rm+1\lceil n/r \rceil \leq m + 1. Since r>1r > 1, m<nm < n, which implies that m+1nm+1 \leq n. Therefore, min{j/r,n}=j/rn/rm+1\min\{\lceil j/r \rceil, n\} = \lceil j/r \rceil \leq \lceil n/r \rceil \leq m + 1 for all j{1,,n}j \in \{1, \dots, n\}.
For each positive integer k{1,,m+1}k \in \{1, \dots, m + 1\}, we now determine the number of positive integers j{1,,n}j \in \{1, \dots, n\} such that j/r=k\lceil j/r \rceil = k. We denote this number by sks_k.
Note that j/r=k\lceil j/r \rceil = k if and only if k1<j/rkk - 1 < j/r \leq k if and only if (k1)r<jmin(kr,n)(k - 1)r < j \leq \min(kr, n), since jnj \leq n. We will handle the cases k{1,,m}k \in \{1, \dots, m\} and k=m+1k = m + 1 separately. If k{1,,m}k \in \{1, \dots, m\}, then min(kr,n)=kr\min(kr, n) = kr, since rmr \leq m and m=n/rm = \lfloor n/r \rfloor.

The set of positive integers jj satisfying (k1)r<jkr(k-1)r < j \le kr is {(k1)r+1,(k1)r+2,,kr}\{\lfloor(k-1)r\rfloor + 1, \lfloor(k-1)r\rfloor + 2, \dots, \lfloor kr\rfloor\}. Hence,
sk=rk(r(k1)+1)+1=rkr(k1) s_k = \lfloor rk \rfloor - (\lfloor r(k-1) \rfloor + 1) + 1 = \lfloor rk \rfloor - \lfloor r(k-1) \rfloor
for all k{1,,m}k \in \{1, \dots, m\}. If k=m+1k = m + 1, then (k1)r<jmin(kr,n)=n(k-1)r < j \le \min(kr, n) = n. The set of positive integers jj satisfying (k1)r<jkr(k-1)r < j \le kr is {(k1)r+1,,n}\{\lfloor(k-1)r\rfloor + 1, \dots, n\}. Then sm+1=nr(k1)=nmrs_{m+1} = n - \lfloor r(k-1) \rfloor = n - \lfloor mr \rfloor. Note that this number is non-negative by the definition of mm. Therefore, by the definition of sks_k, we have
j=1nmin(jr,n)=k=1m+1ksk=k=1m(k(kr(k1)r))+(m+1)(nrm)=(m+1)nk=1mkr.(4) \begin{aligned} \sum_{j=1}^{n} \min \left( \left\lfloor \frac{j}{r} \right\rfloor, n \right) &= \sum_{k=1}^{m+1} k s_k \\ &= \sum_{k=1}^{m} \left( k \left( \lfloor kr \rfloor - \lfloor (k-1)r \rfloor \right) \right) + (m+1)(n - \lfloor rm \rfloor) = (m+1)n - \sum_{k=1}^{m} \lfloor kr \rfloor. \quad (4) \end{aligned}
Summing (??) and (??) yields that
g(r)=n2+n+j=1m(jrjr)n2+n, g(r) = n^2 + n + \sum_{j=1}^{m} (\lceil jr \rceil - \lfloor jr \rfloor) \ge n^2 + n,
which proves the right inequality. \square

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.