di-zhang-fdu/OlympiadExtended huggingface dataset:
Subfield: Geometry


Question: In rectangle $P A U L$, point $D$ is the midpoint of $\overline{U L}$ and points $E$ and $F$ lie on $\overline{P L}$ and $\overline{P A}$, respectively such that $\frac{P E}{E L}=\frac{3}{2}$ and $\frac{P F}{F A}=2$. Given that $P A=36$ and $P L=25$, compute the area of pentagon $A U D E F$.

Solution:
For convenience, let $P A=3 x$ and let $P L=5 y$. Then the given equations involving ratios of segment lengths imply that $P E=3 y, E L=2 y, P F=2 x$, and $F A=x$. Then $[P A U L]=(3 x)(5 y)=15 x y$ and

$$
\begin{aligned}
{[A U D E F] } & =[P A U L]-[P E F]-[E L D] \\
& =15 x y-\frac{1}{2}(3 y)(2 x)-\frac{1}{2}(2 y)\left(\frac{3 x}{2}\right) \\
& =15 x y-3 x y-\frac{3 x y}{2} \\
& =\frac{21 x y}{2} .
\end{aligned}
$$

Because $15 x y=36 \cdot 25$, it follows that $3 x y=36 \cdot 5=180$ and that $\frac{21 x y}{2}=\frac{7}{2}(3 x y)=\frac{7}{2} \cdot 180=\mathbf{6 3 0}$.

Final answer: 630
Subfield: Geometry


Question: Rectangle $A R M L$ has length 125 and width 8. The rectangle is divided into 1000 squares of area 1 by drawing in gridlines parallel to the sides of $A R M L$. Diagonal $\overline{A M}$ passes through the interior of exactly $n$ of the 1000 unit squares. Compute $n$.

Solution:
Notice that 125 and 8 are relatively prime. Examining rectangles of size $a \times b$ where $a$ and $b$ are small and relatively prime suggests an answer of $a+b-1$. To see that this is the case, note that other than the endpoints, the diagonal does not pass through any vertex of any unit square. After the first square, it must enter each subsequent square via a vertical or horizontal side. By continuity, the total number of these sides is the sum of the $a-1$ interior vertical lines and $b-1$ interior horizontal lines. The diagonal passes through $(a-1)+(b-1)=a+b-2$ additional squares, so the total is $a+b-1$. Because 125 and 8 are relatively prime, it follows that $N=125+8-1=\mathbf{1 3 2}$.

Remark: As an exercise, the reader is encouraged to show that the answer for general $a$ and $b$ is $a+b-\operatorname{gcd}(a, b)$.

Final answer: 132
Subfield: Number Theory


Question: Compute the least integer $n>1$ such that the product of all positive divisors of $n$ equals $n^{4}$.

Solution:
Note that every factor pair $d$ and $\frac{n}{d}$ have product $n$. For the product of all such divisor pairs to equal $n^{4}$, there must be exactly 4 divisor pairs, or 8 positive integer divisors. A number has 8 positive integer divisors if it is of the form $a^{3} b^{1}$ or $a^{7}$ where $a$ and $b$ are distinct primes. The prime factorization $a^{3} b^{1}(a \neq b)$ provides a set of divisors each of which has 4 options for using $a\left(a^{0}, a^{1}, a^{2}, a^{3}\right)$ and an independent 2 options for using $b\left(b^{0}, b^{1}\right)$. Using the least values $(a, b)=(2,3), a^{3} b^{1}=24$. If instead the prime factorization is $a^{7}$ (having divisors $a^{0}, a^{1}, a^{2}, \ldots, a^{7}$ ), the least answer would be $2^{7}=128$. Thus the answer is 24 .

Final answer: 24
Subfield: Combinatorics


Question: Each of the six faces of a cube is randomly colored red or blue with equal probability. Compute the probability that no three faces of the same color share a common vertex.

Solution:
There are $2^{6}=64$ colorings of the cube. Let $r$ be the number of faces that are colored red. Define a monochromatic vertex to be a vertex of the cube for which the three faces meeting there have the same color. It is clear that a coloring without a monochromatic vertex is only possible in the cases $2 \leq r \leq 4$. If $r=2$ or $r=4$, the only colorings that do not have a monochromatic vertex occur when two opposing faces are colored with the minority color (red in the $r=2$ case, blue in the $r=4$ case). Because there are 3 pairs of opposite



