My question is not so much about the video, but about anagram siteswaps in
general.
If one has for example a valid period 10 siteswap does anybody know how to
tell what all of the related
anagram siteswaps are for that siteswap?
..or not even necessarily WHAT they are, but rather HOW MANY there are
for any given sequence of
numbers which are wholly divisible by the period?
If somebody has a method for this or can somehow figure one out and share
it I'd be a happy camper.
Thanks in advance,
Daniel
[who hopes this doesn't fall into the depths of the archives before being
answered]
--
----== posted via www.jugglingdb.com ==----
I'm not sure how to work out all the anagrams, but there is an easy method
to find out many of them. Work out each throw mod the period of the
pattern. Any throws that give the same value are interchangeable. So if
all the throws are the same value mod the period then any arrangement of
the throws is valid. foe example 714 and 741. 7, 4 and 1 are all
equivalent to 1 mod 3.
I realise this doesn't help with 51234 and its anagrams for example.
Aidan.
I don't know this for a fact, but I suspect the answer isn't
straightforward. The number of siteswap tricks increases
combinatorially with greater number, so as you allow either greater
period or greater max throw height, the number of tricks explodes.
Part of the reason for that is because of anagrams. A mathematician
might come later to correct me, but I suspect that there is no easy
formula that you just plug in some parameters of your proposed trick,
and it spits out the number of possible anagrams - presumably not
including rotations of the trick which are trivial anagrams.
Practically speaking, I find that if you type into a siteswap
generator, say, 3 balls, 5 max throw height, period 5, and require
that 1 and 2 and 3 and 4 and 5-type throws are all present, the
generator quickly produces 3 tricks - 45123, 52413, and 53142, and
this is a little more than you asked for, not only how many tricks
there are but what they are.
-boppo
With a quick bit of cut & pasting I made this:
http://www.twjc.co.uk/anagrams.html
Enter a string & it will list all anagrams that are valid siteswaps. I
haven't spotted any patterns relating to the number of valid anagrams
though.
> ..or not even necessarily WHAT they are, but rather HOW MANY there are
> for any given sequence of
> numbers which are wholly divisible by the period?
>
> If somebody has a method for this or can somehow figure one out and share
> it I'd be a happy camper.
I'm always smarter in the morning:
a=number of *unique* valid anagrams
p=period
n=number of throws that are a multiple of the period including 0 (eg.
for a period 3 siteswap 0,3,6,9...)
!=factorial (3!=1*2*3=6,4!=1*2*3*4=24,5!=1*2*3*4*5=120 etc.)
a=(p-n)!
The *total* number of valid anagrams (which is what my anagram
calculator returns) will be a*p because all siteswaps can be rotated p
times eg.
531
153
315
Jon
So err... ignore all that. Like I said I can't see any patterns :)
I'm pretty certain you can discount number of props & throw heights as
relevant factors though.
Jon
Hey Jon,
Thanks for giving it a shot. Although the equation didn't work I had
moments of excitement before
trying it :). Your Anagram webpage may help in finding an answer. Do you
think you can put an
option on it to filter the rotations out of the search result so that I
can look for some patterns there a
little easier?
Daniel
Why do you want to count them? My guess is that there's no natural way to
relate it to the usual stuff (fibonacci, catalan etc..) and if there is
it's probably a coincidental identity. It seems like any pattern that
could be juggled by a person, the generate and test algorithm should work
in a short enough time to be practical.
I should probably back up my statement a little bit, for a period 10
siteswap like 4536337333, there's not 10! different permutations you need
to check. And nobody can juggle jhfdb97531 so working out the permutations
for that wouldn't come up in practice (unless you've got some other
interesting application of siteswaps than just throwing them in the air..
which I would not put past you :)).
> (unless you've got some other
> interesting application of siteswaps than just throwing them in the air..
> which I would not put past you :)).
>
Actually I've wanted to use siteswaps as a boardgame mechanic for a while
now
and I have one game which is almost completed. The answer to the anagram
question that I posted is something that will effect the mechanics in an
interesting way.
thanks y'all for giving this a shot.
Daniel
There's three factors impacting on a set of numbers anagram number,
the "base pattern" factor which is, take the modulus of all the
numbers with respect to the period, then this base pattern set of
numbers will have an anagram factor. I have no insight other than
brute force on how to do this.
The next factor is the "permutation factor". For a given base pattern
we can permutate different numbers that are congruent modulo the
period to obtain different siteswaps. If we have a set of n numbers
that are all congruent with x(i) repetitions of each unique digit then
this factor will be n!/x(0)!x(1)!...x(k)!.
The third factor is a "non exact reduction factor". Which is when we
get a reduction in the number of anagrams due to the base pattern
being non exact (i.e. the base pattern is composed of 2 or more
repetitions of the same smaller pattern). I haven't fully convinced
myself I am 100% right about this factor yet but I'm fairly confident.
This results in a factor of 1/d where period/d is the period of the
smallest repeating pattern in the base pattern. I am not sure either
whether a given set of base numbers can have both exact and non exact
anagrams.
4 examples
{9,5,5,1} has a base set of {1,1,1,1} which has a single anagram of
1111. The permutation factor is 4!/2!/1!/1! = 12. The non exact
reduction factor is 1/4 (as 1 is the smallest repeating pattern in the
base pattern and has period 1). Hence there are 3 anagrams of 9551 -
9551, 9515, 9155
{7,5,3,1} has a base set of {3,3,1,1} which has a single anagram of
3131. We have two permutation factors (due to 73 and 51) each of
factor 2. Reduction factor is 1/2. Hence 2 anagrams - 7531 and 1357.
{7,7,1} has base set of {1,1,1} which has a single anagram of 111.
Permutation factor is 3!/2!/1! = 3. Reduction factor is 1/3. Hence 1
anagram - 771.
{9,7,6,4,3,1} has base set of {4,3,3,1,1,0} which has 3 anagrams of
303141, 330411, and 131340. Again two permutation factors of 2. No
reduction factor for any of the base patterns. Hence 3*2*2=12
anagrams.
I've also had a look at what the maximal anagram number is for given
number of balls and period and how many different sets of numbers have
this anagram number. I think this was sort of asking hard questions
about hard questions and I got even less far, in terms of hard numbers
or factors, but did notice a few patterns and such.
PB (period base)
the PB of 7441 is 3001
the PB of 97531 is 42031
the PB of 467520 is 401520
Whenever we have 2 or more of the same number in the PB of a siteswap then
we have the potential
for an anagram. That potential is realized when the at least 2 numbers
with the same PB are different.
Examples:
the anagram for 3501 is 3051
1 anagram for 467520 is 407526
Now onto another type of anagram:
Vocabulary:
S4RA or Sarah = Same State Start Siteswap Rotation Anagram
PBS = Period Base Siteswap
Host = a siteswap which can and is connected to Sarah
PBS anagrams don't start until period 6. This is because Sarah doesn't
exist until period 3 and
connecting a period 3 Sarah to a period 1 or 2 Host results in the same
siteswap no matter how you
rotate Sarah :-).
and so...
Starting with period 6:
531423 and
531342 are PBS anagrams
531 is the Host and 423/342 is Sarah
a few more examples...
441423/441342 - 441 host 423/342 Sarah
522423/522342 - 522 host 423/342 Sarah
This is where I'm at so far... and it feels like there's a long way to go
from here.
(I've enjoyed all of your posts by the way!)
Daniel
[Who will probably transfer this over to the siteswap forum just so as not
to bother folks with all these
random siteswap nuances.]
oops! I meant 3401 and 3041
Thanks very much for making this :)
I think a highlight for which ones are just rotations and also which ones
are excited state would benefit people using this.
Also being able to quickly find out transitions would be great. I think
having a quick link to the ULBOX Generator of Transitions at
http://cursomalabarismo.no.sapo.pt/jdb/ulbox.html would be beneficial to
users of your scripts.
Cheers
Laurence
Daniel was in London at the weekend and got me thinking about this problem
and
I worked out a brute force algorithm that's not too hard to implement.
It's
probably similar to Orinoco's!
Given your list of numbers, fix the highest number in the first place,
then for
each subsequent place try each number in turn. If the number's already
been
used discard it (unless it's repeated). Also if the number would cause a
clash
discard it. Then once you've placed all the numbers successfully you've
found
one siteswap. Continue untill you've tried all possibilities (clashes cut
this
search short quite quickly). Now if there are no repeats then you have
your
number. Otherwise for each repeat you divide by the factorial of the
number of
times the number is repeated. Except with the highest number, because we
fixed
it in the first position. So if the highest number is repeated you divide
by
the factorial of the number of times it's repeated minus 1. One more thing
has
to be taken into account if the highest number is repeated and that's
cyclic
permutations. So if the highest number is repeated then convert your
siteswap
into it's equivalent number base 10. Then do the same for all it's
permutations
and if any of them is bigger than the original number, discard it.
Here's an implementation in Basic:
CLS
RANDOMIZE TIMER
PRINT "how many digits? ( 3 - 9 )";
DO
g$ = INKEY$
LOOP UNTIL g$ = "3" OR g$ = "4" OR g$ = "5" OR g$ = "6" OR g$ = "7" OR g$
= "8"
OR g$ = "9"
period = VAL(g$)
PRINT ; period
PRINT "what's the highest number? ( 3 - 9 )";
DO
g$ = INKEY$
LOOP UNTIL g$ = "3" OR g$ = "4" OR g$ = "5" OR g$ = "6" OR g$ = "7" OR g$
= "8"
OR g$ = "9"
max = VAL(g$)
PRINT ; max
PRINT "how many objects? ( 1 -"; max; ")";
DO
DO
g$ = INKEY$
LOOP UNTIL g$ = "1" OR g$ = "2" OR g$ = "3" OR g$ = "4" OR g$ = "5" OR g$
= "6"
OR g$ = "7" OR g$ = "8" OR g$ = "9"
objects = VAL(g$)
LOOP UNTIL objects <= max
PRINT ; objects
DO
sum = 0
FOR a = 0 TO period - 1
number(a) = INT((max + 1) * RND)
sum = sum + number(a)
NEXT
LOOP UNTIL period * objects = sum
DO
switch = 0
FOR a = 0 TO period - 2
FOR b = a + 1 TO period
IF number(a) < number(b) THEN
switch = 1
temp = number(a)
number(a) = number(b)
number(b) = temp
END IF
NEXT
NEXT
LOOP UNTIL switch = 0
FOR a = 0 TO period - 1
PRINT ; number(a); " ";
NEXT
IF number(0) <> number(1) THEN toprepeat = 0 ELSE toprepeat = 1
divisor = 1
a = 1
DO
same = 1
b = a
DO
b = b + 1
IF number(a) = number(b) THEN same = same + 1
LOOP UNTIL b = period - 1 OR number(a) <> number(b)
FOR c = 1 TO same
divisor = divisor * c
NEXT
a = b
LOOP UNTIL a > period - 2
siteswaps = 0
bookmark = 0
FOR c = 0 TO period - 1
ss(c) = 0
NEXT
DO
DO
place = ss(bookmark)
IF used(place) = 0 THEN
throw = number(place)
landed = (bookmark + throw) MOD period
IF caught(landed) = 0 THEN
caught(landed) = 1
used(place) = 1
bookmark = bookmark + 1
ELSE
ss(bookmark) = ss(bookmark) + 1
END IF
ELSE
ss(bookmark) = ss(bookmark) + 1
END IF
LOOP UNTIL ss(bookmark) >= period OR bookmark = period - 1
IF bookmark = period - 1 THEN
ok = 1
FOR c = 0 TO period - 1
IF used(c) = 0 THEN ss(period - 1) = c
NEXT
IF toprepeat = 1 THEN
original = 1
FOR c = 0 TO period - 1
place = ss(c)
original = original + number(place) * 10 ^ (period - 1 - c)
NEXT
FOR c = 1 TO period - 1
this = 1
temp = ss(period - 1)
FOR d = period - 1 TO 1 STEP -1
ss(d) = ss(d - 1)
NEXT
ss(0) = temp
FOR e = 0 TO period - 1
place = ss(e)
this = this + number(place) * 10 ^ (period - 1 - e)
NEXT
IF this > original THEN ok = 0
NEXT
temp = ss(period - 1)
FOR d = period - 1 TO 1 STEP -1
ss(d) = ss(d - 1)
NEXT
ss(0) = temp
END IF
IF ok = 1 THEN siteswaps = siteswaps + 1
END IF
DO
IF bookmark > 0 THEN
ss(bookmark) = 0
bookmark = bookmark - 1
place = ss(bookmark)
used(place) = 0
throw = number(place)
landed = (bookmark + throw) MOD period
caught(landed) = 0
ss(bookmark) = ss(bookmark) + 1
END IF
LOOP UNTIL ss(bookmark) < period OR bookmark < 1
LOOP UNTIL bookmark < 1
siteswaps = siteswaps / divisor
PRINT
PRINT "Number of siteswaps:"; siteswaps
If anyone wants to convert this into a Java applet feel free :)
Aidan.
If you use the downloaded Juggling Lab Generator, you can also forbid
all the values not in your target selection, ask for prime or all
versions not including rotations, check for transitions too, and you
will get all such versions of the toss values selected that are
*valid*, which mere math permutations do not screen for. It will deal
with sync or async or multiplex. The list will produce a default
animation with a click on each one, or can be saved to a text file.
Why everyone is not using the downloaded Juggling Lab, I do not
understand.
wH
I was going to post this to the contact form on your website, but it
appears to
be broken :(
nice job with the siteswap anagrams. (http://www.twjc.co.uk/anagrams.js)
I'd
like to study your javascript at some point when I'm not so busy with
class.
I wrote the siteswap game for Daniel at http://siteswapgame.heroku.com/
I also had some juggling game suggestions for the twjc website:
clubs: volleyclub
balls: field ball (like keep away with teams, there is one field ball, and
everyone
has two balls of their own)
I don't remember reading Boppo's post, which as you say provides pretty
much what Daniel was looking for. However my program does find all *valid*
siteswaps for the given list of numbers. This is the sort of problem that
when I hear about it I want to solve it if I can, so I'm happy to produce
my own program. It's called intellectual curiousity and I have an
unhealthy dose of it!
Given a valid Pattern P with n digits in it.
Some assumptions:
- If P only consists of only 1 or 2 different digits (e.g. 222 or 522)
then the number of valid anagrams
is n! (all anagrams are siteswaps; shouldn't be that hard to prove)
- The number of valid anagrams of P equals the number of another valid
Pattern with the same
amount of digits and the same amount of digits that differ from each other
within this pattern. (e.g.
531 and 123 have the same amount of valid anagrams)
- A formula for the number of valid anagrams can be found
related question:
when is it impossible to build a valid siteswap out of a set of numbers?
(e.g. for {1,2} it is impossible
to come up with a working siteswap)
> > related question:
> > when is it impossible to build a valid siteswap out of a set of numbers?
> > (e.g. for {1,2} it is impossible
> > to come up with a working siteswap)
> >
> Ok thats an easy question, i just found the answer myself
Was it when the sum of the numbers cannot be evenly divided by the period?
:)
First is any siteswap that can build up from a, a ,a .....a, a where a is
anynumber you like and by adding the value of the period lets say p to
each place as many time as you want has ALL OF ITS ORDER REARRANGEMENTS AS
ANAGRAMS.
e.g 741 is of the form 3x2+1, 3+1, 1 therefore 417 147 741 174
471 714 which of course equates to two patterns 741 and 714. You could
show a similar thing for 825 implying 852 is also a pattern.
Also another FACT is that siteswap NOT of this form DO NOT have all its
reorderings as anagrams
Second play back the siteswap in reverse time( this is not always the same
as the original siteswap). This has to have the same throw values so is
possibly a new anagram
Other then that probably the brute force method of have an algorithmic
proceedure of a computer do it, but thats doesn't really tell you much
interesting I guess.
But I'm guessing a better method for finding them would be a bit lameass
long by hand and not tell you much. So you best bet is to quickly check if
its 'scramable' and if its not being careful about anagrams as using above
or if there was some program that could time reverse the pattern then that
would tell you something interesting if it was a case were it wasn't
itself.
Reading from this mathematics of Juggling book I have, there was also a
chapter about finding magic patterns e.g 12345 but I could'nt be arsed to
understand his explanation.
I personally think more people should stick more articles in Geek Juggling
section about all the Facts that mathematicians have proved about
juggling. I'm still looking for a better mathematical way to define 3 ball
juggling, other then a lame ass combinatorial method when you list throw
positons and catches... nevermind.
Its annoying going through something like this where there are 20 posts
but that are pointless to go thru because half the people only speculate
about what maths has done for juggling rather then putting forward
anything concrete or correct.
Hopefully this makes sense and some of it was interesting
Maks
BTW answer to jgl smltr v0 is:
it is always possible to come up with an vanilla siteswap using a list
with length being your period e.g (5, 9, 3, 7, 7, 2, 4, 3) would be
period 8, if the average is a whole number and this whole number would
give you the number of balls being juggled. for the e.g example this is 5
so there exists a siteswap using these numbers.
There are no (vanila)siteswaps where the average is not a whole number
Its in mathematics of juggling book (Average thm+partial converse)
(this is a kind've hard to prove mathematical fact(theorem) (well atleast
for me to understand) that most mathematicians probably dont care about
because most mathematicians dont care about juggling).
It would be cool if there was a mathsjugglingwikipeida style website that
you could search to answer any questions like this (for jugglers) but it
would also be increadibly nerdy.
Maks
It doesn't make sense I know. If you evenly divide a cake between 3
people you definitely get some
not whole number.
what I meant was:
After dividing you end up with a whole number.
I'm curious. Did you really not know what I meant? I mean literally it
was a bit strange.
btw... Can one evenly divide something between an odd number of people? or
would you then have to
use another word such as 'equally'?
Do you ever say a word enough times that it loses it's meaning? Evenly
just turned into mush for me
so I googled 'evenly divisible' and found this:
http://en.wiktionary.org/wiki/evenly_divisible
(arithmetic) Leaving no remainder when divided by.
15 is evenly divisible by 3, but 16 isn't.
wo ho : )
so tomorrow when I wake up I'll probably realize that In my tired 2am daze
I wrote something
completely wrong... like 4 count rubensteins revenge instead of 4 count
bruno's nightmare as a
workshop request at a small juggling convention for passing... oh wait
that happened :P
ok it's past my bed time. g'night.
naming a siteswap whose period doesn't evenly divide its sum of numbers is
imposssible
because period always evenly divide the sum its siteswap numbers.
Just reading your 2 sentenses just gave the impression that you didn't
know much about what you were talking about so it wasn't worth checking. I
thought I'd write what I thought was an interesting post and u'd read it
and realise your mistake but whatever. Either that or u'd give me an
interesting definition of evenly divided (might've been something
interesting) .
meh. You dissapointed me in both ways plus ur post is rude.
In your post are you trying to call me and idiot then end with 'im a
kickass juggler' for some reason. Your not worth talking to.
Haha what!?!
Hey sorry that came off rude. I wasn't trying to call you an idiot and
I'm not a kick-ass juggler : ).
"you're not worth talking to" ouch man. Keep in mind in any forum, that
you can be reading text with
an unintended tone and get the wrong meaning. You also miss opportunities
to connect with people
(interesting or not) when you jump to conclusions and lash out like that.
Daniel
[who probably shouldn't mention top posting at this point ; ]
You have a siteswap e.g. 1234567 n=7
and this website (http://www.twjc.co.uk/anagrams.html)
creates 133 siteswap that are valid.
But because you can rewrite a siteswap by
rotating it e.g. 531 == 315 == 153. Here
we got n=3 (the length).
So this generator shows every valid siteswap n-times.
Back to the siteswap 1234567 and the
133 variations.
If you devide it by n=7 we
have 7!=5040 possibilities to
spell that. But 19 siteswaps are valid
and can be rewritten 7-times each (133).
So if you generate anagrams you
can lock a number e.g. the highest
number at the beginning and you
don't have to permut n! but (n-1)!
which is much faster.
I copy and paste a little
bit of c-code and I have
a tool that works fine for me.
I used a anagram creator
that was written by a guy named Tom.
But my valid test is a little
bit of a mess and I would like
to get information about
other valid tests and
how they work. And I used
the slow variation with
n! and then checked the validness.