Menu Close

What kind of a name is Siteswap?

Colonel: “Just what … kind of a name is Popinjay anyway?”
“It’s Popinjay’s name, sir,” Lieutenant Scheisskopf explained.

~ Catch 22, by Joseph Heller.

The etymology of “siteswap”[1] has a little more going for it than Lieutenant Scheisskopf’s insightful explanation of Popinjay’s name. This juggling notation also goes by the name of “Cambridge notation”. There should probably be a third name as well, considering that three separate inventors/groups are credited with independently conceiving this notation around the same time in the 1980’s[2]. The name “Cambridge notation” comes from one of places where it was conceived. However, the name “siteswap notation” seems to have stuck.

The “siteswap operation”

The notation takes its name from a particular way of generating new juggling sequences from known ones[3]. I will use vanilla siteswaps[4] to illustrate this concept but it is applicable to other extensions of the siteswap notation which can handle multiplex throws, synchronous throws and even the Multi-Hand Notation (MHN).

Given a valid siteswap sequence of period P, “T0 T1 T2 … Tm … Tn … TP-2 TP-1“, we can perform a siteswap between any two numbers in positions (sites) m and n (m < n), i.e., between Tm and Tn, by replacing Tm with (Tn+(n-m)) and by replacing Tn with (Tm-(n-m)).

For example, let us consider the siteswap “4 2 3” of period P = 3. Then,

T0 = 4, T1 = 2 and T2 = 3.

Let’s say we want to perform a siteswap between the two numbers at sites 0 and 2, i.e.,

m = 0, so Tm = T0 = 4.
n = 2, so Tn = T2 = 3.
Tm = T0 needs to be replaced by (Tn+(n-m)) = (T2+(2-0)) = (3+2) = 5.
Tn = T2 needs to be replaced by (Tm-(n-m)) = (T0-(2-0)) = (4-2) = 2.
T1 = 2 remains unchanged.

So the new sequence is “5 2 2”.

What the siteswap operation achieves is an exchange of the beats (sites) at which the object(s) being thrown at beats m and n will be thrown next.

Table 1: “Next throw sites” for objects of sequence “4 2 3”
Current Throw Site 0 1 2
Siteswap Number 4 2 3
Object thrown A B C
Next Throw Site (current throw site + siteswap number) 0+4 = 4 1+2 = 3 2+3 = 5

Table 1 shows the “next throw sites” for objects A, B and C thrown as per the siteswap “4 2 3” at sites 0, 1 and 2 respectively. If we want to perform a siteswap operation on the objects thrown at sites 0 and 2, it means we want to swap the sites of the next throws of objects A and C. From Table 1, we see that the next throw site of object A is 4 and the next throw site of object C is 5. If we swap these by doing a siteswap operation between T0 and T2, we should end up with object A’s next throw site becoming 5 and Object C’s next throw site becoming 4. Let us see if this is what happens in the sequence “5 2 2”.

Table 2: “Next throw sites” for objects of sequence “5 2 2”
Current Throw Site 0 1 2
Siteswap Number 5 2 2
Object thrown A B C
Next Throw Site (current throw site + siteswap number) 0+5 = 5 1+2 = 3 2+2 = 4

As we can see from Table 2, the “next throw sites” of objects A and C have indeed got swapped as compared to Table 1.

Some authors treat the siteswap numbers as throws with flight time equal to the siteswap number and dwell time equal to zero. This makes the beat (site) of the next throw of that object the same as the beat where the object is caught, or to put it differently, where the object “lands”. These authors then speak about the “landing site” of the objects getting swapped.  However, I will stay away from introducing any constraints on the flight and dwell times and refer to the “next throw site” instead of the landing site.

Note that since n > m, (n-m) > 0 and so Tn+(n-m) > 0, i.e., positive. However, Tm-(n-m) ≥ 0 if and only if Tm ≥ (n-m). In other words, to siteswap the next throw sites of objects being thrown at beats m and n, the next throws of the object being thrown at site m cannot be happening before site n in the current sequence. Mathematically, this condition must be met for a valid siteswap operation to be performed as all siteswap numbers must remain non-negative.

For example, let us perform some siteswaps on the sequence “1 2 3 4 5” of period P = 5.

Table 3: Example Siteswap Operations on sequence “1 2 3 4 5”
Throw site 0 1 2 3 4
Siteswap Number 1 (= T0) 2 (= T1) 3 (= T2) 4 (= T3) 5 (= T4)
Siteswap T2 & T4 T0 T1 T4+(4-2) T3 T2-(4-2)
1 2 5+(4-2) 4 3-(4-2)
1 2 7 4 1
Siteswap T1 & T4 T0 T4+(4-1) T2 T3 T1-(4-1)
1 5+(4-1) 3 4 2-(4-1)
1 8 3 4 -1
Siteswap T0 & T1 T1+(1-0) T0-(1-0) T2 T3 T4
2+(1-0) 1-(1-0) 3 4 5
3 0 3 4 5

