A square grid $2n \times 2n$ is constructed of matches (each match is a segment of length 1). By one move Peter can choose a vertex which (at this moment) is the endpoint of 3 or 4 matches and delete two matches whose union is a segment of length 2. Find the least possible number of matches that could remain after a number of Peter's moves.
Problem
Source: VI Caucasus Mathematical Olympiad
Tags: combinatorics
15.03.2021 11:39
Really bad write-up, but hey, I guess that gives an idea. Answer. $2(2n-1)$. Construction. Peter firstly takes every match at the side of the given initial square two by one. Then Peter makes a move on the right bottom corner vertex of the square $(2n-2) \times (2n-2)$ and makes moves by following zigzag, which guarantees that every match is taken from the square $(2n-2) \times (2n-2)$. Bound. Just consider $(2n-2) \times (2n-2)$ square inside $2n\times 2n$ and vertexes at edges, then obviously alternate deleting of matches keeps fewer matches than any other (i.e. parallel deleting and alternate deleting), since two alternate colourings right after each other make two matches unable to be deleted, but any other combination of deleting causes more than two matches unable to be deleted. Alternate deleting, here on the bottom we have boundary of big square, therefore alternate coloring causes a situation where one match that cannot be deleted from the grid: [asy][asy] import markers; size(5cm); path S = box( (0,0), (2,0) );fill(S, white); for (int i=0; i<=1; ++i) { draw(shift(i,1)*unitsquare); } for (int i=0; i<=1; ++i) { draw(shift(i,0)*unitsquare); } draw((0,0)--(0,1)--(0,2),StickIntervalMarker(2,2,blue)); draw((0,1)--(1,1)--(2,1),StickIntervalMarker(2,2,green)); draw((1,0)--(1,1),StickIntervalMarker(1,1,black)); draw(S, black+2); [/asy][/asy] Parallel 1 deleting, here parallel coloring causes a situation where one match that cannot be deleted from the grid: [asy][asy] import markers; size(5cm); for (int i=0; i<=0; ++i) { draw(shift(i,1)*unitsquare); } for (int i=0; i<=0; ++i) { draw(shift(i,0)*unitsquare); } draw((0,0)--(0,1)--(0,2),StickIntervalMarker(2,2,blue)); draw((1,0)--(1,1)--(1,2),StickIntervalMarker(2,2,green)); draw((0,1)--(1,1),StickIntervalMarker(1,1,black)); [/asy][/asy] Parallel 2 deleting, here on the bottom we have boundary of big square, therefore this parallel coloring causes a situation where three matches that cannot be deleted from the grid: [asy][asy] import markers; size(5cm); path S = box( (0,0), (4,0) );fill(S, white); for (int i=0; i<=3; ++i) { draw(shift(i,0)*unitsquare); } draw((0,1)--(1,1)--(2,1),StickIntervalMarker(2,2,blue)); draw((2,1)--(3,1)--(4,1),StickIntervalMarker(2,2,green)); draw((1,0)--(1,1),StickIntervalMarker(1,1,black)); draw((2,0)--(2,1),StickIntervalMarker(1,1,black)); draw((3,0)--(3,1),StickIntervalMarker(1,1,black)); draw(S, black+2); [/asy][/asy] Diagram for $n=2$, firstly make a moves at edges (as shown from $1$ to $8$) and then start doing zigzag as shown ($9$ to $17$). [asy][asy] import markers; pair A=(0,0), B=(1,0), C=(2,0), D=(3,0), E=(4,0); size(5cm); for (int i=0; i<=3; ++i) { draw(shift(i,3)*unitsquare); } for (int i=0; i<=3; ++i) { draw(shift(i,2)*unitsquare); } for (int i=0; i<=3; ++i) { draw(shift(i,1)*unitsquare); } for (int i=0; i<=3; ++i) { draw(shift(i,0)*unitsquare); } draw(A--B--C,StickIntervalMarker(2,2,blue)); draw(C--D--E,StickIntervalMarker(2,2,green)); draw((4,0)--(4,1)--(4,2),StickIntervalMarker(2,2,blue)); draw((4,2)--(4,3)--(4,4),StickIntervalMarker(2,2,green)); draw((4,4)--(3,4)--(2,4),StickIntervalMarker(2,2,blue)); draw((2,4)--(1,4)--(0,4),StickIntervalMarker(2,2,green)); draw((0,4)--(0,3)--(0,2),StickIntervalMarker(2,2,blue)); draw((0,2)--(0,1)--(0,0),StickIntervalMarker(2,2,green)); label("$\textcircled{1}$", (1,0),S); label("$\textcircled{2}$", (3,0),S); label("$\textcircled{3}$", (4,1),E); label("$\textcircled{4}$", (4,3),E); label("$\textcircled{5}$", (3,4),N); label("$\textcircled{6}$", (1,4),N); label("$\textcircled{7}$", (0,3),W); label("$\textcircled{8}$", (0,1),W); draw((3,0)--(3,1)--(3,2),StickIntervalMarker(2,2,red)); label("$\color{red}\textcircled{9}$", (3,1),dir(20)); draw((3,1)--(2,1)--(1,1),StickIntervalMarker(2,2,purple)); label("$\color{black}\textcircled{10}$", (2,1),dir(290)); draw((1,0)--(1,1)--(1,2),StickIntervalMarker(2,2,red)); label("$\color{red}\textcircled{11}$", (1,1),dir(200)); draw((2,1)--(2,2)--(2,3),StickIntervalMarker(2,2,orange)); label("$\color{black}\textcircled{13}$", (2,2),dir(320)); draw((0,2)--(1,2)--(2,2),StickIntervalMarker(2,2,purple)); label("$\color{black}\textcircled{12}$", (1,2),dir(220)); draw((2,2)--(3,2)--(4,2),StickIntervalMarker(2,2,purple)); label("$\color{black}\textcircled{14}$", (3,2),dir(45)); draw((3,2)--(3,3)--(3,4),StickIntervalMarker(2,2,red)); label("$\color{red} \textcircled{15}$", (3,3),dir(45)); draw((3,3)--(2,3)--(1,3),StickIntervalMarker(2,2,purple)); label("$\color{black}\textcircled{16}$", (2,3),dir(45)); draw((1,4)--(1,3)--(1,2),StickIntervalMarker(2,2,red)); label("$\color{red}\textcircled{17}$", (1,3),dir(135)); [/asy][/asy]