How many holes does this mug have?
Stand-up Maths
0:00 [Matt] I don't think we could possibly improve on this calibre of maths-mug.
0:04 [James] I think there is one way that we can improve our mug.
0:08 [Matt] No.
0:08 [James] Yes.
0:09 Mug with a hole!
0:11 [Matt] Mug with a hole!
0:12 [James] Mug with a hole!
0:13 [Death-metal music plays] #We put a hole into this mug.
0:18 Mug with a hole, hole in a mug# [SUM Theme] Hey it's me, modern-day-Matt.
0:33 That was when James and I were here,
0:35 many years ago, talking about this mug with a hole.
0:39 Which is a very mathematically and topologically interesting object,
0:42 which James was very excited about.
0:45 And we'll get back to past Matt and James in a moment.
0:48 First, we need to deal with the original, utilities puzzle.
0:52 And it was James's idea to put this on a mug.
0:55 And the reason is if you're trying to solve this puzzle on a piece of paper,
0:59 and you may have seen this before.
1:01 There is a fantastic 3Blue1Brown video about it.
1:04 [Grant] Here's the thing about the puzzle,
1:05 if you try it on a piece of paper, you're gonna have a bad time.
1:09 [Matt] You gonna hit an issue real fast!
1:12 So, the challenge is,
1:14 can I link all 3 of these utilities up to all 3 of the houses?
1:19 I'm complete stuck when I try to run the gas pipeline,
1:24 because this house here is completely surrounded by this barrier.
1:30 So no matter what I do, I can run it to the other ones,
1:33 I can get it, er, all the way up to that one.
1:36 Whoops, I should'a gone to that one, n'aww...
1:37 Oh no, wait, I can sneak it in here- here it is, I can run that one, phew!
1:42 But I, absolutely, cannot run the gas to that house,
1:47 there; because this is absolutely impossible on a flat surface.
1:52 It is, however, possible on a "doughnut" or a "toroidal" surface.
1:57 So we have, uh, a, uh, a exact recreation of the mug.
2:01 Um-um, Producer Nicole was able to put that together.
2:05 Um, the houses are the same size, just some of them are closer.
2:09 Um, there's-there's the topology of a doughnut.
2:11 Er, now, because unlike the flat plain,
2:14 where there's no way to get the pipes to cross,
2:19 because you're stuck on the surface.
2:21 Because here, what you can do is you can send
2:24 one pipe up the top and instead of it going,
2:26 so we'll take it from the houses this time.
2:29 So if I had one pipe coming up,
2:31 so the green's on the right and I had the red on the left,
2:36 I can swap them over before they get to the other side.
2:39 'cos the red, I can send all the way,
2:42 like, all the way around like that, and under.
2:46 Whereas, this one here,
2:47 I can send it down an then out the other side and up over here.
2:52 So, because of the global topology of the surface, it is solvable.
2:56 And what James Grime realised is that, famously,
3:00 a mug is a doughnut; or, at least,
3:04 it is topologically equivalent to a doughnut because it has a hole in it.
3:07 Not the hole where the coffee goes,
3:09 that's just a dent, it's got an actual hole over here.
3:13 And, because it's a glazed surface,
3:14 and that's the original one we made a short run of.
3:17 Now, this is like the commercial one,
3:19 which I was drinking coffee out of a second ago.
3:21 And, because it's glazed, it works like a whiteboard.
3:24 So you can use whiteboard markers and you can try and solve it.
3:27 And because you can send one pipe around and under the handle,
3:30 and another pipe over the handle, it can be solved.
3:35 So, I love this mug so much because it's
3:38 like capitalising on the "mug is a doughnut" thing.
3:41 But you don't need to get, like, a printed one.
3:44 You can just get, like, any blank mug,
3:45 get some whiteboard markers and you can try and solve it.
3:47 It's so much fun.
3:48 But for me I love this object.
3:51 Which is why you may have noticed,
3:53 in a lot of my videos, throughout now many years.
3:56 You'll have seen me drinking out of one of these.
3:58 Ok, you can see what I'm doing on the side...
4:01 The cards were definitely shuffled...
4:04 A truncated icosahedron...
4:06 That is the great thing about doing a live show...
4:09 Hello and welcome to The Maths Show...
4:12 Right...
4:14 5 degrees...
4:16 Truly ridiculous things...
4:18 Fifty-times...
4:20 But now, there's a new mug in town and when
4:23 James first made these, I had a few questions.
4:25 [Shopping channel music plays][Matt] First of all,
4:28 how many holes does this mug have?
4:30 [James] Mmm, interesting question.
4:31 [Matt] Yeah, because it, there-there's still the handle one over here.
4:34 [James] Yep, yes [Matt] There's still the one here.
4:37 [James] Yes.
4:37 [Matt] No one turn any of this into a .gif.
4:39 [Matt] And, 'cos there's like a tube, there, so it-does that.
4:45 [James] Yeah, I, do you know when I first saw this kind of mug before.
4:50 I thought, I wasn't sure, I wasn't sure how many holes it had.
4:53 Was it 2, was it 3, was it 2.5, is this like a perforated torus?
5:01 [Matt] Is it a simple, like can you get down to a disk with holes in it?
5:04 [James] So th-this is, this is how you solve it, ok, this is how you imagine it.
5:08 Let's say we're making one of these mugs with clay, right.
5:11 [Matt] Ok, yeah.
5:12 [James] Er, so imagine we're starting with a disk of clay.
5:14 [Matt] Yep.
5:15 [James] Right, now let's start with a bridge,
5:17 we'll make a bridge from one side to the other side of the circle.
5:20 [Matt] 1 hole.
5:21 [James] Yeah, and that's 1 hole, right.
5:23 Now I'm going to take my clay pancake and sort of fold it up into a mug shape.
5:28 So that bridge is going through.
5:30 [Matt] Yep.
5:30 [James] And I'm drill a hole now through...
5:32 [Matt] 2 holes.
5:33 [James] 2 holes.
5:34 Add a handle to it.
5:36 [Matt] 3 holes.
5:37 [James] 3 holes.
5:37 [Matt] 3 holes.
5:38 [James] And it is 3 holes.
5:39 [Matt] A mug with 3 holes.
5:40 [James] It's 3 holes!
5:42 [Death-metal music plays] #We put a hole into this mug.
5:46 Mug with a hole, hole in a mug# Don't worry if
5:51 you found past-James's discussions about pancakes a little hard to follow.
5:56 You really need to kind-of be able to see
5:59 it happening to properly get your head around it.
6:01 And I was inspired by the classic animation,
6:04 we just got this off Wikipedia, that show's a mug becoming a doughnut.
6:09 And, for me, that really helps clarify exactly what's going on.
6:12 But all you're doing is you're flattening out the rest of the mug.
6:15 I thought I'd try and do an equivalent for the Mug-With-A-Hole.
6:19 I'm not able to do good 3D renders,
6:21 so I thought I'd ask a few of my friends to help out.
6:25 And a couple responded.
6:26 Erm, I'm not going to lie, I gonna go with Eugénie.
6:28 So, she does VFX for films and is hugely overqualified for this task.
6:34 I asked her, very nicely to animate it
6:36 and she came up with this fantastic animation.
6:39 You still have to watch it a couple of times to track the bit,
6:43 like the under the bridge bit becoming a tube.
6:48 And then she's made the whole thing a little
6:50 bit transparent so you can see the tube move around.
6:53 But, if you stare at it for long enough and it go backwards and forwards.
6:56 You can convince yourself that yes,
6:58 the mug with a hole is equivalent to a disc with 3 holes in it.
7:04 A, a 3 holed doughnut, if you will.
7:07 Erm, I should say for completeness,
7:09 the other friends who got back to me when I did a call-out.
7:12 Were my good buddies, Morgan and West.
7:15 And they said they had an excellent way to demonstrate,
7:17 erm, this becoming a doughnut with 3 holes in it.
7:23 [SUM Theme] [Rhys] That's a pretzel.
7:32 [Rob] You're a pretzel.
7:34 [Rhys] You're a doughnut.
7:35 [James] 5 houses, 5 utilities, we've got 25 lines.
7:39 [Matt] Oof.
7:40 [James] Right, so compare that with the classic mug, here.
7:44 Er, would have 9 lines: 3 houses, 3 utilities.
7:47 No, 25 lines, so it can be done, yeah, I've definitely done this before.
7:52 [Matt] I've not, successfully, done it.
7:54 Right, because you've got to go through the middle hole.
7:56 You've also got to use the handle as the classic.
7:59 But then you've got to go in and under it.
8:01 [James] Somehow use the bridge as well.
8:03 [Matt] Could we have done 5 utilities with fewer holes?
8:06 [James] So absolutely not, no.
8:08 So you need 3 holes to solve this problem for 5 utilities.
8:14 Now, if we'd done 4 utilities, 4 houses;
8:17 that, in fact, can be solved with a 1 hole mug.
8:22 [Matt] We could have done that on the original?
8:23 [James] We could have done it and, hey, do it yourself.
8:25 If you've got one of these classic mugs, ok, make it harder.
8:29 Ok, we're just going to draw in an extra house,
8:32 we'll have an extra utility there.
8:34 [Matt] And it's still solvable?
8:35 [James] And we can still solve this, on the classic mug,
8:39 with 4 houses, 4 utilities.
8:40 But, if you want to go up a step;
8:43 you do want to go up a step, 5 houses, 5 utilities.
8:46 You'll need one of these.
8:48 [Matt] But James, how will I know for any number of utilities,
8:52 how many holes my mug will require?
8:53 [James] That's a great question.
8:55 [Matt] Thank you.
8:55 [James] There is a formula for that.
8:57 [Matt] No...
8:58 [James] There is, there is a formula, check out this formula.
9:01 [Matt] Look at that, there it is.
9:02 [Shopping channel music plays] The question a lot of people
9:10 have now is why is there an equation for working
9:12 out how many holes a mug has to have to be able to put a utilities puzzle on it?
9:18 And it's because this is actually a whole other,
9:22 interesting and serious bit of mathematics.
9:24 We're trying to link graphs, oh what people often call "networks".
9:28 Which is what we are using this to force you to try to do,
9:31 draw a planar network.
9:32 And what genus surface those graphs can be drawn
9:37 on, or embedded into, such that they don't have lines that cross.
9:41 And genus is just how many holes does the surface have.
9:45 This doughnut is genus 1, single hole.
9:49 This surface, on the mug here, is genus 3.
9:53 And so what these are doing is just saying what genus do you need
9:58 to be able to have a graph that links "n"-points to all of "m"-points,
10:04 but none of th-the 2 sets connect to themselves.
10:08 This is actually called a "Complete, Bi-Partite Graph".
10:12 And they don't have to be the same number;
10:13 you could have different numbers of houses, different numbers down here.
10:16 And it's a very interesting,
10:18 worthwhile bit of mathematics to investigate how these sort of networks
10:21 behave and what happens when they're on, erm, different surfaces.
10:25 And I enjoy them so much,
10:26 you may have noticed a mug over here I've not been talking about.
10:30 Famously, there's a thing called the "4-Colour Problem";
10:32 which, on a flat surface, if you divide it up into regions
10:35 and you want to have them all different colours,
10:37 so no 2 regions that touch are the same colour.
10:40 You have to have, er, 4; 4 or fewer.
10:43 So there are cases that will force you to need all 4 colours.
10:46 But that's only for a flat surface, genus-0, eugh.
10:50 Whereas, genus-1 you might need 7 colours.
10:54 Which is why I designed this mug to show,
10:57 on a doughnut, it's possible to force 7 different colours.
11:01 And so there are 7 different regions, I've numbered each one.
11:04 And every single region touches all 6 other regions,
11:09 to show that this is a colouring-in pattern that forces you to use 7 colours.
11:13 I will put the design in the description below
11:16 if you'd like to make your own one of these.
11:19 And I think it's really interesting that the 4-Colour Problem on a flat map,
11:24 becomes the 7-Colour Problem on a mug.
11:27 But, if we want to combine it all together.
11:30 How many colours would you need to colour
11:34 in any conceivable map on a genus-3 mug.
11:37 Well, would you believe, there's another equation.
11:40 New equation.
11:43 Now this time, you might have noticed, instead of having the ceiling function,
11:46 where you round up to the nearest whole number.
11:48 You've not got to round down to the nearest whole number.
11:52 And this is subtly different because this equation,
11:56 you put in the number of the 2 sets of nodes
11:59 on your graph and it will tell you what genus you need.
12:02 This is the other way around, you put in the genus you've got,
12:06 and it will tell you the maximum of colours you
12:09 might need to colour any conceivable map or, you know,
12:13 collection of contacting regions on that surface.
12:16 And, for a standard mug, you put 1 in there and this gives you 7.
12:21 Which is why I was able to do the 7-colour mug.
12:24 If you had genus-2, 2-handles, this would give you 8.
12:28 And if you were to put in 3, for our friend here, it would give you 9.
12:34 So technically, if you have one these mugs, you can divide it up into 9 regions,
12:40 such that every single region contacts all 8 other regions.
12:45 Or potentially, you can definitely do it such
12:47 that it will force you to need 9 colours.
12:50 Subtly different, I do not want
12:52 to accidently state something that's not completely precise.
12:55 And why stop there?
12:56 Let's say you had a mug with 6 holes, you'd need 12 colours.
13:01 And 7 holes, you'd need 12 colours.
13:04 Because both of these involve rounding,
13:06 you can have multiple values that go in and give you the same output.
13:11 Which is why 12 colours will do you for 6 holes and 7 holes.
13:14 Indeed, if you had 100 different colours at your disposal,
13:19 that would do everything from a mug with 776
13:23 handles right up to a mug with 792 handles.
13:27 Now that's a mug with a lot of holes,
13:30 we didn't do a new version of the-the song for that.
13:33 So that's it with mugs with holes in them, or different numbers of handles.
13:37 You can buy both of these on Maths Gear, if you would like them.
13:40 Or, depending on if we can find a supplier, toroidal balloons.
13:45 Occasionally we're like the world's only stockist of toroidal balloons,
13:48 they're real hard to come by.
13:50 If we have any, they'll be on the website, erm, but occasionally we're out.
13:54 These, we tend to always have.
13:55 Although, that's why we filmed a thing about this many years ago,
14:00 it was right before the pandemic, and then we couldn't get enough mugs.
14:05 And it felt a bit ridiculous to put the video out if
14:08 people couldn't then go and get a mug if they wanted one.
14:10 So now we have loads of mugs, we're finally making the video.
14:13 And I have to thank past-Matt and past-James for their incredible patience.
14:17 But you don't need to buy them, just get blank mug, you can do, well.
14:21 You can get other mugs with hole,
14:22 like this is an off-the-shelf thing- would you believe?
14:25 You get, like, novelty golf mugs, like "hole in one!" ha-ha-ha.
14:28 So you could just get a generic mug and draw on it and explore these things.
14:32 I will link to some more of the maths below, but that's it.
14:35 Thank you so much for watching and I hope you
14:38 all now go and enjoy a nice hot mug of topology.
14:41 [Shopping channel music]