Counting prime juggling patterns
Abstract
Juggling patterns can be described by a closed walk in a (directed) state graph, where each vertex (or state) is a landing pattern for the balls and directed edges connect states that can occur consecutively. The number of such patterns of length is well known, but a long-standing problem is to count the number of prime juggling patterns (those juggling patterns corresponding to cycles in the state graph). For the case of balls we give an expression for the number of prime juggling patterns of length by establishing a connection with partitions of into distinct parts. From this we show the number of two-ball prime juggling patterns of length is where . For larger we show there are at least prime cycles of length .
1 Introduction
Juggling has many interesting connections with combinatorics (see [1, 2, 6]). There are several ways to describe juggling patterns, and each description gives some information about various properties of the patterns. One of the most useful ways to describe a juggling pattern is with state graphs.
The state graph for balls is an infinite directed graph where the vertices (or states) correspond to a schedule of when balls will land and directed edges join states that can occur consecutively. In particular, a state is a - vector indexed by where a in position indicates that a ball will land “beats” in the future (the number of ’s in the state vector equals the number of balls ). Given a state the possible transitions are as follows:
-
•
If the leading entry in the state is , then there is no ball scheduled to land. Moving forward one beat, we delete the first entry, and all other entries shift down by one.
-
•
If the leading entry in the state is , then there is a ball scheduled to land. Moving forward one beat, we delete the first entry, all other entries shift down by one, and then put a somewhere which is currently . (That is, the ball goes into the hand, time moves forward one beat, and then we “throw” the ball so that it lands at a time in the future that does not already have a ball scheduled to land.)
In the language of state vectors, if and are states in the graph, then if and only if for all . A portion of the state graph when is shown in Figure 1. Here we have only included those states where the largest index of a nonzero entry is at most four, and we have truncated the states. We label the edges to indicate the type of “throw” that occurred. A “” indicates no throw was made; otherwise, “” indicates that we moved the leading into the -th slot by an appropriate throw.
Periodic juggling patterns can be found from the state graph by looking for closed walks. The length of the closed walk, which we denote by , indicates the period of the corresponding pattern, i.e. the juggling pattern is formed by continuously repeating the walk so that the throw made at time (as indicated by the edge label) is the same as that made at time . The sequence of edge labels for the closed walk corresponds to the siteswap sequence for the juggling pattern. This is denoted by where each indicates the type of throw made at the -th step. Siteswap sequences are commonly used by jugglers when describing juggling patterns. It is known that from the siteswap we can recover the closed walk in the state graph (see [1, 6]).
Some of the closed walks, i.e. juggling patterns, from Figure 1 are given in Table 1. Note that the first five listed have all of the states unique, i.e. the closed walks corresponds to cycles, while the last two have at least one state is repeated. We call juggling patterns which correspond to cycles in the state graphs prime juggling patterns (the notion of prime comes from noting every juggling pattern can be formed by appropriately combining prime juggling patterns).
An exact expression for the number of juggling patterns with balls and period has been known for decades (see [1]), and is approximately . The number of prime juggling patterns of period and balls, denoted , has never been determined for non-trivial values. A small step towards counting prime juggling patterns was achieved by Chung and Graham [4] (see also [3]) who were able to enumerate primitive juggling patterns, i.e. patterns of period which do not repeat a fixed initial state. In this paper we will begin to address the enumeration problem of prime juggling patterns.
In Section 2 we will count the number of two-ball prime juggling patterns of period by showing a connection to the partitions of into distinct parts. From this we will show in Section 3 that the number of two-ball prime juggling patterns of period is for a known constant . In Section 4 we give a lower bound of for the number of prime juggling patterns of length with balls. Finally, we give some concluding remarks in Section 5.
2 Enumeration by ordered partitions
Our approach to counting will be to find a description of two-ball prime juggling patterns that is connected to ordered partitions. The key observation we will use is that we can describe our patterns by how the spacings can occur in the states (i.e. the distance between the ’s in a state).
2.1 Ternary sequences and spacings
There is a bijection between period , two-ball juggling patterns and ternary words of length using the letters with at least one occurrence of an . The letters are indicating the action on the -th beat, and are interpreted as follows:
-
•
indicates no ball was thrown at that beat.
-
•
indicates that a ball was thrown and that the next ball thrown will be the other ball.
-
•
indicates that a ball was thrown and that the next ball thrown will be the same ball.
In other words, a throw corresponding to an throws the ball so that it will land after the ball already in the air, while a throw corresponding to a throws the ball so that it will land before the ball already in the air. We must have at least one since otherwise we will only throw at most one ball. (We note that this is related to the card interpretation of juggling patterns which we will visit in Section 4).
From the ternary word, we can reconstruct the sequence of throw heights, i.e. the siteswap. (As noted earlier, once we have the siteswap sequence, we can find the closed walk in the state graph.) Since a throw requires that the next ball thrown is the same ball, the throw height is the distance to the subsequent nonzero entry. On the other hand, an throw requires the next ball thrown to be different, so this ball will not land until the other ball is thrown by a throw corresponding to another . Therefore, the throw height is the distance to the first nonzero entry following the subsequent . These words are cyclic, so we wrap around at the ends when counting throw heights.
Example 1.
We illustrate this process for and the word . Below we have written the word in the first line, and in the second line we have indicated the throw heights (i.e. siteswap) corresponding to this word.
0 | 0 | 0 | 0 | 0 | 0 | |||||
1 | 5 | 0 | 0 | 7 | 0 | 4 | 0 | 0 | 0 | 5 |
The next step is to determine when a ternary word corresponds to a prime juggling sequence. We note that two-ball states are of the form . Since states with a leading will always result in a series of shifts until the first term is a , it suffices to determine whether any states of the form
are repeated, where is the number of entries between the two entries of . For such a pattern, we will set the spacing to be . In other words, the spacing is the difference in the landing times for the two balls. Thus, a two-ball juggling pattern is prime if and only if all the states visited in the pattern have unique spacings. Our next step is to determine the spacings from the word.
Given a ternary word corresponding to a juggling pattern, define an anchor point as the first nonzero entry following an . By our convention, an anchor point is always the result of an throw, and in particular is the second ball in the state until the immediately preceding throw occurs. Therefore, to determine the spacing between the balls throughout the juggling pattern, we count the spacing between each nonzero entry and the subsequent anchor point.
Example 2.
For the ternary word in Example 1, we place an anchor symbol () above each anchor point, and below each nonzero entry give the spacing to the next anchor point.
0 | 0 | 0 | 0 | 0 | 0 | |||||
Since these spaces are all distinct, the corresponding juggling pattern is prime.
For each anchor point in a word, we build a set of spacings connected to that anchor point. In Example 2, these sets are , , and . Note that the sum of the distances between adjacent anchor points, which is also the sum of the largest entries in each set, is . It is also possible to reconstruct our ternary word, and hence juggling pattern, given an ordered collection of sets of spacings.
Lemma 1.
Given , where each is a nonempty set and the sum of the largest entries is , then there is a unique cyclic ternary word of length so that the sets of spacings are and for , if is associated with a given anchor point, then is associated with the following anchor point.
Proof.
We form the ternary word in reverse by applying the following algorithm.
-
•
Start with a word of length where the first entries are and the last entry is an active point, temporarily marked “?”.
-
•
For the sets (in that order) repeat the following action for the set ,
-
–
Suppose that and that . In the entry precisely entries to the left of the active point, replace the with an “”. For , in the entry precisely entries to the left of the active point, replace the with a “”.
-
–
Change the active point to be the furthest left nonzero entry (equivalently, the entry formed using element in ).
-
–
-
•
Delete the “?” in the last entry.
Since each set is nonempty and we place an immediately to the left of our active point, then the active points used in the construction will give the anchor points of the resulting ternary word. Further, by the construction for each anchor point we will produce spacings that corresponded precisely to the set used in the placements, and since we worked backwards when constructing the sets of orderings, we will have that comes immediately before . Finally, we note that since the sum of the largest entries in the is , then we will place an anchor point in the first entry, which by wraparound is the same as placing a point in entry . This justifies deleting the “?” at the end. (Note that an anchor point could be either an or which is why we did not initially specify the entry). ∎
2.2 Ordered partitions
As we have already noted, the largest entries of the sets of spacings form a partition of . If we restrict to considering prime juggling patterns, then the spacings are distinct, and the largest entries of the sets of spacings form a partition of into distinct parts.
Starting with a partition of into distinct parts, we consider the number of ways to form sets of spacings that give a prime juggling pattern (i.e. number of ways to add possible additional elements while ensuring that there are no repeats).
Example 3.
For the partition of , we consider the number of ways to form a set of spacings that correspond to a prime juggling pattern with largest parts , , and . In particular, we consider the Ferrer’s diagram for the partition.
We have that the numbers , and are the largest elements of the sets, and so it remains to determine what happens with the other values. The number under each column indicates how many options we have for a particular value (i.e. we can include it in any subset whose largest part is greater than the value or we can include it in none of the sets). Since the choices for the values are independent, the number of possible sets of spacings is .
Theorem 2.
Let be the number of two-ball prime juggling patterns of period . Then
Proof.
We have already noted that a juggling pattern is prime if and only if no spacings are repeated. We also know that given a set of spacings, together with a relative ordering of the sets, we can form a juggling pattern. So it suffices to count the number of ways to form the sets of spacings with no repeated elements, keeping in mind that we must also keep track of the cyclic orderings of these sets.
In particular, given with , i.e. a partition of into distinct parts, the number of ways to form a set of spacings where the largest elements come from these parts is
(1) |
To see this, let and then for we have columns in the partition diagram that have at least elements, and similarly columns in the partition diagram that have at least elements. In particular, there are exactly columns in the partition diagram that have exactly elements. Each of these columns have different options for what happens to that value, except for the value which is already used as one of the largest elements in the sets of spacings. Therefore these columns contribute , giving (1).
We now also need to account for the cyclic orderings of the sets. Given sets, there are such orderings. We can conclude that, for the given partition, we have
different prime juggling patterns. We now sum over all partitions with a fixed number of parts, and similarly sum over all possible number of parts to get the result. ∎
3 Asymptotics
From Theorem 2 we can find the number of prime juggling patterns for any . In Table 2 we give these values for . By examining the data it appears that we are approximately doubling at each step. In this section we will show that this reflects the behavior of these numbers. In particular, we will establish the following.
Theorem 3.
We have , where
3.1 Upper bound
If we let be the number of ways to place spacings in the partitions of into exactly distinct parts, then by Theorem 2 we have
(2) |
Proposition 4.
The values satisfy the recurrence,
Proof.
Starting with (2) we have
In going from the first to the second line we pull out (using that we have a telescoping product). In going from the second line to the third line we group by the size of , calling this parameter , and note that since the parts are distinct we must have that (i.e. our partition contains at least a block and a triangle on the first entries). In going from the third line to the fourth line we drop the size of each part by and now have a partition of using parts. Finally, in going from the fourth line to the fifth line we note that we now have the definition of inside of the sum. ∎
Since we have that , we can work on bounding the size of each . This is achieved by the next result.
Proposition 5.
There exist constants so that where and for all ,
Proof.
From the preceding proposition we can conclude for that
in particular we have that .
We now have everything we need for the upper bound.
Lemma 6.
We have .
Proof.
Using Proposition 5 we have
3.2 Lower Bound
The key in establishing the upper bound is in Proposition 4 to give an upper bound on each individual in Proposition 5. We will use a similar approach for establishing the lower bound.
Proposition 7.
There exist constants and so that where , , and for all ,
Proof.
Putting into (2) we have , establishing and . Now using Proposition 4 we have
establishing and (the inequality follows by noting that if we make the exponent smaller we are subtracting a larger value). Now assuming by induction we have established that we have
For the second term we have
For the first term we first sum and split it into two parts, i.e.
Proceeding similarly as before and using that (so that among other things ) we have
Putting this altogether we have
Lemma 8.
Given any , for all sufficiently large .
Proof.
Since and , there is some so that . For this we can use Proposition 7 to get
Since then for sufficiently large we have . In particular for such large we have establishing the result. ∎
4 Lower bound for prime patterns with balls
We can also consider the problem of counting prime juggling patterns for balls. The natural thing is to again consider anchors, though it is unclear whether anchors should be one or more balls. Each grouping of anchors should have some variation of the partition statistics similar to what was presented here, but a key difficulty is finding how to connect the anchors together. In Table 3 we give some data for .
For , the number of patterns appears to grow roughly as an exponential function in . We will establish a lower bound which supports this belief.
Proposition 9.
.
We will use the card interpretation of juggling sequences to help establish this result. For a fixed there are cards, denoted , , …, , which have on the left and right of each card slots (corresponding to the balls). These slots are connected by tracks which either go straight across (i.e. ) or have the bottom track drop down and then reposition itself relative to the other tracks. In particular, the cards keep track of the relative order of the balls at any given time. The set of these cards for is shown in Figure 2.
All siteswap patterns of length with balls correspond bijectively with cards drawn with replacement from placed consecutively in some order with the card used at least once (see [2, 6]). This can be seen by noting that placing the cards together gives a variant of the juggling diagram (i.e., the diagram that traces out the path of the balls over a time window of period ) from which the juggling pattern can be recovered.
Proof of Proposition 9.
There are precisely ways to place cards consecutively where the first cards are drawn with replacement from and the -th card is . It suffices to show that these are prime (distinctness comes from the uniqueness of ).
To see that they are prime we note that the cards keep track of the ordering of the balls and because we only use in the last card it must be the case that the ball which is scheduled to land last among the thrown balls remains in that ordering until the -th step. In terms of the states, this says that the last shifts down by at every step. In particular, the location of the last will be different in all of the states, which forces the states to be distinct, i.e., a prime juggling pattern. ∎
5 Concluding remarks
We have looked at what happens when we fix and let get large. Alternatively one could fix and let get large. This variation was considered by Ron Graham [5] who showed the following.
For , | |||
For , | |||
For , | |||
For , | |||
For , |
In particular we note that when is fixed and gets large that most juggling patterns are prime, while the case and data in Table 3 indicates that when is fixed and gets large that most juggling patterns are not prime.
One common restraint for looking at the mathematics of juggling is to assume that we always throw a ball at each beat. In terms of siteswap sequences, this means all of the . One common approach to this is to first carry out computations with allowing and have one less ball, and then increase each by (i.e. adding to every throw height increases the number of balls by ). We can do this for prime juggling patterns because of the following.
Observation 10.
The siteswap sequence is prime if and only if the siteswap sequence , where , is prime.
This is a consequence of the following more general result.
Theorem 11.
The state graph with balls is isomorphic to the (induced) subgraph of the state graph with balls consisting of vertices whose state starts with .
Proof.
The embedding works by sending in the the state graph for balls to in the state graph for balls.
It remains to show in the state graph for balls if and only if . So suppose in the state graph for balls. We now break into two cases depending on .
-
•
. In this case and for all . It follows that the edge in the state graph with balls is of the form
While in the state graph for balls the edge is of the form
-
•
. In this case , , , and for all . It follows that the edge in the state graph with balls is of the form
While in the state graph for balls the edge is of the form
Therefore, by Theorem 11, we have that the formula provided in Theorem 2 also counts the number of three-ball prime juggling patterns of period where a ball is thrown at each beat.
Acknowledgments. The authors are grateful for many useful comments and discussions with Ron Graham on the mathematics of juggling. The research was conducted at the 2015 REU program held at Iowa State University which was supported by NSF DMS 1457443.
References
- [1] Joe Buhler and Ron Graham, Juggling patterns, passing, and posets, Mathematical Adventures for Students and Amateurs, Mathematical Association of America, Washington, DC, 2004, 99–116.
- [2] Steve Butler, Fan Chung, Jay Cummings and Ron Graham, Juggling card sequences, arXiv:1504.01426.
- [3] Steve Butler and Ron Graham, Enumerating (multiplex) juggling sequences, Annals of Combinatorics 13 (2010), 413–424.
- [4] Fan Chung and Ron Graham, Primitive juggling sequences, American Mathematical Monthly 115 (2008), 185–194.
- [5] Ron Graham, personal communication.
- [6] Burkhard Polster, The Mathematics of Juggling, Springer-Verlag, New York, 2000.