There is an $n\times n$ chessboard where $n\geq 4$ is a positive even number. The cells of the chessboard are coloured black and white such that adjacent cells sharing a common side have different colours. Let $A$ and $B$ be two interior cells (which means cells not lying on an edge of the chessboard) of distinct colours. Prove that a chess piece can move from $A$ to $B$ by moving across adjacent cells such that every cell of the chessboard is passed through exactly once.
Problem
Source: 2021HKTST1 Q6
Tags: combinatorics
18.10.2020 17:34
Here's my solution during the test: First, rotate the chessboard so that cell $A$ is strictly higher than cell $B$. Then consider the line coinciding with the lower side of $A$ and the line coinciding with the upper side of $B$. These lines cut the chessboard in $3$ rectangles, each of width $n$. We now describe several particular cells. WLOG assume $A$ is black and $B$ is white. Let $C$ be the black lower corner of the upper rectangle. Let $D$ be the white lower corner of the upper rectangle. Then let $E$ be the cell directly below $D$, and let $F$ be the lower corner of the middle rectangle of distinct colour from $E$. Note that $E$ is black and $F$ is white. At last, define $G$ to be the cell directly below $F$, and define $H$ to be the other upper corner of the lower rectangle. We deduce that $G$ is black, while $H$ is white. With the above definitions, we now give an explicit construction. 1) Start from $A$ and move sideways to $C$. 2) Move in a zig-zag pattern upwards and downwards inside the upper rectangle. Since the width is of even length, we will end up at cell $D$. Note that we can pass through every cell of the upper rectangle since the path between $A$ and $C$ span an odd number of cells. 3) Go downwards from $D$ to $E$. 4) Move in a zig-zag pattern sideways within the rectangle in the middle. Since the middle rectangle has even width, it contains an even number of cells, so we end up at the lower corner of distinct colour from $E$, i.e. $F$. 5) Go downwards from $F$ to $G$. 6) Move in a zig-zag pattern downwards and upwards inside the lower rectangle, avoiding the cells between $H$ and $B$. Again, since the width is of even length, we will end up at cell $H$. Similar to step 2, we can pass through every cell of the lower rectangle, except those between $H$ and $B$. 7) At last, move sideways from $H$ to $B$, and we're done! Here is an example for $n=8$: [asy][asy] import graph; size(8cm); real labelscalefactor = 0.5; /* changes label-to-point distance */ pen dps = linewidth(0.7) + fontsize(10); defaultpen(dps); /* default pen style */ pen dotstyle = black; /* point style */ real xmin = -0.8541279055963171, xmax = 13.584678490660089, ymin = 0.5276726137256657, ymax = 11.90551178016557; /* image dimensions */ pen wrwrwr = rgb(0.3803921568627451,0.3803921568627451,0.3803921568627451); pen ffqqtt = rgb(1,0,0.2); pen qqqqcc = rgb(0,0,0.8); /* draw figures */ draw((-0.10562200236517727,7.666711313437013)--(-0.1,2.06), linewidth(2) + wrwrwr); draw((-0.1,2.06)--(5.506711313437013,2.065622002365179), linewidth(2) + wrwrwr); draw((5.501089311071835,7.67233331580219)--(5.506711313437013,2.065622002365179), linewidth(2) + wrwrwr); draw((5.501089311071835,7.67233331580219)--(-0.10562200236517727,7.666711313437013), linewidth(2) + wrwrwr); draw((0.5952169118144495,7.667414063732661)--(0.6008389141796283,2.060702750295648), linewidth(2) + wrwrwr); draw((1.3016778283592552,2.0614055005912952)--(1.296055825994076,7.668116814028307), linewidth(2) + wrwrwr); draw((1.9968947401737032,7.668819564323956)--(2.002516742538882,2.062108250886942), linewidth(2) + wrwrwr); draw((2.7033556567185064,2.0628110011825895)--(2.6977336543533297,7.669522314619602), linewidth(2) + wrwrwr); draw((3.398572568532957,7.6702250649152495)--(3.404194570898136,2.063513751478237), linewidth(2) + wrwrwr); draw((4.105033485077759,2.0642165017738843)--(4.099411482712583,7.670927815210897), linewidth(2) + wrwrwr); draw((4.800250396892209,7.671630565506543)--(4.805872399257381,2.0649192520695316), linewidth(2) + wrwrwr); draw((5.506008563141367,2.766460916544814)--(-0.10070275029564721,2.760838914179627), linewidth(2) + wrwrwr); draw((-0.10140550059129434,3.4616778283592535)--(5.5053058128457195,3.4672998307244365), linewidth(2) + ffqqtt); draw((5.504603062550073,4.168138744904059)--(-0.1021082508869415,4.16251674253888), linewidth(2) + wrwrwr); draw((-0.10281100118258867,4.8633556567185074)--(5.503900312254426,4.868977659083688), linewidth(2) + wrwrwr); draw((5.503197561958778,5.569816573263313)--(-0.10351375147823584,5.564194570898132), linewidth(2) + red); draw((-0.10421650177388299,6.265033485077761)--(5.502494811663131,6.270655487442941), linewidth(2) + wrwrwr); draw((5.5017920613674836,6.971494401622567)--(-0.10491925206953016,6.965872399257388), linewidth(2) + wrwrwr); draw((0.24655433046375677,5.914965403135768)--(0.24514882987246026,7.316643231495023), linewidth(2) + qqqqcc); draw((0.24514882987246026,7.316643231495023)--(0.9459877440520861,7.31734598179067), linewidth(2) + qqqqcc); draw((0.9459877440520861,7.31734598179067)--(0.9466904943477326,6.616507067611046), linewidth(2) + qqqqcc); draw((0.9466904943477326,6.616507067611046)--(1.6475294085273622,6.617209817906695), linewidth(2) + qqqqcc); draw((1.6475294085273622,6.617209817906695)--(1.6468266582317137,7.318048732086317), linewidth(2) + qqqqcc); draw((1.6468266582317137,7.318048732086317)--(2.3476655724113398,7.3187514823819635), linewidth(2) + qqqqcc); draw((0.24655433046375677,5.914965403135768)--(1.6482321588230104,5.916370903727062), linewidth(2) + qqqqcc); draw((2.3476655724113398,7.3187514823819635)--(2.349071073002633,5.917073654022708), linewidth(2) + qqqqcc); draw((2.349071073002633,5.917073654022708)--(3.0499099871822613,5.917776404318356), linewidth(2) + qqqqcc); draw((3.0499099871822613,5.917776404318356)--(3.048504486590967,7.319454232677611), linewidth(2) + qqqqcc); draw((3.048504486590967,7.319454232677611)--(3.7493434007705937,7.3201569829732565), linewidth(2) + qqqqcc); draw((3.7493434007705937,7.3201569829732565)--(3.7507489013618884,5.918479154614001), linewidth(2) + qqqqcc); draw((3.7507489013618884,5.918479154614001)--(4.4515878155415125,5.919181904909648), linewidth(2) + qqqqcc); draw((4.4515878155415125,5.919181904909648)--(4.45018231495022,7.320859733268903), linewidth(2) + qqqqcc); draw((4.45018231495022,7.320859733268903)--(5.151021229129846,7.321562483564549), linewidth(2) + qqqqcc); draw((5.151021229129846,7.321562483564549)--(5.153129480016784,5.219045741025682), linewidth(2) + qqqqcc); draw((5.153129480016784,5.219045741025682)--(0.247257080759405,5.214126488956143), linewidth(2) + qqqqcc); draw((0.247257080759405,5.214126488956143)--(0.2479598310550533,4.513287574776516), linewidth(2) + qqqqcc); draw((0.2479598310550533,4.513287574776516)--(5.153832230312431,4.518206826846048), linewidth(2) + qqqqcc); draw((5.153832230312431,4.518206826846048)--(5.154534980608077,3.8173679126664215), linewidth(2) + qqqqcc); draw((5.154534980608077,3.8173679126664215)--(0.24866258135070154,3.81244866059689), linewidth(2) + qqqqcc); draw((2.3518820741852187,3.113717997304209)--(5.155237730903724,3.1165289984868023), linewidth(2) + qqqqcc); draw((5.155237730903724,3.1165289984868023)--(5.155940481199371,2.4156900843071765), linewidth(2) + qqqqcc); draw((5.155940481199371,2.4156900843071765)--(1.6517459103012513,2.4121763328289347), linewidth(2) + qqqqcc); draw((1.6517459103012513,2.4121763328289347)--(1.651043160005603,3.11301524700856), linewidth(2) + qqqqcc); draw((1.651043160005603,3.11301524700856)--(0.9502042458259649,3.112312496712912), linewidth(2) + qqqqcc); draw((0.9502042458259649,3.112312496712912)--(0.9509069961216113,2.4114735825332865), linewidth(2) + qqqqcc); draw((0.9509069961216113,2.4114735825332865)--(0.25006808194199803,2.4107708322376378), linewidth(2) + qqqqcc); draw((0.25006808194199803,2.4107708322376378)--(0.24866258135070154,3.81244866059689), linewidth(2) + qqqqcc); /* dots and labels */ dot((0.24655433046375677,5.914965403135768),linewidth(4pt) + dotstyle); label("$C$", (0.31053279648020804,6.037413627395383), NE * labelscalefactor); dot((1.6482321588230104,5.916370903727062),linewidth(4pt) + dotstyle); label("$A$", (1.714098257957046,6.037413627395383), NE * labelscalefactor); dot((5.152426729721138,5.919884655205294),linewidth(4pt) + dotstyle); label("$D$", (5.208080364186621,6.037413627395383), NE * labelscalefactor); dot((5.153129480016784,5.219045741025682),linewidth(4pt) + dotstyle); label("$E$", (5.208080364186621,5.335630896656964), NE * labelscalefactor); dot((0.24866258135070154,3.81244866059689),linewidth(4pt) + dotstyle); label("$F$", (0.31053279648020804,3.932065435180125), NE * labelscalefactor); dot((0.24936533164634977,3.1116097464172636),linewidth(4pt) + dotstyle); label("$G$", (0.31053279648020804,3.2302827044417057), NE * labelscalefactor); dot((2.3518820741852187,3.113717997304209),linewidth(4pt) + dotstyle); label("$B$", (2.415880988695465,3.2302827044417057), NE * labelscalefactor); dot((5.155237730903724,3.1165289984868023),linewidth(4pt) + dotstyle); label("$H$", (5.208080364186621,3.2302827044417057), NE * labelscalefactor); clip((xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle); /* end of picture */[/asy][/asy]