How to mathematically hang a picture (badly).

439,800
0
Published 2019-08-02
Watch Jade's original video on Tom Scott's channel "How Knot To Hang A Painting".
   • How Knot To Hang A Painting  

Jade's channel is over here:    / @upandatom  

And here's a whole bunch of Steve Mould for you to subscribe to: youtube.com/user/steventhebrave

Send in your solutions for hanging a picture badly! [email protected]

We have Think Maths resources for any teachers who want to use this as an activity in their class.
think-maths.co.uk/standupmaths-videos?yt-picture-h…

You can buy my book which has this puzzle in it:
mathsgear.co.uk/products/signed-paperback-things-t…

CORRECTIONS
- Nothing yet! Let me know if you spot anything.

Thanks as always for Jane Street being my principal sponsor.
www.janestreet.com/

Thanks to my Patreon supporters who help make these videos possible. Here is a random subset:

Facundo Gonçalves Borrega
Philippe von Bergen
Paulo Brito
Kevin Petrychyn
Magesh Jayapandian
Flynn Hembroff

Support my channel and I can make more maths videos:
www.patreon.com/standupmaths

Filming and editing by Trunkman Productions
Music by Howard Carter
Audio by Peter Doggart
Design by Simon Wright
And probably some stuff by Steve Mould

MATT PARKER: Stand-up Mathematician
Website: standupmaths.com/
Maths book: wwwh.umble-pi.com/
Nerdy maths toys: mathsgear.co.uk/

