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 3 of 5: Initial odd case
m=6=3(3−1)m=6=3(3-1)
Detailed analysis

The sequence (0,1),(1,1),(1,2),(2,2),(2,1),(3,1),(3,3),(4,3)(0,1),(1,1),(1,2),(2,2),(2,1),(3,1),(3,3),(4,3) has six turning points, so m=6=3(3−1)m=6=3(3-1), and it satisfies all conditions.