Source: USATST-2020-P3
Category: Operations and Strategies

Problem:
Let $\alpha \ge 1$ be a real number.  
Hephaestus and Poseidon play a turn‑based game on an infinite grid of unit squares.  
Before the game starts, Poseidon chooses a finite number of cells to be flooded.  
Hephaestus is building a levee, which is a subset of unit edges of the grid, called walls, forming a connected, non‑self‑intersecting path or loop.  

The game then begins with Hephaestus moving first.  
On each of Hephaestus's turns, he adds one or more walls to the levee, as long as the total length of the levee is at most $\alpha n$ after his $n$th turn.  
On each of Poseidon's turns, every cell which is adjacent to an already flooded cell and with no wall between them becomes flooded as well.  

Hephaestus wins if the levee forms a closed loop such that all flooded cells are contained in the interior of the loop — hence stopping the flood and saving the world.  
For which $\alpha$ can Hephaestus guarantee victory in a finite number of turns no matter how Poseidon chooses the initial cells to flood?

Solution:
We show that if $\alpha > 2$ then Hephaestus wins, but when $\alpha \le 2$ Hephaestus cannot contain even a single-cell flood initially.

\bigskip

**Strategy for $\alpha > 2$**:
Impose $\mathbb{Z}^2$ coordinates on the cells. Adding more flooded cells does not make our task easier, so let us assume that initially the cells $(x,y)$ with $|x|+|y| \le d$ are flooded for some $d \ge 2$; thus on Hephaestus's $k$-th turn, the water is contained in $|x|+|y| \le d+k-1$. Our goal is to contain the flood with a large rectangular levee.

We pick large integers $N_1$ and $N_2$ such that
\[
  \alpha N_1 > 2N_1 + (2d + 3),\qquad
  \alpha (N_1+N_2) > 2N_2 + (6N_1 + 8d + 4).
\]
We construct the levee by defining a sequence of points and segments. The lengths of the segments to be added are as follows:
\begin{itemize}
  \item $X_1 Y_1$ is a horizontal wall of length $1$ placed to the north of the flood.
  \item $X_1 X_2$ and $Y_1 Y_2$ are horizontal extensions of length $N_1$ to the west and east, respectively.
  \item $X_4 X_3 X_2$ and $Y_4 Y_3 Y_2$ are broken lines of length $d+1$ each that turn southwards.
  \item $X_4 X_5$ and $Y_4 Y_5$ are vertical extensions of length $N_2$ to the south.
  \item $X_5 X_6 Y_6 Y_5$ is a broken line of length $4N_1 + 6d + 1$ that closes the loop at the south.
\end{itemize}

We follow the following plan:
\begin{itemize}
  \item \textbf{Turn $1$}: place wall $X_1 Y_1$. This cuts off the flood to the north.
  \item \textbf{Turns $2$ through $N_1+1$}: extend the levee to segment $X_2 Y_2$. This prevents further flooding to the north.
  \item \textbf{Turn $N_1+2$}: add in broken lines $X_4 X_3 X_2$ and $Y_4 Y_3 Y_2$ all at once. This cuts off the flood west and east.
  \item \textbf{Turns $N_1+3$ to $N_1+N_2+2$}: extend the levee along vertical segments $X_4 X_5$ and $Y_4 Y_5$. This prevents further flooding west and east.
  \item \textbf{Turn $N_1 + N_2 + 3$}: add in the broken line $X_5 X_6 Y_6 Y_5$ all at once and win.
\end{itemize}

\bigskip

**Proof for $\alpha \le 2$**:
Suppose Hephaestus contains the flood on his $(n+1)$-st turn. We prove that $\alpha > 2$ by showing that in fact at least $2n+4$ walls have been constructed.

Let $c_0, c_1, \dots, c_n$ be a path of cells such that $c_0$ is the initial cell flooded, and in general $c_i$ is flooded on Poseidon's $i$-th turn from $c_{i-1}$. The levee now forms a closed loop enclosing all $c_i$.

