3
$\begingroup$

This is a smaller post that relates to these previous questions that I have asked $(1)$ $(2)$. Context for the (seemingly arbitrary) formulas may be found there.


Let us consider a $3 \times n$ grid of squares. The minimum number of squares that one can remove to guarantee the existence of a unique closed loop is

$$\mathcal{M}(3,n) = \left\lfloor \frac{n}{3} \right\rfloor + \begin{cases} 1 & \text{if } n \equiv 1 \pmod 3,\\[2mm] 0 & \text{otherwise.} \end{cases}$$

Then, it is natural to ask given such value $\mathcal{M}(3,n)$ of squares to remove, how many arrangements of $\mathcal{M}(3,n)$ forbidden squares guarantee the existence of a unique closed loop? In other words, fix this minimal number of forbidden squares. Let $\mathcal{A}(n)$ denote the number of ways to choose exactly $\mathcal{M}(3,n)$ squares whose removal guarantees a unique closed loop.

Experimentally (programmatic exhaustive search), I found

\begin{array}{c|cccccccccccc} n & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 \\ \hline \mathcal{M}(3,n) & 0 & 1 & 2 & 1 & 2 & 3 & 2 & 3 & 4 & 3 & 4 & 5\\ \hline \mathcal{A}(n) & 1 & 5 & 13 & 2 & 14 & 52 & 4 & 36 & 172 & 8 & 88 & 512 \end{array}

The powers of $2$ scattered around at $n=2, 5, 8, 11$ seem to suggest a closed form for $\mathcal{A}(n)$. Here is the conjectured form for $\mathcal{A}(n)$... Let $m = 3t + r$ with $t = \lfloor m/3 \rfloor$ and $r \in \{0,1,2\}$. Then

$$S(m) = \begin{cases} A_t = (2t + 3)\,2^{\,t-1}, & r = 0, \\[6pt] B_t = (2t^{2} + 7t + 4)\,2^{\,t-1}, & r = 1, \\[6pt] C_t = 2^{t}, & r = 2 \end{cases}$$

How can I prove or disprove this conjecture closed form? Perhaps induction will help, where one may consider the partition of the $3 \times m$ grid. Though, with this method, I am having trouble working with $B_t$. Thanks

$\endgroup$

1 Answer 1

5
$\begingroup$

We first claim that there can be no $3\times 3$ grid of unremoved squares in the final configuration. Assume otherwise: we now look at the number of disconnected parts of the loop that pass through the $3\times 3$ grid.

  • $1$ part: The Hamiltonian path the loop takes through the $3\times 3$ grid is not unique, contradiction.
  • $2$ parts: The loop satisfies one of the two configurations shown below (up to vertical/horizontal reflection). But these can be modified into each other, so the entire loop is not unique. enter image description here
  • $3$ parts: Each part of the loop must be a horizontal line across the $3\times 3$ grid; this is not possible.

Now we enumerate $C_t$. The only way a configuration can work is if we remove a square in each $3k$-th column, as otherwise there will be a $3\times 3$ grid. FTSOC, assume there is a removed square in the middle row. Then, if a consecutive removal is not in the middle row, then a loop is not possible (left image below); if a consecutive removal is in the middle row, then the loop is not unique, since we can swap the loop between the middle and right images below. Thus, all removed squares must be in the top or bottom rows. enter image description here This leaves us with $2^t$ possibilities since there are $2$ possible removals for each of the $t$ columns. Each of these configurations work in the same manner as the $n=11$ example below, where each removed square must have the loop wrap tightly around it, and the remaining portions of the loop are fixed. Thus, $C_t=2^t$.

enter image description here

For $A_t$ and $B_t$, we find a recursive definition. We know the rightmost $3\times 3$ grid must contain a removed square. It's easy to check that this square cannot be on an edge or a loop isn't possible. We now do casework on where this square is:

  • If it is the right-side corner, recurse to $n-1$.
    • $A_t$ reduces to $C_{t-1}$ (first image). From our classification of $C$-configurations, the rightmost edge in the must have the loop going directly from top to bottom. This means we there are $2$ possible ways to recurse, which is $2\cdot 2^{t-1}=2^t$ configurations.
    • $B_t$ reduces to $A_t$. If the $n-1$ grid has a removed right corner, which happens in $2^t$ ways, there is $1$ way to recurse (since only one corner removal yields a valid loop). Otherwise, there are $2$ ways. This gives $2A_t-2^t$ configurations.
  • If it is the center, recurse to $n-3$ for $A_t$ and $n-2$ for $B_t$.
    • $A_t$ reduces to $A_{t-1}$ (second image). If the $n-3$ grid has a removed right corner, which occurs in $2^{t-1}$ ways, there is $1$ way to recurse; otherwise, the resulting loop can be checked to not be unique. This gives $2^{t-1}$ configurations.
    • $B_t$ reduces to $C_{t-1}$ (third image), which gives $2^{t-1}$ configurations.
  • If it is the left-side corner, recurse to $n-3$ (fourth image).
    • $A_t$ reduces to $A_{t-1}$. If the $n-3$ case has a removed right corner, which happens in $2^{t-1}$ ways, there is $1$ way to recurse. Otherwise there are $2$. This gives $2A_{t-1}-2^{t-1}$ configurations.
    • $B_t$ reduces to $B_{t-1}$. Using the same logic, this gives $2B_{t-1}-(2A_{t-1}-2^{t-1})$ configurations.

enter image description here

Adding up all the cases for $A_t$ and $B_t$, we have $$A_t=2A_{t-1}+2^t$$ $$B_t=2B_{t-1}+2(A_t-A_{t-1})$$ Solving from the initial values $A_1=5$ and $B_1=13$, or just using induction, yields solutions of $A_t=(2t+3)2^{t-1}$ and $B_t=(2t^2+7t+4)2^{t-1}$, as desired.

$\endgroup$
1
  • 1
    $\begingroup$ @mezzoctane I mean that there are no $3\times 3$ grids after removing the squares. In other words, there is no $3\times 3$ grid of unremoved squares. $\endgroup$ Commented Nov 17 at 21:38

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.