faces of a cube, there are 3 colorings without a monochromatic vertex if $r=2$ and another 3 such colorings if $r=4$. For the $r=3$ colorings, of which there are 20, the only cases in which there are monochromatic vertices occur when opposing faces are monochromatic, but in different colors. There are $2^{3}=8$ such colorings, leaving $20-8=12$ colorings that do not have a monochromatic vertex. Therefore $3+3+12=18$ of the 64 colorings have no monochromatic vertex, and the answer is $\frac{\mathbf{9}}{\mathbf{3 2}}$.

Final answer: $\frac{9}{32}$
Subfield: Geometry


Question: Scalene triangle $A B C$ has perimeter 2019 and integer side lengths. The angle bisector from $C$ meets $\overline{A B}$ at $D$ such that $A D=229$. Given that $A C$ and $A D$ are relatively prime, compute $B C$.

Solution:
Let $B C=a, A C=b, A B=c$. Also, let $A D=e$ and $B D=f$. Then $a+b+e+f=2019$, the values $a, b$, and $e+f$ are integers, and by the Angle Bisector Theorem, $\frac{e}{f}=\frac{b}{a}$. So $b=\frac{a e}{f}=\frac{229 a}{f}$. Because 229 is prime and $\operatorname{gcd}(b, e)=1$, conclude that $f$ must be an integer multiple of 229 . So let $f=229 x$ for some integer $x$. Then $a=b \cdot x$ and $a+b+c=2019$ implies $2019=b x+b+229+229 x=(b+229)(1+x)$. Because $2019=673 \cdot 3$, it follows that $b=444$ and $x=2$, from which $B C=a=\mathbf{8 8 8}$.

Final answer: 888
Subfield: Algebra


Question: Given that $a$ and $b$ are positive and

$$
\lfloor 20-a\rfloor=\lfloor 19-b\rfloor=\lfloor a b\rfloor,
$$

compute the least upper bound of the set of possible values of $a+b$.

Solution:
Let the common value of the three expressions in the given equation be $N$. Maximizing $a+b$ involves making at least one of $a$ and $b$ somewhat large, which makes the first two expressions for $N$ small. So, to maximize $a+b$, look for the least possible value of $N$. One can show that $N=14$ is not possible because that would require $a>5$ and $b>4$, which implies $a b>20$. But $N=15$ is possible by setting $a=4+x, b=3+y$, where $0<x, y \leq 1$. The goal is to find the least upper bound for $x+y$ given $15 \leq(4+x)(3+y)<16 \Rightarrow 3 \leq 3(x+y)+y+x y<4$. This is equivalent to seeking the maximum value of $x+y$ given $3(x+y)+y+x y \leq 4$. By inspection, if $x=1$ and $y=\frac{1}{5}$, then $3(x+y)+y+x y=4 \leq 4$. This is in fact optimal. To see this, consider that because $3 x+3 y+y+x y \leq 4$, it follows that $y \leq \frac{4-3 x}{x+4}$, and so $x+y \leq x+\frac{4-3 x}{x+4} \leq \frac{x^{2}+x+4}{x+4}$, which is increasing on $0 \leq x \leq 1$. Thus the maximum for $x+y$ is attained when $x=1$. Hence the least upper bound for $a+b$ is $5+\left(3+\frac{1}{5}\right)=\frac{\mathbf{4 1}}{\mathbf{5}}$.

Final answer: $\frac{41}{5}$
Subfield: Number Theory


Question: Compute the number of five-digit integers $\underline{M} \underline{A} \underline{R} \underline{T} \underline{Y}$, with all digits distinct, such that $M>A>R$ and $R<T<Y$.

Solution:
There are $\left(\begin{array}{c}10 \\ 5\end{array}\right)=252$ ways to choose the values of the digits $M, A, R, T, Y$, without restrictions. Because $R$ is fixed as the least of the digits and because $T<Y$, it suffices to find the number of ways to choose $M$ and $A$. Once $M$ and $A$ are chosen, the other three digits are uniquely determined. There are $\left(\begin{array}{l}4 \\ 2\end{array}\right)=6$ ways to select $M, A$. Thus the number of five-digit integers of the type described is $252 \cdot 6=\mathbf{1 5 1 2}$.

Final answer: 1512
Subfield: Geometry


