riffle | R Documentation |
Enumeration of riffle shuffles
genrif(v) riffle(p,q=p)
p,q,v |
In function |
A riffle shuffle is a permutation of integers \mjeqn1,2,...,n1,2,...,n containing one or two rising sequences.
A generalized riffle shuffle, or \mjseqnr-riffle shuffle, contains at most \mjseqnr rising sequences. This is not implemented in the package (earlier versions included a buggy version; the difficulty is ensuring that sequences do not appear more than once).
riffle(p,q)
returns all riffle shuffles with rising
sequences of 1:p
and (p+1):q
genrif(v)
returns all riffle shuffles with rising
sequences having lengths the entries of v
, the deck being
numbered consecutively
Returns a matrix of class partition
with columns being
riffle shuffles
When we say “contains \mjseqnr rising sequences” we generally mean “contains at most \mjseqnr rising sequences”
Robin K. S. Hankin
parts
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.