The Light Switch Problem - Numberphile

  Рет қаралды 620,631

Numberphile

Numberphile

Күн бұрын

Пікірлер: 806
@robadkerson
@robadkerson Жыл бұрын
I like that Ben treats you like any random novice. Helps us actual novices.
@geraldsnodd
@geraldsnodd Жыл бұрын
True
@SirCalculator
@SirCalculator Жыл бұрын
And he forgot 1 as a devisor at first. Very relatable
@AntiChangeling
@AntiChangeling Жыл бұрын
Brady is like a veteran novice. He's the perfect person to do these.
@Pope_Balenciaga
@Pope_Balenciaga Жыл бұрын
Einstein once said if you can't explain something clear enough to a novice, you don't understand it clearly yourself
@Silvar55x
@Silvar55x Жыл бұрын
@@SirCalculator I think he was doing that intentionally to engage the viewer (and Brady).
@goodboi650
@goodboi650 Жыл бұрын
Ben Sparks is always an absolute delight to watch, and his puzzles are always so satisfying too. Thank you for everything you do!
@cyrileo
@cyrileo Жыл бұрын
👍 I totally agree, Ben Sparks' puzzles are fun and rewarding to solve!
@pear7777
@pear7777 Жыл бұрын
Love these puzzles, subbed!
@Kaisharga
@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.
@RunstarHomer
@RunstarHomer 6 ай бұрын
Indeed, a²b² = (ab)²
@HonkeyKongLive
@HonkeyKongLive Жыл бұрын
Ben is the MVP when it comes to breaking concepts down to make them easy to understand.
@bencrossley647
@bencrossley647 Жыл бұрын
Thanks ;) - I think he's also a school teacher / did a stint of school teaching so he will have had plenty of practice!
@cyrileo
@cyrileo Жыл бұрын
⭐️ I'm glad you think so! Let's solve the remaining puzzle together! 🤓
@xl000
@xl000 Жыл бұрын
Mvp?
@SirNobleIZH
@SirNobleIZH Жыл бұрын
Grant from 3b1b too
@MichaelMoore99
@MichaelMoore99 6 ай бұрын
Breaking them down? Does that mean that the concepts are composite? 😀
@bryantfuehrer2095
@bryantfuehrer2095 Жыл бұрын
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.
@piercexlr878
@piercexlr878 Жыл бұрын
That's one of the best ways to be taught. Leaving you stranded, most people won't make much progress, but with just a little push, you get all the benefits of figuring it out without all the suffering looking for those bread crumbs. Math is all about taking things someone told you and trying to apply it to something they didn't tell you.
@professorpoke
@professorpoke 7 ай бұрын
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.
@QuantumHistorian
@QuantumHistorian Жыл бұрын
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.
@onr-o1h
@onr-o1h Жыл бұрын
That's the one! I had a nagging feeling that this reminds me of something else, thanks!
@ke9tv
@ke9tv Жыл бұрын
Sift the twos and sift the threes In the Sieve of Eratosthenes, And as the multiples sublime, The numbers that remain are prime.
@columbus8myhw
@columbus8myhw Жыл бұрын
Not quite - you also need the nth person to skip the number n itself.
@adarshmohapatra5058
@adarshmohapatra5058 Жыл бұрын
​@@ke9tvI love your rhyme! You are quite sublime You made my time I'd give you a dime
@EconAtheist
@EconAtheist Жыл бұрын
"Don't believe everything you read on the internet." ~ Eratosthenes, Second Emperor of the Sixteen Kingdoms
@cramesplays
@cramesplays Жыл бұрын
Ben's excitement about this problem is contagious and his method of explaining it was excellent. Great video.
@cyrileo
@cyrileo Жыл бұрын
Wow, awesome! 👍😃
@DaTux91
@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!
@BleachWizz
@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.
@jursamaj
@jursamaj Жыл бұрын
No, the questions teachers hear the most are where the most learning is, so they *don't* gloss over them.
@hyfy-tr2jy
@hyfy-tr2jy Жыл бұрын
Its always nice to see Maximus the Mathematician! We are entertained!
@cyrileo
@cyrileo Жыл бұрын
😊 I too appreciate Maximus and the video was captivating!
@WaltTFB
@WaltTFB Жыл бұрын
'At my signal...unleash maths'.
@alexbennie
@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.
@joshuastucky
@joshuastucky Жыл бұрын
Absolutely stellar video. Interesting, surprising, yet accessible math, coupled with a phenomenal presentation by Ben Sparks. Honestly, this is peak Numberphile content.
@LeonardChurch33
@LeonardChurch33 Жыл бұрын
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.
@cyrileo
@cyrileo Жыл бұрын
👊🏽 Nice work, MrCharlz! Props for taking immediate action and coding a solution! 😮
@Tommy_007
@Tommy_007 Жыл бұрын
In general, experimenting by hand generates more ideas that can be used in a proof (which is the essential part of the problem).
@atharva1509
@atharva1509 Жыл бұрын
This conversation with cameraman format is really great👍
@numberphile
@numberphile Жыл бұрын
Cool - maybe I could make something more of it! :)
@cyrileo
@cyrileo Жыл бұрын
🤓 That's a great insight! It really speaks to the creativity of your thought process.
@marcusklaas4088
@marcusklaas4088 Жыл бұрын
Interesting problem wonderfully explained. Thank you!
@seedmole
@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
@ke9tv
@ke9tv Жыл бұрын
Yeah! Watrch the animation, and you'll see that there's an interesting complementary pattern starting from 100 as you run the light switches in reverse.
@cyrileo
@cyrileo Жыл бұрын
Neat observation! 😎🤓
@TheStoneblogs
@TheStoneblogs 8 ай бұрын
Can you please explain?
@zacprunty
@zacprunty Жыл бұрын
7:19 is exactly what makes this guy a mathematician. Loved this one.
@RavenZahadoom
@RavenZahadoom Жыл бұрын
I knew it would be something to do with how many factors they have, because only the people with one of their factors would ever touch the switch, but didn't see the square thing coming. Interesting puzzle that one.
@alexandertownsend3291
@alexandertownsend3291 Жыл бұрын
I think this is one of my favorite numberphile videos. I like how approachable it is. This is a problem you could reasonably give as extra credit on a math test for high schoolers.
@Sevenigma777
@Sevenigma777 Жыл бұрын
This is the only channel on KZbin 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
@Ghou1Lord
@Ghou1Lord Жыл бұрын
"Told ya!" :) Again a very nice video about math. I can imagine a world where teachers like you make many many students love math instead of being afraid of it.
@cyrileo
@cyrileo Жыл бұрын
👏🏻 Amazing insight! Math can be so much fun with the right person teaching it. 😆
@localidiot4078
@localidiot4078 Жыл бұрын
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.
@DeceptiveSS
@DeceptiveSS Жыл бұрын
"Drawing" this one out in a spreadsheet was very satisfying. Just for the sake of seeing what it would look like in the end, all 100 manipulations side by side.
@TheStoneblogs
@TheStoneblogs 8 ай бұрын
Would you be willing to share?
@nekogod
@nekogod Жыл бұрын
James Grime did this with Othello pieces! Also sometimes demonstrated with school lockers. All about perfect squares because they have an odd number of factors!
@watcherfox9698
@watcherfox9698 Жыл бұрын
I knew I seen this before. I thought it was an old Numberphile video, but it turns out it was on his own 'singing banana' channel.
@phiefer3
@phiefer3 Жыл бұрын
James also did a video on Numberphile about highly composite numbers, which was brought up at the end. The episode '5040 and other anti-primes'
@davidgillies620
@davidgillies620 Жыл бұрын
I've seen it with a corridor with 100 doors and 100 (suspiciously well-trained) monkeys.
@davidlohmann5098
@davidlohmann5098 Жыл бұрын
It appears to be a common math or programming question. Other channels like ted-ed have videos on the problem calling it "the locker riddle".
@jucom756
@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!
@ruferd
@ruferd Жыл бұрын
One of my favorite puzzles to give students. A surprising answer, but when you stop and actually experiment and play around with it, it's almost obvious. Such a wonderful "ah-ha" moment for everyone when they experience it!
@alexandertownsend3291
@alexandertownsend3291 Жыл бұрын
I actually tried it before watching the video. I solved it on my own after having my aha moment. I then watched the video and was happy to see I got it right. A lot of math puzzles that youtubers throw out are quite above my level, but I loved this one. It was a little bit tough, but not too tough.
@R3plicant
@R3plicant Жыл бұрын
A "lightbulb" moment, if you will
@cyrileo
@cyrileo Жыл бұрын
👍 Experimenting and problem-solving often leads to those special "ah-ha" moments. It's one of the magical sparks of mathematics that I love!
@BZAD1989
@BZAD1989 Жыл бұрын
"Told ya!" That was so wholesome :))
@dielaughing73
@dielaughing73 9 ай бұрын
Classic Aussie comeback
@rudodejong
@rudodejong Жыл бұрын
Very enjoyable video! The part at the end about 60, 180 and 360 blew my mind a little bit. 😉
@kindlin
@kindlin Жыл бұрын
The Babylonian counting systems used 60 as the base, so they had 60 unique digits in their numbering system. This was useful for fractioning things. With 10 we can only do 1x10 and 2x5 and that's it. We just happen to have 10 fingers, is my guess.
@lyrimetacurl0
@lyrimetacurl0 Жыл бұрын
😯
@topoDaMornin
@topoDaMornin Жыл бұрын
@@kindlin The Mesopotamians / Babylonians used the three sections of each of their four fingers to count to 12 just as easily 🙂
@thomasdupont1346
@thomasdupont1346 Жыл бұрын
@@kindlin The Babylonians were my first thought as well when the 60, 180 and 360 were mentioned. They are the ones who first used 60 seconds in a minute and 360 degrees in a circle.
@Ms19754
@Ms19754 Жыл бұрын
Such a great video! The conversational presentation, the clear explanations, the interesting but not too complicated problem. Just top of the top!
@bigpopakap
@bigpopakap Жыл бұрын
Wow, this little puzzle ended up touching on some really profound topics! So cool!!
@numberphile
@numberphile Жыл бұрын
So glad you liked it
@Einyen
@Einyen Жыл бұрын
@@numberphile Hey you forgot to call the highly-composite numbers for "Anti-Prime numbers" like you did to annoy Dr. James Grime "5040 and other Anti-Prime Numbers" 😁😂
@ysquaredyobozo
@ysquaredyobozo Жыл бұрын
i love the ending "and that seems like a pleasing outcome to a potentially contrived problem", cuz, aint those the best puzzles
@stathyena
@stathyena Жыл бұрын
Seeing Ben briefly question himself on some basic multiplication is oddly reassuring.
@piercexlr878
@piercexlr878 Жыл бұрын
The difference between you and a mathematician isn't usually intelligence but time spent learning.
@coreyburton8
@coreyburton8 Жыл бұрын
loved this episode! thanks. cool association with the squares. and with the number of factors. 60, 72, 84, 90, 96 have 12 factors they are the highest up to 100
@jameslapslie1995
@jameslapslie1995 Жыл бұрын
Had this question come up for a computer science interview at a London university literally yesterday. Hadn’t seen the video yet so ended up having to work it out in a similar way. A good reminder to watch your videos as soon as they come out rather then a week later 😂
@MTulak
@MTulak Жыл бұрын
I figured out the squares would be the only lights on fairly quickly, but then I spent a while convincing myself they were the only integers with an odd number of factors. I'm glad they proved it!
@iCarus_A
@iCarus_A Жыл бұрын
Yup, I arrived at the conclusion that odd-number factor numbers will be the ones left on, then drew the connection to squares -- as factors must always come in pairs but in the case (and only in the case) of a square, they can pair with themselves
@RunstarHomer
@RunstarHomer 6 ай бұрын
I think intuition is actually clearer than the proof here. Since factors come in pairs, the only way to have an odd number of them is for two factors to be equal. And it's not possible to have two pairs of equal factors totalling the same number. You cannot have a²=b² without a=b in the natural numbers.
@darkdudironaji
@darkdudironaji Жыл бұрын
I'm putting my guess to the problem down before watching the video. My first thought was that it would be easy to work out 1 at a time. Because you don't have to keep track of any numbers you've already passed. That was much harder to keep track of than I thought. But then I realized a switch only gets flipped when one of its factors comes up. So you just have to figure out if it has an odd number of factors, which would keep the light on, or an even number of factors, which would flip it off. After working on that for a few numbers, I realized factors ALWAYS come in pairs unless the number is a perfect square. In conclusion: 1, 4, 9, 16, 25, 36, 49, 64, 81, and 100 should be on. Everything else should be off.
@OwlRTA
@OwlRTA Жыл бұрын
I remember doing this type of problem as something fun the teacher gave us in one of my high school math courses. I was so proud when I figured out that the square numbers would be different from the rest. I don't think I proved it rigorously though
@alexandertownsend3291
@alexandertownsend3291 Жыл бұрын
There a few different ways to prove it. He showed one of them. Maybe you can find one of the others.
@cyrileo
@cyrileo Жыл бұрын
👍 That's awesome, OwlRTA! Impressive deduction skills!
@nekkowe
@nekkowe Жыл бұрын
The initial description reminded me of the prime sieve, which then got me thinking about how many times each switch would get flipped total = how many factors it has, which led pretty directly to "all non-square-number lights will be off at the end" - since that's the only case in which a switch would get flicked an odd number of times, with all other pairs of factors cancelling out.
@tspander
@tspander Жыл бұрын
It was a similar thing for me, but even more basic- I remembered that if you do naïve exhaustive prime checking, you only have to go up to the root of the number because of the factor pairs they show later on in the video. That led me to the same even/odd factors idea and that square numbers would be the only ones where there is a number without a counterpart.
@joseville
@joseville Жыл бұрын
13:00 you have a bag with three 2's and one 3 and you want to know how many unique numbers you can make by combining (read: multiplying) the numbers from this bag.
@laurendoe168
@laurendoe168 Жыл бұрын
What I was wondering was 36 - this is 2 squared time 3 squared, and not writing it out I wondered if having a PAIR of duplications would cause it to have PAIRS of factors once again. Obviously not, but I found this interesting.
@cryptoooooooo
@cryptoooooooo Жыл бұрын
I agree, but for the sake of writing it out: 1x36 = 1 x (2 x 2 x 3 x 3) 2x18 = 2 x (2 x 3 x 3) 3x12 = 3 x (2 x 2 x 3) 4x9 = (2 x 2) x (3 x 3) 6x6 = (2 x 3) x (2 x 3) 5 pairs of factors for 36, while one pair is a duplicate = 9 factors.
@laurendoe168
@laurendoe168 Жыл бұрын
@@cryptoooooooo I realized long after I posted it that there was only one true duplicate... and didn't bother to delete the comment
@cyrileo
@cyrileo Жыл бұрын
👍 Brilliant question! Even with 3 sets of duplicated factors, there are still an even number of factors!
@5eurosenelsuelo
@5eurosenelsuelo Жыл бұрын
Videos with Ben are by far the best of this channel
@artswri
@artswri Жыл бұрын
Another fun puzzle, so simple to perform but with interesting non obvious analysis. Thanks ever!
@pacefactor
@pacefactor Жыл бұрын
Man - this was so enlightening. I was messing with this stuff when designing card games, and my mind is just blown. I have so many more ideas.
@marklonergan3898
@marklonergan3898 Жыл бұрын
To answer the question, i have heard this before long ago, but in trying to remember it, i did jump to Prime numbers, but then i figured primes still have an even number of factors so i had to figure the answer again from scratch. 😀
@macronencer
@macronencer Жыл бұрын
Wonderful! I've seen the puzzle before but I'd never seen the proof, and it was pleasingly easy and elegant.
@codediporpal
@codediporpal Жыл бұрын
I love that you guys are still doing these videos. It's been so long! This is one of the first youtube channels I subscribed to!
@GlassDeviant
@GlassDeviant Жыл бұрын
Brilliant! I knew the answer by 5 minutes in, and I've never considered this problem before. Excellent presentation.
@katari8604
@katari8604 Жыл бұрын
Amazing old style Numberphile video. I think one specific part deserved more attention. The part at 15:00 where we deem that all square numbers +1 are odd. If we were to use 2^4 * 3^4 we'd get a nice number that satisifes the logic -> that is 1296 but as you might have guessed it's the square another number - 36 as you can evenly split the above multiplication into 2 simetrical groups (2^2 * 3^2) * (2^2 * 3^2) ... or just 36^2 :)
@guyedwards22
@guyedwards22 Жыл бұрын
I started this video before having to go to work and didn't get past the initial explanation of the problem. Just worked it out biking home afterwards, and I arrived at the conclusion about the square numbers via the parity of the product of the powers of the prime factors. Nearly crashed into the curb when I had the 'aha' moment 😵
@thenateman27
@thenateman27 4 ай бұрын
What a fun result. Super surprising!
@NoriMori1992
@NoriMori1992 Жыл бұрын
I love how over the years you can see Brady's math knowledge and understanding growing and his astuteness improving. I thought he'd be tripped up by 16 seeming to only have one duplication, but he pointed out right away that 4 x 4 can also be expressed as 2 x 2 x 2 x 2.
@kelqka
@kelqka Жыл бұрын
In Uni I had a similar question I had to verbally answer on the spot, to cement my grade in a class: "If you have 1000 lights. What is the least amount of switches you would need, to turn on Any Number of them" Tip: It was for a basic programing class
@Technodreamer
@Technodreamer Жыл бұрын
3:27 My immediate thought is, if a number has an even number of factors, it ends up off. If even, then on.
@FandangoJepZ
@FandangoJepZ Жыл бұрын
Had a similar problem in 8th grade where marbles were dropped in the nth bucket, and you had to reason about which buckets had such and such many marbles, was quite fun working out but also had 19 other problems to answer in those 90 minutes…
@PJSproductions97
@PJSproductions97 Жыл бұрын
This is the first time in a long time I figured out the answer to a problem during the "pause and solve it" section.
@The_JS_Camper
@The_JS_Camper Жыл бұрын
I liked the start of an additional pattern showing on the final shot. If you tally the columns with squares you get 2,0,0,2,1,2,0,0,2,1 Which you need to go up to 400 in order to see it double. Then I saw different pattern on the rows of 2,2,2,2,1,1,2,2,2,2,1,1. I saw this by starting from the number 1, and going across, you pass 2 squares going right before heading back to the left on the placement of the number line. This one is harder to put into words, but you can see it starting to emerge in the first 100. Dig the channel. 👍
@sledgehammer-productions
@sledgehammer-productions Жыл бұрын
I assigned the on-lights to midi notes sounding and at the end (100, 10^2) I have 2xA, 4xC#, 4xE (that makes A major) and 1xC (A minor). And even when I extend the sequence to 76^2 I only get those 4 notes. This surprised me. So far I haven't been able to assess why this is. I like that it's neither major or minor, just somewhat in the middle.
@radonato
@radonato Жыл бұрын
Short of Mr. Grimes, Mr. Sparks is by far the superlative expositor of these great topics.
@Twisted_Code
@Twisted_Code Жыл бұрын
video paused at 4:18. I have hit upon what I (currently) believe is the solution. it's "how many factors does this number have", and if I'm not mistaken (based on how 1 is an infinitely repeating factor of every number), duplicate factors don't count. That is, it's the length of the set of factors (including composite factors) continuing the video now to see if I'm right...
@Twisted_Code
@Twisted_Code Жыл бұрын
yup I had it. I feel really smart, where's my Internet prize? :D
@thecakeredux
@thecakeredux Жыл бұрын
Oh, I liked that detail of the light switch sound at the end.
@MultiSteveB
@MultiSteveB Жыл бұрын
At 3:36, I know it's not prime numbers. I'm wondering if it is the squares - 1, 4, 9, 16, etc.?
@danielngmoen3901
@danielngmoen3901 Жыл бұрын
Woah what a cool solution! I thought along side the video, and was thinking of another possible solution: If you take all the numbers exponents and remove one, then sum them so n = (c1-1) + (c2-1) + . . . + (ck-1), the light switch will stay on only if this number is odd, and will stay off if the number is even. Any flaw to my logic?
@GilCosta1965
@GilCosta1965 Жыл бұрын
15:51 "we know the primes don't have many factors". gotcha.
@TheStatisticalPizza
@TheStatisticalPizza Жыл бұрын
I actually figured this one out at the beginning without needing help! Kind of spooky because once he walked through it I realized I had the same train of thought by starting with the primes. I didn't make the connection beforehand that only perfect squares would have an odd number of factors so I learned something new.
@kamikaze2613
@kamikaze2613 Жыл бұрын
Thank you for making math for novices fun and forever entertaining and engaging.
@robertscott1949
@robertscott1949 Жыл бұрын
While using the Fundamental Theorem of Arithmetic to solve this problem is effective, it is sort of like using a sledge hammer when a fly swatter will suffice. In this case it is not necessary to develop a formula for the number of divisors of N. All that is needed is to know the parity of the number of divisors, which we can know without knowing the number of divisors itself. All we have to do is to note that if R is the square root of N, every divisor dR, namely N/d. However many divisors those comprise, their is an even number of them since they occur in pairs. All that remains is to ask if R itself is an integer to see if there is one more divisor, making the total odd. This reminds me of an old joke I heard years ago in college. A mathematician and an engineer are each tasked with fetching 10 gallons of water from the well using a 5-gallon bucket. Both the mathematician and the engineer go to the well twice and fill their 5-gallonn bucket to bring back a total of 10 gallons. The next day the mathematician and the engineer are provided with buckets that can hold 10 gallons and again asked to fetch 10 gallons of water. The engineer fills his 10-gallon bucket and returns in one trip. The mathematician makes two trips, each time bringing back only 5 gallons in the 10 gallon bucket. When asked why he did it this way he said that he simply reduced the problem to one he had solved before.
@lynk5902
@lynk5902 Жыл бұрын
I got to the answer quickly, but not why. Thank you for the breakdown!
@racecarrik
@racecarrik Жыл бұрын
I love how Ben knows Brady's favorite square number lol they've got a great working relationship
@ThePrimevalVoid
@ThePrimevalVoid Жыл бұрын
An interesting extension question could be, what is the rule that needs to be modified such that instead of squares remaining on the baord you have some abitrary power N. My first guess is that instead of a light switch it needs to be a dial with N settings (in some sense a light switch is a dial with 2 settings).
@Chelm9
@Chelm9 Жыл бұрын
729 is an interesting one that would be switched on because it has 7 factors, because it’s 3^6, which has two “duplicate factors”, 3^2 and 3^4
@jonathansperry7974
@jonathansperry7974 Жыл бұрын
Imagine the lights all in a row (instead of the grid shown in the animation), then view all the successive steps together, and some pleasant patterns emerge. Say the room numbers are n, then there’s a wedge of light between steps 1/2 * n and n, and fainter wedge of light between steps 1/3 * n and 1/2 * n, and so on.
@pratikkore7947
@pratikkore7947 Жыл бұрын
7:40 the jumpcut to figure out 4x4😂
@uniformizationtheorem3770
@uniformizationtheorem3770 Жыл бұрын
Didn't realise this on the first watch, but an easier proof: we're looking for double-ups in pairs of factors. These are precisely factorisations into square roots. So they only happen for square numbers: non-squares are off. Additionally, you can only have one (positive) square root, so there's only one double-up for each square number. That is, square numbers have an even number of factors from the other pairs, and an extra one from the double-up from the square root. That gives an odd number: squares are on.
@kevinn1158
@kevinn1158 Жыл бұрын
This is a great experiment. I'm going to show this to my 14 yr old daughter.
@palpytine
@palpytine Жыл бұрын
My first thought was "This sounds a bit like the sieve of Eratosthenes", which is why I suspect many people first consider primes
@unvergebeneid
@unvergebeneid Жыл бұрын
I figured it out up to the point that it depends on whether the number of factors is odd or even but I didn't figure out that the squares are the only numbers with an odd number of factors. I also don't think I ever would've figured that out, maybe with a lot of help by the interviewer... 🤔
@deepdrag8131
@deepdrag8131 10 ай бұрын
I had been working on a different problem before I heard of this problem, but the solution I found for the first problem made solving the second a snap. I wanted to figure out a way to determine how many factors any given number had. Actually, my initial problem was to generate all the numbers that had exactly twelve factors - and to solve that one I had to solve the earlier one. Anyway, answer was found, interestingly enough, by expanding the number I was testing to its prime factors. So, lets describe it this way p1^a*p2^b*p3^c… And the number of factors is (a+1)(b+1)(c+1) and so on. So if and of the powers of prime (a,b,c …) are odd then when you add 1 you get an even number and if any of the multipliers is even then the product is even so the only way to get an odd number is if all the multipliers are odd which means all the powers are even which means the number is a square.
@twoblink
@twoblink Жыл бұрын
I didn't need to know this; but I watched the entire video and was better for it! Thank you! Quite interesting!
@alangrant5278
@alangrant5278 Жыл бұрын
Wow one of the most enjoyable videos. Also intrigued is that’s a menora on the shelf or if not whether it’s a puzzle or maths thing…
@VoicelessRabbit
@VoicelessRabbit Жыл бұрын
Guess at 1:40 Take each number 1 to 100 and modular divide each number by the number of factors in the set of 1 to 100.
@origamiswami6272
@origamiswami6272 Жыл бұрын
3:27 I think I’ve figured it out. Numbers with an even number of factors (counting both 1 and the number itself) will end as “off”. Numbers with an odd number of factors will end as “on”. At first I thought it had to do with prime factors, but it’s just total number of factors.
@origamiswami6272
@origamiswami6272 Жыл бұрын
Wow, I’d figured it out, but I didn’t figure out the cool part. This is a really satisfying math puzzle.
@Metlz
@Metlz Жыл бұрын
My physics teacher just gave us this question for our hs physics class, this was one of the best ones he’s asked that’s all, great vid
@gunnarliljas8459
@gunnarliljas8459 Жыл бұрын
What a nice guy. Nicely presented and interviewed.
@bsharpmajorscale
@bsharpmajorscale Жыл бұрын
I'm proud that I thought about prime numbers a second before he brought them up. This definitely reminds me of stuff from the discrete mathematics class I took last year. Is there a connection to the method for working the sum-of-divisors function backwards? They both use (a+1)(b+1) form numbers.
@suan22
@suan22 Жыл бұрын
Thank YOU for making such cool stuff on the internet!
@yaduk7710
@yaduk7710 Жыл бұрын
This video aligned with my thought process perfectly. That's awsome
@jamesregovich5244
@jamesregovich5244 Жыл бұрын
This problem introduced me to the idea of first differences, in which I “discovered that the first difference of the perfect squares is the series of odd numbers, which makes finding the state of the nth switch easily figured out.
@Loki-
@Loki- Жыл бұрын
10:52 and this is why I hate interviews. I've never really liked riddles or puzzles, at least in the way they're proposed in interviews; very short time limits, being observed, interrogated, etc. Just because I fail in that kind of setting, doesn't mean I will fail puzzles in a work setting. Yes, all of those factors are present in a work setting, but it's in a different context that I'm more comfortable and capable in.
@Unknown-tx5iq
@Unknown-tx5iq Жыл бұрын
Your channel makes me love maths even more. ❣️
@richardl6751
@richardl6751 Жыл бұрын
About a 20 years ago I wrote a QBASIC program to solve this. It used 100 lockers instead of lights. I wanted to check for higher numbers and expanded the program to 400, then 1600. It was on an old 8086 4 MHz machine so it took a while to run.
@philipshell5494
@philipshell5494 Жыл бұрын
I made a comment of an observation I saw on this problem basically using addition (or subtraction) to solve this problem. See if you can find my comment and write a program using my more simple logic to solve the problem.
@richardl6751
@richardl6751 Жыл бұрын
@@philipshell5494 Sorry, couldn't find it. Can you copy and paste it here?
@bcr666-cvn68
@bcr666-cvn68 Жыл бұрын
Stopping at 3:38. What I've noticed is that any number that has an even number of factors is going to be off, which means that any prime is going to be off, because it was turned on by #1 and turned off by itself. For other numbers, 4 for example has 3 factors 1,2,4 meaning that it goes on, off, on and will remain on. 6 on the other hand has 4 factors 1,2,3,6 and so will go on, off, on, off and remain off.
@wiscadams
@wiscadams Жыл бұрын
This problem was presented to me in an interview decades ago, except it was a hallway of lockers that you would open and shut, instead of lights. The next level is to figure out what happens if you alternate directions you toggle each number.
@BleachWizz
@BleachWizz Жыл бұрын
5:25 - I'm still half way but I'll give a shot at a prediction. This factor thing is not the whole story: I'm just thinking about like 54. becomes, (1,2,3,3,3) it'll be flicked by 1,2,3,6,9,18,27,54. It has odd number of factors but even number divisors. if you don't consider 1 then another number that has the same parity will start to have the opposite parity. so after the factors you need to count the unique combinations they can form.
@JoniGrin
@JoniGrin Жыл бұрын
heard about this problem a few weeks ago and solved it in a few minutes but very nice
@alanredversangel
@alanredversangel Жыл бұрын
Me too. Then the Illuminati came and tried to recruit me but I said no thanks I'm quite happy just doing my DJing. They gave me a speedboat though because they respected my answer. I gave it to charity.
@eugenefullstack7613
@eugenefullstack7613 7 ай бұрын
05:45 broke my brain! THAT WAS AWESOME!!!
@reh3dzone
@reh3dzone Жыл бұрын
The number of options (on or off) is the multiple of the number of lights off between the on lights. Light 1=on, 2 off lights, light 4=on, 4 off lights, light 9=on, 6 lights off, etc, etc. So, between each light is the multiple of the number of options between each on light. 2, 4 ,6 ,8, 10, 12, etc. The fun is adding a different number of options, as in quantum computing: on, off, on and/or off, flickering, etc.
@golamkashef5255
@golamkashef5255 Жыл бұрын
Ben Sparks has my favorite problems!
@RichardAlbertMusic
@RichardAlbertMusic Жыл бұрын
Did I mention that I love your channel as much as the amount of prime numbers that exists?
@xliquidflames
@xliquidflames Ай бұрын
I had this handheld game as a kid in the 90s called Lights Out. It had 25 lights. When you power it up, it would turn on random lights. When you push one, it would turn it off but it would _also_ switch the state of the ones above, below, left, and right of that one you pushed. So, if they're off, they'll turn on. If they're on, they'll turn off. The game is to try to turn off all the lights. So imagine just the middle on being on. You push it to turn it off but now you have 4 on. The lights above, below, left, and right of that middle one are now on. It kept me occupied for hours. I hope I explained that clearly enough. It was so simple but so fun.
@galaxy_brain
@galaxy_brain Жыл бұрын
Holy Lord, Ben's closing comment about the practical usefulness of highly composite numbers like 60/180/360 absolutely shook me. I've always questioned why these numbers were used to define our measurement scales. Phenomenal.
@FelineBlender
@FelineBlender Жыл бұрын
I wish he'd called out 12 as being part of this set. 1,2,3,4,6,12 is just as impressive as 60's 12 divisors, and it explains clocks and rulers.
@docastrov9013
@docastrov9013 Жыл бұрын
​@@FelineBlenderPounds, Shillings and Pence.
@ExaltedDuck
@ExaltedDuck Жыл бұрын
When people complain about pre-metric measurement systems I like to point out that the 12, 60, and 360 bases made great works of architecture possible in the pre-industrial ages. Base 10 and thousands prefixes don't actually mean a whole lot. The prefixes introduce opportunities for conversion errors and are unnecessary due to scientific notation and - in a lot of cases - get a bit unwieldy without helper electronics.
The Goat Problem - Numberphile
16:52
Numberphile
Рет қаралды 860 М.
Game of Cat and Mouse - Numberphile
18:36
Numberphile
Рет қаралды 1,4 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Can you trust an elegant conjecture?
15:35
Stand-up Maths
Рет қаралды 330 М.
A Surprising Pi and 5 - Numberphile
16:40
Numberphile
Рет қаралды 663 М.
What's special about 277777788888899? - Numberphile
14:24
Numberphile
Рет қаралды 2,2 МЛН
Something Strange Happens When You Keep Squaring
33:06
Veritasium
Рет қаралды 8 МЛН
Epic Circles - Numberphile
26:36
Numberphile
Рет қаралды 2,2 МЛН
The Bingo Paradox: 3× more likely to win
30:15
Stand-up Maths
Рет қаралды 735 М.
Error Correcting Curves - Numberphile
17:46
Numberphile
Рет қаралды 240 М.
How Not to Prove the Collatz Conjecture
29:09
IDK math?
Рет қаралды 25 М.
Divisibility Tricks - Numberphile
27:31
Numberphile
Рет қаралды 918 М.
The Mystery of the Most Dangerous Place on the Moon
47:23
Astrum
Рет қаралды 316 М.
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.