Feel The Glove

By Matt Baker - Tuesday, May 11, 2021


I was originally planning to perform the following routine at Atlanta’s “Mathapalooza” festival in March 2020, but quickly realized that, since it involves nine different volunteers coming onstage and holding hands, it’s one of the least COVID-friendly magic tricks ever created. (Not surprisingly, the whole festival ended up being canceled.)

In honor of the sense of optimism being generated by the coronavirus vaccines (which are unfortunately rolling out much quicker in wealthy countries like mine than in many other parts of the world), I’m pleased to bring you the first-ever Mathemagical Themas blog post devoted to a stage trick!

The following routine was created by the brilliant Dan Harlan, and I’m sharing it with his permission. Both the idea behind the routine and the presentation below are due to Dan; the only thing I’ve added is a mathematical analysis of the trick, which turns out to be closely related to a famous discovery by the great Swiss mathematician Leonhard Euler.

Effect

The performer comes onstage wearing black gloves and carrying a mesh laundry bag filled with rolled-up pairs of mismatched colored gloves.

I went to a seminar on diversity and communication where they have you put on a pair of mismatched gloves at the door and then you only get to interact with people wearing a glove that matches one of yours. So, you'd have two different colors, like red and yellow, and if you wanted to talk to someone who only had blue and green you'd have to find another person who had one of your colors and one of their colors and that person would send your messages back and forth. Turns out it was a fun way to meet people and I think we learned a lesson about something.

Anyway, I thought we'd try a super-quick dance party version of it right now. If I ask you to join me on stage, grab any pair of gloves you'd like and form a line.” (Dan plays the song "Power Glove" by Knife Party as nine participants are invited to come onstage and take a pair of gloves.)

Now, you're all going to dance around and find someone wearing the same color glove as you and grab their hand and keep dancing until you form a single line, like a chain of human dominoes. Remember, you can grab any hand the same color as yours. Like YOU could grab HIS, or HERS, or HERS with this hand, or HIS or HERS with your other hand, and so on. Ready? Here we go!

The music resumes, and the participants move around the stage holding, releasing, and re-holding hands until they've formed a single unbroken chain. The music fades.

No one could have known what gloves each of you would choose and which hands you'd decide to hold to create this diverse and beautiful arrangement, beginning with yellow over here and eventually ending with green over there. No one could have known that those two colors would be left without a hand to hold… Well, no one except me, of course.

The performer removes the black gloves he’s wearing and reveals that underneath are two colored gloves: one yellow and one green.

Materials and preparation

You will need a mesh laundry bag, ten pairs of colored gloves (four each of five different colors, e.g., green, yellow, pink, blue, and purple), two large black gloves which fit over the colored gloves, and a boom box (or whatever the kids these days call those mp3-playing things).

The most inexpensive and least labor-intensive way I know to make the colored gloves is to buy a 12-pack of white cotton gloves (for example these) and a tie-dye kit (for example this one), and then pay an enthusiastic kid five bucks to tie-dye them for you.

Pair up the gloves as follows: for the magician, yellow-green, and for the participants: yellow-pink, yellow-blue, yellow-purple, pink-green, pink-blue, pink-purple, green-blue, green-purple, and blue-purple. (So altogether, you have exactly one of each of the ten possible multicolor combinations.)

In 1736, the Swiss-born Leonhard Euler (pronounced ‘Oiler’) — one of the greatest and most prolific mathematicians of all time — was living in St. Petersburg, Russia. In the nearby city of Königsberg (located in Prussia), the Pregel River divided the city and two islands in the middle of the river into four distinct regions. There were seven bridges connecting these four regions to one another, like this:

bridges

The Seven Bridges of Königsberg by Bogdan Giusca - Public domain (PD), based on the image, CC BY-SA 3.0

Since cat videos on YouTube had not yet been invented, the residents of Königsberg often found themselves with nothing to do, so they naturally started wondering whether one could stroll through the city and cross each of the seven bridges exactly once. Euler settled the question in the negative, proving that the task was impossible.

What’s particularly notable about Euler’s solution is not that he solved this particular problem, but that he abstracted it into an idealized form and thereby solved an infinite number of problems in one fell swoop! And in doing so, he more or less gave birth to the subject of graph theory, which is now a flourishing branch of mathematical research with applications to internet search engines, genomics, and thousands of other things.

Euler’s solution

Euler’s idea was to represent the different land masses—the two banks of the river and the two islands—as vertices in a graph, and the bridges as edges between them, like this:

Eular's Solution

And then, removing the land masses and river and keeping just the abstract graph:

ALT TAG

The “Bridges of Königsberg Graph”, Source: https://towardsdatascience.com/graph-theory-and-data-science-ec95fe2f31d8

The original problem, Euler realized, is thus equivalent to the following abstract problem about graphs:

In the “Bridges of Königsberg Graph”, is it possible to trace a (continuous) path which traverses each of the seven edges exactly once?

The advantage of generalizing the problem in this way is that one can formulate a similar question for any graph. And Euler, being the genius that he was, realized that there was a simple criterion for determining the answer no matter which graph one looks at. (For the experts, we’ll assume in this post that our graphs have only finitely many vertices and edges.)

To explain Euler’s result, we need to introduce a bit of terminology. A vertex in a graph is called even or odd, respectively, according to whether it is adjacent to an even or odd number of edges. For example, in the Bridges of Konigsberg graph all four vertices are odd.

Also, a graph is called connected if there is at least one path from any vertex to any other vertex.

Euler’s Theorem: Given a connected graph, there is at least one path which traverses each edge in the graph exactly once if and only if there are either zero or two odd vertices in the graph. In the latter case, each such path must start at one of the odd vertices and end at the other one.