All Comments (21)
  • @ludicrousslim
    Q: "Why do I need to study math?" A: "Well, if you ever want to maximize points of failure..."
  • @sinom
    "We should thank Tom Scott eventhough he has done literally nothing" well. Thanks for nothing also is a phrase that exists.
  • @unvergebeneid
    Not only does this generalise to n hooks, it also answers the question "How long is a piece of string?" Turns out, very long if you use more than 2 hooks.
  • @ska4dragons
    : "I have generalized this problem mathematically " : Draws a minion.
  • @fghsgh
    Only when the standupmaths theme started playing I realized which channel I was watching.
  • @Ziirf
    0:00 Now you got me curious so i went on a spree to see if Steve ever makes contact to those pipes. and HAH I found it! On the video named "Why November is the most dangerous month for trains" at 2:32 he touches the red pipe, so it does exists!
  • The optimal solution for 4 hooks: ABA̅B̅CDC̅D̅BAB̅A̅DCD̅C̅ (16 loops). Not hard to work out and can be generalised. The generalised formula is: solution = x₁x₂⁻x₁⁻x₂ such that ⁻xᵤ cancels out xᵤ when concatenated (xᵤ⁻xᵤ = null). That is solved by writing xᵤ in reverse and inverting each letter. 1 hook: A 2 hooks: ABA̅B̅ (straightforward substitution for x₁x₂⁻x₁⁻x₂ where x₁=A, x₂=B) 3 hooks: ABA̅B̅CBAB̅A̅C̅ (x₁ = ABA̅B̅ and x₂ = C. ⁻x₁ must cancel out x₁, so is = BAB̅A̅ which is x₁ written backwards with each letter negated). 4 hooks: ABA̅B̅CDC̅D̅BAB̅A̅DCD̅C̅ (x₁ = ABA̅B̅ and x₂ = CDC̅D̅. This is the shortest solution another solution is x₁ = ABA̅B̅CBAB̅A̅C̅, x₂ = D) 5 hooks: ABA̅B̅CDC̅D̅EDCD̅C̅E̅BAB̅A̅ECDC̅D̅E̅DCD̅C̅ (x₁ = ABA̅B̅, x₂ = CDC̅D̅EDCD̅C̅E̅. Again this is the shortest solution, another solution is x₁ = ABA̅B̅CDC̅D̅BAB̅A̅DCD̅C̅, x₂ = E) And so on.
  • @OlegPolivanniy
    You just need to arrange hooks from the middle to sides, like 9, 7, 5, 3, 1, 2, 4, 6, 8, 10 to have final string shorter. Just because first hooks are being meet in algorithm more frequently. Also I think that the most suitable thread for this purpose is one of those used for fishing. They have some cords which flex not much and they designed to reduce friction
  • @Wouter10123
    Now ask James Grime if he can come up with a 4th different method!
  • Abstract: a commutator-based approach reduces the cost of the n-hook problem to quadratic, instead of exponential. Also, numerical investigation rules out non-commutator-based solutions for 3 hooks. This is further evidence against the possibility of non-commutator-based approaches. In this post, a "sequence" is a sequence of elements of the form "loop around a specific hook, clockwise (or counter-)". Letters (a, b, ...) indicate such elements. The order of a sequence is the number of hooks in the problem. The length of a sequence is the number of its elements. The inverse of an element "loop around hook x, with this orientation" is "loop around the same hook x, with opposite orientation". The inverse of a sequence is the sequence of the inverses of its elements, in inverse order. For example: "a b c" has inverse " (inverse c) (inverse b) (inverse a)". Notice that in this way a sequence cancels out with its inverse. A commutator, indicated as [a, b], is the sequence "a b (inverse a) (inverse b)". Notice that a commutator's length is 2*(length of a + length of b). Notice that erasing any element from a commutator makes everything else cancel out. This way it is possible to prove that any sequence constructed entirely of commutators will solve the hanging picture problem. Further notice: [[[a, b], c], d] has cost 22, while [[a, b], [c, d]] has cost 16. Nesting commutators is costly: a better result is achieved "flattening" the commutators. This improves enormously over Parker's method. For sequences of order 6: [[[[[a, b], c], d], e], f] costs 94. In general, for n elements, this costs 2^n + 2^(n-1) - 2. [ [[a, b], c] , [[d, e], f] ] costs 40. For 10 elements, as they want to do: Parker's method costs 1534, while [ [ [[a, b], c], [d, e] ] , [ [[f, g], h], [i, j] ] ] costs only 112. Nesting commutators this way is easy of you have a power of 2 amount of hooks. In this case, the cost for n=2^k hooks satisfies: Cost(k) = 4*Cost(k-1) This is because if n hooks produce a pattern, 2n hooks produce [pattern, pattern] i.e. the commutator of two distinct copies of the original pattern, with cost 4 times the original cost. This recurrence relation reduces to: Cost(k) = 4^k, and since n=2^k, k=log2(n): Cost = 4^(log2(n)) = n^2. This applies only for power-of-2 integers, but non-power-of-2 integers are easily bounded above by their next bigger power of 2. Credits to user mstmar for the idea of nesting commutators. For three hooks, the 10-long sequence found in the video is of minimal length - I checked all combinations via a script. (I can provide the ugly unoptimized python code upon request). This leads me to suspect that the commutator-based approach cannot be improved upon, except by rearranging the commutators. While there are many optimizations to be made, I think doing a search for n=4 is unfeasible without industrial-size compute, and unlikely to yield significant improvement. The size of any pattern of order power-of-2 is directly proportional to the size of the pattern of order 4 that underlies it, but the current order 4 pattern has length 16 and no significant improvement appears likely. Finally, for the real-life version of the problem that takes into account the real-world distance between hooks, further work may be required. Thank you for your attention.
  • @sobertillnoon
    Steve was incredibly whelmed by that gift. It was hilarious. Thanks guys. You're always great together.
  • Interestingly, there's a lovely acronym that explains exactly Matt's algorithm. DRII: Duplicate, Reflect / Reverse (makes abAB -> BAba), Inverse (makes abAB -> ABab), and Inject (makes abAB + baBA -> abABcbaBAC). DRII can be expanded to the nth integer term, which I think is really interesting.
  • @Jkirek_
    You don't actually have a face? No I add it in post every time Face disappears "It's very convincing"
  • @MrTheharshit
    I love it when YouTubers I watch reference other YouTubers I watch guest starring on a YouTube channel I watch
  • @derwolf7810
    16:49 "So the challenge is for some large number of hooks, what's a really short way of doing it." Challenge accepted: My suggestion to extend from n to n+1 hooks would be that: 0) Use solution for n hooks 1) search first least used character x (y is the successor of x in natural order == A < B < C...) 2) Shift every bigger character (in natural order) by 1 3) Replace first letter used least with solution for two hooks x and y From 2 to 3 hooks: 0) use: A B A̅ B̅ 1) x = A, y = B 2) shift => A C A̅ C̅ 3) replace A with A B A̅ B̅ and A̅ with B A B̅ A̅ => A B A̅ B̅ C B A B̅ A̅ C̅ length: 10 cord length: 10 From 3 to 4 hooks: 0) use: A B A̅ B̅ C B A B̅ A̅ C̅ 1) x = C, y = D 2) shift => A C A̅ C̅ 3) replace C with C D C̅ D̅ and C̅ with D C D̅ C̅ => A B A̅ B̅ C D C̅ D̅ B A B̅ A̅ D C D̅ C̅ length: 16 cord length: 18 From 4 to 5 hooks: 0) use: A B A̅ B̅ C D C̅ D̅ B A B̅ A̅ D C D̅ C̅ 1) x = A, y = B 2) shift => A C A̅ C̅ D E D̅ E̅ C A C̅ A̅ E D E̅ D̅ 3) replace A with A B A̅ B̅ and A̅ with B A B̅ A̅ => A B A̅ B̅ C B A B̅ A̅ C̅ D E D̅ E̅ C A B A̅ B̅ C̅ B A B̅ A̅ E D E̅ D̅ length: 28 cord length: 33 Similar from 5 to 10 hooks (use solution for 5 hooks and insert solution for 2 hooks; imlicit shifting using appropriate letters) use: A B A̅ B̅ C B A B̅ A̅ C̅ D E D̅ E̅ C A B A̅ B̅ C̅ B A B̅ A̅ E D E̅ D̅ replace E with I J I̅ J̅ and E̅ with J I J̅ I̅ => A B A̅ B̅ C B A B̅ A̅ C̅ D I J I̅ J̅ D̅ J I J̅ I̅ C A B A̅ B̅ C̅ B A B̅ A̅ I J I̅ J̅ D J I J̅ I̅ D̅ replace D with G H G̅ H̅ and D̅ with H G H̅ G̅ => A B A̅ B̅ C B A B̅ A̅ C̅ G H G̅ H̅ I J I̅ J̅ H G H̅ G̅ J I J̅ I̅ C A B A̅ B̅ C̅ B A B̅ A̅ I J I̅ J̅ G H G̅ H̅ J I J̅ I̅ H G H̅ G̅ replace C with E F E̅ F̅ and C̅ with F E F̅ E̅ => A B A̅ B̅ E F E̅ F̅ B A B̅ A̅ F E F̅ E̅ G H G̅ H̅ I J I̅ J̅ H G H̅ G̅ J I J̅ I̅ E F E̅ F̅ A B A̅ B̅ F E F̅ E̅ B A B̅ A̅ I J I̅ J̅ G H G̅ H̅ J I J̅ I̅ H G H̅ G̅ replace B with C D C̅ D̅ and B̅ with D C D̅ C̅ => A C D C̅ D̅ A̅ D C D̅ C̅ E F E̅ F̅ C D C̅ D̅ A D C D̅ C̅ A̅ F E F̅ E̅ G H G̅ H̅ I J I̅ J̅ H G H̅ G̅ J I J̅ I̅ E F E̅ F̅ A C D C̅ D̅ A̅ D C D̅ C̅ F E F̅ E̅ C D C̅ D̅ A D C D̅ C̅ A̅ I J I̅ J̅ G H G̅ H̅ J I J̅ I̅ H G H̅ G̅ replace A with A B A̅ B̅ and A̅ with B A B̅ A̅ => A B A̅ B̅ C D C̅ D̅ B A B̅ A̅ D C D̅ C̅ E F E̅ F̅ C D C̅ D̅ A B A̅ B̅ D C D̅ C̅ B A B̅ A̅ F E F̅ E̅ G H G̅ H̅ I J I̅ J̅ H G H̅ G̅ J I J̅ I̅ E F E̅ F̅ A B A̅ B̅ C D C̅ D̅ B A B̅ A̅ D C D̅ C̅ F E F̅ E̅ C D C̅ D̅ A B A̅ B̅ D C D̅ C̅ B A B̅ A̅ I J I̅ J̅ G H G̅ H̅ J I J̅ I̅ H G H̅ G̅ length: 112 (= 28 * 4) cord length: 154 I hope, there are no flaws... Edit: just noticed, i posted the length of the rule (in letters) instead that of the cord, so i added the cord length too. Hopefully that's not irritating.
  • @mstmar
    I found a way to get shorter sequences. I'm sure it's not optimal, but at least better than the one presented. My approach does xyXY where x and y are solutions for smaller problems and capitals are inverses. your approach is a special case of mine where x contains all hooks but one and y is the last hook. my approach checks all combinations of x and y to find the best partition of hooks that gives the lowest length. an example for n = 4 can split its hooks 1/3 or 2/2. The 1/3 case gives your solution to n = 4 and the 2/2 case is abAB cdCD baBA dcDC, length 16 vs 22, so 2/2 split is chosen. I'm pretty sure that having balanced hooks (or 1 off for odd n's) gives the smallest length (for this approach anyways). however, for n=6 you can get a length of 40 in 2 ways (3/3 split or 2/4 split). so for big n's, there might be a better split than even. an other advantage of this approach is that you stay localized the same half of hooks for each 1/4, most likely saving even more rope (in addition to needing less loops), compared to jumping to the end and back every 4 loops. this approach lowers the n=10 that you wanted to attempt from 1534 loops to 112, a much more manageable feat. oddly, n = 10 also has 2 ways of getting to 112 loops: 5/5 or 4/6. It also would have saved the 5 people on the stage a little trouble too, as it would only have taken 28 loops instead of the 46. Could have even added a 6th person with a similar tangle (40 loops).
  • @coffeeandproofs
    There's a nice topological way to view this. You're looking at the fundamental group of the plane with n-many holes and discussing what elements of the group, when projected onto the plane with (n-1)-many holes, return the trivial element of the group. To be more precise, the fundamental group of the plane (or, homotopically equivalent, the n-petal graph), is the free group generated by n-many variables. Consider then the projection map, say, called P_i, from F(x_1, x_2, ..., x_n) to F(x_1, x_2, ..., x_(i-1), x_(i+1), ..., x_n). This is a group homomorphism, and its kernel is the subgroup generated by g^m * x_i^n * g^(-m), for g in F(x_1, x_2, ..., x_(i-1), x_(i+1), ..., x_n). The problem you're asking about in the video, or just the general problem, is finding elements of the intersection of the kernels of all the project maps P_i. I gave this a shot and came up with the same answer found in the video, i.e. a middle element serving as a barrier between a string of mirrored inverses on each side.