Question: In parallelogram $A R M L$, points $P$ and $Q$ are the midpoints of sides $\overline{R M}$ and $\overline{A L}$, respectively. Point $X$ lies on segment $\overline{P Q}$, and $P X=3, R X=4$, and $P R=5$. Point $I$ lies on segment $\overline{R X}$ such that $I A=I L$. Compute the maximum possible value of $\frac{[P Q R]}{[L I P]}$.

Solution:
Because $A I=L I$ and $A Q=L Q$, line $I Q$ is the perpendicular bisector of $\overline{A L}$. Because $A R M L$ is a parallelogram, $\overline{Q I} \perp \overline{R P}$. Note also that $\mathrm{m} \angle R X P=90^{\circ}$. Thus $I$ is the orthocenter of triangle $P Q R$, from



which it follows that $\overleftrightarrow{P I} \perp \overline{R Q}$ and $\overline{P I} \perp \overline{P L}$ (because $P R Q L$ is a parallelogram). Extend $\overline{P I}$ through $I$ to meet $\overline{R Q}$ at $D$. Then $2[P Q R]=R Q \cdot P D$ and $2[L I P]=P I \cdot P L=P I \cdot R Q$. Hence the problem is equivalent to determining the maximum value of $P D / P I$.

Set $\mathrm{m} \angle R P D=\mathrm{m} \angle R P I=\alpha$ and $\mathrm{m} \angle I P X=\beta$, and note that $P D=P R \cos \alpha=5 \cos \alpha$ and $P I=P X / \cos \beta=$ $3 / \cos \beta$. It follows that

$$
\frac{P D}{P I}=\frac{5 \cos \alpha \cos \beta}{3}=\frac{5(\cos (\alpha+\beta)+\cos (\alpha-\beta))}{6} \leq \frac{5(3 / 5+1)}{6}=\frac{\mathbf{4}}{\mathbf{3}}
$$

with equality when $\alpha=\beta$.

<img_3978>

Final answer: $\frac{4}{3}$
Subfield: Number Theory


Question: Given that $a, b, c$, and $d$ are positive integers such that

$$
a ! \cdot b ! \cdot c !=d ! \quad \text { and } \quad a+b+c+d=37
$$

compute the product $a b c d$.

Solution:
Without loss of generality, assume $a \leq b \leq c<d$. Note that $d$ cannot be prime, as none of $a$ !, $b$ !, or $c$ ! would have it as a factor. If $d=p+1$ for some prime $p$, then $c=p$ and $a ! b !=p+1$. The least possible values of $a ! b$ ! are $1,2,4,6,24,36,48,120,144,240$, so the case where $d=p+1$ is impossible. If $d \geq 21$, then $a+b+c \leq 16$ and it is impossible to find values of $a$ and $b$ such that $a ! \cdot b !=\frac{d !}{c !}$. If $d=16$, either $a ! b !=16$ or $a ! b !=16 \cdot 15$ or $a ! b !=16 \cdot 15 \cdot 14$. Comparing to the list above, the only possible value $a ! b !$ on the list is $16 \cdot 15=240$ and so $(a, b, c, d)=(2,5,14,16)$ and $a b c d=\mathbf{2 2 4 0}$.

Final answer: 2240
Subfield: Algebra


Question: Compute the value of

$$
\sin \left(6^{\circ}\right) \cdot \sin \left(12^{\circ}\right) \cdot \sin \left(24^{\circ}\right) \cdot \sin \left(42^{\circ}\right)+\sin \left(12^{\circ}\right) \cdot \sin \left(24^{\circ}\right) \cdot \sin \left(42^{\circ}\right) \text {. }
$$

Solution:
Let $S=\left(1+\sin 6^{\circ}\right)\left(\sin 12^{\circ} \sin 24^{\circ} \sin 42^{\circ}\right)$. It follows from a sum-to-product identity that $1+\sin 6^{\circ}=$ $\sin 90^{\circ}+\sin 6^{\circ}=2 \sin 48^{\circ} \cos 42^{\circ}$. Because the sine of an angle is the cosine of its complement, it follows that

$$
S=\left(2 \sin 48^{\circ} \cos 42^{\circ}\right)\left(\sin 12^{\circ} \sin 24^{\circ} \sin 42^{\circ}\right)=2\left(\sin 48^{\circ}\right)^{2}\left(\sin 12^{\circ} \sin 24^{\circ} \cos 48^{\circ}\right)
$$

