Problem 5
Let be a positive integer. There are rooms arranged in an grid. Between every two adjacent rooms there is a door. Find the number of ways to choose a subset of doors and lock them so that there exist two rooms and satisfying:
(i) is in the first row and is in the -th row.
(ii) can be reached from using only unlocked doors.
Step 3 of 5: connects iff does not
Detailed analysis
Call achievable if and are connected in . If is achievable via edges , then no edge of lies in by construction of , so any path from to in would have to cross one of these edges without using it, which is impossible; hence is not achievable. Conversely, if is not achievable, the edges leaving the component of in all lie outside , and transposing them under produces a connected chain of edges of joining to ; hence is achievable. So is achievable exactly when is not.