- #1
find_the_fun
- 148
- 0
A circuit has n switches, all initially off. In order to be able to flip the ith switch, the (i-1)th switch must be on and all earlier switches off. The first switch can always be flipped. Find a recurrence relation for the total number of times the n switches must be flipped to get the nth switch on and all the others off.
I got \(\displaystyle f_n=f_{n-1}+2\) with initial condition \(\displaystyle f_1=1\) Is this right? This makes sense because to get the nth switch on, you need the (n-1)th switch on, and then you need to turn on the nth switch itself and turn off the (n-1)th switch. I have trouble explaining this using math though.
I got \(\displaystyle f_n=f_{n-1}+2\) with initial condition \(\displaystyle f_1=1\) Is this right? This makes sense because to get the nth switch on, you need the (n-1)th switch on, and then you need to turn on the nth switch itself and turn off the (n-1)th switch. I have trouble explaining this using math though.
Last edited: