100 Doors Puzzle || Hard Puzzle for Genius minds

  Рет қаралды 252,416

LOGICALLY YOURS

LOGICALLY YOURS

Күн бұрын

There are 100 doors in a row. They all are initially closed.
A person walks through all the doors 100 times and every time he toggles the state of speific doors. that means he changes
the state of the door,. if the door is closed, he will open it.. and if its opened then he will close it.
In each walk he selects specific doors to toggle, in the following manner.
In his first walk, he toggles all the doors in multiple of 1.. that means he toggles all the 100 doors.
In the second walk, he toggles the doors in multiple of 2.
In the third walk, he toggles the doors in multiple of 3. that means, he will change the state of door no.3, 6, 9, 12... and
so on.
In the fourth walk he toggles doors in multiple of 4.
This way he walks for 100 times.
The puzzle is : What door numbers will remain opened after 100 walks.
(Remeber that initially all doors are in closed state)
This video explains this puzzle the best way. You will certainly learn the optimal way and the best approach of solving difficult puzzles.
Also try these mind blowing puzzles:
Which Tank Will Fill Up First? || Solution || VIRAL PUZZLE
• Which Tank Will Fill U...
Can you solve the Tricky Puzzle || The Clever Commuter || Logical Puzzle
• Can you solve the Tric...
You can follow my facebook page of Logically Yours( Mohammed Ammar ):
/ mohammmedammar