Table 3 shows the siteswap calculations for a few cases. As highlighted, a siteswap between T1 and T4 is not possible for this sequence as it does not meet the condition Tm ≥ (n-m), where m = 1, n = 4 and Tm = T1 = 2. The other two siteswaps are possible and the new siteswap sequences generated after the siteswap operation are “1 2 7 4 1” and “3 0 3 4 5”.

If we start with a valid siteswap sequence, then the sequence obtained after a siteswap operation between any two throws will also be a valid siteswap sequence. Conversely, if we start with an invalid siteswap sequence, then the sequence obtained after a siteswap operation will also be an invalid siteswap sequence.

Sequences of period P = 1

It would appear that at least two sites are required in a vanilla siteswap sequence so that we can swap the sites. Does this mean that the siteswap operation does not apply to sequences of period P = 1? Not so. The sequence of period P = 1 can always be repeated to convert them into sequences of period P > 1 though their minimal period will continue to be 1. For example, the sequence “3” of period P = 1 can always be written as “3 3 3 3” which now becomes becomes a sequence of period P = 4, though the minimal period is still 1. If we make use of the fact that such “constant sequences” are always valid siteswaps, we can pick a constant sequence of a certain period and perform siteswap operations on it to generate other valid siteswaps of that period.

For example, consider the sequence “3 3 3” of period P = 3. Then,

T0 = T1 = T2 = 3.

Let’s say we want to perform a siteswap between the two numbers at sites 0 and 1, i.e.,

m = 0, so Tm = T0 = 3.
n = 1, so Tn = T1 = 3.
Tm = T0 needs to be replaced by (Tn+(n-m)) = (T1+(1-0)) = (3+1) = 4.
Tn = T1 needs to be replaced by (Tm-(n-m)) = (T0-(1-0)) = (3-1) = 2.
T2 = 3 remains unchanged.

So the new sequence is “4 2 3”.

We have already seen how we can perform a further siteswap operation on the sequnce “4 2 3” to generate the sequence “5 2 2”. Starting with the sequence “5 2 2” if we perform a siteswap between T1 and T2, we will get the sequence “5 3 1”. Thus, starting with the constant sequence “3 3 3” which corresponds to a 3 object juggling pattern of period P = 3, we can keep generating other siteswaps of period 3 corresponding to 3 object juggling patterns.

Not just sequences of period P = 1, but any sequences can be repeated (n-1) times to construct sequences of period n*P before a siteswap operation is done on two sites in the new sequence. For example, a sequence of period P = 2, “T0 T1” can be repeated 2 (= 3-1) more times to give a sequence of period P = 3*2 = 6: “T0 T1 T2 T3 T4  T5“, where T2 = T4 = T0 and T3 = T5 = T1, thus making it a sequence of period P = 6, but minimal period 2.

The siteswap operation also provides another method of checking the validity of vanilla siteswaps. But before we study that method, we need to introduce another operation.

Cyclic Shift Operation

Given a sequence of P numbers “T0 T1 T2 … TP-2 TP-1“, if we shift all the numbers from the 0th site to the (P-2)th site one place to the right and shift the number at the (P-1)th site all the way to the left most (0th) site, the new sequence “TP-1 T0 T1 … TP-3 TP-2” is a cyclic shift of the original sequence.

For example, given the sequence “1 2 3 4 5”, a cyclic shift will yield the sequence “5 1 2 3 4”.

If we start with a valid siteswap sequence, then the sequence obtained after a cyclic shift will also be a valid siteswap sequence. Conversely, if we start with an invalid siteswap sequence, then the sequence obtained after a cyclic shift will also be an invalid siteswap sequence.

In terms of actually juggling a valid siteswap, the siteswaps generated by cyclic shifts are equivalent to each other and would be juggled identically, unlike the siteswaps generated by the siteswap operation. However, cyclic shifts help us re-order the terms in a given siteswap to our convenience without affecting the juggling pattern. This reordering is then exploited in the “flattening algorithm” for which Allen Knutson is credited as the inventor.

Flattening Algorithm

The Flattening Algorithm to determine the validity of a siteswap sequence, and if valid, to determine the number of objects required to juggle the sequence, consists of a series of cyclic shift and siteswap operations. It essentially tries to reverse the process of doing siteswap operations to generate other siteswap sequences from a constant sequence[5]. In the algorithm, we start with the given sequence, and if we can end up with a constant sequence, then the starting sequence was also a valid siteswap. Here is how it works:

  1. If the given sequence is a constant sequence, i.e., T0 = T1 = … = TP-1, then it is a valid siteswap sequence and the algorithm stops. Else,
  2. If the largest number of the sequence is at the left most position (position 0, throw name T0) and the number to the right of it (at position 1, throw name T1) is a different number, proceed to step 3. Else, keep doing cyclic shift of the sequence till the largest number comes to T0 position and the number at T1 position is a different number.
  3. If in this new sequence, (T0 – T1) = 1, then the original sequence was an invalid siteswap sequence and the algorithm stops. Else,
  4. Siteswap T0 and T1 and return to step 1.

