Skip to main content

AMC 12 Mock Exam 2 Problem 21

Problem 21 of 25

A panel has four light switches, all of which are initially off. Each minute, one of the four switches is chosen uniformly at random, independently of all earlier choices, and flipped (from off to on, or from on to off). What is the expected number of minutes until all four switches are on for the first time?

Answer choices

Show solution

Solution

Only the number kk of switches that are on matters. From state kk, the next flip moves to k+1k+1 with probability 4−k4\frac{4-k}{4} and to k−1k-1 with probability k4\frac k4.

Let tkt_k be the expected number of minutes to go from kk switches on to k+1k+1 switches on for the first time. After one minute we either succeed, or (with probability k4\frac k4) we drop to k−1k-1, from which we need tk−1t_{k-1} minutes to return to kk and then tkt_k more. So tk=1+k4(tk−1+tk),i.e.,tk=1+k4tk−11−k4.t_k=1+\frac k4\left(t_{k-1}+t_k\right),\qquad\text{i.e.,}\qquad t_k=\frac{1+\frac k4t_{k-1}}{1-\frac k4}. Starting from t0=1t_0=1: t1=1+1434=53t_1=\frac{1+\frac14}{\frac34}=\frac53, t2=1+12⋅5312=113t_2=\frac{1+\frac12\cdot\frac53}{\frac12}=\frac{11}{3}, t3=1+34⋅11314=15t_3=\frac{1+\frac34\cdot\frac{11}3}{\frac14}=15.

The expected total is 1+53+113+15=6431+\frac53+\frac{11}3+15=\boxed{\tfrac{64}{3}}.

(Ignoring the backward moves, as if each minute's flip were always useful until it hit a new switch, gives the coupon-collector value 44+43+42+41=253\frac44+\frac43+\frac42+\frac41=\frac{25}{3}, which is far too small.)

Tagged: Markov chain expected hitting time