Problem (Combinatorics):
Elizabeth is in an "escape room" puzzle. She is in a room with one door which is locked at the start of the puzzle. The room contains $n$ light switches, each of which is initially off. Each minute, she must flip exactly $k$ different light switches (to "flip" a switch means to turn it on if it is currently off, and off if it is currently on). At the end of each minute, if all of the switches are on, then the door unlocks and Elizabeth escapes from the room.

Let $E(n, k)$ be the minimum number of minutes required for Elizabeth to escape, for positive integers $n, k$ with $k \leq n$. For example, $E(2,1)=2$ because Elizabeth cannot escape in one minute (there are two switches and one must be flipped every minute) but she can escape in two minutes (by flipping Switch 1 in the first minute and Switch 2 in the second minute). Define $E(n, k)=\infty$ if the puzzle is impossible to solve (that is, if it is impossible to have all switches on at the end of any minute).

For convenience, assume the $n$ light switches are numbered 1 through $n$.
Find the following in terms of $n$. $E(n, n-2)$ for $n \geq 5$

Solution:
If $n \geq 5$, then $E(n, n-2)=3$. Note that Elizabeth cannot flip every switch in one minute, and after two minutes, some switch (in fact, many switches) must be flipped exactly twice. However, Elizabeth can escape in three minutes using the sequence $\{1,4,5, \ldots, n\},\{2,4,5, \ldots, n\},\{3,4,5, \ldots, n\}$.

Final answer: 3