Nowadays, we call a path which traverses each edge exactly once an Eulerian path. In the Bridges of Königsberg Graph, there are three odd vertices and so no Eulerian path can exist. Which is precisely what Euler told the bored itinerant residents of Königsberg.

What the hell does this have to do with Dan Harlan’s glove trick?

Well, consider the following graph (a pentagram with a missing edge):

ALT TAG

Since there are exactly two odd vertices, Euler’s Theorem tells us that there is at least one path traversing each of the 9 edges exactly once. In fact there are many such paths, for example B -> A -> E -> D -> C -> E -> B -> D -> A -> C or C -> A -> D -> B -> E -> C -> D -> E -> A -> B. Euler’s Theorem also tells us that any such path must either start at B and end at C, or start at C and end at B.

Now suppose that instead of being labeled A, B, C, D, and E, the vertices of our graph are labeled Blue, Yellow, Green, Pink, and Purple. The five vertices represent the five glove colors, the nine edges represent the nine mismatched pairs which get handed out to the participants, and the ‘missing edge’ corresponds to the performer’s gloves. The key observation is:

When the participants on stage form a human chain, they are effectively tracing out an Eulerian path in our graph!

For example, the Eulerian path B -> A -> E -> D -> C -> E -> B -> D -> A -> C which we mentioned before corresponds (under the color coding mentioned above) to Yellow -> Blue -> Purple -> Pink -> Green -> Purple -> Yellow -> Pink -> Blue -> Green. This represents a situation where the person wearing yellow and blue gloves holds hands with the person wearing blue and purple gloves, who holds hands with the person wearing purple and pink gloves, etc. At the end of the chain is the person wearing blue and green gloves, and the two free hands are yellow (corresponding to vertex B) and green (corresponding to vertex C).

No matter how the spectators line up, the free hands will always correspond to colors B and C, i.e., to the ‘missing edge’ in the pentagram—the magician’s prediction.

The revolutionary thing about Euler’s discovery is that his reasoning applies not only to the Bridges of Königsberg but to many, many other real-life situations—including the glove trick! The magical power of graph theory lies in the interplay between abstract principles and concrete applications.

Variations and a counterexample

In corresponding with Dan Harlan about the glove trick, he mentioned to me that he now performs the routine with the 18 gloves loose and unpaired in the mesh bag. He says to the audience, “If I ask you to join me on stage, grab any two gloves you'd like, as long as they're not the same color, and form a line.

Dan claimed that this would always work, but in thinking about it I realized this isn’t quite true. For example, suppose that four of the participants each grab a pink-purple pair, one grabs a yellow-green pair, two grab blue-yellow pairs, and two grab blue-green pairs. Then there will in fact be no way for them to form a continuous human chain! That’s because the following graph, which represents this distribution of gloves, is disconnected:

ALT TAG

However, with very high probability the trick will indeed work under these conditions. That’s because, by assumption, our graph will always have 3 even vertices (A, D, and E) and 2 odd vertices (B and C), and a random graph with 5 vertices and 9 edges is highly likely to be connected. So the same reasoning we applied before, using Euler’s Theorem, shows that the trick will work as intended.

Of course, one can design numerous variations of the basic effect, changing the number of gloves of each color and the number of participants involved. By Euler’s Theorem, the trick will work if and only if the resulting graph is connected and has exactly two odd vertices. For example, if we assemble 9 pairs of gloves according to the following graph, the trick will also work and the unpaired colors at the end of the trick will always be B and C:

ALT TAG

References

  1. The magic trick described in this post appears, with a somewhat different presentation, as the routine “Mind Your Hands” on Dan Harlan’s DVD “Pack Small, Play Big: Mentalism Show”. He now uses the presentation described here and calls the routine “Feel the Glove”.
  2. For a proof of Euler’s theorem, see for example these notes or these slides.
  3. For additional history and context surrounding the Bridges of Königsberg problem, see for example https://www.maa.org/press/periodicals/convergence/leonard-eulers-solution-to-the-konigsberg-bridge-problem or this Wikipedia page.
  4. There is a landscaped rendition of the Seven Bridges of Königsberg on the campus of Georgia Tech, where I teach mathematics.

Reader comments:

Per

Wednesday, 12 May 2021 02:27 AM - Reply to this comment

Nice application of the Euler theorem!
But I find it odd that vertex A in the Bridges of Königsberg Graph is even.
/Per S

Matt

Wednesday, 12 May 2021 12:16 PM - Reply to this comment

Per, thank you for catching that error! It's been fixed now.

Matt

Thursday, 13 May 2021 02:33 AM - Reply to this comment

Derrick Chung pointed out to me that Dan Harlan's "Feel the Glove" is closely related to "The Break in the Chain", from Martin Gardner's book "Mathematics, Magic & Mystery" (p. 47). That trick is done with dominoes, but the method is essentially the same.

Tony

Thursday, 13 May 2021 19:13 PM - Reply to this comment

Lovely! The outcome did seem obvious to me, but then I'm giving a paper this weekend which begins with the Bridges of Konigsberg. A nice trick, beautifully explained

Max

Thursday, 13 May 2021 19:41 PM - Reply to this comment

The domino prediction long predates Martin Gardner’s 1956 book. It can be found at least as far back as Hoffmann’s Modern Magic, 1876.

Leave a comment

Log in or sign up to post a comment about Feel The Glove.


Back to blog homepage

Similar posts on the blog:

What Day Is It?

What Day Is It?

Matt Baker - Wednesday, March 10, 2021

Category: Mathemagical Themas


Read more

Mathe-match-ics

Mathe-match-ics

Matt Baker - Wednesday, February 10, 2021

Category: Mathemagical Themas


Read more

The Omega Bet

The Omega Bet

Matt Baker - Wednesday, January 13, 2021

Category: Mathemagical Themas


Read more