Question 96
Let m,n≥4 be integers. Consider an m×n grid rectangle formed by m+1 horizontal and n+1 vertical segments. Their intersections are called vertices. Let P be a non-self-intersecting closed path through every one of the (m−1)(n−1) interior vertices but no exterior vertex. Let A be the number of interior vertices through which P goes straight, B the number of grid squares of which P uses exactly two opposite sides, and C the number of grid squares

of which P uses no side. Prove that $A=B-C+m+n-1$.
(The illustration shows m=4,n=5,A=4,B=1,C=5.)

of which P uses no side. Prove that $A=B-C+m+n-1$.
(The illustration shows m=4,n=5,A=4,B=1,C=5.)