# Instant Insanity Puzzle | Infinite Series

## Метаданные

- **Канал:** PBS Infinite Series
- **YouTube:** https://www.youtube.com/watch?v=Lw1pF47N-0Q

## Содержание

### [0:00](https://www.youtube.com/watch?v=Lw1pF47N-0Q) Segment 1 (00:00 - 05:00)

imagine you have four cubes whose faces are colored red blue yellow and green as shown can you stack these cubes so that each color appears exactly once on each of the four sides of the stack here are the four cubes again labeled one two three and four now the coloring on these cubes is very important in other words we're only considering these four particular cubes so for example cube number one has exactly 3 red faces and one yellow green and blue face moreover those colors appear on the particular faces as indicated and similarly for the other cubes if you just happen to have four cubes with this exact coloring I encourage you to go get them and try to figure out the answer or pause the video and check out the link in the description below there I've included a template of the cubes which you can print off cut out and tape together to make your own alright there are thousands of different configurations that we can make with these cubes eighty two thousand nine hundred forty four to be exact which is why this is often called the instant insanity puzzle so out of these thousands of possibilities is there one that works that is it possible to stack the cubes so that each color appears exactly once and the front back left and right size of the stack today will attack this puzzle using math with no numbers in particular the mathematics of graph theory the study of graphs Kelsie's done a few episodes featuring graphs but we'll just recap the basics a graph is just a collection of vertices and edges like these you can have things like multiple edges between vertices or loops and edge from a vertex to itself or lonely vertices with no edges and here's some terminology if you start with a graph and then delete vertices or edges the result is called a sub graph of the original graph and if you decorate your edges with arrows like this then the graph is called a directed and this is all we need to know to solve the puzzle how so we can drastically simplify the puzzle by encoding the information of each cube with a graph for example here's the first cube to represent it with a graph let's draw one vertex for each color and draw an edge between two vertices if those colors are opposite faces on the cube now notice that the positions of the faces aren't fixed because we can rotate the cube for example here yellow is on bottom and blue is on top but we can rotate it so that blue is on bottom and yellow is on top to help keep track of this let's use a directed graph to indicate a particular orientation let's say that arrows point from left to right from bottom to top and from back to front so when our cube is sitting like this its graph looks like this and if you want to rotate the cube just swap the direction of one or more edges now already you can see there's some ambiguity like if we rotate another way then blue and yellow can impair on the left and right sides so how do we account for that in the graph it's actually pretty easy to handle and we'll take care of it later on by the way I've labeled each edge with a 1 just to remind us that this graph belongs to cube number one doing this for the other three cubes we get the following graphs there undirected for now but we'll throw in some arrows later but now it's a good time to pause the video just to make sure it all makes sense all right we've encoded information about each individual cube with a graph and now we can use this to capture information about the full stack how simply superimpose the graphs to form a new graph which I'll call G this contains all of the information of the full stack except it's too much information just like Michelangelo chipped away at the marble to reveal David inside we also need to delete or chip away at some of the edges to reveal the solution to the puzzle so here's the plan to solve the puzzle let's find two sub graphs of the graph G I'll call them a and B a will represent the front and back faces of the stack while B will represent the left and right faces but how do we know what a and B should be well let's just think about the front and back faces of the stack sub graph a for now we want all four colors to appear right that means the sub graph should have exactly four vertices so nothing like this and the same is true for the second sub graph we want all four colors to appear on the left and right faces of the stack so a and B should have exactly

### [5:00](https://www.youtube.com/watch?v=Lw1pF47N-0Q&t=300s) Segment 2 (05:00 - 10:00)

four vertices okay great so here are two sub graphs with four vertices and I've arbitrarily directed the edges does this count as a solution well a tells us to stack cube number one so that it's front face is green and back face is red and cube number two with yellow in front and red and back the third cube with red in front and blue in the back and the fourth cube well we don't know a doesn't contain an edge label four so we don't have enough information this suggests that each sub graph should contain edges from all four cubes that is the edges should be labeled by all four numbers 1 2 3 and 4 that is condition number 2 so we need a different sub graph for Ain and we'll come back to it but what about B satisfies condition number 2 so could this be a solution for the left and right faces of the stack well no why B tells us to stack cube number 1 with green on the right and red on the left but it also tells us to stack cube number 1 with blue on the right and yellow on the left but we can't have both the problem is that sub graph B contains two edges labeled with one it also has two so we face a similar problem for cube number two so what's the fix not only must each sub graph contain edges labeled by all four numbers each number must occur exactly once just to recap to find a solution to the puzzle we need two sub graphs a and B so that number one both sub graphs contain all four vertices and number two the edges of each sub graph must be labeled by all four numbers 1 2 3 & 4 exactly once and is that it well take a look at this graph it satisfies the previous two conditions but it's also problematic notice that blue appears twice on the back the reason is because the blue vertex has two edges directed away from it and here's another problem neither red nor blue appear in the front that's because neither of the red nor the blue vertex has an edge directed towards it these are both things we want to avoid so to get around these problems here is condition number 3 in both sub graphs each vertex must have exactly two edges incident to it or sticking out of it moreover one of those edges should be directed in to guarantee that color appears on the front and right and the other edge should be directed out to guarantee that color appears on the back and left and okay this seems like it should solve a puzzle but before we get too excited let me just point out one last condition whatever the correct sub graphs are we don't want them to have any edges in common for example if both a and B have this edge labeled 1 then we'd need to stack cubed number one so that green faces the front and red faces the back while simultaneously having green face the right and red face the left but that's nonsense because you need two copies of cube number one so let's add condition number for the sub graphs should not have any edges in common all right I claim that does the trick all we need to do is pick out two sub graphs of the graph that satisfied these four conditions and we solve the puzzle now I strongly encourage you to pause the video and see if you can find the grass because I'm about to reveal the solution ready here it is in three two one voila if we stack the cubes like this then all four colors appear on each of the four sides of the stack see how cool graph theory is to close out I'll leave you with two questions to think about first we found one solution but is it the only solution another question here's a set of four different cubes can you use graph theory to find a solution to the instant insanity puzzle with these cubes let me know what you come up with in the comments have fun and see you next time

---
*Источник: https://ekstraktznaniy.ru/video/26226*