Closed RobinHankin closed 2 years ago
it would be good to implement riffle shuffles
`faro` <- function(n,out=TRUE){ jj <- t(matrix(seq_len(n*2),ncol=2)) if(out){jj <- jj[2:1,]} as.word(c(jj)) } sapply(2:10,function(n){permorder(faro(n,FALSE))}) # OEIS A002326
it would be good to implement riffle shuffles