8
$\begingroup$

power outlet, 2 timers, light bulb
Two motorized 24-hour light timers are daisy chained between a power outlet and a light bulb.

For these timers, devise schedules and choose initial times that produce the following repeated lighting pattern, with the largest possible whole number $n$, beginning when the outlet's power is switched on.

     Light is on for 1/2 hour,$~$ off for $n$ hours,
      on for 1/2 hour,$~$ off for $n$ hours,
      on for 1/2 hour,$~$ off for $n$ hours,
      $~\,\vdots$

If you are unfamiliar with these timers

Each timer repeatedly cycles through its schedule of 24 intervals that last an hour each.
•$~$ A circular dial determines the current point in the schedule
•$~$ A motor rotates the dial to advance through its schedule whenever power is supplied to the timer
•$~$ You may initially set the dial to any minute of any interval
•$~$ You preset each interval to ON or OFF
•$~$ When the dial is in an interval that was set to ON, the timer acts as a direct connection for power to flow to whatever is plugged into the timer
•$~$ When the dial is in an interval that was set to OFF, the timer does not provide a power connection
•$~$ The resulting ON and OFF durations could be fractions of an hour if the timer is set to begin within an interval or if incoming power is interrupted during an interval

The first timer is plugged into the outlet.
•$~$ It runs nonstop once the outlet is switched on
•$~$ It supplies power— but only when its dial is in an ON interval — to the second timer

The second timer has the light bulb plugged into it.
•$~$ It advances through its schedule only when the first timer supplies power
•$~$ It lights the bulb, but only while powered by the first timer and when its dial is in an ON interval

Related puzzles
Odd hours with two timers
Day and night of the two timers
Third timer's a charm

(These puzzles are either directly from or related to actual botany experiments)

$\endgroup$
4
  • 1
    $\begingroup$ this question reminds me of one of those nasty bonus-questions which frequented our electronic engineering exams :p $\endgroup$
    – nine9
    Commented Jan 21, 2016 at 12:42
  • $\begingroup$ After the initial cycle, regardless of which minute the dial was initially set to, does your timer turn ON for a full interval? $\endgroup$
    – Lawrence
    Commented Jan 21, 2016 at 14:39
  • $\begingroup$ Right, @Lawrence, although the intervals are set as hour-long blocks, they may begin or be interrupted in the middle. To be clarified in the puzzle statement. $\endgroup$
    – humn
    Commented Jan 21, 2016 at 15:06
  • $\begingroup$ Not from an EE exam, from a botany experiment with various day/night cycles $\endgroup$
    – humn
    Commented Jan 21, 2016 at 20:30

3 Answers 3

4
$\begingroup$

To show that Ivo Beckers has the longest $n$ in his answer, rewrite it like this:

Set the intervals like this where 1 is on and 0 is off:
A: 101101101101101101101101
B: 101010101010101010101010

set dial A to 30 minutes and B to 0 minutes.

That is, rotate A once to the left and set its timer to 30 instead of 90.

This works as before for a one hour delay.

Notice that A is now simply 101 repeated 8 times.

To get a 2 hour delay we'd need A to be 10010 repeated, but 5 doesn't divide 24 evenly.

Likewise, for a 3 hour delay A is set to 1000100 repeated but 7 doesn't divide 24 evenly.

etc

None of these work because:
Their length is len = n + (n + 1) for an n hour delay.
Let's call this len(A), therefore len(A) has to be odd.
The only odd number that divides 24 evenly is 3.

So 1 hour is the longest delay.

EDIT: Other patterns simply don't work.

In order to have a 1/2 hour on followed by off B can't have any sequential ones.

So B must be composed of a single one followed by one or more zeros with this pattern repeated through out B.

B must also start with a one or we can simply remove leading zeros (with no loss of generality) so that B does start with a one.

A must now start with a one and its timer set to start at 30 minutes so we begin with a 1/2 hour on.

A must then be followed by a zero so we go off after that 1/2 hour on.

And B obviously is followed by one or more zeros.

Therefore A and B must start with:

A = 10 [1]
B = 10 [2]

Now for any number of zeros that follow the initial one for B in [2], say B is now 10...0 repeated i.e a one followed by b zeros followed by a one followed by b zeros etc, then A must be 100..011..1 repeated i.e. a one followed by b zeros and then b ones followed by a one then b zeros, then b ones etc.

Therefore len(A) is 1 + 2b, so len(A) remains odd and must evenly divided 24.

So therefore len(A) can only equal 3.
and A is 101101101101101101101101
and B is 101010101010101010101010
with A starting at 30 minutes and B at 0 minutes.
Or equivalent rotations as in Ivo Beckers original answer.

$\endgroup$
4
  • $\begingroup$ You make the assumption that B must have 101010... Couldn't that be something else? You only prove that $n$ must be $1$ when B is like this I think. To me this seems an incomplete proof but I could be wrong $\endgroup$
    – Ivo
    Commented Jan 21, 2016 at 21:52
  • $\begingroup$ @IvoBeckers B can't be all1s because you'd loose your 1/2 hour on followed by an off. So all one (pun not intended) can do to B is double/triple/etc the zeroes. That means doubling/tripling/etc the ones in A. len(A) is still odd and even larger now. So the conclusion holds. $\endgroup$
    – Paul Evans
    Commented Jan 21, 2016 at 23:32
  • $\begingroup$ PaulEvans , care to move your comment about 1/2 & 1/.2 into the answer? I agree with @IvoBeckers that it is an important part of the complete solution, even if not as central as the oddness of the first timer's period. $\endgroup$
    – humn
    Commented Jan 22, 2016 at 0:33
  • $\begingroup$ @human Very good, edited answer accordingly. $\endgroup$
    – Paul Evans
    Commented Jan 22, 2016 at 2:40
2
$\begingroup$

Let me start off with an $n=1$ solution, (at least I think this works)

Set the intervals like this where 1 is on and 0 is off:
A: 110110110110110110110110
B: 101010101010101010101010

set dial A to 90 minutes and B to 0 minutes.

$\endgroup$
1
  • $\begingroup$ Yes! And a later answer demonstrates that no better solution exists $\endgroup$
    – humn
    Commented Jan 21, 2016 at 21:40
1
$\begingroup$

A motor rotates the dial to advance through its schedule whenever power is supplied to the timer

• You may preset each interval to ON or OFF

only 1 interval of the 24 is ON on the first and second

• You may initially set the dial to any minute of any interval

The first timer 23:00 away from first ON interval
The second timer 22:30 away from the first ON interval

in that case the first n =

552

$\endgroup$
3
  • $\begingroup$ This does not start with the 1/2 hour on and also does not have the repeating pattern I think $\endgroup$
    – Ivo
    Commented Jan 21, 2016 at 13:01
  • $\begingroup$ it does repeat the 30 min ON, but n will not be the same OFF duration every cycle, is the same off duration required? $\endgroup$ Commented Jan 21, 2016 at 13:07
  • $\begingroup$ From the question I thought that $n$ was fixed and needed to be the same every time but maybe the OP can clarify this $\endgroup$
    – Ivo
    Commented Jan 21, 2016 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.