MathLabs

Problem 1

Let n≥5n\ge5 be an integer. Consider nn squares with side lengths 1,2,…,n1,2,\ldots,n, respectively. The squares are arranged in the plane with their sides parallel to the xx and yy axes. Suppose that no two squares touch, except possibly at their vertices. Show that it is possible to arrange these squares in a way such that every square touches exactly two other squares.
Step 3 of 3: Close the loop when the difference is 2 and check non-overlap
(∑a∈Aa)2+(n−3)+(n−2)22=(∑b∈Bb)2+n+(n−1)22,ai+bj22≤(n−4)2<2n−322\left(\sum_{a\in A}a\right)\sqrt2+\frac{(n-3)+(n-2)}{2}\sqrt2=\left(\sum_{b\in B}b\right)\sqrt2+\frac{n+(n-1)}{2}\sqrt2,\qquad \frac{a_i+b_j}{2}\sqrt2\le(n-4)\sqrt2<\frac{2n-3}{2}\sqrt2
Detailed analysis

When ∑a∈Aa−∑b∈Bb=2\sum_{a\in A}a-\sum_{b\in B}b=2, attach n−3n-3 and n−2n-2 to the AA-diagonal and nn and n−1n-1 to the BB-diagonal; since (n+(n−1))−((n−3)+(n−2))=4=2⋅2(n+(n-1))-((n-3)+(n-2))=4=2\cdot2, the first identity above holds and the two chains again close up at the four corner squares. In both cases the perpendicular distance between the AA- and BB-diagonals is (n−3)+n22=2n−322\tfrac{(n-3)+n}{2}\sqrt2=\tfrac{2n-3}{2}\sqrt2, whereas any ai∈Aa_i\in A and bj∈Bb_j\in B satisfy ai,bj≤n−4a_i,b_j\le n-4, so ai+bj22≤(n−4)2<2n−322\tfrac{a_i+b_j}{2}\sqrt2\le(n-4)\sqrt2<\tfrac{2n-3}{2}\sqrt2. Hence the two parallel chains never touch each other, and every square in the loop touches only its two neighbours along the cycle.