By the double-angle formula, this means $S=\sin 12^{\circ} \sin 24^{\circ} \sin 48^{\circ} \sin 96^{\circ}$. By a product-to-sum identity,

$$
\sin 12^{\circ} \sin 48^{\circ}=\frac{\cos 36^{\circ}-\cos 60^{\circ}}{2}=\frac{\sqrt{5}-1}{8}
$$



and

$$
\sin 24^{\circ} \sin 96^{\circ}=\frac{\cos 72^{\circ}-\cos 120^{\circ}}{2}=\frac{\sqrt{5}+1}{8}
$$

Multiply the expressions on the right-hand sides of (1) and (2) to obtain $\frac{\mathbf{1}}{\mathbf{1 6}}$

Final answer: $\frac{1}{16}$
Subfield: Algebra


Question: Let $a=19, b=20$, and $c=21$. Compute

$$
\frac{a^{2}+b^{2}+c^{2}+2 a b+2 b c+2 c a}{a+b+c}
$$

Solution:
Note that the numerator of the given expression factors as $(a+b+c)^{2}$, hence the expression to be computed equals $a+b+c=19+20+21=\mathbf{6 0}$.

Final answer: 60
Subfield: Algebra


Question: Let $T=60$ . Lydia is a professional swimmer and can swim one-fifth of a lap of a pool in an impressive 20.19 seconds, and she swims at a constant rate. Rounded to the nearest integer, compute the number of minutes required for Lydia to swim $T$ laps.

Solution:
Lydia swims a lap in $5 \cdot 20.19=100.95$ seconds. The number of minutes required for Lydia to swim $T$ laps is therefore $100.95 \cdot T / 60$. With $T=60$, the desired number of minutes, rounded to the nearest integer, is 101

Final answer: 101
Subfield: Geometry


Question: Let $T=101$. In $\triangle A B C, \mathrm{~m} \angle C=90^{\circ}$ and $A C=B C=\sqrt{T-3}$. Circles $O$ and $P$ each have radius $r$ and lie inside $\triangle A B C$. Circle $O$ is tangent to $\overline{A C}$ and $\overline{B C}$. Circle $P$ is externally tangent to circle $O$ and to $\overline{A B}$. Given that points $C, O$, and $P$ are collinear, compute $r$.

Solution:
Let $A^{\prime}$ and $B^{\prime}$ be the respective feet of the perpendiculars from $O$ to $\overline{A C}$ and $\overline{B C}$. Let $H$ be the foot of the altitude from $C$ to $\overline{A B}$. Because $\triangle A B C$ is isosceles, it follows that $A^{\prime} O B^{\prime} C$ is a square, $\mathrm{m} \angle B^{\prime} C O=45^{\circ}$, and $\mathrm{m} \angle B C H=45^{\circ}$. Hence $H$ lies on the same line as $C, O$, and $P$. In terms of $r$, the length $C H$ is $C O+O P+P H=r \sqrt{2}+2 r+r=(3+\sqrt{2}) r$. Because $A C=B C=\sqrt{T-3}$, it follows that $C H=\frac{\sqrt{T-3}}{\sqrt{2}}$. Thus $r=\frac{\sqrt{T-3}}{\sqrt{2}(3+\sqrt{2})}=\frac{(3 \sqrt{2}-2) \sqrt{T-3}}{14}$. With $T=101, \sqrt{T-3}=\sqrt{98}=7 \sqrt{2}$, and it follows that $r=\mathbf{3}-\sqrt{\mathbf{2}}$.

Final answer: $3-\sqrt{2}$
Subfield: Algebra


Question: Given that $p=6.6 \times 10^{-27}$, then $\sqrt{p}=a \times 10^{b}$, where $1 \leq a<10$ and $b$ is an integer. Compute $10 a+b$ rounded to the nearest integer.

Solution:
Note that $p=6.6 \times 10^{-27}=66 \times 10^{-28}$, so $a=\sqrt{66}$ and $b=-14$. Note that $\sqrt{66}>\sqrt{64}=8$. Because $8.1^{2}=65.61$ and $8.15^{2}=66.4225>66$, conclude that $81<10 \sqrt{66}<81.5$, hence $10 a$ rounded to the nearest integer is 81 , and the answer is $81-14=\mathbf{6 7}$.

Final answer: 67
Subfield: Algebra