\begin{claim*}
  If $c_i$ and $c_j$ are adjacent then $|i-j|=1$.
\end{claim*}
\begin{proof}
  Assume $c_i$ and $c_j$ are adjacent but $|i-j|>1$. Then the two cells must be separated by a wall. But the levee forms a simple closed loop, so any wall of the levee separates its interior from its exterior. This would mean $c_i$ and $c_j$ are on opposite sides of the levee, contradicting that both are flooded and thus contained in the interior.
\end{proof}

Thus the cells $c_i$ actually form a simple path. We color \textit{green} any edge of the unit grid (wall or not) which is an edge of exactly one $c_i$ (i.e., the boundary of the polyomino). It is easy to see there are exactly $2n+4$ green edges.

Now, from the center of each cell $c_i$, shine a laser towards each green edge of $c_i$ (hence a total of $2n+4$ lasers are emitted).

\begin{claim*}
  No wall is hit by more than one laser.
\end{claim*}
\begin{proof}
  Assume for contradiction that a wall $w$ is hit by lasers from $c_i$ and $c_j$. Without loss of generality, assume that the laser is vertical, so $c_i$ and $c_j$ are in the same column.

  We consider two cases on the position of $w$:
  \begin{itemize}
    \item If $w$ is between $c_i$ and $c_j$, then the line segment connecting the centers of $c_i$ and $c_j$ intersects the levee exactly once (at $w$). However, both $c_i$ and $c_j$ lie in the interior of the levee. Any segment connecting two interior points of a simple closed loop must intersect the loop an even number of times, a contradiction.

    \item Suppose $w$ lies above both $c_i$ and $c_j$, and assume WLOG $i < j$. Since the laser from $c_i$ hits $w$ without hitting any walls in between, there is no levee at all between $c_i$ and $c_j$. Let $\rho \ge 1$ be the distance between the centers of $c_i$ and $c_j$. Since there are no walls between them, $c_j$ can be flooded in a straight line from $c_i$ within $\rho$ turns, and this straight line is the unique shortest possible path. Thus, this situation can only occur if $j = i+\rho$ and the cells $c_i, c_{i+1}, \dots, c_j$ form a contiguous column. But if they form a column, the top edge of $c_i$ is shared with $c_{i+1}$, meaning it is not a green edge, so no upward vertical laser can be emitted from $c_i$, a contradiction.
  \end{itemize}
  Since neither case is possible, the claim is proven.
\end{proof}

This implies the levee has at least $2n+4$ walls (the number of lasers) on Hephaestus's $(n+1)$-st turn. So $\alpha \ge \frac{2n+4}{n+1} > 2$.

Answer: $\alpha > 2$

Grading guidelines:
(Partial) 1. For the winning direction, reduced to the case where the initially flooded region is a diamond/ball in Manhattan distance (e.g. all cells with |x|+|y|<=d), and correctly tracked that after k Poseidon moves the flood is contained in |x|+|y|<=d+k. 2. Gave a coherent construction idea for α>2: start with a short wall to block one side and then build a large rectangular (or similar) loop with long horizontal/vertical extensions, using the fact that Hephaestus may add many walls in one turn provided the total length constraint is met. 3. For the impossibility direction (α<=2), exhibited the flooded cells c0,c1,...,cn along a flooding chain and proved the key structural claim that if ci and cj are adjacent then |i−j|=1, hence the flooded cells form a simple path. (Almost) 1. Presented a complete strategy for α>2 based on building a large enclosing rectangle in stages (blocking north, extending left/right, turning down, extending down, then closing), with the correct inequalities on chosen parameters, but left a minor gap in checking that the flood cannot “leak around” an unfinished corner during the intermediate turns. 2. Proved α>2 is necessary by counting at least 2n+4 required walls from a length-n+1 containment time, including the green-edge/laser injectivity idea (no wall hit by two lasers), but had a localized flaw (e.g. parity/intersection argument, or handling of the ‘wall above both cells’ case) while the rest of the argument is correct. 3. Solution is almost complete, but made minor mistakes which are not negligible.