èƵ

Juggling by Numbers

By stripping juggling down to the bare essentials, mathematicians have devised spectacular patterns that no one had ever thought of

MATHEMATICS and music, it is said, often go together. Mathematicians are also reputed to be unusually good at chess. But there is a less well-known activity that also enjoys a time-honoured association with mathematics: juggling. Although the connection may seem tenuous at first sight, there has recently been a rush to apply mathematics to juggling, as mathematicians have come up with a clever way to invent new juggling patterns. Engineers have even managed to design a juggling robot.

“A good Christian must beware of mathematicians and soothsayers,” Saint Augustine wrote. In his time, around AD 400, the word “mathematician” meant astrologer, and juggling and fortune-telling have long existed side by side in fairgrounds and travelling show.”

The earliest recorded juggling mathematician (to use the word in its modern sense) was Abu Sahl, who juggled bottles in the markets of Baghdad in the 10th century. Abu Sahl’s modern counterpart is Ron Graham of AT&T Bell Laboratories in Murray Hill, New Jersey, who is both a proficient juggler and one of the prime movers in the current push to put jugglery on a mathematical footing.

The way that mathematics gets in on the act becomes clear if you analyse what juggling involves. A juggler tosses various items in a gravitational field so that they move along precise trajectories in a way that forms a pleasing pattern. The pattern is usually periodic, repeating the sequence of motions at regular intervals. So there are at least two mathematical aspects to juggling: the applied mathematics of moving objects, and the pure mathematics of periodic patterns.

The three commonest juggling patterns are the cascade, the fountain and the shower (see Diagram). The cascade is performed with an odd number of balls, usually three. The three balls are thrown alternately with the left and right hands, and travel in a figure-of-eight pattern. The cascade cannot easily be performed with an even number of balls, because they would tend to collide in mid-air. But with four balls, or a larger even number, you can perform the fountain. In this pattern, no ball ever changes hands. The third common pattern is the shower, in which a continuous stream of balls passes from right hand to left in a low arc and returns from left to right in a high arc.

3 basic Juggling patterns

At the International Jugglers’ Association convention in 1993, Anthony Gatto from Las Vegas took the record for a sustained cascade by juggling nine balls for more than 60 consecutive throws. Earlier this century the famous Italian juggler Enrico Rastelli managed 20 consecutive catches with a 10-baIl fountain. Several people have successfully juggled 11 or 12 rings. The record for chain saws, one imagines, would be considerably fewer.

The pure mathematics of juggling concerns itself only with the patterns of throws, ignoring detail such as the precise timings, the exact trajectories and even the objects being thrown. Some theoretically minded jugglers recently introduced an idea called “site swaps” to describe the patterns in a compact form. And last year, four mathematicians Graham, Joe Buhler of Reed College in Oregon, David Eisenbud of Brandeis University in Massachusetts and Colin Wright of the University of Liverpool – turned it into a mathematical theory.

It works like this. For simplicity, I will refer to the objects as balls, though they could just as easily be oranges, umbrellas, flaming torches or what you will. For convenience, we can assume that the balls are thrown at regular time intervals. By choosing suitable units we can represent these times using positive or negative whole numbers:

… -3, -2, -1, 0, 1, 2, 3, …

Here 0 is some arbitrary reference time. Positive numbers occur after that time and negative numbers before. The mathematical juggler throws balls forever, both in the past and into the future, but for many purposes all that matters is a short segment of the future. To reduce the possibilities, and to reflect common juggling practice, let’s assume that every ball is thrown repeatedly, and that only one ball is thrown at any given instant.

Now we are ready to have a stab at representing a juggling pattern as a sequence of numbers. In this notation, the numbers correspond to the times at which a given ball is thrown. For example, the three-ball cascade corresponds to the following sequences:

Ball 1: … −6, −3, 0, 3, 6, …

Ball 2: … −5, −2, 1, 4, 7, …

BalI 3: … −4, −1, 2, 5, 8, …

Here each sequence increases in steps of three. The four-ball fountain similarly corresponds to:

Ball 1: … −8, −4, 0, 4, 8, …

Ball 2: … −7, −3, 1, 5, 9, …

Ball 3: … −6, −2, 2, 6, 10, …

Ball 4: … −5, −1, 3, 7, 11, …

all increasing in steps of 4. A three-ball shower differs noticeably from the cascade, with sequences:

Ball 1: … −6, −5, 0, 1, 6, …

Ball 2: … −4, −3, 2, 3, 8, …

Ball 3: … −2, −1, 4, 5, 10, …

where the steps are alternately 1 and 5.

These lists are rather cumbersome, so Buhler and his colleagues prefer to strip the data down to something more manageable. The first step is to represent the sequence of throws as a diagram made up of a series of semicircles. Each one links the times at which a particular ball is thrown. The semicircles are there to guide the eye; they are not supposed to be a realistic representation of the motion of the balls, which is parabolic. The diagram (see Diagram) represents the three patterns already described. Because the pattern of throws is periodic in time, the corresponding diagram is periodic in space: the same sequences of semicircles repeat indefinitely.

