# Siteswaps, State Diagrams, and New Ideas

Charlie Dancey submitted these notes on siteswaps and state diagrams, based on Martin Probert's work, to the net in April of 1995.

## Introduction

I recently picked up a copy of Martin Probert's new book, "Four Ball Juggling" which I have posted a note about here already. I was intrigued by some of the stuff in the appendix which I showed to Colin Wright, he looked at one of Martin's diagrams and said "Oh yes, that's an *adjacency matrix*". Thanks for that Colin:-) Let me tell you what this actually means...

The first thing to understand is the concept the idea of 'landing schedules' or 'states' in a juggling pattern. You'll find a good explanation of this in 'Siteswap FAQ' (see juggling help pages). Briefly, the idea is that at any moment of time in a juggling pattern there are a queue of balls waiting to be caught and thrown again. The hands take it in turns to deal with the ball at the front of the queue and *usually* they throw it to the back of the queue.

A the queue of balls in a three ball cascade can be represented as:

```- - - A B C
```

The dashes on the left are spaces at the back of the queue. A, B and C are the three balls, C is about to be caught, then it get's thrown to the end of the queue and everybody moves down a space:

```- - - C A B
```

Moving 'C' three spaces to the left is the equivalent of throwing a 3 in SiteSwap notation. You can make other throws if you wish, for example, what happens if we throw a 5 from the cascade?

```- B - - C A
```

That's what happens, you end up with a queue with two spaces in it. It's the spaces in the queue that tell you what throws are possible at any given moment. Every time a ball reaches the end of the queue the juggler has to decide where to put it, and they can put it into any of the spaces in the queue, always remembering that there are an infinity of spaces at the back of the queue.

## A Step Further with Martin Probert

Ok, now Martin Probert takes this a stage further in his book and shows how you can represent each possible 'state' or 'landing schedule' of a pattern as a single number. This piece of trickery is done simply by taking your landing schedule:

```- B - - C A
```

..and writing it as a binary number, wherever there is a ball you write a '1' and wherever there isn't you write a '0'. Thus you end up with 010011 to represent the situation right after you toss a 5 in a three ball cascade and 000111 for the normal cascade. Now, just like ordinary numbers, the zeros to the left are not significant, but I like to write them in anyway.

Then Martin does something rather silly, he turns the binary number back into a decimal number, which seems pretty pointless to me because I don't see the value in talking about a pattern changing from state 7 to state 19 when you throw a 5. It's much clearer to say it changes from 111 to 10011.

Never mind about that, what Martin then does is to draw a series of diagrams that show how you can move from one possible state of a juggling pattern to another. These diagrams are what Colin called 'adjacency matrices', Martin calls them 'State Tables'

Here's the State Table for three balls up to height 5 using Martin's rather opaque *decimal* numbers instead of binary numbers:

```28              .  .  .  .  .  .  .  5  .  X
26              .  .  .  .  .  5  .  .  X  .
25              .  .  .  .  5  .  .  X  .  .
22              .  .  5  .  .  .  X  .  .  .
21              .  5  .  .  .  X  .  .  .  .
19              5  .  .  .  X  .  .  .  .  .
14              .  .  4  X  .  3  .  2  .  0
13              .  4  X  .  3  .  .  1  0  .
11              4  X  .  .  2  1  0  .  .  .
7               3  2  1  0  .  .  .  .  .  .

7  11 13 14 19 21 22 25 26 28
```

Here's how it works. In normal three ball juggling you are in state 7 (binary 111) and this is represented by the first column of the diagram. There are three throws marked on the diagram in this column, the 3 at bottom left, the 4 above it and the 5 above that. The position of these numbers in the diagram shows what happens if you make one of these throws, reading off we find that throwing a three keeps us in state 7 (binary 111), a 4 takes us to state 11 (binary 1011) and a 5 takes us to state 19 (binary 1011).

So what are the 'X's? Glad you asked. They are to help you find your way around the diagram, that's all. Say you start at the bottom left and throw a 5:

