MathLabs

Problem 4

Let nn be a fixed positive odd integer. Take m+2m+2 distinct points P0,P1,…,Pm+1P_0,P_1,\ldots,P_{m+1} in the coordinate plane such that: (1) P0=(0,1)P_0=(0,1), Pm+1=(n+1,n)P_{m+1}=(n+1,n), and for 1≤i≤m1\le i\le m, both coordinates of PiP_i are integers between 11 and nn inclusive; (2) for 0≤i≤m0\le i\le m, segment PiPi+1P_iP_{i+1} is parallel to the xx-axis if ii is even and to the yy-axis if ii is odd; (3) for 0≤i<j≤m0\le i<j\le m, segments PiPi+1P_iP_{i+1} and PjPj+1P_jP_{j+1} share at most one point. Determine the maximum possible value of mm.
Step 2 of 5: Base case
m=0m=0
Detailed analysis

For n=1, the two prescribed endpoints P_0=(0,1), P_1=(2,1) form the horizontal segment required for i=0, so m=0=n(n-1).