# Maths Problem: Connect the towns solution (Motorway Problem)

### Bernard Jenkins

Nope. The length is (((1/2)*2)*2)+the length of the line that joins A-D line with B-C line (around one quarter)

2. Kevin Octa

This is the coolest thing ever.

3. Tennison Chan

+ singingbanana 120 degrees. It reminds me bees make hexagonal honeycomb with internal 120 degrees, which is with the minimum used material.

4. Luis Hernandez

………

5. Wiki Zune

It works like a beehive!

6. Harvinder kalsi

Wow James! You are nailing it my friend. Nothing could be better for me than the answer given by Nature itself for the puzzle I was looking to solve. That's the sheer power of Equilibrium. Thanks for these types of puzzles!

7. Alexei Fando

Awesome. Is this why honeycombs are shaped the way they are?

8. Matthew Foos

That was fantastic……have you built an 8 point prop?…. I'd like to see that

9. Joe Chiocca

So did he loose some road (bubble) when he blew on the U (local minimum) shape to get the true minimum? They seemed the same to me so how is it less material (road)? Thanks

10. Felipe

Dr. Grime, the solution for the regular hexagon (of side 1) is not that shown in the video, which has lenght 3.sqrt3, bigger than 5, if you consider the perimeter of the hexagon except for one segment.

Excellent video!

11. Mars rover

Legend

12. dbzelda123

so i originally though out the cross solution, but when i heard that that wasn't the answer, i thought of the exact shape that the soapy water produced, bit i just thought that the middle line would be 0,5 miles long. now i am struggling to figure out how does the 1 + (squareroot) 3 comes from. can someone explain?

13. Honey Pringles

Wooooow!!!!

14. Glen Shennan

That's a freaking awesome way of finding the solution.

15. S4R1N

That, is incredibly cool.

16. 1123aka

i would have loved if you showed how this can actually be solved by using the lagrange formalism

17. Akash Halder

18. khurshid habeeb

A soap film contained by any fixed boundary will acquire its minimum free energy when it reaches equilibrium. As the free energy of a film is proportional to its area, the area will also be minimized. Consequently soap films can be used to solve mathematical problems requiring the minimization of a surface area contained by a boundary. In order to obtain analogue solutions, we require a frame to form the boundary of the surface. When the frame is withdrawn from a bath of a soap solution a soap film will form which will attain its minimum area configuration on reaching to equilibrium.

Joseph Plateau discovered experimentally, over a hundred years ago, that soap films contained by a framework always stratify three geometrical conditions:

1) Three smooth surfaces of a soap film intersect along a line
2) The angle between any two tangent planes to the intersecting surfaces, at any point along the line of intersection of three surfaces, is 120°.
3) Four of the lines, each formed by the intersection of three surfaces, meet at a point and the angle between any pair of adjacent lines is 109° 28'

19. Ravi Jidge

Like it

20. John Bouttell

Soap bubbles solve problem super computer would take 10 years to solve

21. Marcin Szyniszewski

I love your experiment – it would be a brilliant outreach activity! 🙂

22. Oxymoron23

I tried this myself and the hexagon solution you gave is wrong. You gave us the internal solution to the problem which is = 5.196. But if you connect the perimeter together, like you did in the octagon solution, then you get 5. Remember that you don't have to go all the way around like you showed is in your octagon picture. The towns are still connected if you just connect 1 to 2 to 3 to 4 to 5 to 6. (No need to go from 6 to 1).

23. Kyle Amoroso

Maybe you could do a spinoff video about minimal spanning trees?

24. NoriMori

Wow! That bubble pathway is so perfect! And that's such a clever way to find the solution! When you said the cross wasn't the most efficient way, I had a feeling it might be something halfway between the H and the cross, but I didn't quite visualize it that way! Bravo!

25. L4Vo5

3:53 why would you fill the entire perimeter? you can remove one of those lines (the same way you removed one of them in the square and got a U form)

26. Aleksandar Maksimov

could you connect the 4 towns with 3/4 of a circle?

27. Naþan Ø

Wait, here're a few guesses before I finish:

