MathLabs

Problem 5

Let nn be a positive integer. There are n(n+1)n(n+1) rooms arranged in an (n+1)×n(n+1)\times n 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 SS and GG satisfying: (i) SS is in the first row and GG is in the (n+1)(n+1)-th row. (ii) GG can be reached from SS using only unlocked doors.
Step 4 of 5: Exactly half of the subsets are achievable
#{H:H achievable}=2 n2+(n−1)2−1\#\{H: H\text{ achievable}\}=2^{\,n^2+(n-1)^2-1}
Detailed analysis

Since ff is a bijection on the 2n2+(n−1)22^{n^2+(n-1)^2} subsets of edges of G\mathcal{G} that pairs each achievable HH with the non-achievable f(H)f(H), the achievable and non-achievable subsets are in bijection with each other and partition all 2n2+(n−1)22^{n^2+(n-1)^2} subsets; hence exactly 2 n2+(n−1)2−12^{\,n^2+(n-1)^2-1} of the subsets are achievable.