Math in the Simpsons: the river crossing puzzle cube


So for those of you that have been following this channel, and you all know that I’m obsessed about cubes I like Klein bottles, but I like cubes even better and Recently I just really watched all of The Simpsons and I spotted this cube very well hidden in one of the episodes I’m sure nobody among all those millions of people who’ve watched the simpsons Particularly episode you’re gone Maggie gone have noticed this cube well if you have let me know, but otherwise I’ll show it to you anyway. Oh That’s not candy, sweetheart. What is it with kids and candy colored poison? Huh? You stupid dog. That’s Maggie’s bunny not in front of the poison man. How am I gonna get us all across this river? Oh, a boat! We’re too heavy Let’s see I need to get the baby the dog and the poison across the river But I can only take one thing at a time I can’t leave the baby alone with the poison and I can’t leave the dog alone with the baby Can’t someone help me with this puzzle me I can help Okay, so let’s just this is help homer with the puzzle first and then see whether we can find this very very special cube Okay, so what’s the problem? well we’ve got three characters to get across the river now plus plus Homer of course and You can’t take all three in fact. I mean you can only take one. It’s kind of implied here You can only can take one so homer can only take one of the characters across, okay? so There’s a problem here in terms of who we leave on the shore as we take one of those characters across so [Meggie] can’t be left alone with the poison and Mega can also not be left alone with Santa’s helper, right? so Okay, so just take them to this sort of set up here So the only thing we can really do here since we can’t take the poison since you can’t take the dog we have to take Maggie really choice you if it’s going to work. We have to take Maggie So let’s just do this okay. Take it across Okay, well, then what can we do but we can take Maggie back, but that’s not a good choice. So let’s just leave it there Homer goes back now He can either take the dog across so you can take the poison across let’s just go for the poison see what happens, right? so poison goes across Okay, now we can’t leave those alone and just go back and get the dog so the only thing we can really do here [that] gets us somewhere is take Maggie back, so we take my get back Okay now obviously the only thing you can do now is take the dog and take it across and then we’re all okay again in terms of Those two you know can stay together so we have to go back get Maggie and That’s it. You know very very nice Okay, now did you see the Cube? No!
You didn’t see the Cube? I’m sure nobody else saw the cube, alright I’ll show you the cube now all right, let’s just go back to those three guys here being on the left side, okay, and so if I actually wanted to solve this kind of mathematically In a very special way, which is actually very useful in many many situations. I would somehow encode this So I wouldn’t call dog and Maggie and the poison being on the left side of the river to say where we are instead left left left, right so that stands for the dog second L stands for Maggie and Then the purple one stands for for poison. It is color-coded right, okay now We could also be in this state here which just means that the dogs on the left the poisons on the left and Maggie’s on the right and So that state we write as left right left okay, and this state here we write as well right right left and Maybe everybody over on that side. We write as right right right and There’s a couple more distributions affected us for more my two days for two choices here Two choices here two choices here two times two [times] two is eight eight eight different ways of distributing those three characters You know and so there? They are so eight getting closer to the cube because when you think of eight eight eight cube eight Corners All right well That’s already kind of starting to materialize But it’s not quite there yet, right so we’ve got corners, but we need something else like cubes not only got corners but also has edges and faces and stuff like this. Okay, so let’s just see what happens of we’re in one of those states like for example starting configuration is left left left What can we do? Right, Homer can take three different things you can either Take a dog across make it across pr poison across right okay? So for example a dog goes across so we can actually Now say where we can get from the beginning state? To that state he about taking the dog across and that’s why we kind of make a make a line there We can also go back right? So that line also stands for kind of moving from the right to the left so it’s that connection here between those two states Stands for we can kind of move left to right or right to left okay? Now. We can also take Maggie a cross and That gives [us] [a] second edge or back let’s dance for kind of both Movements, and then we’ve got a third one going here, okay, [and] Where we can do this for any single one of the states and to kind of just figure out? What can we do well? We can move three different things that will give us three different edges and if you put all those edges in what do we get? Wha there’s the Cube? Okay, so there’s the cube and so basically when we solved the puzzle we kind of move across the Cube except Some of the edges. We can actually not move across right. They’re prohibited. Let’s just see where they are or which ones they are okay. So what shouldn’t we do well? We shouldn’t move the dog right? it doesn’t matter whether we go from here to there or there to there shouldn’t move the dog because if We did that, Maggie and the poison would be left, right so that particular edge We should never move across okay, so we take it out now. There’s the second edge We’d have to take out just looking at is well. We should also not just take the poison that’s if you take the poison And again making the dog left with Maggie shouldn’t be done. So that edge has to be taken out Yeah
And there’s actually two more edges that we need to take out and their basic symmetric to those it’s just you know imagine that you’re on this side of the river and they’re kind of going back then You know using the poison that’s out and a dog That one’s out and actually turns out that all the other connections that are still visible now They are okay, okay, and so now you can actually kind of see at a glance. You know what’s possible What’s not possible how to solve this problem, [so] let’s just go from the beginning, okay? So we’re down here and now you can see only one connection is possible so only one move is possible So let’s just do that. So we’ve done that Now what comes next we actually have a choice here. I think got a choice either. We do the dog or we do the poison okay, and actually we’ve done the poison the first time around so let’s just do the dog this time and And I mean if you just look at it you also already know how it’s going to continue right on You can kind of go from here that that Go there Or if you take the second part you kind of go there Obviously, there’s lots more ways of getting over you could kind of go up here and [in] disease and then eventually do something But it’s I mean in terms of shortest solutions, that’s it there’s two and they’re completely symmetrical and It just depends on what choice you make now you bring your poison across or the dog So we’ll do the dog this time so that gets us here, and then you can just read off We need to do Maggie right that’s the yellow connection, so we do yellow and now it tells us poison so we do the poison and then there’s one more we need to do Maggie a cross so hohmeister shuttle back and Take Maggie a cross, and it’s done. You know so very nice Cube in there So I’m really happy okay Hope you’re happy, too Alright Giuseppe: So how would the cube look like if you could actually carry two each time? Good point. Good point. I mean, so, it’s actually not clear from the clip but kind of implied that Homer can only take one of those guys across Right, but you kind of think about it right the poison doesn’t weigh much and you know either of those Maybe maybe dog. I don’t know who’s lighter maybe it would be actually be possible to kind of fit two of those guys in and take them across then things would change a little bit, right so Basically the restriction of only being able to take one across corresponds to just filling in the edges here of the Cube if you could take two across That would mean that we also have to fill in diagonals and then actually you can kind of see at a glance again that We get a much shorter solution, right? So we could just kind of go across here So what does that Correspond to? Giuseppe: That means bringing both the dog and the poison over That’s right. So dog and poison go over alright dog and poison go over you just leave them there just Bring Maggie over and then there, so that’s three times across instead of what we did before was I think seven yeah so it’s a lot better and actually if the board could carry more critters to All three in one go which was that? Correspond to so all three in one go would then correspond to these long diagonal of the cube right so we kind of go from Here to there, and be done with it. That’s you know. It’s very nice Now actually it turns out that Homer does not our help at all he actually figures it out right and then so he describes it to the dog and Maggie and even talks to the poison! And then he implements his strategy so he’s actually doing the right thing. He’s taking Maggie across. This is have a look at this So here we go. It’s got Maggie in the the boat so he does the right thing so he starts pedaling Mm-Hmm Are you listening at all? very funny But actually when you think about it When you think about it, I mean You know if if if we maybe change the puzzle to saying well the dog can swim across, what should we do that? What should we do them? Well maybe then you bring the poison? Poison and dog are going at the same time, then it is like that case when you can carry two You can actually make it in what two or three?
Three modes again, so it’s actually exactly right, right? So we would just instead of taking Maggie will put poison in the boat and then Homer rows across and the dog swims alongside. And poison and dog stay on the other side and homer comes back to get Maggie Done, that’s all Good to go, so yeah, it’s very funny But actually it’s not over yet, right it’s not over yet. So here comes another Twist in the story, I’d be obliged to you if you’d help me puzzle out my fox duck and corn situation Well the puzzle done puzzled itself out very funny So this is actually exactly the same problem that Homer has right So there’s three different things and you know This one wants to eat that and that one wants to eat that but those two are okay together on it So it’s exactly the same it’s exactly the same and then Well, there’s a different sort of solution because the problem there now still remains because the solution was that the fox ate the duck which eat the corn and it weighs too much And so you still can’t bring it.
Exactly because I mean now everybody’s kind of together Bundled together and that means that it’s still too heavy obviously right so it’s actually not a solution actually I mean, this is just a second way of phrasing the same problem They’re original well there is an original which actually dates a couple of hundred years back is a really really old old puzzle is about a Wolf and a Sheep, I think and some cabbage right and then you know it’s the same thing again the wolf wants two sheep and sheep wants To eat cabbage and well the wolf and the cabbage together are okay. I want to get across the river Okay, so that’s that and there’s even a whole book about just believe it on I have it somewhere. I couldn’t find it today It’s not a very Good book But it had to and we had to have at the collection all right now This is actually there’s lots of variations to this puzzle you know this kind of replacing objects, but there’s also other river crossing puzzles which are very similar and Which actually get a lot harder so one which is harder than the one we just looked at is like this and I’ve just used some simpsons characters here To talk about them quickly. So here. We’ve got three couples All right, and you all know them from the simpsons and the husbands are all very jealous, okay? and they’ve got a boat and the boat can carry two people at the same time and Because the husbands are very jealous the restriction here is well, not that somebody will eat somebody else but the restriction is that None of the women can be together with another man either on this side or on that side or in the boat unless her husband is also present okay, and so you can try and figure out how how that one works right and I’m actually going to show a quick solution of this as part of the credits But maybe you want to give this a try first itself and maybe if you’re really ambitious You could try and see kind of what sort of geometrical shape is kind of hiding in the back of all this. It’s not going to be a cube. It’s going to be something pretty complicated, but there’s something there so you can actually do it again You know mathematically which gives it kind of a complete overview of what can happen anyway? So that’s it for today So here’s one solution. There’s a few so what I’ll do is. I take two of the women across… Done!

