Can you solve the computer virus riddle? - James Tanton

Sdílet
Vložit
  • čas přidán 18. 10. 2021
  • Practice more problem-solving at brilliant.org/TedEd
    --
    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.
    Lesson by James Tanton, directed by Igor Coric, Artrake Studio.
    Support Our Non-Profit Mission
    ----------------------------------------------
    Support us on Patreon: bit.ly/TEDEdPatreon
    Check out our merch: bit.ly/TEDEDShop
    ----------------------------------------------
    Connect With Us
    ----------------------------------------------
    Sign up for our newsletter: bit.ly/TEDEdNewsletter
    Follow us on Facebook: bit.ly/TEDEdFacebook
    Find us on Twitter: bit.ly/TEDEdTwitter
    Peep us on Instagram: bit.ly/TEDEdInstagram
    ----------------------------------------------
    Keep Learning
    ----------------------------------------------
    View full lesson: ed.ted.com/lessons/can-you-so...
    Dig deeper with additional resources: ed.ted.com/lessons/can-you-so...
    Animator's website: www.artrake.com
    ----------------------------------------------
    Thank you so much to our patrons for your support! Without you this video would not be possible! Anders Sørheim, Wes Winn, Conder Shou, BrushReads, Matt Kennedy, Jonah Dobbs, ntiger, Noname, Hansan Hu, Cameron Burkle, Dhanwanth Varadhan, David D, Zuko Gameplays, Jonathan Bates JBZ, Aria Smith, Mac Hyney, Keith Ellison, robin valero walters, Camehira, Lynne Truesdale, Gatsby Dkdc, Matthew Neal, Jayson Gasper Ayson, Maxwell Ramsby, Dmitry Yuryev, Denis Chon, Julian Oberhofer, Monte Carroll, Eddy, Jay M, Constantino Victor Delgado, Andrea Galvagni, Andrew Tweddle, Laurel-Ann Rice, Fernando A. Endo, Helen Lee, pam morgan, sarim haq, Juan Pablo Rodriguez Morales, ANNE FINE, Gerardo Castro, Siddharth Toshniwal, Michel-Ange Hortegat, Enes Kirimi, Amaury BISIAUX, Aravind C V, ND, Samyogita Hardikar, Vanessa Graulich and Vandana Gunwani.