```28              .  .  .  .  .  .  .  5  .  X
26              .  .  .  .  .  5  .  .  X  .
25              .  .  .  .  5  .  .  X  .  .
22              .  .  5  .  .  .  X  .  .  .
21              .  5  .  .  .  X  .  .  .  .
19              5 ->  -> -> X  .  .  .  .  .
14              ^  .  4  X  .  3  .  2  .  0
13              |  4  X  .  3  .  .  1  0  .
11              |  X  .  .  2  1  0  .  .  .
7               3  2  1  0  .  .  .  .  .  .

7  11 13 14 19 21 22 25 26 28
```

...you go to state 19, now if you follow the row horizontally till you hit the 'X' you'll find yourself in column 19, which offers you the throws 5, 3 and 2, we'll take a 5 again...

```28              .  .  .  .  .  .  .  5  .  X
26              .  .  .  .  .  5  .  .  X  .
25              .  .  .  .  5  -> -> X  .  .
22              .  .  5  .  ^  .  X  .  .  .
21              .  5  .  .  |  X  .  .  .  .
19              5 ->  -> -> X  .  .  .  .  .
14              ^  .  4  X  .  3  .  2  .  0
13              |  4  X  .  3  .  .  1  0  .
11              |  X  .  .  2  1  0  .  .  .
7               3  2  1  0  .  .  .  .  .  .

7  11 13 14 19 21 22 25 26 28
```

..now we are in state 25 (binary 11001), we'll throw another 5..

```28              .  .  .  .  .  .  .  5 ->  X
26              .  .  .  .  .  5  .  |  X  .
25              .  .  .  .  5  -> -> X  .  .
22              .  .  5  .  ^  .  X  .  .  .
21              .  5  .  .  |  X  .  .  .  .
19              5 -> -> -> X  .  .  .  .  .
14              ^  .  4  X  .  3  .  2  .  0
13              |  4  X  .  3  .  .  1  0  .
11              |  X  .  .  2  1  0  .  .  .
7               3  2  1  0  .  .  .  .  .  .

7  11 13 14 19 21 22 25 26 28
```

