The Light Switch Problem - Numberphile

577,678
0
Published 2023-02-16
Featuring Ben Sparks... See brilliant.org/numberphile for Brilliant and get 20% off their premium service and 30-day trial (episode sponsor)... More links & stuff in full description below ↓↓↓

This is also widely known as The Locker Problem - we liked the light switches better!

More Ben Sparks on Numberphile: bit.ly/Sparks_Playlist
Ben Sparks on the Numberphile Podcast:    • The Happy Twin (with Ben Sparks) - Nu...  

Ben's website: www.bensparks.co.uk/
Ben's YouTube channel:    / @sparksmaths  

Highly Composite Numbers:    • 5040 and other Anti-Prime Numbers - N...  

Numberphile is supported by the Simons Laufer Mathematical Sciences Institute (formerly MSRI): bit.ly/MSRINumberphile

We are also supported by Science Sandbox, a Simons Foundation initiative dedicated to engaging everyone with the process of science. www.simonsfoundation.org/outreach/science-sandbox/

And support from The Akamai Foundation - dedicated to encouraging the next generation of technology innovators and equitable access to STEM education - www.akamai.com/company/corporate-responsibility/ak…

NUMBERPHILE
Website: www.numberphile.com/
Numberphile on Facebook: www.facebook.com/numberphile
Numberphile tweets: twitter.com/numberphile
Subscribe: bit.ly/Numberphile_Sub

Videos by Brady Haran

Patreon: www.patreon.com/numberphile

Numberphile T-Shirts and Merch: teespring.com/stores/numberphile

Brady's videos subreddit: www.reddit.com/r/BradyHaran/

Brady's latest videos across all channels: www.bradyharanblog.com/

Sign up for (occasional) emails: eepurl.com/YdjL9

All Comments (21)
  • @Kaisharga
    This video gave me the realization that a square times a square is also a square. Which, now that I think about it and why that's true, seems obvious and clear, but I very much did not expect it until I saw it.
  • @goodboi650
    Ben Sparks is always an absolute delight to watch, and his puzzles are always so satisfying too. Thank you for everything you do!
  • @robadkerson
    I like that Ben treats you like any random novice. Helps us actual novices.
  • @ZachGatesHere
    Ben is the MVP when it comes to breaking concepts down to make them easy to understand.
  • @cramesplays
    Ben's excitement about this problem is contagious and his method of explaining it was excellent. Great video.
  • @professorpoke
    I once read this question in a math magazine when I was in the 7th grade. I tried to solve it but couldn't. Then I almost forgot about this question. After more than a year (now I am in the 9th grade) it suddenly hit me, and I solved it. That made me realize that I never had forgotten about this question. It was there all the time, in my brain waiting for me to learn the right tools, waiting for me to become worthy to solve it.
  • One of my favorite things about this video is that, through their conjecture, I discovered it before they said it and I felt like a genius even though I needed to lean on them leaving bread crumbs to lead me.
  • The connection to primes is actually very very close. Take the same problem, but once a light is off you can never turn it back on. You now have an algorithm called The Sieve of Eratosthenes which is a well known (and efficient!) way of generating the prime numbers. It's cute that a tiny change in the rules is the difference between spitting out primes and squares. Bonus fun fact: Eratosthenes was also the first guy to measure the radius of the Earth.
  • I love when I realize that I can implement a solution to a particular math problem in code. I paused the video at 1:34 and wrote a little Java program to run through all 100 iterations before continuing with the video and was very satisfied when Ben got to the final answer and my result matched his.
  • @BleachWizz
    amazing video. I love the fact Brady is clearly improving and participating more. Plus he brings a lot of questions that teachers usually gloss over because they're used to see that question so many times that it has become irrelevant. They're usually the ones that brings back connections from the model to the problem and those really help understanding.
  • @joshuastucky
    Absolutely stellar video. Interesting, surprising, yet accessible math, coupled with a phenomenal presentation by Ben Sparks. Honestly, this is peak Numberphile content.
  • @DaTux91
    I'm stealing this puzzle and adapting it for my D&D game. Instead of lights getting switched, I'm thinking trapdoors over death pits. Stand on a non-square labeled one at your own peril, adventurer!
  • @alexbennie
    The best feeling ever, after seeing the obvious 'Answer', without seeing the not-so-obvious-at-first 'Why'; then seeing it after many hours! I had this problem in an assessment years ago and ended up spending hours on excel simulating the problem... I saw that the pattern was spoiler*. I then spent a ridiculous amount of time to try and figure out why only the *spoiler stayed lit... One of the most fun/cool and fundamental ideas crop up in solving this problem.
  • @seedmole
    The slight segue about anyone beyond the 50th being able to only interact with a single switch would be a wonderful point to go off on a tangent about Nyquist theory in the context of Audio Sampling
  • @atharva1509
    This conversation with cameraman format is really great👍
  • I vaguely remember this puzzle years ago. I never guessed the answer. I completely forgot about it until i watched this video. It took me 5 seconds to go through the primes -> Squares logic. Its crazy what a few years and some programming will do to your neurons.
  • @jucom756
    i think this was an olympiad problem once because i instantly remembered how to do the solution: the amount of times a lightswitch is flicked is the amount of numbers of which the lightswitch is a multiple AKA the amount of divisors of the lightswitch, then because every divisor has an inverse divisor (d*m=K so d and m are both divisors) the total amount of divisors will always be even if those 2 are different for every divisor, so only the numbers that have a divisor equal to itself will be flicked an odd amount of times, divisor equal to itself means a square number so it will be all the squares that are on!
  • @Sevenigma777
    This is the only channel on Youtube where in every single video i have watched there is a moment where i have no clue whats going on or being said but yet i keep on watching lol
  • @zacprunty
    7:19 is exactly what makes this guy a mathematician. Loved this one.
  • i love the ending "and that seems like a pleasing outcome to a potentially contrived problem", cuz, aint those the best puzzles