Skip to content

Instantly share code, notes, and snippets.

@aleclaws
Created July 9, 2015 15:21
Show Gist options
  • Save aleclaws/7f62030ca078d7f2f90a to your computer and use it in GitHub Desktop.
Save aleclaws/7f62030ca078d7f2f90a to your computer and use it in GitHub Desktop.
i) Each shuffle is described by n numbers t1,t2,...,tn
A shuffle defines a reindexing of the cards
```
given cards C = [ a b c d e]
and shuffle S = [ 2 3 4 5 1]
S(C) = [b c d e a]
given shuffle S2 = [5 4 3 2 1]
S2(C) = [e d c b a]
```
Note that these shuffles can be composed:
```
S2(S(C)) = S2( [b c d e a] )
= [ a e d c b ]
S(S2(C)) = S( [e d c b a] )
= [d c b a e]
S(S(S2(C))) = S([d c b a e])
= [c b a e d]
```
Thus by composing the two shuffles S and S2, we can perform new shuffles (without learning them)
```
S3(C) = [ 1 5 4 3 2 ] = S2(S(C))
S4(C) = [ 4 3 2 1 5 ] = S(S2(C))
S5(C) = [ 3 2 1 5 4 ] = S(S(S2(C)))
```
the shuffler know shuffle S, and is trying to learn a second shuffle ci such that the various compositions of these shuffles maximizes the number of knows shuffles from a given list (c1,c2,...ck)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment