[Combinatorics]
Problem: 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 $E(2020,1993)$

Solution: First, we prove that if $n$ is even and $k$ is odd, then $E(n, k)=E(n,n-k)$.


Because $n$ is even, and because each switch must be flipped an odd number of times in order to escape, the total number of flips is even. Because $k$ must be odd, $E(n, k)$ must be even. To show this, consider the case where $E(n, k)$ is odd. If $E(n, k)$ is odd, then an odd number of flips happen an odd number of times, resulting in an odd number of total flips. This is a contradiction because $n$ is even.

Call a switch "non-flipped" in any given minute if it is not among the switches flipped in that minute. Because $E(n, k)$ (i.e., the total number of minutes) is even, and each switch is flipped an odd number of times, each switch must also be non-flipped an odd number of times. Therefore any sequence of flips that solves the " $(n, k)$ puzzle" can be made into a sequence of flips that solves the " $(n, n-k)$ " puzzle by interchanging flips and non-flips. These sequences last for the same number of minutes, and therefore $E(n, k)=E(n, n-k)$.

$E(2020,1993)=76$. By the above prove, conclude that $E(2020,1993)=E(2020,27)$. Compute the latter instead. Because $\frac{2020}{27}>74$, it will require at least 75 minutes to flip each switch once. Furthermore, $E(2020,27) \geq 76$ because the prove above implies that $E(2020,27)$ is even.

To solve the puzzle in exactly 76 minutes, use the following strategy. For the first 33 minutes, flip switch 1, along with the first 26 switches that have not yet been flipped. The end result is that lights 1 through $26 \cdot 33+1=859$ are on, and the remaining 1161 lights are off. Note that $1161=27 \cdot 43$, so it takes 43 minutes to flip each remaining switch exactly once, for a total of 76 minutes, as desired.

Final answer: 76