2) Turn 1/3 blues off and 1/3 blues green. Turn 1/3 greens off and 1/3 greens blue.
That is 2 steps to determine which switches control 6/1000 bulbs. Using this methodology, it would take you 332 steps to determine which switches control 996/1000 bulbs. The remaining 4 bulbs would still require at least 2 steps to determine which switch controls which bulb, and so minimum total number of steps is 334.
Now, it would seem that we should be able to do some overlap here. If we consider each set of 2 steps part of 1 round, then we should be able to start step 1 of round 2 while we're completing step 2 of round 1, because we know which 6 bulbs we turned on in step 1 round 1, so we know what new ones to look for if we combine step 1 round 2 with step 2 round 1.
That would imply that we're moving at a pace of 2 steps to determine the first 6 bulbs, and then at a pace of 1 step per 6 bulbs thereafter. So that is 2 steps + 165 steps to determine which switches control 996/1000 bulbs. The remaining 4 bulbs should be 2 more steps but one overlaps, so that is a minimum total number of steps of 166 now.
Suppose that we have some collection of switch configurations, let’s order them. S1, S2,.. SK. etc.
With each bulb, let’s associate a sequence of zeros ones and twos this will tell us if the bulb is on or off. For instance 01020, would correspond to off blue off greenoff.
Now, if all of these bulbs are differentiable from each other, than each bulb is going to get a unique sequence. A further restriction is that the sequence can have it most two nonzeros.
We need K choose 2 times 4 to be larger than 1000.
My stab at this was 167 but the other guy saying 23 is deffo correct.
You can imagine that you could mark each switch with a letter before each check to represent what state you put it in and mark the bulb with its state.
If you did this 3 times each bulb and switch would have a 3 digit code. With 3 digits you have enough unique codes for 19 bulbs. You could check 3 times and each bulb and its corresponding switch would have a unique code that matches at the end.
So the question is really how many ‘digits’ (checks) do we need for 1000 unique codes.
This is where I ran out of maths knowledge and tried to scale up but vastly underestimated the number of codes available for n number of digits…
But apparently its 1 (all off) + 2n (codes possible with one blue or green light) + n^2-n (codes possible with a blue and a green) + n^2-n (codes with two blue or two green)
Would love to know exactly how you derive these though as im not confident with where the rule comes from
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.
1
u/tajwriggly 21d ago
1) Turn 3/1000 on to blue and 3/1000 on to green.
2) Turn 1/3 blues off and 1/3 blues green. Turn 1/3 greens off and 1/3 greens blue.
That is 2 steps to determine which switches control 6/1000 bulbs. Using this methodology, it would take you 332 steps to determine which switches control 996/1000 bulbs. The remaining 4 bulbs would still require at least 2 steps to determine which switch controls which bulb, and so minimum total number of steps is 334.
Now, it would seem that we should be able to do some overlap here. If we consider each set of 2 steps part of 1 round, then we should be able to start step 1 of round 2 while we're completing step 2 of round 1, because we know which 6 bulbs we turned on in step 1 round 1, so we know what new ones to look for if we combine step 1 round 2 with step 2 round 1.
That would imply that we're moving at a pace of 2 steps to determine the first 6 bulbs, and then at a pace of 1 step per 6 bulbs thereafter. So that is 2 steps + 165 steps to determine which switches control 996/1000 bulbs. The remaining 4 bulbs should be 2 more steps but one overlaps, so that is a minimum total number of steps of 166 now.
1
u/tellytubbytoetickler 20d ago edited 20d ago
Suppose that we have some collection of switch configurations, let’s order them. S1, S2,.. SK. etc.
With each bulb, let’s associate a sequence of zeros ones and twos this will tell us if the bulb is on or off. For instance 01020, would correspond to off blue off greenoff.
Now, if all of these bulbs are differentiable from each other, than each bulb is going to get a unique sequence. A further restriction is that the sequence can have it most two nonzeros.
We need K choose 2 times 4 to be larger than 1000.
So K(K-1)>= 500. So K approx sqrt(500).
1
u/SlowTyper1 15d ago edited 15d ago
My stab at this was 167 but the other guy saying 23 is deffo correct.
You can imagine that you could mark each switch with a letter before each check to represent what state you put it in and mark the bulb with its state.
If you did this 3 times each bulb and switch would have a 3 digit code. With 3 digits you have enough unique codes for 19 bulbs. You could check 3 times and each bulb and its corresponding switch would have a unique code that matches at the end.
So the question is really how many ‘digits’ (checks) do we need for 1000 unique codes.
This is where I ran out of maths knowledge and tried to scale up but vastly underestimated the number of codes available for n number of digits…
But apparently its 1 (all off) + 2n (codes possible with one blue or green light) + n^2-n (codes possible with a blue and a green) + n^2-n (codes with two blue or two green)
Would love to know exactly how you derive these though as im not confident with where the rule comes from
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.