Let m be an integer greater than 1, and let n be an odd number with 3≤n<2m. Numbers ai,j (i,j∈N, 1≤i≤m, 1≤j≤n) satisfy: (1) For every 1≤j≤n, a1,j, a2,j, ..., am,j is a permutation of 1,2,...,m; (2) ∣ai,j−ai,j+1∣≤1 for every 1≤i≤m, 1≤j≤n−1. Find the minimal possible value of M=max1≤i≤m∑j=1nai,j.
Solution
Let n=2l+1. Since 3≤n<2m, we have 1≤l≤m−1. We first estimate the lower bound of M. By the condition (1), there exists a unique 1≤i0≤m, such that ai0,l+1=m. Consider ai0,l and ai0,l+2.
Case 1: At least one of ai0,l and ai0,l+2 is m, and we may assume without loss of generality that ai0,l=m. It follows from the condition (2) that ai0,l−1ai0,l+2≥m−1,ai0,l−2≥m−2,…,ai0,1≥m−l+1,≥m−1,ai0,l+3≥m−2,…,ai0,2l+1≥m−l. Thus, M≥j=1∑nai0,j≥(m−l)+2((m−l+1)+(m−l+2)+⋯+m)=(2l+1)m−l2.
Case 2: None of ai0,l and ai0,l+2 is m, and by the condition (1) there exists 1≤i1≤m, i1=i0, such that ai1,l=m. It easily follows from the conditions (1) and (2) that ai1,l+1=m−1, ai1,l+2=m. It follows again from the condition (2) that ai1,lai1,l+2≥m−1,ai1,l−1≥m−2,…,ai1,l−(l−1)≥m−l+1,≥m−1,ai1,l+3≥m−2,…,ai1,l+1≥m−l+1. Thus, M≥j=1∑nai1,j≥2((m−l+1)+(m−l+2)+⋯+(m−1))=(2l+1)m−(l2−l+1). Combining the above two cases, we have M≥(2l+1)m−l2.
On the other hand, consider ai,j=f(2i+j)=⎩⎨⎧2i+j,(2m+1)−(2i+j),(2i+j)−2m,(4m+1)−(2i+j),2i+j≤m,m+1≤2i+j≤2m,2m+1≤2i+j≤3m,3m+1≤2i+j≤4m. We shall show that this table of numbers satisfies the required conditions in the problem. For any 1≤i≤m, 1≤j≤n−1, if m=2i+j, then ∣ai,j−ai,j+1∣=∣f(2i+j)−f(2i+j+1)∣=1; if m=2i+j, then ∣ai,j−ai,j+1∣=∣f(2i+j)−f(2i+j+1)∣=0. The condition (2) is verified.
We next show that the condition (1) is also fulfilled. In fact, it suffices to show that for any integers 1≤j≤n and 1≤k≤m, there exists an integer 1≤i≤m such that ai,j=k. If j≡k(mod2), since 1≤j≤n, 1≤k≤m and n<2m, we have −2m<k−j<m, and therefore −m<2k−j<m, and note that 2k−j is an integer. Thus, at least one of 2k−j and 2k−j+m is in the set {1,2,…,m}; taking this number to be i will do the job. If j≡k(mod2), again since 1≤j≤n, 1≤k≤m and n<2m, we have −2m<(2m+1)−(j+k)<2m, and therefore −m<2(2m+1)−(j+k)<m, and 2(2m+1)−(j+k) is an integer. Thus, at least one of 2(2m+1)−(j+k) and 2(2m+1)−(j+k)+m is in the set {1,2,…,m}; taking this number to be i will do the job.
We now estimate M in this case. Since the condition (1) holds, for any 1≤i1<i2≤m, 1≤j≤n−1, we have f(2i1+j)≡f(2i2+j), i.e. for any integers x,y with the same parity such that 3≤x<y≤2m+n and y−x<2m, we have f(x)=f(y). Thus, for a given i, ai,1,ai,2,…,ai,2l+1 are pairwise distinct, and so are numbers ai,2,ai,3,…,ai,2l. As a result, j=1∑nai,j≤(m−l)+2((m−l+1)+(m−l+2)+⋯+m)=(2l+1)m−l2. Thus, M=max∑1≤i≤mai,j≤(2l+1)m−l2.
Therefore, the minimal possible value of M is (2l+1)m−l2 where n=2l+1.
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.