A has a road to B (1)
There is a diagonal from A to D (sqrt(2))
There is a half-diagonal from C to the midpoint of AD (sqrt(2)/2)

Does that work?

<launches ipython>

3.121320343559643; Nope, cross is more efficient at 2.8284271247461903

Perhaps A to B (1)
from the midpoint of AB to the centerpoint (0.5)
from the midpoint to both C and D (2*1/2*sqrt(2)=sqrt(2))

That's 2.914213562373095; cross is still better.

Perhaps A to B then a line from the midpoint of AB to C and D?

This is moving into weird triggy areas.

The equation is 1+2*math.sqrt(0.5**2+1), which yields 3.23606797749979- possibly my worst guess yet.

I would guess that it's a 'Z' shape, but that can't possibly be right- 2+sqrt(2), which is obviously greater than 3 whereas my best is the cross at 2.8<3.

Oh well, I'm guessing it's going to be like the the 2.9 answer, but not to the midpoint.

28. WhovianMinecrafter

0:53 that has like four

29. franktankboi

Damn that's impressive

30. keithwouldstay

Ok. Mind blown. Thank you!

31. Kieran Payne

It is the same thing for molecular geometry I believe

32. That Guy

This is brilliant and you are a great teacher in each of your videos 🙂

33. Tomi Malinen

How does this work in 3D? How to connect all the vertices of a cube or other platonic solids? What would be the optimum angle?

34. Spiderous

How did you get 1 + sqrt(3)? Is this regular hexagon or not?

35. Elliot Grey

My mind is so blown.

I was fully convinced that the X solution was it; because of the 2√2 thing.

But nah; I should have thought in a more hexagonal way. Beehives and structural efficiency and all that.

… Seriously though, that bubble thing is AMAZING.

I got (3sqrt(3))/2 which is about 2.598. I'm probably wrong though….

37. Yury Rykov

That's how nature solves equations)

38. Tianshu Chu

Hello！I am recently writing my Math Essay about the motorway problem (for general cases) for three randomly-chose points. May I take some screenshot from this video and use some of your words as evidences in my Essay? I will carefully cite everything I used from this video. Please tell me wether I may do this. Thank you very much!!☆⌒(*＾-゜)v

39. Prince Benny

it's pretty obvious that is the minimum solution (knowing this solution already) but I was lead in the direction using only the lines that you showed (the two diagnols, and the 4 outer lines)

40. Rigor Mortis

very cool

41. hydorah

You found the solution in the solution (get it? Soapy water… It's a solution!) I'll get me coat

42. David M. Johnston

I want to tell you that you've largely contributed to me deciding to learn to speak English. It started out 3 to 4 years ago when I started watching Numberphile, back then I could barely keep up with the speed at which native speakers speak. And now, I'm practically fluent. So thanks for being so passionate about what you do, it's always a pleasure to watch your videos.

43. norich111

44. Mr. E

can someone write the calculations simply? all I see is text symbols of the shape but no method of how they gt there answer. thx

45. 625tvroom

I know James Grime is a fan of Johnny Ball's and I think this demonstration may have been largely inspired by him. On a BBC children's show way back, Johnny had the same pegs and soap bubble apparatus (only larger) and showed how the M1, M5 and M6 connect up in the same minimal way. (Sorry if this was already mentioned – I gave up before reading all 640+ comments :-))

46. Jesse Crotts

thats cool as shit

47. ChickenBird

By far my favourite math related video I have ever seen, a very practical and elegant solution to a seemingly simple problem. When you said that 2sq{2} was not the answer, I was extremely surprised. This video gave me a new perspective on solving problems and the integration of local minimums into finding the true solution. Thank you James 🙂

48. Abderrahmane Mihoub

brilliant

49. Qupid VOneOhOne

Very nice video. Now I'm curious why 120 degrees is the optimum solution.

50. Zachary Gregg

Damn, so cool. Problems that seem to have various solutions because local minima are always fascinating

51. Ashwin Mathur

You sir, just blew my mind
And I've seen a lot of these puzzles on YouTube but dayum , that was something truly awesome