..this puts us in state 28 (binary 11100). There is now now ball to catch so we have to throw a 0 (SiteSwap's way of saying do nothing) which, if you follow the chart will take you to state 14, binary 1110. Once again there is no ball to catch and we have to 'throw' a 0 taking us to state 7. Back where we started!

```28              .  .  .  .  .  .  .  5 ->  X
26              .  .  .  .  .  5  .  |  X  |
25              .  .  .  .  5  -> -> X  .  |
22              .  .  5  .  ^  .  X  .  .  |
21              .  5  .  .  |  X  .  .  .  |
19              5 ->  -> -> X  .  .  .  .  v
14              ^  .  4  X  <-  <-  <-  <- 0
13              |  4  X  |  3  .  .  1  0  .
11              |  X  .  v  2  1  0  .  .  .
7               3  <- <- 0  .  .  .  .  .  .

7  11 13 14 19 21 22 25 26 28
```

That whole sequence ...55500... was a three ball flash. You'll find all the other well known Siteswap 'routes' in the diagram, like 531, 441 and so on.

Martin Probert's book contains several different state tables for different numbers of balls, the largest is a state table for seven balls, up to height 9.

## A Step Further with Charlie Dancey

I was knocked out when I saw this (I think I had the third copy of his book to be sold) but I found the scheme to be a little too opaque (I *hate* those decimal numbers, binary is so much easier because it *looks* right) so I tried an extension to the idea. Why not write *every* possible state of the queue instead of limiting oneself to working with a certain number of balls.

I labelled the rows and columns of a graph with the binary numbers starting from zero (00000, 00001, 000010, 000011, 000100 and so on) and started to fill in the possible throws for each state, here's a section of the graph that you get...

```1111 .  .  .  .  .  .  .  .  .  .  .  .  .  .  +  4
1110 .  .  .  .  .  .  .  .  .  .  .  .  .  4  X -
1101 .  .  .  .  .  .  .  .  .  .  .  4  +  X  .  .
1100 .  .  .  .  .  .  .  .  .  4  .  .  X  -  .  .
1011 .  .  .  .  .  .  .  4  .  .  +  X  .  .  .  .
1010 .  .  .  .  .  4  .  .  .  .  X  -  .  .  .  .
1001 .  .  .  4  .  .  .  .  +  X  .  .  .  .  .  .
1000 .  4  .  .  .  .  .  .  X  -  .  .  .  .  .  .
0111 .  .  .  .  .  .  +  3  .  .  .  2  .  1  0  .
0110 .  .  .  .  .  3  X  -  .  2  .  .  0  .  .  .
0101 .  .  .  3  +  X  .  .  .  1  0  .  .  .  .  .
0100 .  3  .  .  X  -  .  .  0  .  .  .  .  .  .  .
0011 .  .  +  2  .  1  0  .  .  .  .  .  .  .  .  .
0010 .  2  X  -  0  .  .  .  .  .  .  .  .  .  .  .
0001 +  1  0  .  .  .  .  .  .  .  .  .  .  .  .  .
0000 0  -  .  .  .  .  .  .  .  .  .  .  .  .  .  .

0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  (NOTE: the column headings
0  0  1  1  0  0  1  1  0  0  1  1  0  0  1  1   read from bottom to top here)
0  0  0  0  1  1  1  1  0  0  0  0  1  1  1  1
0  0  0  0  0  0  0  0  1  1  1  1  1  1  1  1
```

..you can't fail to notice the pretty patterns that are starting to emerge! I've also added plus and minus symbols to the chart to represent pickups and drops, which I think is something new to SiteSwap technology. Imagine that you start with no balls at all (0000 binary) and you pick up a ball, this puts you in state 0001 binary. The symbol '+' in the bottom left of the chart represents this. Similarly if you have one ball and you drop it (moving from 0001 to 0000) this is described by the '-' in the bottom left.

Here's the route a juggler takes through the chart if they start with a three ball cascade and then drop a ball..

```1111 .  .  .  .  .  .  .  .  .  .  .  .  .  .  +  4
1110 .  .  .  .  .  .  .  .  .  .  .  .  .  4  X -
1101 .  .  .  .  .  .  .  .  .  .  .  4  +  X  .  .
1100 .  .  .  .  .  .  .  .  .  4  .  .  X  -  .  .
1011 .  .  .  .  .  .  .  4  .  .  +  X  .  .  .  .
1010 .  .  .  .  .  4  .  .  .  .  X  -  .  .  .  .
1001 .  .  .  4  .  .  .  .  +  X  .  .  .  .  .  .
1000 .  4  .  .  .  .  .  .  X  -  .  .  .  .  .  .
0111 .  .  .  .  .  .  +  3  .  .  .  2  .  1  0  .
0110 .  .  .  .  .  3  X<--  .  2  .  .  0  .  .  .
0101 .  .  .  3  +  X  |  .  .  1  0  .  .  .  .  .
0100 .  3  .  .  X  -  v  .  0  .  .  .  .  .  .  .
0011 .  .  +  2<-----  0  .  .  .  .  .  .  .  .  .
0010 .  2  X  -  0  .  .  .  .  .  .  .  .  .  .  .
0001 +  1  0  .  .  .  .  .  .  .  .  .  .  .  .  .
0000 0  -  .  .  .  .  .  .  .  .  .  .  .  .  .  .

0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  (NOTE: the column headings
0  0  1  1  0  0  1  1  0  0  1  1  0  0  1  1   read from bottom to top here)
0  0  0  0  1  1  1  1  0  0  0  0  1  1  1  1
0  0  0  0  0  0  0  0  1  1  1  1  1  1  1  1
```

...they end up juggling 2's (i.e. holding the two remaining balls).

You'll find that by tracing routes around the diagram you can do pretty much anything involving pickups, drops and juggles with up to four balls, using the throws 0, 1, 2, 3 and 4 as well as the new symbols '+' and '-' for pickup and drop.

If you want to work with larger throws or larger numbers of objects then you'll need a bigger chart. On my desk here I have a chart that goes up to binary 1111111, everything up to 7's and it's very informative to look at. For practical reasons I have not included it here but you won't find it too difficult to make your own.

It's in the nature of this sort of thing that other people have probably come up with the same ideas, though I haven't come across them yet, maybe this time *I* get to publish something first? :-)

## References

"Four Ball Juggling" by Martin Probert. Available direct from the author.

Siteswaps, State Diagrams, and New Ideas / Juggling Information Service / help@juggling.org
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}