Further, if the algorithm stops on Step 1, then the number getting repeated in the constant sequence also represents the number of objects required to juggle the original sequence.

Examples

We now implement the flattening algorithm for a few example sequences.

Sequence “3 3 3 3”

Step 1: It is a constant sequence and therefore a valid siteswap. Algorithm stops.

Further, the number getting repeated in the constant sequence is “3”, so this sequence represents a 3-object juggling pattern.

Sequence “4 1 3”

Step 1: Not a constant sequence. Proceed to step 2.

Step 2: T0 = 4 is the largest number and T1 = 1 is a different number. Proceed to step 3.

Step 3: (T0 – T1) = (4 – 1) ≠ 1. Proceed to step 4.

Step 4: Siteswap T0 and T1. T0 will get replaced by (T1+(1-0)) = 1+(1-0) = 2. T1 will get replaced by (T0-(1-0)) = 4-(1-0) = 3. T2 will remain the same = 3. So the new sequence is “2 3 3”. Return to step 1.

Step 1: “2 3 3” is not a constant sequence. Proceed to step 2.

Step 2: T0 = 2 is not the largest number. Cyclic shift on “2 3 3” gives “3 2 3”. In the new sequence, T0 = 3 is the largest number and T1 = 2 is a different number. Proceed to step 3.

Step 3: (T0 – T1) = (3 – 2) = 1. Therefore, the original sequence “4 1 3” was an invalid siteswap sequence. Algorithm stops.

Sequence “4 4 1”

Step 1: Not a constant sequence. Proceed to step 2.

Step 2: T0 = 4 and is the largest number. But T1 = 4 also. Do cyclic shift to get “1 4 4”. Now T0 = 1 is not the largest number. Do cyclic shift again to get “4 1 4”. Now T0 = 4 is the largest number and T1 = 1 is a different number. Proceed to step 3.

Step 3: (T0 – T1) = (4 – 1) ≠ 1. Proceed to step 4.

Step 4: Siteswap T0 and T1. T0 will get replaced by (T1+(1-0)) = 1+(1-0) = 2. T1 will get replaced by (T0-(1-0)) = 4-(1-0) = 3. T2 will remain the same = 4. So the new sequence is “2 3 4”. Proceed to step 1.

Step 1: “2 3 4” is not a constant sequence. Proceed to step 2.

Step 2: T0 = 2 is not the largest number. Cyclic shift on “2 3 4” gives “4 2 3”[6]. In the new sequence, T0 = 4 is the largest number and T1 = 2 is a different number. Proceed to step 3.

Step 3: (T0 – T1) = (4 – 2) ≠ 1. Proceed to step 4.

Step 4: Siteswap T0 and T1. T0 will get replaced by (T1+(1-0)) = 2+(1-0) = 3. T1 will get replaced by (T0-(1-0)) = 4-(1-0) = 3. T2 will remain the same = 3. So the new sequence is “3 3 3”. Proceed to step 1.

Step 1: “3 3 3” is a constant sequence. So the original sequence “4 4 1” was a valid siteswap. Algorithm stops.

Further, the number getting repeated in the constant sequence is “3”, so the original sequence “4 4 1” represents a 3-object juggling pattern.

It can be shown that the flattening algorithm will always terminate, either in step 1 (if the starting sequence was a valid siteswap), or in step 3 (if the starting sequence was an invalid siteswap). Further, if the starting sequence was a valid siteswap, then any intermediate sequences generated during step 2 (cyclic shifts) or step 4 (siteswap operation) will also be valid siteswaps.

Footnotes

  1. See also Allen Knutson’s FAQ note on siteswaps.
  2. Paul Kimek at the University of California, Santa Cruz; Bruce Tiemann and Bengt Magnusson at the California Institute of Technology; and Mike Day, Colin Wright and Adam Chalcraft at the university of Cambridge.
  3. See “Siteswap Manipulations” section of this blog for some examples of such methods.
  4. See part 1 and part 2 of my series of blogs on the siteswap notation.
  5. Just like the siteswap generating algorithm, discussed in part 1 of my blog on siteswap notation, and the permutation test for validity of a siteswap are the reverse of each other.
  6. After the cyclic shift of step 2, or the siteswap operation of step 4, if we end up with a known valid siteswap like the “4 2 3” which we just derived in the section on “The siteswap operation”, we may conclude that the starting sequence (“4 4 1” in this case) is also a valid sequence representing a juggling pattern with the same number of objects as the “4 2 3”, i.e., 3 objects.

Leave a Reply

Your email address will not be published. Required fields are marked *