Alexa Turn off the Fans (Take 2)

Logic Level 3

A cafeteria has 8 ceiling fans in which some are on high, some are on low, and some are off. You are a new worker and you have been instructed to set all the fans to low before closing up for the night. However, the only way to change the fan settings is to use the switches in a closet that is a 5 minute walk around the corner from the cafeteria, and you can’t see the ceiling fans from the closet. Furthermore, none of the switches are labeled, and some have been installed at different angles and at different directions, so there’s no way to tell which switch is for which fan, which of the three settings each switch is set to, or which direction to turn the switch to change the settings from low to high to off. You are the only person left in the building and you don’t have any handy tools (like an Amazon Echo, camera, remote control anemometer, etc.) so the only way to complete your task will be to walk, turn switches, observe, and reason.

Starting at the cafeteria, what’s the least amount of time (in minutes) that you need for a worst-case scenario to come back to the cafeteria with all the fans set to low? (Assume that the time it takes to turn switches or look at the fans is negligible, and assume that you can tell the difference between the high and low settings without having to compare to another fan.)

30 50 60 40

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Jon Haussmann
Oct 22, 2019

We can turn 12 fans to low in 40 minutes.

Let's say that each switch can be set to 0, 1, or 2, and that they are all initially set to 0. Label the switches from A to L. Then we can set them to the following positions.

A 0 0 0 1 B 0 0 1 0 C 0 0 1 1 D 0 1 0 0 E 0 1 0 1 F 0 1 1 0 G 0 0 1 2 H 0 2 0 1 I 0 1 2 0 J 0 2 1 1 K 0 1 2 1 L 0 1 1 2 \begin{array}{ccccc} \text{A} & 0 & 0 & 0 & 1 \\ \text{B} & 0 & 0 & 1 & 0 \\ \text{C} & 0 & 0 & 1 & 1 \\ \text{D} & 0 & 1 & 0 & 0 \\ \text{E} & 0 & 1 & 0 & 1 \\ \text{F} & 0 & 1 & 1 & 0 \\ \text{G} & 0 & 0 & 1 & 2 \\ \text{H} & 0 & 2 & 0 & 1 \\ \text{I} & 0 & 1 & 2 & 0 \\ \text{J} & 0 & 2 & 1 & 1 \\ \text{K} & 0 & 1 & 2 & 1 \\ \text{L} & 0 & 1 & 1 & 2 \end{array}

So in the cafeteria, we can see the initial state of the fans (which all correspond to 0). We can walk to the switches, set switch D to 1 (etc.), then walk back and see the fans again, and so on. After walking back and forth for 30 minutes, we will have seen each fan in all four states, corresponding to the four columns above.

Each row in the table has a different "pattern", so we can match the fans to the switches. For example, if we observe that the settings of a fan were high-low-off-high, then the only switch that fits is switch I.

Furthermore, we have seen each fan in at least two different states, so we know which switch setting corresponds to low. So we can walk to the switches, set all the fans to low, and walk back to the cafeteria, which brings us up to 40 minutes.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...