Пікірлер: 729
@lokeshreddy212
@lokeshreddy212 6 жыл бұрын
Very difficult puzzle, but your explanation is very detailed. Thanks a lot for making this video....
@alandouglas2789
@alandouglas2789 5 жыл бұрын
Mangoloads all the squares...
@mohammedsiddiqui3062
@mohammedsiddiqui3062 3 жыл бұрын
Yes this was a great explanation, and very easy to follow. How interesting it is that something can be so complicated and so simple at the same time.
@medipallinarendrakumar1351
@medipallinarendrakumar1351 3 жыл бұрын
Well ఎక్షపళైణైడ్
@kiranvootori8101
@kiranvootori8101 3 жыл бұрын
I can imagine how difficult making the animation would have been and appreciate how it makes understand the problem and approach to the solution so easy. But, I loved the door opening progress bar more than anything else - very creative.
@bhaveshkhanted7087
@bhaveshkhanted7087 4 жыл бұрын
After completing the puzzle by writting all the factors till 100. Me : i am the most clever in the world. After video explanation.. Me : Oh , just missed that.
@kanishkkrishna9983
@kanishkkrishna9983 5 жыл бұрын
Really amazing explanation.Actually I was asked to solve this using programming.I even solved it in C++ by factor of a no. You are a genius sir. I never thought about square logic.
@LOGICALLYYOURS
@LOGICALLYYOURS 5 жыл бұрын
Thanks Kanishk :)
@jaygreen7494
@jaygreen7494 5 жыл бұрын
I love this type of puzzle, because you feel clever if you figure it out, but if you have to see the explanation it seems so simple and you wish you'd thought of it.
@k.g6907
@k.g6907 3 жыл бұрын
ya this is always the case with me
@shauryaagarwal4556
@shauryaagarwal4556 5 жыл бұрын
This came in my Olympiad yesterday and today this is in my recommendation!!!! Aliens Confirmed
@shauryaagarwal4556
@shauryaagarwal4556 5 жыл бұрын
@Adam Romanov It was not specifically an Olympiad It was sort of a competition for a tour of IIT Kanpur conducted by students studying in IIT Kanpur
@shauryaagarwal4556
@shauryaagarwal4556 5 жыл бұрын
@Adam Romanov Thanks bro
@udayadityabhattacharyya7496
@udayadityabhattacharyya7496 5 жыл бұрын
Though it is a known puzzle with 1000 doors, your explanation is superb.
@qusuto
@qusuto 2 күн бұрын
Fortunately I was able to find this solution in today's codeforces contest.
@manpowervicky
@manpowervicky 5 жыл бұрын
I solved the puzzle using MS Excel, The doors open are - 1,4,9,16,25,36,49,64,81,100. Totally 10 doors
@TigruArdavi
@TigruArdavi 3 жыл бұрын
Im too lazy, that's why I so love spreadsheets. Quickly drew up an excel, and instantaneously realized it's only square numbers remaining. That's the solution, so I didn't inquire it any further, appreciate your approach and explanation.
@girlnado
@girlnado 2 жыл бұрын
Kinda proud of myself on this one. I usually suck at these problems but I was able to work through it on my own, find the patterns, and get the right result. Very fun!
@gopinathnatarajan6895
@gopinathnatarajan6895 3 жыл бұрын
It's really an awesome one. When you explained perfect square thing with this extraordinary animation. I am just wow! Thanks for making our brain smarter
@nidadursunoglu6663
@nidadursunoglu6663 9 ай бұрын
I did it and found "all of the numbers which have even powers of their primes will be opened". Than i watched it and realized this defines the perfect squares 😅
@LOGICALLYYOURS
@LOGICALLYYOURS 9 ай бұрын
Glad you solved it on your own 😊
@yasharya9765
@yasharya9765 5 жыл бұрын
I solved it in 15 min
@jaynilsheth1668
@jaynilsheth1668 4 жыл бұрын
If there would have been 'n' doors then in nth round number of open doors will be given by: greatest integer of √n that is : [√n] . You can check this by putting different values of n. You have solved for n=100.
@gurshaan4848
@gurshaan4848 3 жыл бұрын
This puzzle was difficult, but after seeing this video I am able to analyze it,thanks Ammar
@dwstyagi
@dwstyagi 3 жыл бұрын
this puzzle is in the CtCI Book... but their explanation wasn't that good... thank you so much for explaining that briefly... Keep on doing that... Don't Stop
@joneikholm
@joneikholm 5 жыл бұрын
public class DoorsToogled { public static void main(String[] args) { int size = 100; boolean[] doors = new boolean[size + 1]; for (int multiple = 1; multiple
@SourabhBhat
@SourabhBhat 6 жыл бұрын
Using a computer program to simulate the puzzle: ----------------------------------------------------------------------------- numDoors = 100 doors = ['✘'] * numDoors for stride in range(1, 100+1): for i in range(numDoors): if (i + 1) % stride != 0: continue if doors[i] == '✘': doors[i] = '✔' else: doors[i] = '✘' print(doors) ----------------------------------------------------------------------------- Output: ['✔', '✘', '✘', '✔', '✘', '✘', '✘', '✘', '✔', '✘', '✘', '✘', '✘', '✘', '✘', '✔', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✔', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✔', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✔', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✔', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✔', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✘', '✔']
@greninjamariokartpokemonfan
@greninjamariokartpokemonfan 9 ай бұрын
The doors that will remain open are Doors 1, 4, 9, 16, 25, 36, 49, 64, 81, and 100. How do I know this? Well, opening or closing a door a certain number of times determines that door's factors. All doors that remain closed have an even number of factors, while those that remain open have an odd number of factors. Lo and behold, perfect squares are the only numbers with an odd number of factors. Here are how many factors each of the ten squares has, and what each factor is. 1: 1 (one factor) 4: 1, 2, 4 (three factors) 9: 1, 3, 9 (three factors) 16: 1, 2, 4, 8, 16 (five factors) 25: 1, 5, 25 (three factors) 36: 1, 2, 3, 4, 6, 9, 12, 18, 36 (nine factors) 49: 1, 7, 49 (three factors) 64: 1, 2, 4, 8, 16, 32, 64 (seven factors) 81: 1, 3, 9, 27, 81 (five factors) 100: 1, 2, 4, 5, 10, 20, 25, 50, 100 (nine factors)
@abhishekjadhav2363
@abhishekjadhav2363 3 жыл бұрын
I solved it by reducing it to 10 doors and doing the calculation and found the pattern that 1 4 and 9 are open. guessed it correct that squares will be opened in the end.
@Name-js5uq
@Name-js5uq 5 жыл бұрын
Wow, you did a really good job explaining it and it was easy to understand.it was well worth the time to do it right and explained it so very carefully I fully understood it. Excellent excellent job you did ammsr on this video.
@LOGICALLYYOURS
@LOGICALLYYOURS 5 жыл бұрын
Thanks Steve for the appreciation... It really boosted my passion to make more videos. :)
@subodhkhamkar2930
@subodhkhamkar2930 2 жыл бұрын
Good visual explaination. I found the solution by programming and surprised to find that it's the square. Which highlights the importance of correct thinking over computer program
@fascination1461
@fascination1461 5 жыл бұрын
Superb you are logically genius
@lokeshkoliparthi9268
@lokeshkoliparthi9268 3 жыл бұрын
At first I didn't get the logic of perfect square but at 3:40 I got the logic. Thanks for the puzzle 🙏
@scyllasemusic2254
@scyllasemusic2254 5 жыл бұрын
I thought I would need paper, but, I used the picture in the video to visualise it easily instead. Then it came to my mind that all except 1 were closed as I thought others had even factors. But, I realised that one of the factors of a square number (the root) is multiplied by itself instead, and the person will only toggle the door once. So, instantly figured it out, the opened doors are square numbers Solved in 1 minute, well, not too hard, and also requires luck
@Vicky-dp1fy
@Vicky-dp1fy 6 жыл бұрын
Awesome........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... Bro!
@Vicky-dp1fy
@Vicky-dp1fy 6 жыл бұрын
Mind blowing
@viktorsmets29
@viktorsmets29 5 жыл бұрын
I really liked this puzzle. It is comparable a locker riddle on TED.
@nikhilramteke142
@nikhilramteke142 5 жыл бұрын
Excellent Work!!! And very well explained. Thank You.
@MrRobertpaul80
@MrRobertpaul80 5 жыл бұрын
Loved the explanation. Very very well done video! Thank you!
@IroxGamer
@IroxGamer 4 жыл бұрын
I saw many explanations but i could not understand why only perfect squares,,, but with this video i was able to understand THANKS A LOT
@LOGICALLYYOURS
@LOGICALLYYOURS 4 жыл бұрын
Glad to know that my explanation helped you...
@priyanshiagarwal2291
@priyanshiagarwal2291 3 жыл бұрын
I solved the puzzle and that too by same logic... practising...permutation combination really increases iq😄😁
@gharud_xd6812
@gharud_xd6812 3 жыл бұрын
Today interviewer ask me this puzzle and my mind said what's up logical people's 😂
@ramaclassy8394
@ramaclassy8394 6 жыл бұрын
thankyou sir very good explanation ...
@ammaryasser2726
@ammaryasser2726 5 жыл бұрын
i love his name first time to run into my name on youtube
@LOGICALLYYOURS
@LOGICALLYYOURS 5 жыл бұрын
By the way... my son's name is Yasir :)
@vickyca9313
@vickyca9313 5 жыл бұрын
Very nice puzzle. I solved this using MS Excel. It was surprising that I cracked it in 10 mins by framing a formula in MS Excel
@LOGICALLYYOURS
@LOGICALLYYOURS 5 жыл бұрын
Thanks Vicky.... good to know that you made use of excel formula.
@amol1539
@amol1539 3 жыл бұрын
Check for ten gates and you get 1 4 and 9 open... And you get the series logic!!
@MUJAHID96414
@MUJAHID96414 3 жыл бұрын
This isn't difficult 1st door will open and prime number door closed.
@pappalaabhiram1670
@pappalaabhiram1670 3 жыл бұрын
Superb Are you solving this problems on your own or with any reference .
@keerthanasharavanan8169
@keerthanasharavanan8169 5 жыл бұрын
Thanks a lot for your video and explanation☺☺☺
@ridarehman4727
@ridarehman4727 4 жыл бұрын
Got it Ammar By Rida 😊
@vaibhavbaldeva9076
@vaibhavbaldeva9076 5 жыл бұрын
It was fantastic
@FurryCombatWombat
@FurryCombatWombat 3 жыл бұрын
My initial thought before watching rest of video: Only perfect squares will remain open because all other numbers have an even number of factors
@FurryCombatWombat
@FurryCombatWombat 3 жыл бұрын
heck I was right now people are gonna think I cheated ;-;
@cyburntormund6310
@cyburntormund6310 5 жыл бұрын
A quistion ask me by an interviewer in a company that ' a Bear is at top of a hill (hight 100 meter) and fall down from hill in 10 second what is colour of BEAR .please answer this question sir
@LOGICALLYYOURS
@LOGICALLYYOURS 5 жыл бұрын
Color should be White.. it's a polar bear(white in color).. it's found in Arctic Circle(north Pole of earth).. at poles the gravity is 10m/s. So it falls in 100/10 = 10 seconds (t = distance/speed).
@faridfares8338
@faridfares8338 5 жыл бұрын
Great but my english is so poor that l did not understand all the explanation
@theletsplayprincess3894
@theletsplayprincess3894 5 жыл бұрын
Those can't be the only open doors, can they? Feels like their should be more....
@justingolden21
@justingolden21 4 жыл бұрын
Commenting before I see the explanation: Since all doors start closed, the open ones will be toggled an odd number of times. Primes (and composites as well) are divisible by themselves and 1, which in cases except for 1, cancel out. For example, 5 is prime and only divisible by 5 and 1, so that's 2 numbers, which is even, so they offset. For composites, they are also divisible by themselves and 1, however they can also be divisible by other numbers. 12 for example, is divisible by 2,3,4, and 6 (and 1 and 12). Since that's an even number of divisors, 12 will also stay closed. Since multiplying numbers pairs two unique integers together, unless the multiplied numbers are the same, the only numbers which have an odd number of divisors (and will therefore be left open) should be squares, such as 9, because 3 and 3 are the same number, so 9 has an odd number of divisors and will be toggled an odd number of times, and be left open. 1 is also a square, so this covers that case as well. 18 is divisible by 2,3,6,9, and even though it's divisible by 9 (a square, 3*3), it's divisible by an even number of numbers, as is 50 for example, where 25 pairs with 2, and 5 pairs with 10. 27 is a cube, and is divisible by 3 and 9, which is also an even number. Final answer: perfect squares only.
@arshdeepsingh1348
@arshdeepsingh1348 3 жыл бұрын
I solved this by starting with smaller set till 16, it makes an Arithmetic progression, 1open 2close 1open 4close 1open 6close ie after 1 open the close count increments by 2 So now if we do the sum of AP + open doors so that it is equal to 100 the n comes out to be 10 which is the answer
@madhavaellamsetty1104
@madhavaellamsetty1104 3 жыл бұрын
I did not understand
@arshdeepsingh1348
@arshdeepsingh1348 3 жыл бұрын
@@madhavaellamsetty1104 Assume there are 16 doors and now you do the open close thing starting from 1st door then multiple of 2 then 3 so on till 16th door After doing this open close thing at the end you will see that 1st door is open 2nd and 3rd door will be closed, 4th door is open, 5,6,7,8 th doors are closed. 9th is open, 10,11,12,13,14,15th doors are closed and 16th is open. So it makes and AP 2,4,6,8 of consucutive closed doors and 1 open door in between them. You have to add this AP and the open door between them till the sum is 100. 1+2+1+4+1+6+1+8+1+10+1+12+1+14+1+16+1+18+1 = 100 So the 1's are the open door and the count is 10
@madhavaellamsetty1104
@madhavaellamsetty1104 3 жыл бұрын
@@arshdeepsingh1348 wt does " AP" mean
@JillC
@JillC 3 жыл бұрын
@@madhavaellamsetty1104 Arithmetic progression
@BALAKRISHNAN-wb9hw
@BALAKRISHNAN-wb9hw 4 жыл бұрын
Very hard puzzle. But really good explanation sir
@samtabatabaeian2793
@samtabatabaeian2793 4 жыл бұрын
a very good mathematical question I found out the answer in a very long time,but it really challenged me Thanks for your beneficial video
@mattethebest1
@mattethebest1 5 жыл бұрын
Squares?they have odd number of factors...
@sameerkashyap4620
@sameerkashyap4620 3 жыл бұрын
Was asked this in an interview today, flunked grandly. Thanks tho, now I know how this works
@BRIJ1501
@BRIJ1501 3 жыл бұрын
which company bhai?
@sameerkashyap4620
@sameerkashyap4620 3 жыл бұрын
@@BRIJ1501 Juspay
@BRIJ1501
@BRIJ1501 3 жыл бұрын
@@sameerkashyap4620 are you in IT domain..
@onkarpitti767
@onkarpitti767 3 жыл бұрын
Actually it took me 1 hour for getting this As i took first approach writting all the factors And then i saw you video 😂 But really quite awesome 👌👏
@anujkothari2134
@anujkothari2134 6 жыл бұрын
Awesome puzzle....same will be true for if we keep 10 doors and 10 times to toggle??right
@captainjacksparrow690
@captainjacksparrow690 3 жыл бұрын
me ( when i saw the starting of video.) : The doors are all closed , then the puzzle is solved.🕷 me(after completing video) : swallowing saliva In fear.👻
@baggiojoset
@baggiojoset 5 жыл бұрын
Did it in 2 minutes I Checked it for only 10 doors I found out 1,4,9 are open at the end. It is because they are perfect squares.
@suprajareddy2964
@suprajareddy2964 4 жыл бұрын
super explanation what a logic 👌👌 really you are great thanks for making this video sir
@LOGICALLYYOURS
@LOGICALLYYOURS 4 жыл бұрын
So nice of you
@malahalder8534
@malahalder8534 5 жыл бұрын
Ammar you are amazing bro. I am late to check out your channel but then also your puzzles really teaches to be rational and logical..... Love you
@LOGICALLYYOURS
@LOGICALLYYOURS 5 жыл бұрын
That's all I needed.... a little appreciation boosts my passion to make more and more videos.... get ready for this weekend puzzle :) Many thanks Mala
@malahalder8534
@malahalder8534 5 жыл бұрын
Yes...
@awfulprogrammer619
@awfulprogrammer619 5 жыл бұрын
In first ten number 1,4,9 will be opened(as 4 got closed by 2 and opened by itself, same as 9 got closed by 3 and opened by itself). So, we have Arithmetic sequence as.. 1,4,9,16,25,36,64,81,100...
@shaheedsukhdevnagar24shaku98
@shaheedsukhdevnagar24shaku98 4 жыл бұрын
I also figure out this solution by this method. 🙂🙂
@shaheedsukhdevnagar24shaku98
@shaheedsukhdevnagar24shaku98 4 жыл бұрын
Your trick is amazing 👍🏼👍🏼. But I think u missed 49.
@Ressuu
@Ressuu 3 жыл бұрын
Spent 15min on the puzzle. It was clear there had to be a rule and dealing with the first few numbers it quickly becomes apparent that odd number of factors is the key. How can some people manually calculate all the odd factors up to a 100 and not see this is amazing XD
@yairkaz
@yairkaz 2 жыл бұрын
Most people create code to check this, I personally did and I know many else did as well
@d4django
@d4django 5 жыл бұрын
Very interesting. Excellent explanation. And an interesting fact about squares.
@XJWill1
@XJWill1 3 жыл бұрын
Your explanation would be clearer if you used the word "divisor" instead of "factor". When someone says "factor" the first thing many people think of is a factorization. For example, 36 has the prime factorization 36 = 2^2 * 3^2 but what we need to know for this problem are what are the divisors of 36, i.e., what numbers can 36 be divided by with 0 remainder? Those are: 1,2,3,4,6,9,12,18,36
@gq7435
@gq7435 5 жыл бұрын
Awesome logic. But I think I will just write code to find correct doors than do all this analysis.. that would be a lot faster 😀
@Nuclearburrit0
@Nuclearburrit0 4 жыл бұрын
Programming is fun
@rakshit_jain_sahab
@rakshit_jain_sahab 5 жыл бұрын
The excellent explanation. You are a genius
@deeptanshusurya6399
@deeptanshusurya6399 3 жыл бұрын
It takes few minutes for us to watch the video but for sir it takes a lot of hard work and patience to create such an amazing , informative and brain storming videos. A lot of appreciation to you sir.
@sushantagawane8683
@sushantagawane8683 4 жыл бұрын
Very good explanation. Thank You !!!
@navdeepsingh6204
@navdeepsingh6204 3 жыл бұрын
Incredible approach..... Totally out of the box ..... Great to watch such a solution....keep it up
@padmavathynarayana7089
@padmavathynarayana7089 5 жыл бұрын
Sir wat about the prime numbers sir Will not the doors of prime numbers be opened??
@LOGICALLYYOURS
@LOGICALLYYOURS 5 жыл бұрын
Prime door numbers would be closed because they would be visited twice.. example: Door 7 would be visited on walk1 and walk7.
@sakeenakalam5373
@sakeenakalam5373 4 жыл бұрын
You are genious
@Agnihotri798
@Agnihotri798 4 жыл бұрын
I did it by own
@priyadharshinikumar4007
@priyadharshinikumar4007 5 жыл бұрын
Such awesome explanation....tq bro
@kk-fj9mi
@kk-fj9mi 3 жыл бұрын
It will be all perfect square less than 100
@vembukarthickt8809
@vembukarthickt8809 3 жыл бұрын
#TED RIDDLES *************************************************** sarcacism
@DarkZero757
@DarkZero757 5 жыл бұрын
I solved it using c++
@dashl5069
@dashl5069 5 жыл бұрын
this is a fun logic puzzle but really not that difficult, my class was given this problem in 4th grade and almost everyone was able to solve it in 30 mins or so.
@manusarda
@manusarda 3 жыл бұрын
I have viewed this puzzle 2 times before on other channels but never understood the concept. Although I mugged up the answer that perfect squares will remain open. But now after seeing your explanation there is conceptual clarity. Great explanation 👍👍
@abhinandan3175
@abhinandan3175 5 жыл бұрын
My teacher just taught me this question a few days back....😉😉 And the answer is 10!!
@scyllasemusic2254
@scyllasemusic2254 5 жыл бұрын
Yeah, that's the amount
@brianmagicman3556
@brianmagicman3556 5 жыл бұрын
That's obvious, seeing as the answer on here was 10 anyway
@sangeethamaryr368
@sangeethamaryr368 3 жыл бұрын
Nicely explained sir Thank you
@icebro5059
@icebro5059 4 жыл бұрын
I like how this video uses the SpongeBob font.
@suryarb4843
@suryarb4843 5 жыл бұрын
Single question gives.teaches a lot of information and hints.
@InfoPanel7902
@InfoPanel7902 4 күн бұрын
Explained beautifully
@sriramyatoleti
@sriramyatoleti 2 жыл бұрын
Really appreciate the presentation. Must have taken a lot of effort, but beautifully illustrated!
@RadheRadhe-js8co
@RadheRadhe-js8co 3 жыл бұрын
Sir cleared it Without seeing the solution
@aayushjalan712
@aayushjalan712 5 жыл бұрын
I actually wrote the code to count the factors... anyway, nice question and solution Excellent
@LOGICALLYYOURS
@LOGICALLYYOURS 5 жыл бұрын
Hi Aayush... can you please share the code.. just need to check if you wrote it based on algorithm or any other logic.
@crickster1333
@crickster1333 3 жыл бұрын
Sir what about 12, it having odd number of factors.
@arshdeepsingh1348
@arshdeepsingh1348 3 жыл бұрын
1,2,3,4,6,12 which is 6
@brwler1
@brwler1 5 жыл бұрын
subscribed
@komedy3001
@komedy3001 5 жыл бұрын
A very good puzzle and explanation tooo
@ameersuheal8070
@ameersuheal8070 5 жыл бұрын
Is it true??? I still din get it
@williamjoannes7197
@williamjoannes7197 4 жыл бұрын
nice puzzle, the only thing I could think of was that all primes are closed in the end (but actually many others all also closed)
@panchalibaishya749
@panchalibaishya749 4 жыл бұрын
Awesome explanation 😍
@olerask2457
@olerask2457 10 ай бұрын
I solved the problem using prime factor decomposition. Any natural number N may be written uniquely as p1^n1 * p2^n2 * ... * pk^nk, and the number of divisors of N is then (n1+1) * (n1+1) * ... * (n1+1), which is only an odd number if ALL n1, n2, ..., nk are even. But then each factor p2^n2 is a perfect square, and as any product of perfect squares is also a perfect square, the condition for an open door is that N should be a perfect square. The approach in the video using matching of divisors is simpler than mine, and also very intuitive :-).
@praneethkuraparthi3165
@praneethkuraparthi3165 6 жыл бұрын
However i came with the same approach till the number of factors to be odd.There is an other explanation to this. we know that the number of factors for a number expressed in the form of prime numbers such as 2^(a1)*3^(a2)*5^(a3)..*x^(an). is (a1+1)*(a2+1)*(a3+1).....*(an+1)..let it be equation(1).Where 'x' is the largest prime number. And we know that odd*even is even, even *even is even, only odd*odd will be odd number, so every term in equation(1) is odd number i.e, (a1+1),(a2+1),(a3+1)...,(an+1). are all odd numbers so we can say a1,a2,a3,a4,....,an are even numbers(since if a1+1=odd, a1=odd-1 would be even) in case of odd number of factors. so this number should be a perfect square because it can be expressed in a form of (2^(a1/2)*3^(a2/2)*5^(a3/2)..*x^(an/2))^2. a1/2, a2/2,a3/2,....,an/2 are integers (since a1,a2,a3,....,an are even numbers ) we will get a integer square. so we can conclude that doors opened after 100 repetitions would only be perfect square numbers as mentioned.
@gharud_xd6812
@gharud_xd6812 3 жыл бұрын
Thanks bro this is made my interview ❤️ Interviewer ask same Puzzle 😂
@sankhya_0461
@sankhya_0461 3 жыл бұрын
haven't looked at the video but the answer has something to do with a number of factor as 2^p.3^q.5^r... is the prime factorization of a number then it has (p+1)(q+1)(r+1) factors. But this will yield the factors as even and even number of factors means the door will be closed. The only way that they remain open is if they are squares as they are the only numbers with odd no of divisors. JEE aspirants should've done this during P&C and this question should be a piece of cake Yes I was right.
@hocaponttas
@hocaponttas Жыл бұрын
It took me like two hours and I still solved it partly wrong... 😂 My answer was 1, 4, 9, 12, 25, 30, 60, 64, 80, 81, 84, 90 and 100. I'm not sure what happened
@apnapython
@apnapython 5 жыл бұрын
very nice explanation easily understand the concept behind this puzzle.
@LOGICALLYYOURS
@LOGICALLYYOURS 5 жыл бұрын
Thanks Aman :)
@christianromero1334
@christianromero1334 2 жыл бұрын
Made a table of door vs walk. Used 1s and 0s to signify open and closed. There was a diagonal pattern 100 10000 1000000. The difference between Every door number with the last zero went up by 2 every time. Door 99 was one of them so 100 must have been 1 (open). His way was better 🙄
@manansheth3084
@manansheth3084 5 жыл бұрын
Perfect squares will be open because they have odd number of factors.
@JEManishkumar
@JEManishkumar 3 жыл бұрын
i just alnayzed this question with 10 door , then i analyze it for 20 , i got 1,4,16 are opened , i immediately said all perfect square no. door will remain open, analyzing with small no. makes any question easy
@bharathraj435
@bharathraj435 3 жыл бұрын
Just an another way to solve riddle having big numbers is first trying with sample. For example in this riddle assume 10 doors and 10 walks and see how many doors are opened .we'll get 1 4 & 9..from these numbers we can get idea that perfect squares are the answers
@soumyanarayanbehuria6694
@soumyanarayanbehuria6694 5 жыл бұрын
Perfect square no.s only have odd no of factors..that's it's answer..nice question... thanks a lot..
Prisoner Hat PUZZLE || 10 Prisoners || RED & BLUE Hats
5:55
LOGICALLY YOURS
Рет қаралды 361 М.
HAH Chaos in the Bathroom 🚽✨ Smart Tools for the Throne 😜
00:49
123 GO! Kevin
Рет қаралды 16 МЛН
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 3,6 МЛН
10 Hard Riddles Geniuses Solve In 15 Seconds
9:29
BRIGHT SIDE
Рет қаралды 828 М.
how to study less and get higher grades
11:16
Gohar Khan
Рет қаралды 326 М.
How logical are you? A legendary experiment
9:07
MindYourDecisions
Рет қаралды 621 М.
The Game You Can't Win
11:16
Vsauce2
Рет қаралды 2,3 МЛН
The Oldest Unsolved Problem in Math
31:33
Veritasium
Рет қаралды 10 МЛН
HARD PUZZLE : 100 Switches & 100 Lights Puzzle
6:25
LOGICALLY YOURS
Рет қаралды 134 М.
HAH Chaos in the Bathroom 🚽✨ Smart Tools for the Throne 😜
00:49
123 GO! Kevin
Рет қаралды 16 МЛН