4 complex juggling patterns

From these diagrams we can read off when each ball has to be thrown, how high it has to be thrown and whether it changes hands, given that successive points on the diagram always correspond to alternate hands. The throw height is another way of representing the time between successive throws of a particular ball – the longer the time the higher the throw. So in the diagram, it is represented by the diameter of the relevant semicircle. For example, a throw height of one unit corresponds to a low throw from one hand to the other. The mathematics permits throw heights as large as you like, but a real juggler can’t afford to wait indefinitely for balls to come back down, so in practice the throw height should be 10 or less.

But drawing diagrams like this is still rather clumsy and time-consuming. So the four mathematicians came up with a way to represent the patterns more compactly. First, start at time 0 and list the successive throw heights. For example, in the three-ball cascade every throw height is 3, so the list is 333333 … going on forever. The four-ball fountain is 444444 … The three-ball shower is almost as simple, with the sequence 151515 …

But there is a way to make things even simpler. Because the juggling patterns are periodic, each sequence is periodic too. The pattern also repeats backwards, so the pattern at negative times is determined by what happens from time 0 onwards. “Site swap” notation is what you get when you list just the basic repeated unit, like this:

3-ball cascade: 3

4-ball fountain: 4

3-ball shower: 15

In the last case, where the pattern involves more than one number, there are alternative notations depending on where you choose to start it. So the three-ball shower can equally be represented as 51.

Site swap notation is clearly a lot simpler than either the sequences of throw times or the diagram. Its advantage for jugglers is that it is an easy way to remember a wide range of patterns that look very impressive when performed. The advantage for mathematicians is that a neat, compact notation makes it easier to count or classify patterns.

You can unpack site swap notation to work out how the balls actually get thrown by drawing the corresponding diagram. For example, to unpack the exotic but jugglable pattern 566151 you draw the following semicircles:

diameter 5 from point 0

(to point 0 + 5 = 5)

diameter 6 from point 1

(to point 1 + 6 = 7)

diameter 6 from point 2

(to point 2 + 6 = 8)

diameter 1 from point 3

(to point 3 + 1 = 4)

diameter 5 from point 4

(to point 4 + 5 = 9)

diameter 1 from point 5

(to point 5 + 1 = 6)

and then repeat this pattern over and over again to left and right. Buhler and colleagues remark that the range of jugglable patterns produced by these methods “seems to be unlimited”, and list 20 examples: 234, 504, 345, 551, 40141, 561, 633, 55514, 7562, 7531, 566151, 561, 663, 771, 744, 753, 426, 459, 9559, 831.

If you want to try these patterns with real balls, you should bear in mind some practical conventions about the meaning of the throw heights 0, 1 and 2. Throw height 0 corresponds to an empty hand. Throw height 1 corresponds to a rapid shower pass from one hand to another that is thrown again immediately. Throw height 2 ought to mean a low throw from one hand to itself, but in practice the ball is usually held momentarily. There is no mathematical notation for dropping a ball. You should bear in mind that site swap patterns are notoriously difficult to juggle. Unlike simpler patterns, where you can focus your attention on a relatively small region of space, with site swap patterns it is often necessary to concentrate on what is happening on different height scales. In fact, according to Graham, many jugglers use computers to animate and analyse site swap sequences before trying to juggle them.

Because this notation is so compact, the answers to some reasonable questions are not immediately obvious. For example, how many balls do you need to throw a given pattern? It turns out that there is a simple rule: the number of balls is the average of the numbers in the site swap sequence. Thus 566151 requires (5 + 6 + 6 + 1 + 5 +1)/6 or four balls, as can be checked by looking at how the arcs in the diagram connect up.

Another important question is whether a particular sequence of numbers in site swap notation actually corresponds to a practical juggling pattern. Some sequences lead to sets of arcs that require the same hand to hold two balls at once, or to throw two balls at once. This time the test is slightly more complex. Again, consider 566151. This contains six numbers, so the period is 6. Add to these the values 0, 1, 2, 3, 4, 5 in turn to get 578496. If any of these numbers is 6 (the period) or greater, then subtract 6, getting 512430. If this is a permutation of 012345 (that is, if it consists of all six digits in some order, as it does here) then the pattern is theoretically jugglable. On the other hand, the superficially similar sequence 561651 leads to 573996 on adding 0, 1, 2, 3, 4, 5, which reduces to 513330 on subtracting surplus sixes, and this is not a permutation of 012345. Therefore 561651 violates the rules for juggling patterns, as can be checked by drawing the corresponding diagram.

You can also work the rule backwards to create patterns. For example, to find a pattern of period 5, choose some permutation of 01234, such as 43021. Now subtract the numbers 0, 1, 2, 3, 4 to get 4, 2, −2, −1, −3. Finally add the period (5 in this case) to anything that is negative, and you get 42342. You’ve found a new pattern, and because (4 + 2 + 3 + 4 + 2)/5 = 3 it requires three balls.