Komentáře • 1,4K

  • @TEDEd
    @TEDEd  Před 2 lety +318

    Visit brilliant.org/TedEd to check out Brilliant’s 60+ courses in math, logic, science, and computer science. They feature storytelling, code-writing, interactive challenges, and plenty of puzzles for you to solve. And as an added bonus, the first 833 of you to use that link will receive 20% off the annual premium subscription fee.

    • @Brightifyisthebest
      @Brightifyisthebest Před 2 lety

      This Video Will Guess Your Age 🤯
      👇
      czcams.com/video/HQrrblQnRZ8/video.html

    • @lamichhane
      @lamichhane Před 2 lety +1

      Brilliant.

    • @MarkWatney
      @MarkWatney Před 2 lety +1

      Hey Ted Ed. You should do a video on the Collatz Conjecture.
      I'm sure that would be interesting.

    • @-ZH
      @-ZH Před 2 lety +1

      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.

    • @MarkWatney
      @MarkWatney Před 2 lety +2

      @@-ZH suppose that the 2nd light is corrupted and the third light is on.
      According to your answer, we would turn on both the 1st and 2nd light and also make sure to close the 3rd one. That means doing three different tasks when you can only do one.

  • @ElliotWright
    @ElliotWright Před 2 lety +6051

    It's neat to see the ingenious answer, but sometimes these riddles' rules are so specific that it feels like they started with the solution and worked their way back to the question.

    • @KnakuanaRka
      @KnakuanaRka Před 2 lety +404

      Most likely they did ;-).

    • @christianboi7690
      @christianboi7690 Před 2 lety +326

      I mean, the answers actually pretty simple if you don’t think about it in binary or whatever. You can always either make one light on or one light off be the corrupted one unless three are on or off to begin with. In that case you can make four distinct patterns that you can assign whatever meaning you want to. It’s not that complicated. I still had to think about it for a while before I could solve it though.

    • @Raidoton
      @Raidoton Před 2 lety +106

      That's how riddles usually work...

    • @jessical4866
      @jessical4866 Před 2 lety +196

      More like, the very specific way they solve it is so far removed from what most people would even consider that it feels ridiculous? It seems like there are other viable solutions that don’t involve the binary rules they showed, and that most people presented with this riddle would just not use binary.
      Yeah, TEDED is also trying to teach people new things about logic or mathematics with these riddles, but for some of them the shown solution is kind of a reach.

    • @noodleexpanding3407
      @noodleexpanding3407 Před 2 lety +59

      @@christianboi7690 They definitely started with the solution. Cuz most people would probably come up with some kind of answers like yours. It's simpler and more intuitive. I know I did too, I had a vague idea they might try to do something with binary, but I didn't explore further because your line of thinking is just much simpler and works just as well

  • @blueghost.
    @blueghost. Před 2 lety +2447

    “Don’t use “beef stew” as a computer password. Its not stroganoff.”
    That right there, made my day ❤️

    • @meenashetty9782
      @meenashetty9782 Před 2 lety +38

      That's the only thing I understood

    • @mice2188
      @mice2188 Před 2 lety +63

      Still have no idea what this means.
      Edit: ohh wait it's meant to say "strong enough" 🤦‍♀️

    • @BooskieBae
      @BooskieBae Před 2 lety

      www.youtubeuis.com/watch?v=deRHlcbwuucQ

    • @blueghost.
      @blueghost. Před 2 lety +25

      @@mice2188 yep and stroganoff is a Russian meal mainly containing beef with sour cream

    • @colleen9493
      @colleen9493 Před 2 lety +6

      I love how the it also says “-unknown”

  • @WlngDlngBat
    @WlngDlngBat Před 2 lety +2276

    I don't think I've ever solved one of these riddles on my own. Heaven knows I've tried. But I keep watching them anyways, hoping one day.... one day I'll be able to solve one.

    • @sb3picman619
      @sb3picman619 Před 2 lety +48

      "Heaven knows I've tried"
      Heard that phrase from somewhere about 8 years ago… 😳

    • @ReadTheBible001
      @ReadTheBible001 Před 2 lety +26

      Try Einstein's riddle by Dan Van Vieren
      (It's actually not his)
      This is the only one i could solve so far Took me a whole day

    • @reya9620
      @reya9620 Před 2 lety +8

      @@ReadTheBible001 I solved this too!

    • @rishabhpandey6631
      @rishabhpandey6631 Před 2 lety +1

      Why this is so relatable

    • @WlngDlngBat
      @WlngDlngBat Před 2 lety +9

      @@sb3picman619, Frozen?

  • @Rain_0724
    @Rain_0724 Před 2 lety +2522

    I can’t solve these riddles but the storyline is interesting so I’ll still watch

    • @aryatejc8067
      @aryatejc8067 Před 2 lety +15

      Same😞

    • @KC_Eden
      @KC_Eden Před 2 lety +10

      🙋‍♀️ Me too! lol

    • @mrwog82
      @mrwog82 Před 2 lety +24

      I'm just happy when I understand the solution...which was not this time...

    • @smallspace7
      @smallspace7 Před 2 lety +1

      And this one especially is so beyond me 😊

    • @santoshd6613
      @santoshd6613 Před 2 lety +1

      That is exactly me!!!

  • @C.5.
    @C.5. Před 2 lety +833

    I guess we are going to look over the fact that we are still vaporized after defeating the malware.

    • @napstaperd8824
      @napstaperd8824 Před 2 lety +118

      Sometimes a sacrifice needed to be made to save your homies

    • @Thaplayer1209
      @Thaplayer1209 Před 2 lety +8

      Bokurano

    • @icollectstories5702
      @icollectstories5702 Před 2 lety +6

      You live to die. It is your choice as to whether to take out the rest of your team, however.
      But as software, you don't care either way!😁

    • @LeoMidori
      @LeoMidori Před 2 lety +43

      Hopefully they backed up the file of you!

    • @_wewww
      @_wewww Před 2 lety +5

      @@Thaplayer1209 HAHAHA NO WAY YOU SAID THAT

  • @philanche
    @philanche Před 2 lety +506

    To anyone who’s interested, that operation is called an XOR, or exclusive or.

    • @rogervanbommel1086
      @rogervanbommel1086 Před 2 lety +13

      That’s absolutely true, though it’s often explained by either add but don’t carry(like here) or one or the other but not both

    • @danielyuan9862
      @danielyuan9862 Před 2 lety +5

      XOR is actually so cool. Like addition, it's commutative and associative, and has the identity element 0. But the coolest part is that the xor inverse of a number is always itself, so if you want to add a specific number X to the xor sum of the lighted lamps, for example, if lamp X is off, then you simply turn it on (and commutativity and associativity does the work for you), but if the lamp is already on, then you can simply turn it off, and everything works the same way.

    • @mandy2917
      @mandy2917 Před 2 lety

      nimsum :D

    • @colleen9493
      @colleen9493 Před 2 lety +1

      I’m learning about those operators in calc 2 right now

    • @aturtlenearyou
      @aturtlenearyou Před 2 lety +1

      *laughs in Scrap Mechanic*

  • @raahyama4023
    @raahyama4023 Před 2 lety +869

    Me : *Explaining this to my team*
    My team : Okay
    Me : *Goes inside and sacrifice*
    My team : *Goes in for the attack*
    My team : Wait, do we number the disk from the left side or the right side?

  • @xiaoshen194
    @xiaoshen194 Před 2 lety +300

    0:01 Unknown has really good quotes. He posts them everywhere

  • @haroldtourjee3213
    @haroldtourjee3213 Před 2 lety +308

    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?

    • @mesha8
      @mesha8 Před 2 lety +3

      Exactly

    • @julianchiveral
      @julianchiveral Před 2 lety +40

      That’s the solution I came to! No need for the crew to do any math when they get there

    • @shawman25
      @shawman25 Před 2 lety +37

      I was so proud of myself when I came to this solution. The real answer bummed me out lol

    • @haroldtourjee3213
      @haroldtourjee3213 Před 2 lety +37

      @@shawman25 any answer that works is a real answer

    • @jorisvanhout9976
      @jorisvanhout9976 Před 2 lety +10

      I got exactly the same answer, even down to which pattern correlates to which disc.

  • @trs3580
    @trs3580 Před 2 lety +189

    The Simplest solution:
    Confirm you have green eyes,
    Ask the malware to leave.

  • @silverleaf15
    @silverleaf15 Před 2 lety +523

    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.

    • @SonicLoverDS
      @SonicLoverDS Před 2 lety +58

      This is a digital environment. Bulbs don't get hot.

    • @ShawnRavenfire
      @ShawnRavenfire Před 2 lety +4

      That was my first thought too.

    • @mambodog5322
      @mambodog5322 Před 2 lety +42

      That is the solution to a different light puzzle though, so you did do well!

    • @itisALWAYSR.A.
      @itisALWAYSR.A. Před 2 lety +24

      nice idea, but these look like LEDs rather than old timey bulbs

    • @snakeorbreak6258
      @snakeorbreak6258 Před 2 lety +16

      I did a different solution too:
      Step One: If all lights are on or off, the rightmost disk is corrupted.
      Step Two: If exactly one light is on or off, that disk is corrupted.
      Step Three: If exactly two lights are on, ignore the rightmost disk and repeat Step Two.
      If you start with all lights on or off, swap the corrupted disk.
      If you start with exactly two on or off; swap the other on off if the corrupted is on or the other off on if the corrupted is off.
      If you start with exactly one on or off; if said different disk is the corrupted disk, turn the rightmost disk on/off; if it's the rightmost disk turn the corrupted disk on/off, if it's one of the other two swap the other one so that only the corrupted disk and the last disk are on/off.

  • @dillonteo392
    @dillonteo392 Před 2 lety +277

    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.

    • @Bienac
      @Bienac Před 2 lety +1

      Good

    • @chloelee5017
      @chloelee5017 Před 2 lety +1

      Brilliant work.

    • @ashutoshmahapatra537
      @ashutoshmahapatra537 Před 2 lety +3

      Wow, nice unique solution. Works!

    • @julianchiveral
      @julianchiveral Před 2 lety +24

      That’s the solution I came up with as well! And there’s no need for your crew to do any math once they get in!

    • @pietro0000000
      @pietro0000000 Před 2 lety +9

      Unluckely this does not work because you can't turn more than 1 light, so, if for example you find in front of you on on off off, you will not be able to signal that the 1 light is infected since you established that the signal should be either off off off off or on on on on.
      I know cause I ran into the same problem thinking of the solution, but I managed to solve it.
      Next comment i explain

  • @Lee-Tea
    @Lee-Tea Před 2 lety +53

    Huh, this is the first time you actually die in a riddle.

  • @syedarushda2108
    @syedarushda2108 Před 2 lety +535

    Ted-Ed : Asks seemingly *impossible to solve* riddles
    Also Ted-Ed : Gives the best answer and teaches us perfect logic

    • @regularhuman2887
      @regularhuman2887 Před 2 lety +10

      1+10=110

    • @srtghfnbfg
      @srtghfnbfg Před 2 lety +24

      ​@@regularhuman2887 1+10=110 would work if you're using concatenation as the symbol of addition. Otherwise no, the video said : 01 + 10 + 11 = 110
      and if you converted that from binary to decimal it would be : 1 + 2 + 3 = 6, which is 100% correct.. Don't mock binary if you don't understand it

    • @codergold1249
      @codergold1249 Před 2 lety +5

      Not the best answer
      I solved it with an "easy to explain" answer

    • @johndoberman4970
      @johndoberman4970 Před 2 lety +4

      Definitely not the best answer, I've already seen 2 better solutions in the comments not including my own.

    • @syedarushda2108
      @syedarushda2108 Před 2 lety

      @@johndoberman4970 Oh, I actually didn't try to solve it any other way so, I thought that's the best answer. Sorry and thank you

  • @mrjoe332
    @mrjoe332 Před 2 lety +48

    Gladly he didn't said me and the squad are perfect logicians, now I don't feel bad for the fact we failed miserably

    • @RGC_animation
      @RGC_animation Před 2 lety +2

      He also didn't say they had good memories or were good at math, so we'll 100% fail and let the virus destroy everything.

  • @Yusso
    @Yusso Před 2 lety +87

    There is a much easier way. Take the first 3 bits, ignore the 4th when trying to figure out which bit is corrupted.
    Rule 1: If the corrupted bit is 1, 2 or 3 then switch one bit within them to make the corrupted bit different.
    Rule 2: If the corrupted bit is 4 then switch one bit within the first 3 to make them all same.
    Rule 3: If the original state of the first 3 bits are already what you wanted then switch bit 4 since it will be ignored.

    • @micahmorris4943
      @micahmorris4943 Před 2 lety +5

      I came up with a very similar solution, albeit a lot more complicated. It was basically halfway using binary. The first two disks represented 0s when off and 1s when on. If I had a light situation that had both of them in the wrong position, disk 3 would be on to flip what they meant. An example would be if the first 3 were on and the fourth was corrupted, I would need the first two to be on, or the first two off with the 3rd on. In that scenario I turn the 3rd off and it works. If it was the first one, I need both off so with 3 on, I just turn on the 4th one since it can be ignored and the 3rd switch flips the output. As I said, more complicated lol, but it works

    • @arthurgraton7165
      @arthurgraton7165 Před 2 lety +2

      That's really good!

    • @bill5922
      @bill5922 Před rokem

      How did you think to ignore the 4th? What was your thought process

    • @Yusso
      @Yusso Před rokem +5

      @@bill5922 Uhh that was long time ago but let me see if I still remember.
      First reason is because the chosen agent must flip one switch. So in case you don't want to switch 1, 2 or 3, you can switch the 4th which is irrelevant.
      The second reason is that 3 bits are enough to show which one of the 4 discs is corrupted:
      100 or 011 -> disc 1
      010 or 101 -> disc 2
      001 or 110 -> disc 3
      000 or 111 -> disc 4
      And if you try it out, you will see that you can always (at any state) set the 3 bits to the disc you want with just one switch or no switch at all.

    • @bill5922
      @bill5922 Před rokem +1

      @@Yusso thanks for answering

  • @MangOnang611
    @MangOnang611 Před 2 lety +213

    I've watched enough Ted-Ed riddles to know that the solution involves parity but the binary is what I didn't think of. Hats off Ted-Ed, thanks for the entertaining educational riddle!

    • @danielyuan9862
      @danielyuan9862 Před 2 lety

      Tbf, the answer is literally just parity if there were only two lights instead of four.

    • @DespOIcito
      @DespOIcito Před rokem

      Meanwhile I picked up on the solution involving binary but not the parity part /lh

  • @NitantGupta
    @NitantGupta Před 2 lety +20

    This was a fun puzzle, and I have found an alternate solution.
    If each light represents a bit with OFF meaning 0, and ON meaning 1, then the four lights will represent a 4-bit number which in decimal represents a number between 0 to 15. We only need 2-bits of information to represent the corrupted disk, so this means, we can use 4 numbers from the 16 numbers to represent each disk. After working it out (and easy to check) let us make the following definition:
    0, 1, 14, 15 represents the first disk
    2, 3, 12, 13 represents the second disk
    4, 5, 10, 11 represents the third disk
    6, 7, 8, 9 represents the fourth disk
    Starting from any given initial configuration of lights (i.e. any number from 0 to 15), it is easy to check that you can always flip just one light to get at least one of the four numbers to represent the correct corrupted disk.
    As an example, if initially the lights are 0 1 1 0 (=6 in decimal) you can flip bit#1 to get 0 1 1 1 (=7 or disk 4), or flip bit#2 to get 0 1 0 0 (=4 or disk 3), or flip bit#3 to get 0 0 1 0 (=2 or disk 2) or flip bit#4 to get 1 1 1 0 (=14 or disk 1).
    This works for all possible cases. I like this solution better. :)

  • @Kairudesu
    @Kairudesu Před 2 lety +95

    The narrators's voice is so sooothing.

  • @SuperParkourio
    @SuperParkourio Před 2 lety +25

    My solution was to tell my team something like:
    "Use the binary number indicated by these two lights to find the answer, but reverse the digits if this third light is on. Ignore the fourth."
    It's pretty similar to what's in the video, I suppose, but I didn't think about using addition.

    • @mrmimeisfunny
      @mrmimeisfunny Před rokem

      This is actually equivalent
      Though in your solution disk 4 acts like disk 1 in their solution, disk 3 acts like disk 4, disk 2 acts like disk 2 and disk 1 acts like disk 3

  • @Luiz-tr2gq
    @Luiz-tr2gq Před 2 lety +63

    This CZcams channel was recommended to me by my professor and I slowly liking it as I watch your vids. It helps a lot!

    • @The.Nasty.
      @The.Nasty. Před 2 lety

      It helps a lot… with what?

    • @Bxll_Bxll
      @Bxll_Bxll Před 2 lety

      I just found this channel one day, never stopped watching

  • @haughton4832
    @haughton4832 Před 2 lety +43

    I personally came up with a different solution, though I could be wrong. If they are all the same value, then flip the corrupted one. If there is two of each, flip the one with the same value of the one that is corrupted. So, if the team enters to only one switch having a distinct value, they will know that one is corrupted. However, if there is a 3-1 split, we will have to change the strategy a little. If the first switch is corrupted, then change the odd one out to give everything the same value. If the second one is, then create a clean split down the middle (aka 1100, 0011). If the third one is, choose the option that has a one switch gap in between (so 1010, 0101). If the last one is corrupted, then mirror it across the center (1001, 0110).

    • @andrewsparks1561
      @andrewsparks1561 Před 2 lety +3

      That's basically what I came up with

    • @pinesmoke618
      @pinesmoke618 Před 2 lety +5

      That’s actually identical to the given solution, just with a different explanation.

    • @animax2422
      @animax2422 Před 2 lety +3

      Came up with the same thing down to what pattern to assign to each value on my own too.
      No need for binary

    • @only4comments561
      @only4comments561 Před 2 lety +2

      I came up with the same idea!

  • @Skully935
    @Skully935 Před 2 lety +2

    The Ted-Ed riddle playlist is just growing 1 by 1, and I love binge watching/listening to all the riddles in the background while I play games, there’s just something relaxing about that combination and it makes the Ted-Ed Riddle Playlist my favourite playlist on CZcams for that reason.
    I really hope there are a lot more riddles to come 😁🧐

  • @NorMarkus
    @NorMarkus Před 2 lety +11

    Another solution that should work for any amount of disks (although difficult to find a pattern that works), is to assign four 4-bit configurations to indicate which disk is the corrupt one such that by flipping one bit on any random configuration, you can always change the configuration to indicate which disk is the corrupt one. (Sorry for long and convoluted sentence).
    In this example you can use the following:
    "Disk light configuration" = "which disk is the corrupt one"
    0000 = 1
    0001 = 1
    0010 = 2
    0011 = 2
    0100 = 3
    0101 = 3
    0110 = 4
    0111 = 4
    1000 = 4
    1001 = 4
    1010 = 3
    1011 = 3
    1100 = 2
    1101 = 2
    1110 = 1
    1111 = 1
    With this you can always change any configuration to indicate the correct disk, for example. If agent A comes in and is told that disk number 3 is the corrupt one, and the current configuration is 0110, he can simply change it to be 0100.
    I'm pretty sure there's a boolean theorem describing this and gives a method to find such a table for x amount of disks, but I can't remember what it's called ¯\_(ツ)_/¯

    • @graygator10
      @graygator10 Před 2 lety +2

      This is exactly what I did!

    • @ultimateninjaguydan
      @ultimateninjaguydan Před měsícem +1

      I ended up doing the same thing and found that for a number of disks D and infected drive X, there is always an ending configuration C that is exactly one binary digit away, with the relationship being described by the function C = (D-.5)-abs(floor(X/2)-(D-.5)), assuming the disks are numbered from 0 to D-1.

  • @PanozGTR2
    @PanozGTR2 Před rokem +8

    The way I solved this was to look at what information the others have. When the others come in, all they know is what the lights show, so they have 4 ordered bits. This gives 2^4 = 16 possible configurations, and from that they must be able to find which is corrupted - in other words, we need to sort these 16 possible configurations into 4 groups, so that of the configuration when they enter is in (let's say) group 1, then disk 1 is corrupted, etc.
    Furthermore, on my end, it must be possible for me to switch any configuration into any of the 4 groups, in order to indicate which disk is corrupted. And thus for any initial state when I enter, there must be at least one element in each group that is exactly 1 bit flip away from this state, so that I can put the configuration into the correct group. Thus for any configuration, each of its 4 bit flip "neighbours" must be in different groups.
    If you think about it, every solution must follow this rule actually, and necessarily fits into this scheme. It's just that other solutions have rules for what configuration corresponds to what disk, while this method allows for all possible configuration groups. In total, ignoring which group corresponds to which disk, there are 42 possible configuration groupings over all 4 groups.
    It's actually not that hard to find a working grouping. Keep picking configurations until all initial states are accounted for, i.e. any configuration is exactly 1 bit flip away from at least one of the elements in the group. Each configuration accounts for 4 initial states, so we need at least 4 in each group to account for all 16, which means we must split them into 4 groups of 4 - they just barely cover all possibilities, there can be no overlap, so any configuration is actually 1 bit flip away from exactly one of the elements in each group - its 4 bit flip neighbours.
    For the first group, pick any configuration, it does not matter. This configuration is one bit flip away from 4 other configurations, and so those initial states are now accounted for. Crucially, this does not account for the configuration we picked, since we must flip exactly 1 bit. Thus the second configuration of the group must be exactly 1 bit flip away from our first configuration, with a total of 4 choices. These choices will never overlap with the first. We now have half the group filled, and half the initial states accounted for. For the second half, we can use a trick: If we take our current two configurations, and flip all 4 of their bits, then we get two more configurations that also work. This is because these are 4 bit flips away from their counterparts, and so they are 3 bit flips away from the other. Thus there is no overlap, and because they don't overlap each other either they must account for 8 confurations - the other half of the set. As it turns out, this is actually the only way to complete the group for this case of 4 bits.
    For the remaining groups, follow the same rules, while avoiding any configurations that have already been chosen. This should be easy.
    Note that this also explains why the number of disks must be a power of 2. Let n be the number of disks. Each configuration in the group accounts for n initial states, and so we need at least 2^n/n configurations in each group. This must be an integer, so we have to round up. The only times this divides cleanly is when n is a power of two, as otherwise there will be a prime factor other than 2 in n. There are n groups, and so we need ceil(2^n/n)*n total configurations. But we only have 2^n, so this is only possible if n is a power of 2.

  • @Tzeren-Kal
    @Tzeren-Kal Před 2 lety +8

    I have a different solution. Let the three first discs represent the corrupted disc.100 and 011 are 1, 010 and 101 are 2, 001 and 110 are 3, 000 and 111 are 4. That way you no matter which lights are on you can communicate which one of the disc is corrupted with 1 step, and if the lights are showing the correct answer just flip the fourth one.

    • @yogue3108
      @yogue3108 Před 2 lety +1

      Well done! Wow this is way more simple than what I did!

    • @cyberfoxvii6253
      @cyberfoxvii6253 Před 2 lety

      This is equivalent to the solution I thought of!
      I figured that since you HAVE to flip one switch, one light would have to be designated as meaningless. From there it seemed to me that no matter what state the lights were in, I could make any one of the remaining three lights the odd one out, or make them all the same.
      Be nice if I could figure out a mathematical proof, though...

    • @swaw11
      @swaw11 Před 2 lety

      Good solution.

  • @dbzwarlord
    @dbzwarlord Před 2 lety +9

    There is a different solution that works without binary.
    If zero, two, or four lights are on, you can always flip a switch that leaves the corrupted disk in a different state than the other three (only one on or only one off).
    If there are exactly one or three lights on, you can always configure the lights into one of four patterns: AAAA, AABB, ABAB, or ABBA. Where A and B refer to lights on/off or vice versa. Then just assign a disk number to each pattern.

    • @arcanecrow7498
      @arcanecrow7498 Před 6 měsíci +1

      Pretty much solved it the same way. Glad to see this solution on here too!

    • @muhammadharisaamir3952
      @muhammadharisaamir3952 Před 5 měsíci

      Yeah brother! I worked it out exactly the same way. My solution is the same for when we get in and we see 0,2,4 lights on and we make the corrupted one unique so that the team comes in they destroy the unique light. However, with when we arrive and 1 or 3 lights are on. It's a bit different for me and we'll do the following and team will recognize that as follows:
      Zero or All On = Corrupted disk is the left most one
      Two Lights are on with 1 Off Light between them = Corrupted disk is the right most one
      If the two center ones OR the left most & right most lights are on = Corrupted disk is 2nd from the left most.
      If the either two corner ones are ones together (1100,0011) = Corrupted disk is 3rd from the left most.
      I checked it out. It's legit. Works every time. Took me a while to figure it out but I'm so glad I made a workable strategy for this one.

  • @sebastiansimon7557
    @sebastiansimon7557 Před 2 lety +2

    Fittingly, this is the 64th TED-Ed riddle video in the playlist.

  • @TheDisasterMo
    @TheDisasterMo Před 2 lety +13

    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

    • @raizin4908
      @raizin4908 Před 2 lety

      Ooh, very nice solution!
      I had a different solution (which Dillon Teo also found and explained in this comment: czcams.com/video/i0WH4SFpeB8/video.html&lc=UgxZ1dRebvvZQ5Tzojh4AaABAg ), but this one is much more elegant, with fewer "if-thens".

    • @autumn4442
      @autumn4442 Před 2 lety

      Yeah, this is the solution I came up with. I thought it made a lot of sense to only use as many bits as you need and save the last one in case they're all already in the correct position.

    • @MaxKirkpatrick
      @MaxKirkpatrick Před 2 lety +1

      You can frame this as:
      1st bit = "whether to negate 2nd and 3rd bits"
      2nd & 3rd bits = the corrupted disk
      4th bit = throwaway

    • @marvingtz
      @marvingtz Před 2 lety

      I had a similar solution. Focus on the first three to figure out the answer. If the first three are all on or off then it means it’s the fourth one. If it’s not the forth one then it’s the odd ball from the first three.

  • @98802ohhey
    @98802ohhey Před 2 lety +6

    I was thinking something along the lines of (since you can communicate with your team) setting up a bunch of scenarios like “if all off or all on but one, that’s it.” Etc…. But creating all those rules essentially breaks out to this math. This is freaking cool

  • @jarirpangadapun8155
    @jarirpangadapun8155 Před 2 lety +1

    0:03 best TED-Ed quote I have seen yet.

  • @cozyflurry
    @cozyflurry Před 2 lety +1

    Can we just appreciate how smooth and on-flowing that gradient is?

  • @Imamotherfreakingavocado
    @Imamotherfreakingavocado Před 2 lety +13

    Ted-Ed: "Can you solve..."
    Me: "You know goddamn well that I cannot"

  • @macdjord
    @macdjord Před 2 lety +5

    This is, of course, just one of many possible solutions. More generally, there are 16 possible combinations of lights. For any given combination, there are 4 other combinations which can be reached by toggling a single switch. You need to assign each combination of lights to mean a particular disk is the corrupted, and do so in such a way that, for any given starting combination, there's one reachable combination to indicate each possible corrupt disk.

  • @prod.byjango3049
    @prod.byjango3049 Před 10 měsíci +2

    There's a much simpler answer. Only work with the first 3 and ignore the fourth. No matter what combination of lights there are there will always be a way to make one of the first three lights the odd one out if it's corrupted. Example: 1, 3 and 4 are on, corrupted is 1. You hit 3 so 1 is on and 2 and 3 are off which signals it to be 1. If the corrupted light is already the odd one out just flip 4. Also, if the corrupted is 4, you make it so that the first 3 are either all on or all off which works for any combination. If they're already all on or off just flip 4 since its on or off is meaningless.

  • @TheTommaxx
    @TheTommaxx Před 2 lety +3

    this was a missed opportunity to name it "the risky disky riddle"

  • @beans2874
    @beans2874 Před 2 lety +6

    I made a mapping table from all possible states to modified states. Then I assigned each modified state a number from 1 to 4 and make sure that you can reach all possible numbers (1 to 4) from every starting state.

    • @AniketPatil-nk1vw
      @AniketPatil-nk1vw Před 2 lety +3

      That's what I did. If the 4 lights are considered 4-bit binary number, then if the lights indicate 0,1,14,15 - Disk A is corrupted; 2,3,12,13 - B; 4,5,10,11 - C; and 6,7,8,9 - D. All possible starting states can go to exactly one of the 4 disks by changing one bit.

    • @IconoclastX
      @IconoclastX Před 2 měsíci

      Same!

  • @rafireomatic
    @rafireomatic Před 2 lety +5

    I absolutely brute forced my way to a solution:
    If my team finds only one light on or only one light off, destroy that one.
    If they find any combination of two offs and two ons or all ons and all offs, i made a cheat sheet with each of the 8 combinations equal to 1, 2, 3 or 4.
    Not quite elegant but it would work

    • @Greener01
      @Greener01 Před 2 lety +1

      YES! Thank you! This was my solution as well. Since you're allowed to plan ahead with your team before going in, you can assign number values 1 to 4 to certain configurations. You will need to create 2 cheat sheets, one for odd configurations and one for even configurations. With that sorted out before going in, you will always be able to set a configuration that will tell your team which disk is corrupted by flipping exactly one switch.

    • @deathy2885
      @deathy2885 Před 2 lety

      There are more than 8 combinations with the lights

  • @justusbondurant5797
    @justusbondurant5797 Před 2 lety +1

    I solved it, but with a much simpler method
    1) if your friends see that there is an odd light out, it’s the corrupted one.
    - This takes care of any setup where you start with two of each (two on or two off), and any set up where you start with all of one (all on or all off) because with both set ups you can manipulate them so that any one light is the odd one out.
    (Now the tricky part is dealing with if you are giving a set up where three lights are the same and one light is different. That’s where you can discuss with your friends different patterns that indicate a different corrupted light)
    2)
    a) if your friends see that all the lights are matching (all off or all on) then the first one is corrupted.
    b) If your friends see that it’s two pairs next to each other (double on then double off, or double off then double on) the the corrupted light is the second one.
    c) If your friends see that it’s alternating (on off on off, or off on off on) then the corrupted light is the third one.
    d) If your friends see that there’s a pair in the center with a pair split on the outside (on off off on, or off on on off) then the corrupted light is the fourth light.
    This works for any scenario and all this pretty much gives a “cheat sheet” for your friends to know which one is corrupted.

  • @ido54321
    @ido54321 Před 2 lety +2

    I believe I found an easier answer to this riddle.
    At first, we will give numbers for the lights/disks - the left one is 1 and the right one is 4 (1_2_3_4).
    Our way to show what disk has the virus is by following these steps:
    The first rule is that 3 and 4 represent the infected disk in binary representation.
    If they are both off the infected disk is 1, if 3 is off and 4 is on the infected disk is 2, if 3 is on and 4 is off the infected disk is 3 and if they are both on the infected disk is 4.
    The second rule is that if disk number 1 is on then the person who needs to find the infected disk should take the opposite states of disks 3 and 4.
    For example: if disks 3 and 4 are off and disk number 1 is on then disks 3 and 4 should be considered as if they are both on (disk 4 is infected).
    The third rule is that disk number 2 means nothing.
    For example, if the is no need to make any change to disks 1, 3, and 4 (they already represent the infected disk) then just switch disk number 2.
    With these rules, you can show what's the infected disk is by changing one switch every time!
    In my opinion, this way is much easier to explain and understand than the solution in the video.
    Dan Ikar

  • @LEWIS1992
    @LEWIS1992 Před 2 lety +3

    Step 1: Find out if you have green eyes.
    Step 2: Ask the virus to leave.

  • @deleted_handle
    @deleted_handle Před 2 lety +27

    I would totally replace History class for a problem solving class.
    But I sadly can't.
    :*(

    • @paulgaither
      @paulgaither Před 2 lety +2

      Check out Hardcore History by Dan Carlin. He makes history far more interesting than a traditional class which has to force many topics with few details in a limited time space.

    • @Seth9809
      @Seth9809 Před 2 lety +5

      Boo! History is the best class, there is wars and empires, food, religion, politics, and so on.

    • @thomaslwin8588
      @thomaslwin8588 Před 2 lety

      @@Seth9809 you're right!

    • @Lotschi
      @Lotschi Před 2 lety +1

      I would add a problem solving class without leaving out history class!
      In my point of view the goal of history knowledge is that we learn from the mistakes the last generations made.

    • @stewiegriffin12341
      @stewiegriffin12341 Před 2 lety +2

      Well, you do have a problem solving class: math.

  • @KnakuanaRka
    @KnakuanaRka Před 2 lety +1

    I managed to solve this one, but I came up with a much more complicated and less intuitive and generalizable answer.
    Basically, if you go into the mainframe and there are 0 or 4 active lights, flip the corrupted disk.
    If there are 2 on and 2 off, find the good disk that is the same setting as the corrupted one and flip it.
    In these cases, your team will discover the lights split 1-3, and can destroy the odd man out.
    If there are 1 or 3 lights on at the start, things get more complicated.
    If the corrupted disk is the first one, flip the odd man out.
    If it isn’t the first disk, then if it has a different setting from the first disk, flip whichever of the first and corrupted disks isn’t the odd man out.
    If the corrupted disk isn’t the first one but has the same setting, then flip whichever of the other two disks has the same setting as the first disk.
    Then, when your team goes in, they’ll either discover 2 on and 2 off (in which case they’ll check the setting of the first disk, find the other disk with the same setting, and destroy it), or all 4 the same setting (in which case they’ll destroy the first disk). For example, if the lights are initially set 0010, you could indicate disks 1, 2, 3, and 4 with 0000, 0011, 1010, and 0110 respectively.

  • @tinfox2
    @tinfox2 Před 2 lety +2

    It's always a great day when there's a new Ted-ed riddle

  • @Greener01
    @Greener01 Před 2 lety +3

    Alternative solution: Since you're allowed to plan ahead with your team before going in, you can assign number values 1 to 4 to certain configurations. You will need to create 2 cheat sheets, one for odd configurations and one for even configurations. With that sorted out before going in, you will always be able to set a configuration that will tell your team which disk is corrupted by flipping exactly one switch

  • @felipemolica
    @felipemolica Před 2 lety +3

    Wow, I was so happy with my solution and it felt so TED-Edy, but then it was totally different. I basically only use the middle switches for the code: 00 for disk 1, 01 for 2, 10 for 3 and 11 for 4. But what if you have to flip two switches? Then you can establish the first light is a true/false one. If it's off, you read the middle slots as they are. If it's on, you read the opposite, so 10 means 01 and so on.
    Since the virus makes you flip a switch, if everything is already in its proper position when you arrive you just flip switch 4, which means nothing.

    • @danielyuan9862
      @danielyuan9862 Před 2 lety

      It would be easier if you have to flip two switches because there are 6 ways to flip two switches but there are 4 ways to flip only one switch.

    • @autumn4442
      @autumn4442 Před 2 lety

      I actually really like this solution. It's extremely simple and unique. It's also similar to the first idea I had, except yours actually works.

    • @andrewtominack3730
      @andrewtominack3730 Před 2 lety

      I really like the simplicity of your solution. I did something very similar, but without the use of a true/false light.
      First, number the lights starting at 0, so you can directly translate the binary instead of shifting everything by 1. So instead of numbering lights 1234, they are 0123.
      Then I divided the last three lights into two groups of two with lights 1 and 2 together in a group, and lights 2 and 3 together in a group.
      I then said that if a group had an even number of lights on (0 or 2) then that grouping was equal to 1. If only 1 light was on in a group, then it was equal to 0. So for example 1100 would translate to 01.
      So that way you can reach any binary number from 00, 01, 10, 11 with just one flip without having to remember if you need to reverse your answer based on a true/false light. If the left digit needs to change, flip light 1, if the right digit needs to change, flip light 3. If both digits need to change, flip light 2. If nothing needs to change, flip light 0.

  • @svettypoo
    @svettypoo Před 2 lety +1

    I have a way simpler solution. You can tell your crew the plan... If the lights are 1,1,1,1 then you can switch one off to leave an odd one out. Likewise, if the lights are 0,0,0,0 you can switch one on to leave an odd one out. If the lights have 2 on and 2 off, then you can ALWAYS switch one light in a way to leave the special light as the odd one out (try a mental experiment to prove this example if it's 1,0,0,1 and the special light is in position 2, you can simply switch position three to make position 2 the odd one out). The tricky part is when there is 3 of one kind and 1 of another when you first get there. If this happens, you can create one of four patterns that you've agreed with your team will correspond to a specific light. For example, if you switch the odd light, you will make uniform lights, and that could correspond to spot one. The other three combinations are alternating (ex 1,0,1,0), same at either end (ex 1,1,0,0) or same at The opposite end (ex 1,0,0,1). You can create those four combinations for any sequence in which you have three of the lights the same and one of the lights different (run a mental experiment to prove this). I hope that was helpful!

  • @TvdLover633
    @TvdLover633 Před 2 lety +1

    I came up with a different solution. I will use 0 for off and 1 for on.
    2^4 = 16 possible starting points which are as follows:
    --- 2 options of all the same number (0000/1111) -> then flip the faulty one
    --- 6 options of two on and two off (eg. 1010) -> flip in a way that so that the faulty one is always the odd one (eg cont. 1st faulty: 1000, 2nd: 1011, 3rd: 0010, 4th: 1110)
    --- 8 options of only one odd either on/off (eg.0100, 1110) -> there are 4 non-symmetric patterns that can be created by flipping only one light. The patterns are discussed and mapped with the team before the sacrifice.
    For eg. : 1100/0011 -> 1st faulty
    1010/0101 -> 2nd
    1001/0110 -> 3rd
    0000/1111 -> 4th
    Hence, when the team comes in together to attack and they see that:
    - only 1 light is on and all the rest are off (or vice versa), then the odd one is the faulty one.
    - two lights are on and the other two are off, then they follow the mapping done above

  • @aishwaryapujitha9970
    @aishwaryapujitha9970 Před 2 lety +3

    This is interesting. I've come to another solution though and it seems to work as well. I knew binary code was the answer and we need such an arrangement that with a single switch we should be able to give code for the corrupted disk. Out of the 16 possible values, I've assigned 4 for each disk such that with a single switch we can change it to a value belonging to the corrupted disk.
    [0000,0001,1111,1110] - values for disk 1 (group 1)
    [0010,0011,1101,1100]- values for disk 2 (group 2)
    [0100,0101,1011,1010]- values for disk 3 (group 3)
    [0110,1000,1001,0111]- values for disk 4 (group 4)
    For example - if the initial setting of the disks are 1010 (belonging to group 3) and our corrupted disk is 2, We can switch off the 4th place converting 1010 to 0010 (belonging to group 2) which will tell us the corrupted disk is 2. If our corrupted disk is 1, switch on the third place from 1010 to 1110. If the corrupted disk is 4, switch off the second place from 1010 to 1000. For corrupted disk three, although the existing values belong to group 3, since we must make a change, if we switch on the first place from 1010 to 1011, it would remain in group 3, signaling the corrupted disk is 3.

  • @jstlivinlifern
    @jstlivinlifern Před 2 lety +4

    Thank you ted ed. Now I am more knowledgeable than ever.

  • @sbbmwalker9266
    @sbbmwalker9266 Před 5 měsíci +1

    For those who doesn't like math, I've created a solution that only uses patterns.
    There's 4 types of pattern
    0 = on X = off
    Full (0-0-0-0 or X-X-X-X)
    Side (X-X-0-0 or 0-0-X-X)
    Center (X-0-0-X or 0-0-X-X)
    Split (0-X-0-X or X-0-X-0)
    These patterns are named as it will be useful for Scenario 3
    Let's call the corrupted disk as "c-disk"
    Scenario 1:
    If all lights are on, turn off the c-disk.
    If all lights are off, turn on the c-disk
    Scenario 2:
    If there are 2 lights that are on, flip one light that is in the same state as the c-disk, so if the light of c-disk is on, turn off the other light that is on and if c-disk is off, turn off the other light that is also turned off.
    Scenario 3: Only one light is on or off
    Now this is the tricky part, but Its actually easy, what we need to do is create a pattern and each pattern will represent which c-disk is corrupted.
    If the c-disk is bulb no.1, we'll use the "full" pattern, so all we have to do is flip the odd light.
    If the c-disk is bulb no.2, we'll use the "side pattern, so basically we'll just have to flip the other light that is on the same side as the odd light.
    If the c-disk is bulb no.3, we'll create the "center" pattern that will look like a sandwich, basically the one in the center is in the same state, and the one on both sides are the same
    If c-disk is on bulb no.4 we'll create the "split" pattern, where we just have to create an alternating pattern like on-off-on-off or off-on-off-on
    Now try it yourself 😉

  • @Naked_Snake
    @Naked_Snake Před 2 lety

    Interesting solution. I worked this out a bit different but using a similar concept. With 4 lights on/off, you can have 16 combinations. So I assigned 4 combinations of lights into 4 groups (each group representing one light). But you can't assign the combinations randomly; I had to assign it in a way such that you can get from one group to another group using just one flip.

  • @Theraot
    @Theraot Před 2 lety +4

    I make the valiant sacrifice, and my team rushes in... They have no idea what they I did, we didn't agree on anything before hand. They destroy all the disks. Destroying the corruption and freeing the system.

  • @stealthybaguette
    @stealthybaguette Před 2 lety +6

    I actually managed to solve this one! I didn't translate each light into binary, but I created my own ruleset that I would communicate with my team that would work for any solution. It's a bit complicated, but it essentially follows the same rules as the one shown in the video

  • @philipmorse-fortier5499
    @philipmorse-fortier5499 Před 2 lety +2

    So I broke this down into 5 cases (which is really 3, but whatever), based on how many lights are on when you go in. If all the lights are on, or all off, you can swap just the corrupted light and your team will know to hit the different one. If 2 are on and 2 are off, ensure that the corrupted disk is showing a different light from the other 3.
    So then you have just the case where 1 or 3 lights are on at the start. In this case we will end up in one of 8 different end cases: all lights on, all off, or 6 patterns of 2 on 2 off. By assigning opposite cases to the same disk, you assign each pattern to one of the disks. So 1111 and 0000 would mean, perhaps, the right most disk, while 1010 and 0101 would mean, perhaps, the 2nd from right. In any case where 1 or 3 are on you can get to one of the settings for whichever disk is corrupted.
    It doesn't scale as well as your answer though, I didn't get to the idea of assigning the disks themselves values and adding them.

    • @parikshithnaik3846
      @parikshithnaik3846 Před rokem

      Sorry dude it's totally wrong 3 people have made the same MISTAKE IN THE CHATS AND I HAVE HAD TO REPPY 3 TIMES !! LETS ASSUME THE TWO LIGHT ON AND 2 OFF SCENARIO ,LETS SAY LIGHT NO 1 AND 2 ARE ONE BUT NOT CORRUPT , NO 3 IS JUST LIKE 1 AND 2,meaning not corrupt , BUT ITS SWITHCED OFF AND SO THAT LEAVES LIGHT NO 4 AS CORRUPT AND ALSO SWITCHED OFF , THEN ACCORDING TO YOU THE LIGHT WHICH IS CORRUPTED MUST BE MADE ODD ONE OUT ISNT IT ?? WHICH IN THIS SCENARIO IS LIGHT NO 4 . AND THE ONLY POSSIBLE WAY TO MAKE LIGHT NO4 ODD ONE IS TO CHANGE THE STATUS OF LIGHT 1 AND 2 WHICH ARE BOTH ONE INTO OFF AND THEN LEAVE LIGHT 3 AS IT IS AND THEN TURN ON LIGHT NO 4 AS ON bcoz that's the corrupt one to be made an odd one out so that's 3 flips dude

  • @anastasijanovikova
    @anastasijanovikova Před 2 lety +1

    I used patterns to solve it. If you come in and 0, 2 or 4 lights are on, just flip one so that the corrupted disc is the odd one out. Now, if you come in and 1 or 3 lights are on it's a bit trickier, but the math still works out. You have to disregard the exact values and instead use patterns. All these can be got from any 1/3 lights on:
    0000 and 1111 -> disc 1
    0011 and 1100 -> disc 2
    0110 and 1001 -> disc 3
    0101 and 1010 -> disc 4
    You just have to agree which disc corresponds to which pattern beforehand.

  • @parvmaheshwari6018
    @parvmaheshwari6018 Před 2 lety +3

    Fun fact - TED-ed didn't come up with a question and made the answer, they came up with an answer and worked all the way to the question.

    • @danielyuan9862
      @danielyuan9862 Před 2 lety

      Honestly, there is an inspiration to come up with this problem. The idea is that when you are given the corrupt light (or whatever it was), you are given one of 4 possible pieces of information, and then you have the power to show your team one of 4 possible lighting arrangements. So if there is a solution, it has to be precisely created, and that is exactly what is shown in the video.

  • @Y337n3ss
    @Y337n3ss Před 2 lety +4

    so, if i understand correctly: use disc 11 as a NOT operation, discs 01 and 10 to point to a different disc, and disc 00 to not change anything if its already correct

    • @ghostderazgriz
      @ghostderazgriz Před 2 lety

      I would have preferred this explanation as well. The "break the rules regard 2 as 0" thing seemed like an unnecessary complication, but I am speaking from a programming background.

  • @lefawsy4082
    @lefawsy4082 Před 4 měsíci +1

    If anyone is interested, I came to a different solution that works perfectly as well and I think is easy to understand.
    Suppose we assign each disk/light a value. The first disk = 0, the second disk = 1, the third disk = 2 and the last disk = -3.
    Notice the last one is -3, not 3!
    The trick is now to flip a switch, so that the sum of these numbers equals the disk number (0, 1, 2, 3). If you end up in negatives, take the absolute value of the number.
    It works for every configuration, because you can add or substract any number of 0, 1, 2 or 3 from any configuration. It works so beautifully because we allow ourselves to go into the negatives.
    The sum of these disks can lie between -3 and 3. (-3, -2, -1, 0, 1, 2, 3). If the sum is at any of these points, you can always add or substract in such a way to go to any of the other values (in absolute sense).
    Examples with lights:
    - Suppose all the lights are off. Take the sum of these numbers, which equals 0. This means the first disk ( = 0 ) has the virus. You can flip any switch to indicate that disk has the virus (e.g. flip last light, sum of disks = (0+0+0-3) = -3 --> 3rd disk has virus).
    - Suppose all the lights are on. Sum of disks = 0 +1 + 2 -3 = 0. If the second disk has that virus, You can flip that disk to make the sum of disks = -2 --> 2.
    - Suppose only the second light is on (sum = 1). You can go to disk 0 by turning it off, stay at disk 1 by switching the first switch, go to disk 2 by adding -3 (1 - 3 = -2), and go to disk 3 by adding 2.
    Numerical examples:
    From -3 you can go to 0 by substracting -3. You can go to 1 by adding 2 (= -1 -> disk 1 has virus). To 2 by adding 1 (-3 + 1 = -2 --> disk 2). To 3 by adding 0.
    From -2 (= 1 + -3, these lights are on) you can go to 0 by adding 2, to 1 by substracting -3 (-2 - -3 = disk1), to 2 by adding 0 (-2 --> disk 2) and to 3 by removing 1 (-2 + -1 = -3 --> disk 3).
    From -1 (= 2 + - 3) you can go to 0 by adding 1, to 1 by adding 0, to 2 by substracting -3, to 3 by removing 2.
    From 0 you can go to 1 by adding or substracting 1, to 2 by adding or substracting 2, and to 3 by adding or substracting -3.
    From 1 you can go to 0 by substracting 1, to 1 by adding 0, to 2 by adding -3 and to 3 by adding 2.
    From 2 you can go to 0 by substracting 2, to 1 by adding -3, to 2 by adding 0 and to 3 by adding 1.
    From 3 (= 2 +1) you can go to 0 by adding -3, to 1 by substracting 2, to 2 by substracting 1 and to 3 by adding 0.
    In the numerical example we have explored every possible solution.
    Not sure if my explanation is clear, but it seems very elegant to me. Very easy to understand/use, just sum disk values and flip switch to get to the virus. I think the principle is the same as the solution in the video, just applied differently.

  • @1Chitus
    @1Chitus Před rokem

    “Don’t use “beef stew” as a computer password. Its not stroganoff.”
    That right there, made my day ️

  • @sirnikkel6746
    @sirnikkel6746 Před 2 lety +13

    Before watching the answer: My brain inmediatly thought of binary. With more brainstorm, i came up with "What if i assign to 4 values between 0 and 15 the tag [Corrupt Disk = 1], to other ones [Corrupt Disk= 2]..." And then i had to find those values. And i come up with:
    Binary value: [00] [01] [02] [03] [04] [05] [06] [07] [08] [09] [10] [11] [12] [13] [14] [15]
    Corrupt Disk: [d1] [d2] [d3] [d4] [d1] [d2] [d3] [d4] [d4] [d3] [d2] [d1] [d4] [d3] [d2] [d1]
    The thing is to make the binary lights output to be:
    - 0, 4, 11 or 15 if the corrupt disk is 1 (That is: 0000, 0100, 1011, 1111).
    - 1, 5, 10 or 14 if the corrupt disk is 2 (That is: 0001, 0101, 1010, 1110).
    - 2, 6, 9 or 13 if the corrupt disk is 3 (That is: 0010, 0110, 1001, 1101).
    - 3, 7, 8 or 12 if the corrupt disk is 4 (That is: 0011, 0111, 1000, 1100).
    This is because in each case, those values can be obtained with a single change of a light in a 4 lights array. EX for Corrupt Disk is 1: 0110 (6) -> 0100 (4); 1110 (14) -> 1111 (15); 0101 (5) -> 0100 (4).
    About to comment down in this same comment to react to the TEd-ed answer.

    • @sirnikkel6746
      @sirnikkel6746 Před 2 lety +2

      I am keeping my strat, but the Ted-ed answer is not only more easy to understand to follow and elegant, but easy to scale up. I still cannot explain how i come up with *that* tag assigment to each value. I just started from the extremes and, when I realized that it was a reflection, I just went to fill the gaps with the most obvious pattern. And worked lol.

    • @yogue3108
      @yogue3108 Před 2 lety

      @@sirnikkel6746 I did the same method, but I used a Karnaugh map to obtain the assignments. It's a table that is characterised by a switch of 1 digit when you move from a box to an adjacent one.

    • @sirnikkel6746
      @sirnikkel6746 Před 2 lety

      @@yogue3108 How you managed to even use a Karnaugh map to do it?

    • @rasern
      @rasern Před 2 lety

      I was about to do a lengthy reply, and then I saw this comment. I did the EXACT same thing you did. I agree the Ted-ed answer is much more elegant. I'm curious why this solution works though.

    • @Jhimest
      @Jhimest Před 2 lety

      Haha! Me too!

  • @Chigger
    @Chigger Před 2 lety +3

    "It's a rational transaction. One life for billions." -Dr. Hans Zarkov, Flash Gordon

  • @playforbeer6491
    @playforbeer6491 Před 2 lety

    You can do it in a less abstract way by making a code:
    If 0, 2 or 4 lights are on you can make the one different from the others;
    If it's 3 and 1 (or 1 and 3, same thing) you can make 4 patterns: alternative, grouped, middle/edges and all the same, which would correspond to 4 predetermined positions positions;
    It's nice how it doesn't matter whether lights are on or off, just their relation to the other lights.
    The given solution cooler and much more practical, but at this scale you can find unintended solutions still, which makes the riddle more fun as you have less to go on.

  • @nathanglover8938
    @nathanglover8938 Před 2 lety

    YAY! I finally solved one of these riddles - and not using the same method to reach it as TED-ED! Basically there are 16 different configurations of how the lights can be illuminated. Each configuration can (and indeed must) be switched to one of 4 other configurations. Therefore you can assign a number from 1-4 to each of the configurations, and agree in advance with your team what configuration refers to what. For example, in my solution: All lights off = 3. Left hand light only = 1, Middle left only = 2, Middle right only =3, far right only = 4. You can basically map it out so that no matter what the starting combo is, you can always change it to be on a configuration that you've agreed in advance is one of the numbers 1-4.

    • @nathanglover8938
      @nathanglover8938 Před 2 lety

      For anyone interested, here is my solution (where “X” is a light that’s switched off, and “0” is a light that’s switched on):
      XXXX = 3
      0XXX = 1, X0XX = 2, XX0X = 3, XXX0 = 4
      00XX = 1, 0X0X = 2, X00X = 4, XOXO = 2, XX00 = 1, 0XX0 = 4
      00X0 = 3, 000X = 4, X000 = 1, 0X00 = 2
      0000 = 3
      I’d give my team that list above, and go in, knowing that whichever combination is showing when I arrive, I can switch it to be the number that I need, out of the above list.
      Hope that makes sense, please ask what I mean if not 😊

    • @nathanglover8938
      @nathanglover8938 Před 2 lety

      And before anyone says it - no my answer isn't as elegant as TED-ED's, and it can't be used to solve bigger versions of the puzzle - but then again the riddle never asked for that, so :P

  • @DrRank
    @DrRank Před 2 lety +3

    The main thing I learned today was that "parity" is not spelled "parody".

    • @zyaicob
      @zyaicob Před 2 lety +1

      Two crucially different concepts

    • @danielyuan9862
      @danielyuan9862 Před 2 lety +1

      the solution to this video is just a parody of the concept of parity

  • @aadreejapandey3436
    @aadreejapandey3436 Před 2 lety +3

    can i can i really?!

  • @edna1626
    @edna1626 Před 2 lety

    Hi was hoping if you could make a video on how we could try solving these . I solved one of your riddles ( the catching the rare fish Einstein problem one ) it took me quite a while but once I figured out how to solve it I pieced the puzzle also your videos are extremely engaging and keep my brain on its toes , hunting for answers constantly . Thank you for the amazing content . Have a great day !

  • @definitelymdt
    @definitelymdt Před 2 lety

    I can't believe I turned off the notifications, I missed the riddle but thank god CZcams recommended it to me.

  • @aadityachhitarka1938
    @aadityachhitarka1938 Před 2 lety +6

    I feel like my CS degree is worth it finally.

  • @lemonaj4408
    @lemonaj4408 Před 2 lety

    Sadistic code. Another nice phrase from list of phrases i heard from someone else for the first time. You can hear almost everything here.
    Love riddles from ted-ed

  • @lucar6897
    @lucar6897 Před 2 lety +2

    Alternative answer:
    If there are 0, 2 or 4 lights on, you can flip one so the odd one out (the only one which is on/off) is corrupted.
    If there are 1 or 3 on, you can ignore the first light, and make the odd one out corrupted (if the corrupted is already odd one out, swap the first light)
    If there are 1 or 3 on, and the first one is corrupted, you can make all of the lights the same (all on or all off)
    For the decoder:
    If there is 1 or 3 on, the odd one out is corrupted.
    If there are 2 on, the one matching the first light is corrupted.
    If there are 0 or 4 on, the first light is corrupted

  • @leachy3000
    @leachy3000 Před 2 lety +4

    You can just number the lights 0,1,2,3 then work out the sum of them mod 4 and it works in exactly the same way. More than that it will work for any number of lights, not just powers of 2.

  • @loszhor
    @loszhor Před 2 lety +5

    Remember children: 1+1 = 0 !

    • @marksmith5754
      @marksmith5754 Před měsícem +3

      I mean… he’s out of line but he’s right!

  • @jaydenhenry1885
    @jaydenhenry1885 Před 2 lety +1

    It has been a long time since TedEd ever given us a riddle like this.

  • @brazen_helm
    @brazen_helm Před rokem

    Your solution was much neater and more extendable than mine, but I think mine still works:
    If you see all four lights on or all four lights off, flip the corrupted switch (so that it becomes the odd one out)
    If you see two lights on and two lights off, flip whichever is the same as the corrupted switch (so that the corrupted switch again becomes the odd one out)
    If you see three lights on and one light off, or vice versa, there is always one switch you can pull to get the lights into each of the following four patterns:
    - All lights the same (all on or all off)
    - Lights alternate between on and off
    - Left two lights on and right two lights off, or vice versa
    - Middle two lights on and edge two lights off, or vice versa
    So you can assign each of those four patterns to one of the disks. If your team comes in and sees one light is the odd one out, they know that's the right one. Otherwise they can identify the correct pattern and act accordingly.

  • @meidion6498
    @meidion6498 Před 2 lety +4

    You can say that this riddle is LIT

  • @yashdevnani3257
    @yashdevnani3257 Před 2 lety +5

    Check if you have green eyes
    Ask the virus to leave

  • @tommynickymicky
    @tommynickymicky Před 2 lety +1

    I discovered a solution by myself.
    0=OFF, 1=ON
    1) if an even number of lights are on (0, 2 or 4 lights), switch a light so that only the light of the corrupted disk has a different status from the others.
    e.g. Supposed that the third disk is corrupted
    0000 -> 0010
    0101 -> 1101
    0011 -> 0010
    1111 -> 1101
    etc.
    2) if an uneven number of lights are on (1 or 3 lights), there are eight patterns:
    0001, 1110, 0010, 1101, 0100, 1011, 1000 or 0111
    Every pattern can be changed into four following patterns after switching one light:
    e.g.
    If the first disk is corrupted, 0000 or 1111
    If the second one is corrupted, 0011 or 1100
    If the third one is corrupted, 0110 or 1001
    If the fourth one is corrupted, 1010 or 0101
    It should be possible to communicate the corrupted disk to other squads in this way, but the method as a model solution in this video is much smarter.

  • @isaacwebb7918
    @isaacwebb7918 Před 5 měsíci

    Lots of possible solutions for this one. Here was mine: I need to deliver two binary pieces of information, which could give four possible outcomes in total, enough to communicate which disk. Now, consider two pairs of lights. I can't control the initial state, but if we consider the output of a pair not based on which lights are on, but on whether both lights in that pair are the same or different. But how to manipulate two pairs with one action? Overlap the pairs, with one unit in common. Now, with one flip, I can change the sameness of both pairs (flip the common unit), either (flip the one belonging to that pair) or neither (flip the last unit.)
    So, instructions left with the team: if the two units on the left are both on, or both off, the corrupted unit is on the left side, and if they're different, it's on the right. If the two units in the middle are both on or off, the bad drive is toward the inside of the row, otherwise on an end. From any initial arrangement, I can see which of those pairs is already appropriately same/different and which need to change to indicate the right drive, and can change either pair, both, or neither with one flip.

  • @I_Hate_YouTube.
    @I_Hate_YouTube. Před 2 lety +15

    Hello, is your name Ted? I am curious.

  • @mikeandrew7591
    @mikeandrew7591 Před 2 lety +29

    Despite the financial crisis, this is still a good time to invest in Crypto as the market is favourable

    • @justinpamela9305
      @justinpamela9305 Před 2 lety

      I invested in both stock and Crypto but I'm doing much better on Crypto with the favourable market price

    • @scottkatherine9461
      @scottkatherine9461 Před 2 lety

      Investing in the right things Matter,I have actually invested in the stock market and Crypto market trust me Crypto trading is more profitable than stock investment

    • @ralphchristian7108
      @ralphchristian7108 Před 2 lety

      I have been investing in Crypto on my own for over 7 month's with no good returns ,rather loss and blown accounts , really heart breaking

    • @mariagregory5548
      @mariagregory5548 Před 2 lety

      @@ralphchristian7108 I've been in such situation before and it wasn't an easy one

    • @mariagregory5548
      @mariagregory5548 Před 2 lety

      I'll recommend you to my broker Expert Alvaro William, my first investment with him earned me profits of over $28,400. And ever since then he keeps delivering and earn consistent profits for me. He is the best

  • @tylerxiao2656
    @tylerxiao2656 Před 2 lety +2

    This one is basically the XOR command, very cool!

  • @parth-dobariya
    @parth-dobariya Před 2 lety +1

    We are loving your riddles😍 please keep Posting more riddles 👍🏻

  • @acat5581
    @acat5581 Před 2 lety

    Spectacular video as always!

  • @tjgueli
    @tjgueli Před 2 měsíci

    I'm not sure if this solution works, but I went with:
    Covering you for ANY combination of all being off, all being on, or ANY two being on when you go in:
    If only one is ON, it's that one (either all were off and you turn that one on, or two were on, and you turn off the good one)
    If only one is OFF, it's that one (either all were on and you turn that one off, or two were on, and you turn on the unlit good one)
    Covering you on disks 1,2 and 3 if any three are on, or any one is on:
    If 1&4 or 2&3 are on, it's disc one
    If 1&2 or 3&4 are on, it's disc two
    If 2&4 or 1&3 are on, it's disc three
    Covering you on disk 4 if any three are on, or any one is on:
    If when your team goes in, they're all off, or all on, it was disk #4
    This should cover you for any combination of ons/offs, I think.

  • @nettyyyys
    @nettyyyys Před rokem +2

    I have another solution. Consider the four discs XXXX in order renamed as Y Z XX. Then XX gives you the disk that is wrong. Z is used to revert the value. And Y is ignored. 0100 means 0 ignored 1 reverts so the result is 11 -> last disk is wrong. You can try with it and it works. With any possible combination you can switch one disk and get the correct result.

  • @HenryTheWeeb
    @HenryTheWeeb Před rokem

    I arrived at the same answer through a different thought process, feels nice to see divergent thinking converge to the same answer
    4 bits:
    Useless bit: flip if what u want is already done
    The "negative" bit: take the reverse of the following bits
    Last 2 bits: 2 bit number

    • @HenryTheWeeb
      @HenryTheWeeb Před rokem

      Taking the reverse here means that u treat 0 as 1 and 1 as 0 if the second bit is a 1, else treat them as normal. This is just a rudimentary thinking of parity flipping ig

  • @delfyinc
    @delfyinc Před 2 lety +1

    Loving the Tron references in the animation!

  • @triccele
    @triccele Před 2 lety

    I got to another way to solving the riddle just by trial and error, if you are interested, I did it like this:
    •If the team enter and see only one light on, means when you entered, all lights were off, in this case, attack the light that is on.
    •If the team enters and there's two lights on, all lights are on or all lights are off, means when you entered, there was only one light on or only one light off. In this case, if all lights are off or all the lights are on, attack the first one, if the lights are one half on and one half off (on on off off / off off on on), attack the second one. If the two lights at the center are switched the same way (on off off on / off on on off) attack the third one. If the lights are intersperse (on off on off / off on off on) attack the forth one.
    •If the team enters and theres only one light switched different than the others (all off except one or all on except one), then two lights were on when you entered. In this case, attack the light switched different than the others.

  • @user-my4yv9zb3p
    @user-my4yv9zb3p Před 2 lety

    Also interesting solution is to take first 3 lights divide it in two pair (a,b and b,c) and make a rule that if the pair is equal (both turn on or off) that counts as zero and if both are different (on, off or off, on) that counts as one. It's easy to see that from any position you can get any number. The fourth lamp is using to skip any changes

  • @vanivanov9571
    @vanivanov9571 Před 2 lety +2

    Well, that's a needlessly complex solution... I worked out a much simpler one:
    There are 16 permutations with repetition you can base. For half of them, you can make the corrupted disk the odd one out, and your team will destroy it. If the second Disk was corrupt, and the pattern is 0101, you would just need to turn the last 1 into a 0, for example (0100).
    Now, with the other 8 permutations, they're ALREADY odd ones out (EX: 0001, 0100, etc.), but you need to change those. Luckily, there are four simple combinations you can change any odd one out into. And you can tell your team the meaning of each combination.
    If the 1st disk (00) from the left is corrupt: Line: Change 0111 into 1111.
    If the 2nd: Sandwich: Change 0001 into 1001.
    If the 3rd: Halves: Change 0100 into 1100
    And if the 4th: Alternating: Change 1101 into 0101
    By this means, your team only needs to memorize 5 possibilities, including odd one out. No need to crunch the numbers.

    • @ghostderazgriz
      @ghostderazgriz Před 2 lety

      Disk 2 corrupt. Pattern 0100. What light do you change?

    • @vanivanov9571
      @vanivanov9571 Před 2 lety

      @@ghostderazgriz As per the example above, you use the Sandwich pattern. Change the third disk, so it reads 0110. That communicates to the team to destroy the second disk.

    • @ghostderazgriz
      @ghostderazgriz Před 2 lety

      @@vanivanov9571 Making sure you also included the inverted patterns as well.
      Yes this solution works. However, if I may make a small correction to your symantics. I wouldn't say it's simpler, but rather it is more intuitive. This answer is far easier to process and understand.

  • @NxVernxual
    @NxVernxual Před 2 lety

    I missed those riddles so much!

  • @daviddelille1443
    @daviddelille1443 Před 2 lety +1

    There are actually 567 (=24*24) strategies that work. Here is a simple strategy I came up with:
    The corrupted disk is the odd one out of the first 3; if the first 3 lights are all the same, the last disk is corrupted.
    Example: If the virus shows you 0101 (second and fourth lights on) and tells you the first disk is corrupted, you can make it the odd one out of the first 3 by flipping the third light: 0111.
    Example 2: Same lights, but now the fourth disk is corrupted. The first 3 lights must be the same, so now we flip the second light: 0001.
    Each possible strategy comes down to distributing the 16 possible light combinations into 4 groups: (for example)
    light 1 corrupted = 1000 / 0111 / 0110 / 1001
    light 2 corrupted = 0100 / 1011 / 0101 / 1010
    light 3 corrupted = 0010 / 1101 / 0011 / 1100
    light 4 corrupted = 0001 / 1110 / 0000 / 1111
    All groups must be reachable from any starting combination, therefore if two combinations are 2 flips apart, they must be in different groups!
    A consequence of this rule is that a combination and its complement (i.e. all lights flipped) have to be in the same group.
    Another consequence is that each group must have 2 even combinations (i.e. even number of 1's and 0's) and two uneven combinations.
    Consider these uneven combinations: 1000, 0100, 0100, 0001. They are all separated by two flips, so they must all be in different groups. You can assign them in 24 ways (4 possible choices for the first one, 3 for the second, and 2 for the third; 4*3*2 = 24). Assign the complements of each combination to the correct group, which is forced. This takes care of all the uneven combinations.
    Now for the even combinations: 0000, 0011, 0101, 1001. For the same reason as above, these can only be assigned in 24 ways. The complements are again forced.
    Multiply the 24 choices from the uneven combinations with the 24 choices from the even combinations to get the total number of possible groupings: 567.
    Finally, you can try to come up with a more intuitive method based on the grouping (like I did above).

  • @CircleTheSkies
    @CircleTheSkies Před rokem

    The solution they give is a more 'proper' one, generalized to any number, but here's a different one, split into two cases:
    1. You come in and either all four lights are the same parity, or two are off and two are on. In this case, flip a switch such that the corrupted one is the 'unique' one. The squad will see one switch different than the rest and know it's the corrupted one.
    2. You come in and three are one parity and one the other. In this case, by flipping one switch, from any arrangement you can generate one of four patterns:
    2a. All four are the same parity (0000,1111); this communicates that the first is corrupt.
    2b. The two ends are the same parity (0110, 1001); this communicates that the second is corrupt.
    2c. The two sides are the same parity (1100, 00,11); this communicates that the third is corrupt.
    2d. The switches are alternating (1010, 0101); this communicates that the fourth is corrupt.

  • @AvidCluelessGuy
    @AvidCluelessGuy Před 2 lety

    Used a different solution: based on the limited configurations, you can use parity to create two different rule sets, one for even number of lights on and off (or just all on or off), and 3/1 lights on/off (and vice versa). So, say you show up and it’s a 2/2; play odd-man out, and flick the flight that makes the corrupt one not match the other three lights. If you show up and it’s a 4/0, then same rule. But for 3/1, we need a slight variation: it does not matter what the last light is. Do odd man out on the first three. If the last light is the corrupt, make all 3 others match.
    Ex: you find 1001. team shows up to 0001. It’s odd parity, meaning it came from a 2/2 or a 0/4; finding the odd light out it’s the last light. Ex2: you find 0010. The first is corrupt. You flip to make 0110. Your team shows up. Seeing a 2/2, they ignore the last light, and see that the first 0 is the odd light out.

  • @luxon4
    @luxon4 Před 2 lety

    knew this one for once cause of error correcting codes. surprised they didnt mention that, this same concept is what makes the internet and your computers work today, and the guy who invented them won a turing award for this.

  • @abhinavr5533
    @abhinavr5533 Před 8 měsíci

    I solved it differently. There are a total of 16 possible configurations of the lights. For eg. 0000 is all lights off, 0001 means only the rightmost light is on and so on.
    Just classify these 16 configurations into 4 categories representing the corrupted disk number, such that you can get the correct category by flipping one switch. Create a 4x4 table with the category number and the configurations it contains. Give one copy to your teammates.

  • @kanenaskanenou
    @kanenaskanenou Před 2 lety

    We can also think it like this:
    If one switch is off or one switch is not off that means that it's that switch. This is okay for cases in which 0, 2 or 4 lights are on. In cases where there are 1 or 3 lights, we can represent as light number 1 as 1, line number 2 as 2, 3 as 3 and 4 as four. If all lights or no lights are on, the answer is 4. If the answer is 1 and we have light 2 on, we will switch on number 3 which is 5 which corrssponds to 1. (5 % 4 = 1, or we can just think that if the number is > 4 subtract 4). In some occasions, it's impossible to navigate to number 2, but we can navigate to number 4, so if we navigate to number 4 that means number 2 is the answer (if number 4 is the answer, no lights or all lights are on). Think about it! It works!

  • @ragnaroksden3439
    @ragnaroksden3439 Před 2 lety +1

    Found a different solution before looking at the original one:
    Condition 1: If all are off or all are on/two are on.
    Then flip one bulb so only the corrupted one remains (1 off or 1 on). The team will recognize that 1 of the lights is unique so they know that is the one.
    Condition two: 3 are on/1 is on.
    This one is a bit more difficult, but still easily solvable. Solution: if it’s 4, turn all of them on or off (depending on wether 3 lights are on or off). If it’s 3, flip one bulb until the split is 1-2/3-4 (if 1-2 is on, 3-4 should be off and vice versa). If it’s 2, flip one bulb until the split is 1-3/2-4. If it’s 1, split should be 1-4/2-3. The team will recognize that 2 lights are on and will destroy the corrupted one based on the split, or if all are on/off.
    Should work :)