search for: tcycl

Displaying 2 results from an estimated 2 matches for "tcycl".

Did you mean: cycl
2017 Dec 08
2
Curiously short cycles in iterated permutations with the same seed
...- X start <- 112358 N <- 10 for (i in 1:N) { seed <- start + i for (j in 1:1000) { # Maximum cycle length to consider set.seed(seed) # Re-seed RNG to same initial state X <- sample(X) # Permute X and iterate if (all(X == Xorig)) { cat(sprintf("Seed:\t%d\tCycle: %d\n", seed, j)) break() } } } Seed: 112359 Cycle: 14 Seed: 112360 Cycle: 14 Seed: 112361 Cycle: 8 Seed: 112362 Cycle: 14 Seed: 112363 Cycle: 8 Seed: 112364 Cycle: 10 Seed: 112365 Cycle: 10 Seed: 112366 Cycle: 10 Seed: 112367 Cycle: 9 Seed: 112368 Cycle: 12 I understand that I...
2017 Dec 08
0
Curiously short cycles in iterated permutations with the same seed
...> for (i in 1:N) { > seed <- start + i > for (j in 1:1000) { # Maximum cycle length to consider > set.seed(seed) # Re-seed RNG to same initial state > X <- sample(X) # Permute X and iterate > if (all(X == Xorig)) { > cat(sprintf("Seed:\t%d\tCycle: %d\n", seed, j)) > break() > } > } > } > > Seed: 112359 Cycle: 14 > Seed: 112360 Cycle: 14 > Seed: 112361 Cycle: 8 > Seed: 112362 Cycle: 14 > Seed: 112363 Cycle: 8 > Seed: 112364 Cycle: 10 > Seed: 112365 Cycle: 10 > Seed...