VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » Knowledge, science, education » TED-Ed
Can you solve the risky disk riddle? - James Tanton

Can you solve the risky disk riddle? - James Tanton

FBTwitterReddit

video description

Rating: 4.5; Vote: 2
Your antivirus squad is up against a code that s hijacked your mainframe. What you ve learned from other infected systems, right before they went dark, is that it likes to toy with antivirus agents in a very peculiar way and you re the agent that s been selected to go up against the malware. Can you figure out which disk that runs your mainframe has been corrupted? James Tanton shows how
Date: 2021-10-19

Comments and reviews: 10


Instead of using binary numbers, i thought you could directly signal which light was corrupted to your friends.
If the number of lights on when you get there is an even number (0. 2 or 4, then it is straightforward because you can turn one light switch to make it such that the odd light out (the only one turned off or on) is the corrupted light.
It is a bit more complicated if the number of lights on is an odd number (1 or 3, but you could arrange a code with your friends, one example which I have listed below.
1. To signal that the 1st light is the corrupted one, turn the light switch that makes it such that all 4 are on, or all 4 are off (in other words: on-on-on-on or off-off-off-off)
2. To signal that the 2nd light is the corrupted one, turn the light switch that makes it such that the lights 1 & 2 share the same configuration, while lights 3 & 4 share the opposite configuration (in other words on-on-off-off or off-off-on-on)
3. To signal that the 3rd light is the corrupted one, turn the light switch that makes it such that lights 1 & 3 share the same configuration, while lights 2 & 4 share the opposite configuration (in other words on-off-on-off or off-on-off-on)
4. To signal that the 4th light is the corrupted one, turn the light switch that makes it such that lights 1 & 4 share the same configuration, while lights 2 & 3 share the opposite configuration (in other words on-off-off-on or off-on-on-off)
No matter what the starting configuration of lights is, you should always be able to signal each of the 4 lights depending on which one is revealed to be corrupted.
When you expand the problem and number of lights on a much greater scale, the binary solution definitely makes a lot more sense, but in the case of just having 4 lights, I believe this is a more straightforward solution.

reply

I solved this in a different yet similar way way. I also labeled the disks from 0 to 3. Then I basically said read the lights as a binary number except completely ignore the last light. So we are left with a three digit binary number. If the first digit is a 1, take the ones complement. That is flip every bit. Then read the binary number. Whichever number the binary number reads as is the corrupted disk. If the initial state of the lights already shows the correct number, just flip the last light since we ignore that one.
My solution defines which lights to switch differently but both solutions are fundamentally the same. Switching the last light in TedEd s solution is the same as taking the ones complement ie switching the first light in my solution. Doing nothing by switching the first light in TedEd s solution is the same as doing nothing by switching the last light in mine. Switching one of the middle lights in both solutions does the same thing by flipping one bit.

reply

Ok. I'm at the problem-pause screen.
Here's my solution.
If all of them are off or on, I can indicate which one by having an odd-one-out.
I can also create the same scenario if two are off and two are on.
If there are three one way and one the other way, I can flip one to make them all match. Or I can flip one to make a 2-2 split down the middle. Or I can flip one to make every other light match. Or I can flip one to make a 1-2-1 pattern, where the two in the center match each other.
So my instructions to my allied agents are these.
1. If there's three lights matching, the corrupted disk is the one that doesn't match.
2. Failing that, see the chart below
All matching - disk 0
2-2 pattern - disk 1
Alternating pattern - disk 2
1-2-1 pattern - disk 3
Edit: I think I used something that works because of what was explained? I think? I just didn't use the binary math to explain it?

reply

My solution was different from theirs, but I think it still works (at least for 4 disks):
If the pattern you see is an even pattern (all 4 on/off or 2 on 2 off, just flip a switch so that the corrupted one is the odd one out. For example, let s say the 3rd button is corrupted:
->
->
Now let s say you see an odd pattern (3 on/off, 1 off/on. Just flip one switch such that you are left with one of four patterns below (all of which you can get from 3-1 by flipping one switch) and assign a value to each. For example:
or means 1 is corrupted.
or means 2 is corrupted.
or means 3 is corrupted.
or means 4 is corrupted.
So, if your team mates see an odd (3-1) pattern, the odd one out is corrupt. If they see an even pattern (4-0 or 2-2, the one which matches the 4th disk is corrupt unless all four are the same, in which case the 4th is corrupt.

reply

My solution didn't involve binary at all, but it still worked. The trick is to have a plan for every possibility (considering odds and evens separately, since you can't choose not to toggle a light. The rule I implemented goes like this:
- 0 or 4 lights on: toggle the corrupted disk's light.
- 1 or 3 lights on: if the leftmost disk is corrupted, toggle the different light. If not, toggle another light so that the corrupted disk's light matches the leftmost disk's (and no others do.
- 2 lights on: toggle the light that's in the same state as the corrupted disk.
- 0 or 4 lights on: hit the leftmost disk.
- 1 or 3 lights on: hit the disk that's different from the others.
- 2 lights on: hit the disk that's in the same state as the leftmost disk.

reply

Fantastic puzzle with a great explanation!
I figured out another way to solve this particular scenario though:
Take the first 3 disks as bits: off -> 0, on ->1, the 4th disk is a 'throw-away'.
Encode the position of the corrupted disk as follows:
disk 1: 000 or 111, disk 2: 100 or 011, disk 3: 010 or 101, disk 4: 001 or 110
With this encoding it is ensured that one can indicate the position of the corrupt disk via a single toggle (if the code is already correct, just toggle the 4th disk):
1 2 3 4
000 100, 010, 001
111 011, 101, 110
2 1 3 4
100 000, 101, 110
011 111, 010, 001
3 1 2 4
010 000, 011, 110
101 111, 100, 001
4 1 2 3
001 000, 011, 101
110 111, 100, 010

reply

If 0 lights -> turn on corrupted
If 1 light ->
All lights off if corrupted is in 1st position,
1, 2 on= 2nd light corrupted
1, 3 on= 3rd light corrupted
1, 4 on= 4th light corrupted
2, 3 on= 4th light corrupted
2, 4 on= 3rd light corrupted
3, 4 on = 2nd light corrupted
If 2 lights ->
Make the corrupted light either be the only one on or the only one off
If 3 lights ->
All lights on if corrupted is in 1st position.
The rest is the same as if 1 light
4 lights on -> turn off corrupted
I think I ve found an alternate solution.

reply

I thought it was something about feeling the heat of the lightbulbs.
If the corrupted disk light was on, you would turn it off and the squad could feel the heat from a bulb that was currently off but still emitting heat from when it was on.
If the corrupted disk was off, you would turn it on and the squad notices that one bulb isn t as warm as the other bulbs that are on.
Assuming the bulbs that are off are cool and the bulbs that are on are supposed to be hot. It probably doesn t work in some cases though, what do I know.

reply

TedEd: uses binary code
Me, nonbinary: ok I got nothing from that
I thought about using a solution similar to the one from Sorting Hats. Like, if lights 1 and 2 were in a different setting, it would mean that it was the disc nr 1, if they were both illuminated or both off - the disc 2 etc. Sadly, it would have wirked only for 2 discs situation, or if we had the possibility to switch more than one time, or not switch at all.

reply

Maybe deliver the context a little less ambiguous next time, instead of hitting us with a riddle from the start with a seemingly confusing animation? I liked and think it's good but there must be a better way to present this riddle to the average person like me. I didn't know what the riddle's about and what angle to tackle in solving it because I don't even know what it's related to until BINARY comes up halfway into the video.
reply
Add a review, comment






Other channel videos