By applying techniques of combinatorics (how to count things) and number theory to site swap sequences, Buhler and colleagues were able to count the number of patterns with a given number of balls and with a given period. The simplest version of their result is that there are precisely bp patterns of period p with fewer than b balls. This formula is startlingly neat and tidy, and at least four other mathematicians have given different proofs that it holds. It explains why there are lots of patterns: for instance the number of patterns of period 5 with fewer than four balls is 45 = 1024.

Using standard results from number theory, Buhler and colleagues were then able to give a rather more complicated formula for the number of different patterns of period p with exactly b balls. For the record, it is 1/p times the sum over all factors d in the expression:

&mgr;(p/d)((b+1)d-bd).

Here &mgr; is the so-called Möbius function: &mgr;(n) = 0 if n has a repeated prime factor, 1 if n has an even number of distinct prime factors, and -1 if n has an odd number of distinct prime factors.

So much for the pure mathematics of juggling, now for the applied. Since 1989, the engineer Daniel Koditschek and colleagues at Yale University have done a great deal of theoretical and practical work on a juggling robot and they have discovered, amazingly, that their analysis leads rapidly into chaos theory. In its simplest form, the robot juggles a single flat puck that moves in two dimensions on an inclined plane. Juggling just one ball – a trivial task for humans – is a tricky number for robots. Yet this versatile machine can juggle two pucks.

The robot bats at the puck with a billiard cushion mounted on a pivoting bar. Information from sensors giving the position of the puck is fed to a computer program that repositions the bar for the next impact. The difficult part is finding an effective algorithm for this. The robot needs to look at where the puck is bouncing, and compare this with where the juggling patterns require it to be. If the puck is in the wrong place, the robot needs to determine if it should change the timing of its next hit or the strength.

In the mirror

Koditschek’s group came up with a technique known as a “mirror algorithm”. In this approach, the computer “reflects” the trajectory of the puck in the mathematical equivalent of a distorting mirror, to obtain a reference trajectory that is better suited to the robot’s task of controlling the puck. The program monitors the reference trajectory and the puck’s energy, and works out what corrections it should apply at the next impact in order to keep the puck on a periodic flight path. You do much the same when you toss a ball from hand to hand: your reference trajectory is your brain’s simplified internal model of the complex dynamics of projectile flight in the outside world. An extension of the mirror algorithm permits the robot to perform a kind of two-ball fountain, keeping one puck bouncing vertically above the righthand part of its bar, and another bouncing on the left part so that the pucks are batted alternately. This is 2 in site swap notation, and in this unusually simple case balls of throw height 2 are not held.

Chaotic states

Chaos theory comes into play because the behaviour of the robot and the pucks is governed by Newton’s laws of motion. The mathematical consequences of these laws include the possibility of steady states, in which the system does not change; periodic states, in which it repeats the same motions over and over again; and chaotic states, in which its motion becomes highly irregular. It has been known for some time that control systems can behave chaotically for a number of reasons, for instance if they are “over-driven” – which roughly means that they are compensating too soon for behaviour that has not yet occurred, or too late for behaviour that has long gone – or if their responses are subject to time delays. The result is that the entire system “thrashes”, spending nearly all of its time reacting to its own errors and very little time reacting to the reality it is supposed to be controlling.

The problem is not one of accuracy of information: measurements to more decimal places don’t help. The problem is to measure the right information at the right time, and to react at the right pace. An example from outside robotics is fisheries policy. Although governments collect accurate data on fish stocks, their decisions on fishing quotas are subject to lengthy political delays. By the time the quotas are set, the fish populations have changed. The result is fishing fleets sitting in port while the seas are full of fish, or fleets chasing paper fish where none actually exist. Tight controls combined with bad timing are a recipe for chaos.

It the case of the robot, the parameter that is increased is the “gain” in part of the control algorithm – the extent to which the difference between the desired position and the actual position of the bar is amplified in order to control the motor. The greater the gain, the more eager the robot is to correct the difference between where it is and where it thinks it ought to be. When it becomes over-eager, it displays a classic case of chaotic motion.

This is interesting, because robot juggling is a step on the road to robot garbage collectors, bricklayers, tennis players, underwater welders – in fact, the automation of any activity that involves control of free-moving objects. If robots are to be used for these purposes, it is important to understand exactly how eager you can afford to make them before they become incapable of performing their tasks. Partly, it depends what you want from the robot. A chaotic garbage collector would still be able to throw the garbage into the truck: it just wouldn’t do so at neat regular intervals, which would worry no one. But things wouldn’t be quite so rosy if a bricklaying robot went chaotic. There is still some way to go before you can hope to encounter a robot juggling bottles in a Baghdad market.

More from èƵ

Explore the latest news, articles and features