Find all pairs of positive integers (m,n), such that in a m×n table (with m+1 horizontal lines and n+1 vertical lines), a diagonal can be drawn in some unit squares (some unit squares may have no diagonals drawn, but two diagonals cannot be both drawn in a unit square), so that the obtained graph has an Eulerian cycle.
Problem
Source: 2022 China TST, Test 2, P1
Tags: graph theory, grid, combinatorics
29.03.2022 06:46
the overall idea is simple I just am awful at explaining it here Please tell me what is unclear, because it is uh pretty sus when I try to put the idea into words.
29.03.2022 10:50
The answer is m=n only. Making the degree of all vertices even is the equivalent and sufficient condition to create an eulerian path. Construction: let S be the set of points on an edge but not a corner. Connect each pair with a line of slope 1. Proof of optimality: we prove a critical claim: let S be the set of points on an edge but not a corner. Then there exists a matching (a1,b1),⋯,(ak,bk) in S such that S={a1,a2,⋯,ak,b1,b2,⋯,bk} such that there is a path from ai to bi with only new edges. Proof: focus on ai. If I draw a diagonal containing ai it must affect the parity of degree of another vertex call c. Repeat the argument until c∈S, in which case ai is paired with c. If it goes into an already paired vertex the degree of that vertex will be forever odd. The paths connecting ai,bi and aj,bj must not be in the same square. Therefore, the only way they can intersect (geometrically) is in a 2x2 square, a path goes from top left corner to center to bottom right corner, and another goes from bottom left to center to top right. We can "adjust" the paths such that the two paths do not cross each other i.e. the edges of one side are always to one side of the other path. Now, it may be intuitive to think of S as points of a circle, where two edges do not cross each other (i.e. one edge stays on one side of any other edge) We can color all vertices black and white with the checkerboard coloring. Note a vertex can only be paired of another of the same color. If a vertex connects to a vertex on the same row or on the opposite row, we can show one arc it cuts into has an odd number of points if m≠n, contradicting continuity!
30.03.2022 20:39
@above I don't think you can argue that two paths between four vertices of the same color do not intersect.
Attachments:

30.03.2022 21:04
I think I see what you mean. First, the SQUARES they pass through don't intersect, which is true by the problem criteria. The case that breaks the "continuity" argument is that if I have a 2x2 square, one path goes through the top left and bottom right square, and the other path goes through the bottom left and top right. In this case, all four edges must point to the vertex in the center, so we can argue for continuity by "swapping" the paths. Thanks for pointing out my mistakes!