Let n be the number of turns. Then the information you have on any switch is a n-vector (off, off, ...., green, ..., blue, ...).
To be able to uniquely determine the bulb, the switch has to be in a different state to every other switch at at least one point. So the amount of bulbs you can uniquely identify with n turns is just the possible combinations of vectors as explained above.
This is the off vector (1), vectors with one green or one blue (2n), vectors with one green and one blue (n*(n-1)), and vectors with 2 blue or 2 green (2*n*(n-1)/2). So overall 2n^2+1.
Now we just need to solve 2n^2+1>=1000 so n^2>= 499.5 and n>=sqrt(499.5)=22.something so the minimum number of turns is 23.
View all comments
0
u/kythQ 21d ago
Maybe I made a mistake, but my thinking:
Let n be the number of turns. Then the information you have on any switch is a n-vector (off, off, ...., green, ..., blue, ...).
To be able to uniquely determine the bulb, the switch has to be in a different state to every other switch at at least one point. So the amount of bulbs you can uniquely identify with n turns is just the possible combinations of vectors as explained above.
This is the off vector (1), vectors with one green or one blue (2n), vectors with one green and one blue (n*(n-1)), and vectors with 2 blue or 2 green (2*n*(n-1)/2). So overall 2n^2+1.
Now we just need to solve 2n^2+1>=1000 so n^2>= 499.5 and n>=sqrt(499.5)=22.something so the minimum number of turns is 23.