Talk:Perfect shuffle: Difference between revisions

m
fix typo
(→‎What to do?: +1 on third table of values.)
m (fix typo)
 
(3 intermediate revisions by 2 users not shown)
Line 95:
 
::: +1 on using your third and last set of numbers (and the table). --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 08:33, 16 June 2015 (UTC)
 
:::: Some other possible sequences include 2^(2 .. 15) - 2:
::::{| class="wikitable"
|-
! input ''(deck size)'' !! output ''(number of shuffles)''
|-
| 2 || 1
|-
| 6 || 4
|-
| 14 || 12
|-
| 30 || 28
|-
| 62 || 60
|-
| 126 || 100
|-
| 254 || 110
|-
| 510 || 508
|-
| 1022 || 340
|-
| 2046 || 204
|-
| 4094 || 4092
|-
| 8190 || 774
|-
| 16382 || 16380
|}
 
:::: And 3^(2 .. 14) -3:
::::{| class="wikitable"
|-
! input ''(deck size)'' !! output ''(number of shuffles)''
|-
| 24 || 11
|-
| 78 || 30
|-
| 240 || 119
|-
| 726 || 140
|-
| 2184 || 1044
|-
| 6558 || 3198
|-
| 19680 || 2980
|-
| 59046 || 168
|-
| 177144 || 43332
|-
| 531438 || 6776
|-
| 1594320 || 397380
|}
 
:::: That last value might be excessive, but looking at the original task, for a sequence of 9950 numbers I get a cycle length of 9948. So if we are being true to the original task description I imagine we should include something similar in the updated requirements? Or is the 9950 example already an unreasonable burden? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 11:44, 16 June 2015 (UTC)
 
::::: I think 1020->1018 is sufficient as a "high number" example. There's nothing really to be gained by going higher, except for performance bench-marking but that's not what rosettacode is supposed to be about. --[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 13:04, 16 June 2015 (UTC)
 
: I felt like doing some improved HTML diagrams, so I went and updated the whole task while I was at it, using a list of values similar as I suggested above, but amended slightly to include 52 (the size of a standard card deck) and 8 (the example given in the introduction). It also has two powers of 10, two powers of 2, one factorial, and one number where the result is almost as big as the deck size (and also pretty right in absolute terms). I think that should cover everything of interest. --[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 13:01, 16 June 2015 (UTC)
Anonymous user