52. J.J. Shank

I was saddened to find that this only applies in truly Euclidean coordinate systems, and not in simplified systems like Manhattan geometry. This relies on a 120-degree angle being a certain length, which can't happen in simplified systems where a Knight's Move is actually 2 or 3 units long.

53. Joseph Gonzalez

Well played good sir

54. lPandarenl

OMG YOU ARE SO COOOL!!! <3

55. James Filosa

So the reason why the solution of >6 towns isn't hexagonal (120°) is that in nature (e.g. honeycomb) there would always be some point within the outer ring of >6 points…?
In other words: the hexagon dictates the position of the steiner points, of which the connecting lines are a necessary outcome.

56. 43labontepetty

This is almost a basic fluid dynamics problem rather than math. lol

57. Louis M

Okay what is this soapy water sorcery?

58. Itzalex 13

could i have a shoutout plz

59. RCmies

Don't nitrogen atoms form bonds that are 120 degrees as well?

60. AnatoleH1

This guy… Doing maths with soapy water xD

61. David Vacarciuc

wtf this is blowing my mind

62. Jakub Turliński

1+ square root of 3 ~ 2.73 which is approximately 'e'

Coincindence? Perhaps

63. rangga

i'll bring soapy water to school 🙂

64. Gustav Carp

65. Tobi9012

There haven't been many things i saw in my life, that amazed me so hard like watching this video.
I would love to see that with the ,,cities" placed random (not in a square or regular triangle).

66. Dave Lordy

What's the solution for two towns ?

67. Neurotic Sos

That's so cool

68. Diego

hexagons, always create hexagons.

69. Doc hackenslash

Ha! My first thought was a Feynman diagram for electron interaction.

70. skotiskiller

This is beautiful

71. MalevolentDivinity

So, basically, hexagons are supreme.

72. Sachin Kumar

he explains everything in a wonderful and easy way…..😊

73. Gio Vidana

3:56 I enjoyed the label for the X-Axis

74. Simon Shugar

What's the optimal motorway for 7? Would it be in hexagonal form or would it be (almost) the perimeter?

75. Anton Rudacov

Great!

76. Edward Li

please show the soap solution for 8 point object now man, its the logical next step after showing us all this info

77. josem138

This is brilliant

78. BronzeJourney

Man you are awesome thanks.

79. Rosie Fay

Now I want to see you use your perspex and soapy water to solve the regular heptagon.

80. Sierra

Good job bro. Nice content

81. *Hannah M*

Okay… this is really awesome

82. MrTomaat23

4:44 mathgic

83. Сергей Волков

ho ly shit

84. Josh P

4:40 The Matrix confirmed.

85. Quantum

Cant it be inner diagonal like )(

86. Mariah Davis

This is still one of the coolest videos ever haha I love how simple the solution is when you apply it to physical phenomena. It’s crazy how our world is shaped inevitably by math 🙂

87. Samuel Urban

I also noticed that the optimal paths were seen in atomic structures and the explanation of local minimums is very familiar. Cool.

88. A Pathum Na

I like you

89. coryman125

Nobody's commenting on the brilliant labeling of the axis in the graph at 3:56 ?
I audibly laughed at that

90. NGC 7635

stop hacking

91. Anant Mishra

amazed :O

92. RUBBER BULLET

4:04 Be careful you don't end up as a recurring cutaway gag on HIGNFY.

93. vaibhav jain

Great video James!!

94. Looking In With Victor B

This is not a traffic solution though as it's highly condensed traffic

95. Devanand T ദേവാനന്ദ്

Sheldon Cooper's best video. 😛

96. Anastasis Sfyrides

wow ill teach this to my math students, they always ask me real life applications of math and i stumble upon finding an easy example every time

97. Blan Morrison

Why is no one else marvelling at the fact that the universe loves regular hexagons? Bees, soapy water, and optimization problems: all the same.

98. theboombody

As much as I don't like to resort to physics to solve a math problem, if it works, it works. Brilliant.

99. Rawand Ahmed

Who ever designed nature has surely God modded it!

100. Anastasiia Okonnikova

🤯