Ah the classic mathematics career path. Undergraduate > Masters > Doctorate > Postdoc > Assistant Professor > Associate Professor > Professor > Prison Warden
@@CrushedAsian255 basic math classes giving weird questions when first learning about math operations (addition, subtraction, multiplication and division)
Why do mathematicians always set their puzzles in prisons? Simple: min-maxing. You have maximum amount of time, minimum amount of distractions and maximum motivation to solve the puzzle correctly.
Matt Parker and I talk about the solution to the original puzzle on his channel: ruclips.net/video/as7Gkm7Y7h4/видео.html This solution is _highly_ connected to Hamming error correction codes, so much so that doing this puzzle inspired me to make a video about them: ruclips.net/video/X8jsijhllIA/видео.html
@ "cool" means that the speaker is comfortable with the statement and it's implications. "Cool!" means the speaker is comfortable and excited by the statement, this is possibly what VWLZ intended.
Haha I just came from the Hamming codes videos, so my mind was already primed to think about this in a certain way. You really are an amazing teacher BTW, in case you haven't heard it enough from all your other fans.
A: "Wanna go to their wedding ?" B: "Nah, I'm busy, I'll just send them present." A: "There will be an extremely complicated math puzzle which related to higher dimension and computer science." B: "Done, let's go."
This is honestly the first time I understand what that representation of a 4D cube is supposed to convey, it's not about somehow imagining how it would look like, it's just representing the relation of how the vertices are connected
It also is what one could look like. The flat cube, if you looked at it from the top down, is a way cubes can be positioned in 3 dimensions. The same applies for the 4d cube
the 3-D projection of the 4-D cube is brain-breaking. He demonstrates the 2-D projection of a 3-D cube and then constructs the 3-D projection of the 4-D cube, which of course prompts you to think about how that 3-D projection is expanded into 4-D which our puny brains can't do. ugh.
That's correct in the context of graph-theory and topology, but not geometry. By definition, all sides of a 4D cube must have the same size as each other, regardless of how it looks when projected
@@pradyunmore6727 Probably the hint was that two of the rows were repeated, especially the two that represent 32, or space in ascii. That and a suspicion that youtubers like to leave easter eggs in their videos.
I was surprised as well, but then I thought it's ok too. I've been into weddings where people talk about computers and AI a lot. That's because I have my friends who share common knowledge in this domain. So it's normal for Grant to talk about Maths in the wedding. (Btw talking about technology doesn't look weird enough, but discussing Maths problems...)
When you first stated the problem, I understood that you "may" (instead of "must") flip one coin. The possibility of not flipping any coin definitely changes the problem. I know, for example, that it would be possible to solve for 3 squares. Have you given any thought to this variant of the problem?
For this variation, it is possible for any number of squares that is a power of 2 or 1 less than a power of 2, but it is impossible for all other cases. In case of 3 squares it was possible since it is 1 less than 4 which is a power of 2. To find how o solve for squares 1 less than a power of 2 you just use the same strategy for solution for powers of 2, but assign a binary number to not flipping any coin.
@@azertykeys9011, no, the Imperial Fists' logo has an armoured gauntlet hand. The raised fist has been a symbol of revolt throughout history. In modern times this symbol particularly represents civil rights movements and resistance to discrimination. Here it's integrated with the rainbow flag which represents sexualities that are discriminated against.
(Without these complex strategies) I think it would be really funny if the warden put every coin on heads except for tails on the key square so you can’t flip it because then they’re all heads and flipping another one would give you like a 50/50
Prisoner 1 **Confidently walks in, flips a coin, leaves.** Warden **turns board 180 degrees** Prisoner 2 **Walks in, takes a guess, no key under the coin** **shocked pikachu face**
the scenario assumed the warden would attempt to interfere with you *before* you do your bit flipping, because he knows your strategy. If the warden is allowed to interfere with you *after* your bit flipping, he could just flip any coin once and change the answer. Your scenario is smart, but any interference would do the same thing, render it entirely impossible.
Yes, I was very happy to note that the table of 0's and 1's was the ASCII representation of "Do math!" and that the single bit flip illustrated actually turned the a into an e
I noticed that and I howled in laughter at 5 in the morning. Grant has the sharpest humour, tying in chessboards, bit flipping, math and meth in one 3 second punchline
@@meghanto Yeah, I didn't realize that and had to look back when I saw this comment. Additionally, once the warden realizes that the prisoners have come up with a foolproof solution, the warden can at least arrange the coins to spell out "F*** YOU" which is also exactly 8 characters.
To answer your question of why mathematicians set their puzzles in prison, the only way to force people to play through a challenging puzzle is to remove every other possible option besides solving the puzzle. In the case of prisons, you either solve the puzzle or do nothing
Love the high-D visualisation. My first though on the puzzle was also Hamming codes, but I couldn't get my head around the application to this particular problem. As a visualisation, it makes SOOOO much more sense! I'd love to see one that's more dedicated to Hamming, I'd love to see how you apply your visualisations to the question of overall packet length vs. number of correctable bits.
This is a really good puzzle. The choice of a chessboard is significant because it has 64 squares. But to be a truly great puzzle, all the relevant properties of a chessboard should be significant, not just the number of squares. A chessboard can be rotated 180 degrees and it will look the same. If Prisoner 2 is led into the room and he notices that the room is 180-degree symmetrical with two entrance doors, and it also so happens that the arrangement of heads and tails is similarly symmetrical (ie a palindrome when written as a sequence), then he only has a 50% chance, no matter what he has previously discussed with Prisoner 1. There is absolutely no way to know whether he is looking at the board from the same side as Prisoner 1 was. So it's a choice between square x , and square (63-x), and those can't be the same square. So to solve the problem, Prisoner 1 would have to never leave a palindrome. He can certainly avoid leaving a palindrome, but that removes some of his options, and he doesn't have any spare options. Therefore the problem, as presented, really is impossible, after all.
I'm not in the field of math or IT, so the error correction always looked to me like magic. I would be happy to watch you explaining how it really works.
I can hardly find appropriate words to describe the quality of your work on RUclips... It's just astonishing and breathtaking ! You explain beautifully clearly and concretely ideas I would never have thought of myself and it just opens up to me a new way to see things, in math, science or more generally in real life ! I sincerely thank you for inviting me so cheerfully in such wonderful mental experiments !
Alan Turing didn't go to prison. For the "crime" of being gay, he was pressured into undergoing "chemical castration" to avoid prison time. This treatment undoubtedly contributed to his depression and suicide. Not sure why so many people liked your "joke" - it's pretty shit.
When I first heard this problem, my mind instantly went to hamming codes, but I couldn't think how to use it. It's fascinating that you can flip one coin to make the hamming code of the board any number between 0-63 you want and thats how you can send information to your partner. I love this
16:47 I love how you are displaying a 4D object by using a 3D rendering of it, but you have to do that on a 2D surface. Now I wonder if there would be a way to render a 5D object in a few decades when we have access to truely 3D Holograms. It would still really mess with our heads and it wouldn't really work since we basically already see a 2D image anyway. Our brain just does a really good job at faking depth (Having a second eye helps though too). And yes I spent way too long trying to think of a way to render a Cube on a Line. Sadly it doesn't even make sense...
If you remove the constraint that prisoner 1 MUST flip a coin and you change the rule that he CAN flip a coin, there are many more board sizes that will have a solution. For example, a chessboard of size 3 will have a solution (optionally flip one coin so that you end with 2heads/1tails or 2tails/1heads indicating that the key is under the single head or single tail. Using coloring, this would mean that you do not need all three RGB colors to be adjacent to every node but only 2 of them as you already have one color you are standing on and you are allowed not to move. This means that, for example, R nodes would need only G and B neighbours. And it is simple to demonstrate that if the rule changes from MUST to CAN flip a coin, the puzzle has solutions for many more boards! Excellent video, just fantastic !
If asked to color the 4th dimensional cube's vertices I never would have thought "Put the colors on a 3d projection's diagonals" would have been the answer. It seems way to elegant and perfect to have been the answer. That's crazy.
I remember encountering error-correcting codes in grad school when I TA'd a class in it. If you do a Hamming code video, would you please include the (binary) Golay code?
I like Matt Parker's video that uses a prison device, and he went through and introduced his students/participants and why each one was in Math Prison. (I guess in the UK he would call it "Maths Prisoun".) The first one of course was "divided by zero". Another I recall was "refused to take a position on pi vs tau."
easy. pick up the coin with the key under it, open the compartment, take out the key, close the compartment, set the coin back down on the other side, and set they key on the chessboard.
I once thought you could just flip the coin with the key under it, but then I rewatched this video and I think Prisoner 2 sees the board for the first time when they come in.
The way that the nodes were arranged on these Qn graphs reminded me of some undergrad research I participated in where we investigated F-WORM colorings. An F-WORM coloring is a coloring of a graph G in which there does not exist a copy of subgraph F which is either rainbow (every node is different) or monochromatic (every node is the same). Hence, F-W(ith)O(ut)R(ainbow or)M(onochromatic). In our team’s investigations, I was especially fascinated with Sn+1-WORM colorings of Qn; i.e., colorings of hypercubes such that any node and its neighbors wasn’t rainbow or monochromatic, and exactly the kind shown in this video. The minimum number of colors is trivial for bipartite graphs such as Qn; it’s always 2. We were mostly interested in the maximum number of colors for a valid F-WORM coloring. The research was inconclusive on this particular front (we weren’t able to prove a lowest upper bound for any more than Q4), but it was still interesting nevertheless.
I understand every word of the language used in the video. But the order in which the words are used. This man might as well be speaking Cantonese. Amazing.
I think you should introduce algorithms in one of your videos. Graph coloring is an NP Complete problem, and it's equivalent to all other NP Complete problems such as picking a subset of sets that don't share any members. I would love to see how you visualize that.
As someone who's fairly literate when it comes to mathematics, this was impenetrable. Reminds me of my undergraduate stats courses where the lecturer also liked to break things down into binary concepts; as if this helped with the understanding of the concepts behind DoE. Transforming heads and tails to 1's an 0's is easy to grasp, but then imediately jumping to cooridinates on a unit square requires some mental origami, but before the swan in processed; we're at a 3D unit cube with a colour bar. Add the sneak peak of the neurons that are to be transformed into a 4D cube, then attention is lost.
Is it just me, or is missing from this puzzle that you *have* to flip a coin, rather than that the warden allows you to flip one? Otherwise it does not hold true that every vertex needs to have, for example, a red neighbour, since the red vertices then do not need to have red neighbours.
The warden being able to listen in actually made me feel a bit relieved. As a Cold War enthusiast I know that being eavesdropped on and being aware youre being eavesdropped on is a great way to feed the "enemy" information that can make them act to your advantage
I have 2 strategies if the question was with 3 squares. the first one is very easy, just tell your colluege to choose the odd one and what ever the case is, you can always use only one move to make one different case(H or T). The second strategy is based on your method with the formula : 1(x) + 2(x) + 3(x). but if the outcome number suceeds 3, you should subtract the number from 6. Ive already tried all of the possibilities and it work. Im stuck on solving a board with 4 squares when you just nailed...64.
For the 3 piece chessboard I'd go with the odd one out strategy. Basically since I know the location of the key I'd flip a coin such that the coin on the key space is different from the ones surrounding it. It wouldn't work for any board greater than 3 though :(
@@iDabblThought I replied to this but my bad, for HHT and key being 3 it can be solved by flipping the T key (if flipping is mandatory), indicating that since all the coins are the same, the key has to be the one that I flipped. For HTH and the key being one, if I turn the last H to become a tail it becomes HTT indicating that the key is the odd one out, which is the first head, so key = 1
@@virivirus56but prisoner 2 doesn't see the before and after so doesn't know which one you flipped... Otherwise you just flip the one the key is under and all go home.
Once you made the computer comparison I realized there is nothing I can do. My luck will have it so that whatever coin I flip will be struck by a stray cosmic ray and flipped back into its original position.
The video built up beautifully to the 4D cube representation of a strategy, and I was even more amazed seeing what the solution was. In Matt Parker's video you both pointed out the importance of having essentially a "null" bit that changes nothing. In the 4D cube representation, that null bit is moving in the 4th dimension. 🤯 (Though if you take a moment to think about it, every bit corresponds to a dimension and you could just as easily make a coloring where moving in the x, y, or z dimension would be the null bit)
I'd definitely be interested to see how the amount of information required to encode error correction compares with the amount of info in the base message (like is 6 bits for a 64 bit message typical? that seems crazy)
What I did in the last step was: There are 2^n vertices, and by symmetry, each of the n colours should appear an equal number of times. So 2^n has to be divisible by n.
Sounds like a really cool puzzle. Exactly the kind of thing I could spend hours thinking about. Unfortunately I didn’t get far enough into math to know what mod 3 is or to understand how flipping one coin adds or subtracts while flipping another does not.
So by adding the coins, he's saying add their 1 or 0 value (he calls heads 1 and tails 0 in the video, but you could reverse it and the puzzle works the same). Then the sum is the number of the tile which has the key (we're assuming the tiles are numbered from 0, so the first is 0, second is 1, last is 2). e.g. if we had 3 tiles then if they were all 0, that would be 0+0+0=0 which means the coin is under the first tile. 1+0+1=2 would mean the coin is under the last tile. And so on. Modulus (mod) is pretty simple, it's basically the remainder if you remember that from fractions. So for instance, 5 / 3 is the same as 1 and 2/5, aka 1+2/5. 2 is the remainder/modulus because after you've divided there's still 2 parts left that aren't whole.
The solution for this problem is not in maths - though the full length video to this is facinating - but in communication. You need to find a way to communicate with the other prisoner in a way that the warden can hear without then being able to interrupt it by laying a specific pattern. The first example of this that came to my mind would be that you lick your finger before touching the coin you flip. It is not against the established rules and no matter how the warden is placing the coins, your fellow inmate will be able to tell whichever coin you touched.
The Warden Only said "To flip a coin" not that you had to "put it back Where it was". As such, you could just Flip the coin and put it on the square where the key is.
I solved this puzzle quite ago. They told me it was overkill. However, I remember I was satisfied with my solution as I understood it well. I'd say it is quite algebraic. If you want to inspect it I'll translate it (it is in Russian) and send it to you as pdf. Upd: posted in Reddit.
I'm not too sure, but I'd guess something along the lines of recursive backtracking could work. It's like how you might solve a maze: go down a path, when you hit a fork in the road choose some path, and continue; if you hit a dead end then back up to the last fork in the road and choose a different path. Similarly, for each vertex that needs to be colored, choose some color and continue, and once you hit a dead end, backtrack to the last vertex color you chose and change it to one you haven't tried for that vertex yet, and repeat.
He said he has a "computation" that solves the puzzle and a computer to "draw" it out. Probably came up with the solution by hand and not by programmatically solving the coloring?
This can be done by hand with some insight. Hint: You need to have four of each color. Prove that there need to be two "dyads" with adjacent identical colors. Decide where the dyads must be in relation to each other. Apply that, and the rest should fall into place.
The algorithm adapts the solution to the 64-coin puzzle, which Grant does not want to spoil in this video because it is explained in the associated Stand-Up Maths video. If you watch that one, and understand the link between vertices and bit strings, you can also produce the coloring
Grant makes the drawings using a python package that he made called manim, it’s possible that you could have written a short graph colouring solver in python and used it to make the animation in manim
chat gpt Interesting puzzle! Let's see if we can solve it together. To summarize the situation: There is a chessboard with 64 squares, each containing a coin. The coins are turned either heads or tails in a specific pattern determined by the Warden. The Warden hides a key inside one of the chessboard squares. You are allowed to flip over one and only one of the coins before leaving the room. Your fellow prisoner enters the room after you and must deduce the location of the key based on the pattern of heads and tails they see on the chessboard. To solve this puzzle, we need to find a strategy for flipping one coin that will allow the second prisoner to deduce the location of the key. Here's a strategy that works: Number the squares of the chessboard from 1 to 64, starting from the top-left corner and moving row by row. Count the number of coins showing heads. If it's an even number, do nothing (don't flip any coin). If it's an odd number, flip the coin on square 1 (top-left corner). Explanation: When you enter the room, you have no information about the location of the key. Flipping the coin on square 1 will change the number of heads from even to odd or from odd to even. When your fellow prisoner enters the room, they will see the pattern of heads and tails. If the original pattern had an even number of heads, and you did not flip the coin, they will see an even number of heads and can deduce that the key is in the square that you flipped (square 1). If the original pattern had an odd number of heads, and you flipped the coin, they will see an odd number of heads and can deduce that the key is in the square that you didn't flip (not square 1). This strategy ensures that the second prisoner will have enough information to deduce the location of the key and potentially win freedom for both of you.
So I had the thought that in the 3 square case, while it's impossible to communicate the location of the key, the second player also just has a 33% chance to guess correctly anyway. Then I had the thought that, knowing the perfect signaling task is futile, a simple strategy would be to use the first coin to signal either "under square 1" or "under one of squares 2 or 3", increasing the odds to 50%. A general version of this is that you can double your odds of a successful guess on even counts, and acquire double the odds you'd have with one more square on odd counts, by simply bisecting the available guessing space using a single bit. Surely there's a better option than that, though? What I'm now wondering is, what strategy do you use for your cube painting to minimize the number of possible squares the warden can force you into specifying? You can just use less colors to paint with by lumping multiple squares into one color, and indeed you can use half as many colors (rounded up, sadly, for odd numbers of squares) and still retain the 50% hit rate (which is the best that can be hoped for without being able to hard specify a single square) I SUSPECT that this is enough leniency that you never get forced below 50%, but honestly I don't think I'm up to proving or disproving that in a quick fashion (if indeed it's trivial enough to do so)
You can flip the coin on the right side of the coin where the key lies. This gives the coin the unique position to be surrounded by the other side thus giving a logical and relativly simple hint to where the key lies.
Ah the classic mathematics career path.
Undergraduate > Masters > Doctorate > Postdoc > Assistant Professor > Associate Professor > Professor > Prison Warden
haha
Interesting, but where does buying 78 watermelons fit into this?
@@CrushedAsian255 basic math classes giving weird questions when first learning about math operations (addition, subtraction, multiplication and division)
>Physics video commenter, the most evolved form of intellect around.
@@CrushedAsian255 he meant that if your mom is 56 years old and your car is red then how tall is your father?
Why do mathematicians always set their puzzles in prisons?
Simple: min-maxing. You have maximum amount of time, minimum amount of distractions and maximum motivation to solve the puzzle correctly.
Assuming a spherical prison in a vacuum, of course.
And still people don't wanna go to prison.
I imagine mathematicians would flourish in prison.
Because existence is a prison and only mathematics can free you into non-existence ?
@@SacredGeometryWeb Stop explaining the plot of evangelion
He's hiding messages in the checkerboards. They're all in ASCII.
0:29 "3b1b :)"
0:51 "3b1b :("
0:57 "Tau < Pi"
1:26 "FlipBits"
1:27 "BlipBits"
1:30 "ClipBits"
1:33 "ChipBits"
1:36 "ChipBats"
1:38 "ChipRats"
1:41 "ChipVats"
1:44 "ChipFats"
1:47 "ChapFats"
2:08 "Do Math!"
4:06 "To 2 bit"
5:50 "3 Fails!"
16:11 "Please, "
16:13 "go watch"
16:16 "Stand-up"
16:19 "Maths on"
16:22 "RUclips."
Let me know if I missed any!
Priceless! and I thought the meth joke was brilliant... =)
Wow!
I hid a message in this message.
@@apu_apustaja i can see a message tho-
Okay the "Tau < Pi" one is even more brilliant though because the original version without the bitflip says "Tau > Pi."
Who would have known this would be the icebreaker to the puzzle in black ops 3, somebody give Jason a raise...
Matt Parker and I talk about the solution to the original puzzle on his channel: ruclips.net/video/as7Gkm7Y7h4/видео.html
This solution is _highly_ connected to Hamming error correction codes, so much so that doing this puzzle inspired me to make a video about them: ruclips.net/video/X8jsijhllIA/видео.html
cool
@ "cool" means that the speaker is comfortable with the statement and it's implications. "Cool!" means the speaker is comfortable and excited by the statement, this is possibly what VWLZ intended.
Haha I just came from the Hamming codes videos, so my mind was already primed to think about this in a certain way.
You really are an amazing teacher BTW, in case you haven't heard it enough from all your other fans.
It can be possible for n = 63; just assume n=64. As far as the flip coin is not the imaginary cell.
Got a bit confused, I didn’t get that the coin flip was mandatory from the phrasing “allows you to do” making the 3D version a cakewalk to solve
That bit sequence actually maping to "Do math!" and "Do meth!" is the type of small things that makes this channel amazing
Yeah, that's what makes this channel my favorite meth RUclipsr.
ikr and i got to use my skills in reading binary i knew that i'll use it in the future
Entity 303? Its been a long time since I've seen that face.
Thank you for saving me from writing a line of python
😜😜
A: "Wanna go to their wedding ?"
B: "Nah, I'm busy, I'll just send them present."
A: "There will be an extremely complicated math puzzle which related to higher dimension and computer science."
B: "Done, let's go."
LOL
Los jo uno 7
a: friend
b: 3Blue1Brown
@ he said that he heard this question at a wedding
net for mathematicians
This was impossibly good fun. Thanks for getting me involved!
*Me seeing Standup's vid and Blue's vid being uploaded at the same time* : Well heck
Tfw you have to pick between the same video from your favorite two channels
Wow it’s Matt!
Thanks for all the cool math videos!
@@lapiscarrot3557 hello fellow gamer
ooooh thats why you both uploaded the video about this puzzle at the same time
Kn44
Do you think the unsolved Giant cipher is going to be related? I’ve gotten interested in taking my shot at solving it
This is poetry.
This is honestly the first time I understand what that representation of a 4D cube is supposed to convey, it's not about somehow imagining how it would look like, it's just representing the relation of how the vertices are connected
Yup
It also is what one could look like. The flat cube, if you looked at it from the top down, is a way cubes can be positioned in 3 dimensions. The same applies for the 4d cube
the 3-D projection of the 4-D cube is brain-breaking. He demonstrates the 2-D projection of a 3-D cube and then constructs the 3-D projection of the 4-D cube, which of course prompts you to think about how that 3-D projection is expanded into 4-D which our puny brains can't do. ugh.
It somehow makes you “see” that the sides of a 4D cube are 8 3D cubes, just as the sides of 3D cube are 6 2D cubes (squares)
That's correct in the context of graph-theory and topology, but not geometry.
By definition, all sides of a 4D cube must have the same size as each other, regardless of how it looks when projected
Grant Sanderson is definitely a master at making you feel these "Eureka" moments.
*aha! moments
Integarahl boi
Or “I’ve got it!” if you just want to speak English instead of Greek.
Eurgasms. If you will.
1:03 before flip in ascii code: Tau > pi
1:03 after flip in ascii code: Tau < pi
1:25 in ascii code: 3b1b :)
???
@@bismajoyosumarto1237 If you break the bit stream into ASCii characters, that's what it makes
Is this a hint that Grant is on Steve's side rather than Matt's side?
And after the flip in the bottom right corner in 0:50 : "3b1b :("
Skite Innit is bringing huge traffic to this video for B03 zombies
If you convert the arrangement of heads and tails at 0:49 into binary then translate it into english the readable text will say this: "3b1b :)"
@GoldBoy4 yes indeed! How did you find out?
Investigation I believe
Damn
@@pradyunmore6727 Probably the hint was that two of the rows were repeated, especially the two that represent 32, or space in ascii. That and a suspicion that youtubers like to leave easter eggs in their videos.
Nice easter egg
All the cod black ops 3 fans will watch this 20x times for the impossible Easter egg
lock picking lawyer: who needs keys?
Number one is binding... nice click out of 2
Hi, this is the lock picking lawyer and what I'm going to show you today is how to pick this jail lock with maths.
@@volcanking662 Using the pick that Bosnianbill and I made.
Meta
Lol
KN-44
kn44
Only Grant would discuss this problem at a wedding 😂
but a discussion needs 2+ people... I wonder what wedding has this many fun nerds (I say nerds as a compliment and not an insult)
I was surprised as well, but then I thought it's ok too. I've been into weddings where people talk about computers and AI a lot. That's because I have my friends who share common knowledge in this domain. So it's normal for Grant to talk about Maths in the wedding.
(Btw talking about technology doesn't look weird enough, but discussing Maths problems...)
@@pvic6959 when you add fun as a prefix, we take it as a compliment. You don't need to clarify 😉
@@stv3qbhxjnmmqbw835 Just wanted to be clear! I consider myself one too :P
Even worse, it was his own wedding. :-)
"Error correction is universally sexy!" Needs to be made into a t-shirt.
r\woosh
@@tuneboyz5634 r//
You from U.S?
When you first stated the problem, I understood that you "may" (instead of "must") flip one coin.
The possibility of not flipping any coin definitely changes the problem. I know, for example, that it would be possible to solve for 3 squares. Have you given any thought to this variant of the problem?
It'll prob be way easier (for the prisoners)
The way it's stated does indeed leave room for not flipping any coin.
For this variation, it is possible for any number of squares that is a power of 2 or 1 less than a power of 2, but it is impossible for all other cases. In case of 3 squares it was possible since it is 1 less than 4 which is a power of 2. To find how o solve for squares 1 less than a power of 2 you just use the same strategy for solution for powers of 2, but assign a binary number to not flipping any coin.
Grant: "Should I make a video about x?"
Everyone: "Yes, do that, please."
Isnt that the Imperial Fists logo from Warhammer 40k? With a rainbow background for some reason...?
@@azertykeys9011, no, the Imperial Fists' logo has an armoured gauntlet hand.
The raised fist has been a symbol of revolt throughout history. In modern times this symbol particularly represents civil rights movements and resistance to discrimination.
Here it's integrated with the rainbow flag which represents sexualities that are discriminated against.
@@JNCressey Understandable, have a nice day
(Without these complex strategies)
I think it would be really funny if the warden put every coin on heads except for tails on the key square so you can’t flip it because then they’re all heads and flipping another one would give you like a 50/50
That's why you always have a null bit ;)
I can confidentally say that we're all here to figure out KN-44 for the impossible EE on BO3
> color the vertices of a cube
"It's all graphs?"
"Always has been"
Prisoner 1 **Confidently walks in, flips a coin, leaves.**
Warden **turns board 180 degrees**
Prisoner 2 **Walks in, takes a guess, no key under the coin**
**shocked pikachu face**
He will be able to know it's flipped by looking at the color of a corner
@@TheGrenvil That would only tell you it's been rotated by either +/- 90 degrees
the scenario assumed the warden would attempt to interfere with you *before* you do your bit flipping, because he knows your strategy. If the warden is allowed to interfere with you *after* your bit flipping, he could just flip any coin once and change the answer.
Your scenario is smart, but any interference would do the same thing, render it entirely impossible.
Well, it's a chess board, most of chessboards are numbered, so it's not a big deal.
Use an encoding where orientation doesn't matter... just in case
black ops 3 impossible easter egg hypercube brought me here
I'm sorry for the oncoming traffic of call of duty zombies fans, but we're currently undergoing a breakthrough in easteregg hunting
You know what else is universally sexy?
This channel
"... But reliable data transmission? C'mon. I think we can all agree that's universally sexy" I'm in love with this man
"I'm only gonna flip the one" - with warm, dirty fingers and touch the coin for a long time.
399 IQ
You’ll be happy to know that flipping that one bit actually did turn math into meth in most binary to text encoding schemes
Yes, I was very happy to note that the table of 0's and 1's was the ASCII representation of "Do math!" and that the single bit flip illustrated actually turned the a into an e
I noticed that and I howled in laughter at 5 in the morning. Grant has the sharpest humour, tying in chessboards, bit flipping, math and meth in one 3 second punchline
@@meghanto Yeah, I didn't realize that and had to look back when I saw this comment. Additionally, once the warden realizes that the prisoners have come up with a foolproof solution, the warden can at least arrange the coins to spell out "F*** YOU" which is also exactly 8 characters.
It was at the 8:06 mark when I realized my chances of understanding the solution is next to nothing.
July 5, 2020: Grant renames his channel to “Universally Sexy”.
Nah, July ninth would be the way to go.
tru tho
@@johnclever8813 that's 9/7
Better make a different channel with this name.
Who’s here to solve some the secret Zombies Easter egg!!!
To answer your question of why mathematicians set their puzzles in prison, the only way to force people to play through a challenging puzzle is to remove every other possible option besides solving the puzzle. In the case of prisons, you either solve the puzzle or do nothing
@1:30 yeah, totally, that's how any wedding conversations i had go.
Lol i thought the same
Love the high-D visualisation. My first though on the puzzle was also Hamming codes, but I couldn't get my head around the application to this particular problem. As a visualisation, it makes SOOOO much more sense! I'd love to see one that's more dedicated to Hamming, I'd love to see how you apply your visualisations to the question of overall packet length vs. number of correctable bits.
This is a really good puzzle. The choice of a chessboard is significant because it has 64 squares. But to be a truly great puzzle, all the relevant properties of a chessboard should be significant, not just the number of squares. A chessboard can be rotated 180 degrees and it will look the same. If Prisoner 2 is led into the room and he notices that the room is 180-degree symmetrical with two entrance doors, and it also so happens that the arrangement of heads and tails is similarly symmetrical (ie a palindrome when written as a sequence), then he only has a 50% chance, no matter what he has previously discussed with Prisoner 1. There is absolutely no way to know whether he is looking at the board from the same side as Prisoner 1 was. So it's a choice between square x , and square (63-x), and those can't be the same square. So to solve the problem, Prisoner 1 would have to never leave a palindrome. He can certainly avoid leaving a palindrome, but that removes some of his options, and he doesn't have any spare options. Therefore the problem, as presented, really is impossible, after all.
Chessboards are actually often annotated with letters and numbers along the sides.
I'm not in the field of math or IT, so the error correction always looked to me like magic. I would be happy to watch you explaining how it really works.
Like if you’re here because black ops 3
YES GRANT, WE WANT MORE VIDEOS ...ON ANYTHING! Doesn’t matter lol
No, more videos in the same amound of time will mean lower quality videos and we DON'T want that
Nobody:
Grant: “do meth!”
Your dinner conversations must be very intriguing...
And the weddings he attends. Probably doesn't even bother to RSVP unless both spouses have at least a master's in math.
KN-44 🧊
I can hardly find appropriate words to describe the quality of your work on RUclips... It's just astonishing and breathtaking ! You explain beautifully clearly and concretely ideas I would never have thought of myself and it just opens up to me a new way to see things, in math, science or more generally in real life ! I sincerely thank you for inviting me so cheerfully in such wonderful mental experiments !
Hey :3
bruh
@@NPCooking69 bruh
Papi
3b1b standupmaths and flammable maths collab when
@@non-inertialobserver946 dunno m8
Q: Why do mathematicians alwys set their puzzles in prisons?
A: An hommage to Alan Turing.
:(
If that was the case, you would still be in jail after finding key.
Alan Turing didn't go to prison. For the "crime" of being gay, he was pressured into undergoing "chemical castration" to avoid prison time. This treatment undoubtedly contributed to his depression and suicide. Not sure why so many people liked your "joke" - it's pretty shit.
@@octowuss1888 You're that guy who is never invited to weddings, right?
FINALLY I MISS U
18:09 "But reliable data transmission? C'mon! I think we can all agree that that's universally sexy."
Yes I agree. And also QR code encoding!
Wow fantastic video for sure! Many of the puzzles or so called IQ test type math problems are so interesting to try!
Dont know why I watched all of this while not understanding a word of it.
When I first heard this problem, my mind instantly went to hamming codes, but I couldn't think how to use it. It's fascinating that you can flip one coin to make the hamming code of the board any number between 0-63 you want and thats how you can send information to your partner. I love this
16:47 I love how you are displaying a 4D object by using a 3D rendering of it, but you have to do that on a 2D surface.
Now I wonder if there would be a way to render a 5D object in a few decades when we have access to truely 3D Holograms. It would still really mess with our heads and it wouldn't really work since we basically already see a 2D image anyway. Our brain just does a really good job at faking depth (Having a second eye helps though too).
And yes I spent way too long trying to think of a way to render a Cube on a Line. Sadly it doesn't even make sense...
And we're using our 1D brains to understand that.
"Please just throw me back in jail"
Who’s here from zombies
Me!
?????
If you remove the constraint that prisoner 1 MUST flip a coin and you change the rule that he CAN flip a coin, there are many more board sizes that will have a solution.
For example, a chessboard of size 3 will have a solution (optionally flip one coin so that you end with 2heads/1tails or 2tails/1heads indicating that the key is under the single head or single tail.
Using coloring, this would mean that you do not need all three RGB colors to be adjacent to every node but only 2 of them as you already have one color you are standing on and you are allowed not to move. This means that, for example, R nodes would need only G and B neighbours. And it is simple to demonstrate that if the rule changes from MUST to CAN flip a coin, the puzzle has solutions for many more boards!
Excellent video, just fantastic !
If asked to color the 4th dimensional cube's vertices I never would have thought "Put the colors on a 3d projection's diagonals" would have been the answer. It seems way to elegant and perfect to have been the answer. That's crazy.
I remember encountering error-correcting codes in grad school when I TA'd a class in it. If you do a Hamming code video, would you please include the (binary) Golay code?
No way Golay codes would be amiss! There should also be a video on packing spheres in dimensions 1,2,8,24!
I like Matt Parker's video that uses a prison device, and he went through and introduced his students/participants and why each one was in Math Prison. (I guess in the UK he would call it "Maths Prisoun".)
The first one of course was "divided by zero". Another I recall was "refused to take a position on pi vs tau."
the warden sh*ts his pants while watching me balance the coin on its edge
I saw a short with no solution, so I watched an 18 min video for the solution, which sends me to an another video for the solution.
Nice 👍🏾
Who is here for bo3
easy. pick up the coin with the key under it, open the compartment, take out the key, close the compartment, set the coin back down on the other side, and set they key on the chessboard.
I once thought you could just flip the coin with the key under it, but then I rewatched this video and I think Prisoner 2 sees the board for the first time when they come in.
The way that the nodes were arranged on these Qn graphs reminded me of some undergrad research I participated in where we investigated F-WORM colorings. An F-WORM coloring is a coloring of a graph G in which there does not exist a copy of subgraph F which is either rainbow (every node is different) or monochromatic (every node is the same). Hence, F-W(ith)O(ut)R(ainbow or)M(onochromatic). In our team’s investigations, I was especially fascinated with Sn+1-WORM colorings of Qn; i.e., colorings of hypercubes such that any node and its neighbors wasn’t rainbow or monochromatic, and exactly the kind shown in this video. The minimum number of colors is trivial for bipartite graphs such as Qn; it’s always 2. We were mostly interested in the maximum number of colors for a valid F-WORM coloring. The research was inconclusive on this particular front (we weren’t able to prove a lowest upper bound for any more than Q4), but it was still interesting nevertheless.
“I’m going to turn over the coin with the key and make sure I spit on it too so it’s super wet”
Gg
The warden hears your strategy remember? They can just spit on every other coin as well
@@jay-tbl the thought of the warden taking the time to spit on every piece in spite instead of just wiping it off is hilarious
2:30 there is no error!
I fucking choke on my food when I read the comment😂
I understand every word of the language used in the video. But the order in which the words are used. This man might as well be speaking Cantonese. Amazing.
I think you should introduce algorithms in one of your videos. Graph coloring is an NP Complete problem, and it's equivalent to all other NP Complete problems such as picking a subset of sets that don't share any members. I would love to see how you visualize that.
As someone who's fairly literate when it comes to mathematics, this was impenetrable. Reminds me of my undergraduate stats courses where the lecturer also liked to break things down into binary concepts; as if this helped with the understanding of the concepts behind DoE. Transforming heads and tails to 1's an 0's is easy to grasp, but then imediately jumping to cooridinates on a unit square requires some mental origami, but before the swan in processed; we're at a 3D unit cube with a colour bar. Add the sneak peak of the neurons that are to be transformed into a 4D cube, then attention is lost.
Is it just me, or is missing from this puzzle that you *have* to flip a coin, rather than that the warden allows you to flip one? Otherwise it does not hold true that every vertex needs to have, for example, a red neighbour, since the red vertices then do not need to have red neighbours.
In the matt parker video has does say you have to flip one.
The warden being able to listen in actually made me feel a bit relieved. As a Cold War enthusiast I know that being eavesdropped on and being aware youre being eavesdropped on is a great way to feed the "enemy" information that can make them act to your advantage
I have 2 strategies if the question was with 3 squares. the first one is very easy, just tell your colluege to choose the odd one and what ever the case is, you can always use only one move to make one different case(H or T). The second strategy is based on your method with the formula : 1(x) + 2(x) + 3(x). but if the outcome number suceeds 3, you should subtract the number from 6. Ive already tried all of the possibilities and it work. Im stuck on solving a board with 4 squares when you just nailed...64.
For the 3 piece chessboard I'd go with the odd one out strategy. Basically since I know the location of the key I'd flip a coin such that the coin on the key space is different from the ones surrounding it. It wouldn't work for any board greater than 3 though :(
it wouldn't even work for 3 though
what about the case
HHT, key = 3
HTH, key = 1
and so many more...
For HTH the key would be 2?@@iDabbl
@@iDabblThought I replied to this but my bad, for HHT and key being 3 it can be solved by flipping the T key (if flipping is mandatory), indicating that since all the coins are the same, the key has to be the one that I flipped. For HTH and the key being one, if I turn the last H to become a tail it becomes HTT indicating that the key is the odd one out, which is the first head, so key = 1
@@virivirus56but prisoner 2 doesn't see the before and after so doesn't know which one you flipped... Otherwise you just flip the one the key is under and all go home.
@@lefrinj oh right why didn't I think of that. Yep this strategy won't work then... And here I thought I came up with something good 🥲
Once you made the computer comparison I realized there is nothing I can do. My luck will have it so that whatever coin I flip will be struck by a stray cosmic ray and flipped back into its original position.
The video built up beautifully to the 4D cube representation of a strategy, and I was even more amazed seeing what the solution was. In Matt Parker's video you both pointed out the importance of having essentially a "null" bit that changes nothing. In the 4D cube representation, that null bit is moving in the 4th dimension. 🤯
(Though if you take a moment to think about it, every bit corresponds to a dimension and you could just as easily make a coloring where moving in the x, y, or z dimension would be the null bit)
I'd definitely be interested to see how the amount of information required to encode error correction compares with the amount of info in the base message (like is 6 bits for a 64 bit message typical? that seems crazy)
What I did in the last step was: There are 2^n vertices, and by symmetry, each of the n colours should appear an equal number of times. So 2^n has to be divisible by n.
Sounds like a really cool puzzle. Exactly the kind of thing I could spend hours thinking about. Unfortunately I didn’t get far enough into math to know what mod 3 is or to understand how flipping one coin adds or subtracts while flipping another does not.
So by adding the coins, he's saying add their 1 or 0 value (he calls heads 1 and tails 0 in the video, but you could reverse it and the puzzle works the same). Then the sum is the number of the tile which has the key (we're assuming the tiles are numbered from 0, so the first is 0, second is 1, last is 2). e.g. if we had 3 tiles then if they were all 0, that would be 0+0+0=0 which means the coin is under the first tile. 1+0+1=2 would mean the coin is under the last tile. And so on.
Modulus (mod) is pretty simple, it's basically the remainder if you remember that from fractions. So for instance, 5 / 3 is the same as 1 and 2/5, aka 1+2/5. 2 is the remainder/modulus because after you've divided there's still 2 parts left that aren't whole.
Wow, what an amazing solution!! And visualizing it as a hypercube is the perfect visualizer. Great vid!
Lesson unclear, only learned "Do Meth", welp im a goner.
The solution for this problem is not in maths - though the full length video to this is facinating - but in communication.
You need to find a way to communicate with the other prisoner in a way that the warden can hear without then being able to interrupt it by laying a specific pattern.
The first example of this that came to my mind would be that you lick your finger before touching the coin you flip. It is not against the established rules and no matter how the warden is placing the coins, your fellow inmate will be able to tell whichever coin you touched.
Damn it. A blunt and youtube cost me sleep again.
What if the other prisoner with you is hulk, how will you explain it to him
someone cooked here
I saw this problem and immediately thought of my graph theory course and coloring hypercube graphs.
The Warden Only said "To flip a coin" not that you had to "put it back Where it was". As such, you could just Flip the coin and put it on the square where the key is.
I solved this puzzle quite ago. They told me it was overkill. However, I remember I was satisfied with my solution as I understood it well. I'd say it is quite algebraic.
If you want to inspect it I'll translate it (it is in Russian) and send it to you as pdf.
Upd: posted in Reddit.
Proof that it’s impossible.
“Can’t he just guess” 💀💀💀
Cops: Man! Are you drunk?
No.. i.. i.. i was flipping.
Why not just flip the coin that holds the key?
Upd: I got it: player2 don't see you flipping a coin
Math plus chess... this is completely winning
Thought I'd see you here
You should add the link for this to your shorts that you made for it.
Btw at 2:40 the binary actually does say "Do math!", and the bit he flipped in the example actually does make it say "Do meth!"
At the end he says the computer “solves” the coloring of the 4D cube.. what algorithmic process does the computer use to do this?
I'm not too sure, but I'd guess something along the lines of recursive backtracking could work. It's like how you might solve a maze: go down a path, when you hit a fork in the road choose some path, and continue; if you hit a dead end then back up to the last fork in the road and choose a different path. Similarly, for each vertex that needs to be colored, choose some color and continue, and once you hit a dead end, backtrack to the last vertex color you chose and change it to one you haven't tried for that vertex yet, and repeat.
He said he has a "computation" that solves the puzzle and a computer to "draw" it out. Probably came up with the solution by hand and not by programmatically solving the coloring?
This can be done by hand with some insight. Hint: You need to have four of each color. Prove that there need to be two "dyads" with adjacent identical colors. Decide where the dyads must be in relation to each other. Apply that, and the rest should fall into place.
The algorithm adapts the solution to the 64-coin puzzle, which Grant does not want to spoil in this video because it is explained in the associated Stand-Up Maths video. If you watch that one, and understand the link between vertices and bit strings, you can also produce the coloring
Grant makes the drawings using a python package that he made called manim, it’s possible that you could have written a short graph colouring solver in python and used it to make the animation in manim
Way better than sleep ASMR, keep going man
chat gpt
Interesting puzzle! Let's see if we can solve it together. To summarize the situation:
There is a chessboard with 64 squares, each containing a coin. The coins are turned either heads or tails in a specific pattern determined by the Warden.
The Warden hides a key inside one of the chessboard squares.
You are allowed to flip over one and only one of the coins before leaving the room.
Your fellow prisoner enters the room after you and must deduce the location of the key based on the pattern of heads and tails they see on the chessboard.
To solve this puzzle, we need to find a strategy for flipping one coin that will allow the second prisoner to deduce the location of the key. Here's a strategy that works:
Number the squares of the chessboard from 1 to 64, starting from the top-left corner and moving row by row.
Count the number of coins showing heads. If it's an even number, do nothing (don't flip any coin). If it's an odd number, flip the coin on square 1 (top-left corner).
Explanation:
When you enter the room, you have no information about the location of the key. Flipping the coin on square 1 will change the number of heads from even to odd or from odd to even.
When your fellow prisoner enters the room, they will see the pattern of heads and tails. If the original pattern had an even number of heads, and you did not flip the coin, they will see an even number of heads and can deduce that the key is in the square that you flipped (square 1). If the original pattern had an odd number of heads, and you flipped the coin, they will see an odd number of heads and can deduce that the key is in the square that you didn't flip (not square 1).
This strategy ensures that the second prisoner will have enough information to deduce the location of the key and potentially win freedom for both of you.
"He heard about this at a dinner conversation at HIS wedding actually, so his honeymoon was delayed until he could solve the puzzle." - his ex-wife
lol
It actually made the honeymoon a lot more interesting, since such problems are universally sexy.
So I had the thought that in the 3 square case, while it's impossible to communicate the location of the key, the second player also just has a 33% chance to guess correctly anyway.
Then I had the thought that, knowing the perfect signaling task is futile, a simple strategy would be to use the first coin to signal either "under square 1" or "under one of squares 2 or 3", increasing the odds to 50%. A general version of this is that you can double your odds of a successful guess on even counts, and acquire double the odds you'd have with one more square on odd counts, by simply bisecting the available guessing space using a single bit. Surely there's a better option than that, though?
What I'm now wondering is, what strategy do you use for your cube painting to minimize the number of possible squares the warden can force you into specifying? You can just use less colors to paint with by lumping multiple squares into one color, and indeed you can use half as many colors (rounded up, sadly, for odd numbers of squares) and still retain the 50% hit rate (which is the best that can be hoped for without being able to hard specify a single square)
I SUSPECT that this is enough leniency that you never get forced below 50%, but honestly I don't think I'm up to proving or disproving that in a quick fashion (if indeed it's trivial enough to do so)
You can flip the coin on the right side of the coin where the key lies. This gives the coin the unique position to be surrounded by the other side thus giving a logical and relativly simple hint to where the key lies.