Question: Let $T=67$. A group of children and adults go to a rodeo. A child's admission ticket costs $\$ 5$, and an adult's admission ticket costs more than $\$ 5$. The total admission cost for the group is $\$ 10 \cdot T$. If the number of adults in the group were to increase by $20 \%$, then the total cost would increase by $10 \%$. Compute the number of children in the group.

Solution:
Suppose there are $x$ children and $y$ adults in the group and each adult's admission ticket costs $\$ a$. The given information implies that $5 x+a y=10 T$ and $5 x+1.2 a y=11 T$. Subtracting the first equation from the second yields $0.2 a y=T \rightarrow a y=5 T$, so from the first equation, $5 x=5 T \rightarrow x=T$. With $T=67$, the answer is 67 .

Final answer: 67
Subfield: Geometry


Question: Let $T=67$. Rectangles $F A K E$ and $F U N K$ lie in the same plane. Given that $E F=T$, $A F=\frac{4 T}{3}$, and $U F=\frac{12}{5}$, compute the area of the intersection of the two rectangles.

Solution:
Without loss of generality, let $A, U$, and $N$ lie on the same side of $\overline{F K}$. Applying the Pythagorean Theorem to triangle $A F K$, conclude that $F K=\frac{5 T}{3}$. Comparing the altitude to $\overline{F K}$ in triangle $A F K$ to $\overline{U F}$, note that the intersection of the two rectangles will be a triangle with area $\frac{2 T^{2}}{3}$ if $\frac{4 T}{5} \leq \frac{12}{5}$, or $T \leq 3$. Otherwise, the intersection will be a trapezoid. In this case, using similarity, the triangular regions of $F U N K$ that lie outside of FAKE each have one leg of length $\frac{12}{5}$ and the others of lengths $\frac{16}{5}$ and $\frac{9}{5}$, respectively. Thus their combined areas $\frac{1}{2} \cdot \frac{12}{5}\left(\frac{16}{5}+\frac{9}{5}\right)=6$, hence the area of the intersection is $\frac{5 T}{3} \cdot \frac{12}{5}-6=4 T-6$. With $T=67$, the answer is therefore $\mathbf{2 6 2}$.

Final answer: 262
Subfield: Combinatorics


Question: 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$.
Compute the $E(6,1)$

Solution:
$E(6,1)=6$. Note that at least six minutes are required because exactly one switch is flipped each minute. By flipping all six switches (in any order) in the first six minutes, the door will open in six minutes.

Final answer: 6
Subfield: Combinatorics


Question: 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$.
Compute the $E(6,2)$

Solution:
$E(6,2)=3$. The sequence $\{1,2\},\{3,4\},\{5,6\}$ will allow Elizabeth to escape the room in three minutes. It is not possible to escape the room in fewer than three minutes because every switch must be flipped, and that requires at least $\frac{6}{2}=3$ minutes.

Final answer: 3
Subfield: Combinatorics


Question: 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$.
Compute the $E(7,3)$

Solution:
$E(7,3)=3$. First, note that $E(7,3) \geq 3$, because after only two minutes, it is impossible to flip each switch at least once. It is possible to escape in three minutes with the sequence $\{1,2,3\},\{1,4,5\}$, and $\{1,6,7\}$.

Final answer: 3
Subfield: Combinatorics


Question: 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$.
Compute the $E(9,5)$

Solution:
$E(9,5)=3$. Notice that $E(9,5) \neq 1$ because each switch must be flipped at least once, and only five switches can be flipped in one minute. Notice also that $E(9,5) \neq 2$ because after two minutes, there have been 10 flips, but in order to escape the room, each switch must be flipped at least once, and this requires 9 of the 10 flips. However, the tenth flip of a switch returns one of the nine switches to the off position, so it is not possible for Elizabeth to escape in two minutes. In three minutes, however, Elizabeth can escape with the sequence $\{1,2,3,4,5\},\{1,2,3,6,7\},\{1,2,3,8,9\}$.

Final answer: 3
Subfield: Combinatorics


Question: 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, 2)$ for positive even integers $n$

Solution:
If $n$ is even, then $E(n, 2)=\frac{n}{2}$. This is the minimum number of minutes required to flip each switch at least once, and Elizabeth can clearly escape in $\frac{n}{2}$ minutes by flipping each switch exactly once.

Final answer: $\frac{n}{2}$
Subfield: Combinatorics


Question: 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