100 thoughts on “Math in the Simpsons: the river crossing puzzle cube

  1. before even reading anything, my guess is as follows:
    1. take baby, leave it there
    2. take pills, leave there, take baby
    3.leave baby take dog, leave dog
    4. go back for baby and bring her over

    Edit:
    i think there is already a puzzle like this, at least in german, with wolf, sheep and something else….

    Edit 2:
    just watching the video halfway, and its rly rly nice, im impressed by this visualisation

  2. I truly love graph theorey. This problem reminds me of the traveling salesman problem

  3. The Solution to the riddel
    (capital letter = man)
    Turne 1side 2side boat
    0)(ABCabc)()(bc->)
    1)(ABCa)(bc)(<-b)
    2)(ABCab)(c)(ab->)
    3)(ABC)(abc)(<-a)
    4)(ABCa)(bc)(BC->)
    5)(Aa)(BCbc)(<-Bb)
    6)(ABab)(Cc)(AB->)
    7)(ab)(ABCc)(<-c)
    8)(abc)(ABC)(bc->)
    9)(a)(ABCbc)(<-b)
    10)(ab)(ABC)(ab->)
    11)()(ABCabc)
    But i don't know if this is the shorts solution 🙁

  4. The original puzzle is so stupid, cause presumably you have a leash or something for the wolf and the goat (otherwise they would just wander off when you leave them). So the solution is just to tie them up far enough from each other so they cannot reach each other and then just take them in any order you want, with no backtracking.

  5. the whole cube doesnt work because it doesnt take into consideration where homer is.

  6. At 1:58 I guess that. Maggie, nothing, poison, maggie, dog, nothing, maggie

    Edit: wohooooo

  7. If I understood well, to summarize, we just have to consider the problem as a "n" dimension problem where n is the number of character and the number of things we can transfer is the maximal dimension of the lines tracables between the corners of the n dimension shape formedand the eliminate the "bad scenarios" which doesn't respect the criterias of the problem to find the most efficient path from the beginning to the solution

  8. To solve the second puzzle. I figure you have one couple go across, have the husband ferry the boat back, have the remaining two wives go over, then have each wife go back for their husband and return to the right side.

  9. Why would you want to ferry a wolf across? And if you did, what is stopping the wolf from eating YOU?

  10. You must transfer all the people across the river in this flash river crossing game respecting the following rules:

    People: 1 policeman, 1 thief, 1 mom ,2 girls, 1 dad, 2 boys.

    -The ferry can carry no more than 2 people.
    -Only the Adults (mom, dad and policeman) can operate the ferry.
    -Dad can not be in the presence of the girls w/out Mom
    -Mom can not be in the presence of the boys w/out Dad
    -The thief can not be alone with any of the family w/out the policeman.

  11. Couldn't you solve the second one with three moves? Just take each couple at a time, the women would be with her husband at all times

  12. I think I didn't understand the second problem. You can carry two people and women can never be with other men unless her husband is with them. Why can't you just carry the first couple, leave it on the right, carry the second couple, leave it on the right and finally carry the third couple and leave it on the right?

  13. Let me try
    Get the baby
    Return empty handed
    Get the dog
    Return with baby
    Get poison
    Return empty handed
    Get baby
    Done

  14. Charles Lutwidge Dodgson (aka Lewis Carroll) once posed this problem with a Lion, a Lettuce, and a Lamb. I prefer the alliteration. (It must have been an exceptionally large lettuce.)

  15. and no one mentions that homer just crossed a really fuck wide river 7 times in a rowing boat

  16. I don't watch Simpsons, but I feel like the dog only swam because maggie is on the boat to follow the said stuff toy.

  17. They do this same problem in Peppa Pig as well. I'll try and find the clip! It's a hidden easter egg for parents in a pre-school TV show.

  18. Just tie the dog up on a tree since there is a leash, then tale the baby across then the poison, hold the baby while delivering the poison then take the baby home then come back for the dog

  19. All those MouseClicks! Why not put them in a loop. It would save you lots of typing. Lets say you have 13 premium tasks and you have to press each twice, one to Start and one to claim. You will probably want to do 100 lists of tasks say, so make two loops, one nested in the other: So you'd need:

    $NumberOfLists = 100
    $NumberOfTasks = 13

    While $NumberOfLists > 0
    ; Press apply to start a list of 13 for premium tasks
    ; X and Y are the coordinates of the Apply button

    MouseClick( "left", X, Y )
    Sleep (6
    WEnd00)

    ; A and B are the coordinates of the top Task button at the top of the list and there's a tool in autoit to find the coordinates of a spot on your screen

    ; To check there are no tasks left

    While $NumberOfTasks > -1

    ; Press Start

    MouseClick( "left", A, B )
    Sleep (600)

    ; Press Claim

    MouseClick( "left", A, B )
    Sleep (600)

    ; Decrease number of tasks completed in the loop of 13

    $NumberOfTasks -=1
    WEnd

    ; Decrease number of lists of tasks in the loop of 100

    $NumberOfLists -=1
    WEnd

    You may need to alter the pauses for your needs but that is less typing for the same work.

  20. 1) Take the baby across the river
    2) Leave the baby
    3) Return to the start
    4) Take the boat across
    5) Leave the boat
    6) Return to the start

  21. It's a good thing it's Homer and not Bart. Bart might just poison the dog, or worse!

  22. There are 16 states, not 8, because Homer's location is relevant to whether the state is permissible. Even if you limit yourself to permissible states, you'll end up with a state graph that isn't a subgraph of a cube: you need room for the transitions where Homer rows back alone.

  23. Why do we need a cube to solve it ? Its a puzzle for children , this would just confusing for them

  24. Adding Homer's trips places this on a tesseract, and the trips no longer necessarily follow the edges. The edges describe transforms of one parameter at a time, but when two are in the boat, we leave the edges and travel across a plane or though space? Further research is clearly necessary.

  25. simple…put the dog down ( bye bye santa h )…. then dump the poison in the river ( nothing new there right ? )….. then jump in the river and float across towing maggie and bunny behind……….oh wait….could have done it all in 1 trip……jump in the river ….float across the river towing dog and maggie….eat some candies and stuff the bunny in the jar…….very simple solution

  26. theres a similar problem in runescape where you have to get a chicken grain and a fox acrose a bridge

  27. I heard this puzzle with prisoners guards and weapons. At 1 point they sent the prisoners back in the boat alone. That is implausible because then the prisoners would just run away

  28. Take chicken across come back take fox across bring chicken back take bag of seed across then go back for chicken.

  29. I think the thing with the swimming dog and three moves is wrong, because the dog follows only because of the rabbit maggie hold and if you take the poison and leave maggie, the dog propably wouldn't swim with homer.

  30. instead of removing edges it's better to remove all banned conners with edges attach to them

  31. This could also be a tesseract because Homer's state is also important. RRL when Homer is R is fine, but when Homer is L this is not fine.

  32. The picture of a 'sheep' is clearly that of a goat as per the original puzzle. Remember goats have tails up and sheep have tails down.

  33. Better way is to solve it using an hypercube. Homer need is own dimension. No joking.

  34. The second problem is impossible now. These days husbands wouldn't allow their wifes to stay alone with another woman either

  35. For the last puzzle can you not just take each couple one after the other? Then the women are always with their partner.

  36. i think i can simplify the solution at the end.

    marge takes maude across, then comes back.
    homer takes ned across then comes back.
    with one whole couple already on the other side its just now 2 couples at square 1
    now since the husbands are jealous you need to take the first husband across first
    homer takes apu, then comes back.
    marge brings apu his wife (for the life of me i never remember her name) then comes back
    homer and marge then cross together.

    the way this works in my mind is that the rule states no woman can be with another man on sides a or b or in the boat unless husbando is present. the sides and the boat are separate entities. which means the marge can ferry apu his wife because she never gets out of the boat onto land where apu is. there's a barrier there.

  37. 12:31 – Everyones Bundled together – Priceless. Love these vids and watching your enjoyment which is contagious !

  38. lets have a survey; which square on the cube is default in front, top right or bottom left?

  39. I have a question. Word problem-wise, why was it all right to leave the dog alone with the poison anymore than it was the baby?

  40. For the 2nd problem, why not take a couple at a time, it's only carrying 2 people at a time and they won't get jealous

  41. Why can’t you just carry each couple across? They never are left alone without their husband. 3 easy trips, no math.

  42. the trick for the end puzzle is that the boat can carry 2 people, not that it must carry two people

  43. The goose eats the corn and then before the goose can defecate the fox eats the goose. It will be hours before the fox defecates. The fox is now heavy enough that the boat won't carry both the fox and the farmer. So, the fox rows the boat across and the farmer swims alongside. (The fox can't be the one swimming because one should wait an hour after a meal before swimming and no fox has ever said to me "Oh, that's just old folk-medicine, an unproven myth".) 100% of the mass of corn, goose, fox and farmer are now on the far side of the river. QED.

  44. In truth though, isn't it a 4D vector if you take homer into account, therefore allowing you to represent the problem with a hypercube – there are, after all, two LLR states, one of which is permitted, the other of which is not: LLR (Homer Left), which is permitted, and LLR (Homer Right), which is not.

  45. What if you can:

    1) Just dog

    2) Just Maggie

    3) Just poison

    4) Maggie and poison

    5) Dog and maggie

    6) But not maggie and dog?

    What are some interesting combos? What about if you had more then 3 things? Can you get a 3 dimensional star solution diagram

  46. solution to the problem at the end:
    we have:
    L(left)
    R(right)
    M(man)
    W(woman)
    and numbers show the couple,
    we start with LM1 LW1 , LM2 LW2, LM3 LW3
    we put W1 and W2 on the boat and we go to the other side and we comeback with W1 so we get LM1 LW1, LM2 RW2, LM3 LW3
    now we take W1 and M2 in the boat and comeback with W1 so we get LM1 LW1, RM2 RW2, LM3 LW3
    now we take W1 and M1 in the boat and comback with W1 so we get RM1 LW1 , RM2 RW2, LM3 LW3
    now we take W1 and M3 in the boat and comback with W1 so we get RM1 LW1, RM2 RW2, RM3 LW3
    now so we take W1 and W3 and we get RM1 RW1, RM2 RW2, RM3 RW3

    i have no idea what's the mathematical shape tho, but the enigme was easy if you just think about it and don't waste your time trying to imagine the mathematical shape

  47. interesting way to implement a graphic solution to the valid "jumps" in a finite state machine taking into acount the conditions of the system

  48. About the poison and Maggie problem, take the poison and bind it to the dog, boat Maggie over while the dog is swimming beside! 🙂

  49. simple 99 times x equals to 11 times 9x and all cauntşng we plug for we will get 100a +10(a+b) +b cause if we muktiply any number with 9 which less than 10 the numbers add in the result is 9

  50. He left Maggie, but she was found by a nun and taken to a cathedral.

  51. Homer : I need to get the baby, the dog and the poison across the river but I can only take one thing at a time ….

    Math dude : its not clear from the clip but homer can take only one thing…
    🤦🏼🤦🏼🤦🏼🤦🏼🤦🏼🤦🏼

    Homer literally saying he can carry only one thing at a time is not clearly enough for you??
    How smart is this math dude???

  52. The rules for the second puzzle leave us with only 22 states, where either of the following criteria hold:
    – all men are on the same side
    – no couple is separated
    The general solution seems to be:
    All left -> {1 couple right, or 2 women right} -> one woman right -> all women right -> two women right -> two couples right -> one couple right -> one couple + two men right -> all men right -> two couples + one man right -> {two couples right, or one pair + two men right} -> all right
    As you can see (and as is the case with the other puzzles as well), the solutions are symmetric so that the second half of the solution is just the first half backwards and the sides swapped, or in other words, if you fold the solution in half and kind of add the states that correspond to each other, you get the three couples on both sides.
    For complicated/high dimensional binary state problems like these I like to use the Karnaugh map https://en.wikipedia.org/wiki/Karnaugh_map, where, the way I set it up, the allowed states are on two vertical stripes and the diagonal, really nice.
    In many states, there are several choices for the next steps, and if I got it right, there are 1944 unique shortest paths to the goal.
    It was much fun messing with that, thank you for that, und ein schönes Wochenende, Herr Polster!

  53. Interesting how if you can take 1 across at a time, you can only move in 1 dimension around the cube (only along edges); if you can take 2 at a time, you can move in 2 dimensions (across the face in a diagonal), and if you can take all 3 at a time, you can move in 3 dimensions (diagonally across the volume).

  54. Are you leaving the dog with the poison? What makes you think dog doesn't eat poison? And you just leave the fox or wolf. Why are you bringing home wild animals? Correct answer if dog can swim is row Maggie across river. Dog will always attempt to follow Maggie, so will swim across river. Row dog back, because Maggie doesn't swim. Row poison across river; dog will swim across as well, given dog wants to get to Maggie.

  55. oh i catched what he says about, i just started read Wakerly about same things, understanding pleasing me)

  56. When you think about being able to bring 1 character at a time it allows you to travel across 1 dimension of the cube (vectors), being able to bring 2 lets you travel across the 2nd dimension of the cube (faces), and bringing 3 would let you travel across the 3rd dimension of the cube through the center of the space inside

  57. but the puzzle typically does not ask you how to do it, but what is the minimum number of moves (river crossings)

  58. add a restriction just to mess it up.

    It's bad parenting to leave your baby on her own on one side of the river.
    You could leave her with the dog, but the toy is the problem.

    Take the toy over. come back. take the poison. come back.

    take the baby and have the dog swim 🙂

  59. 10:50 Wrong assumption: if homer takes poison first, the dog won't swim aside. he will stay and catch maggy's toy bunny. 😉

  60. Use induction to prove that for every natural number n,
    1^3+2^3+3^3+…+n^3=(1+2+3+…+n)^2

  61. The puzzle is more than a couple of hundred years old, I think it was attested in old ancient egyptian records, so it's a few thousands of years old.

  62. I've been trying to figure out a variation to the more complex puzzle by making some of the people lazy (definition: lazy person is someone who never rows). It's a rowboat that carries 2 people so only one of them needs to row. I find that you can have up to 3 lazy people, and indeed a solution using ABC for men and abc for the women [bc,c,ac,a,BC,Bb,AB,c,ac,c,bc] has A,C,b all lazy. I wonder if there's a solution with two lazy women, or why a lazy pair is impossible?

  63. About the last puzzle with the couples: You can just carry each couple across the river, since the boat can carry two people at the same time. So only couples would be left on each side of the river and the men won't be jealous.

  64. The couples one is easy. You fix a rope at the boat. Couple 1 passes. The two couples pull the rope, couple 2 passes. Couples 3 pulls the rope and then passes

Leave a Reply

Your email address will not be published. Required fields are marked *