Talk:Perfect shuffle: Difference between revisions

m
Line 20:
 
::::::: No, I'm not saying (or implying) that I didn't read about the failure, and I have read the Rosetta Code task's requirements.   It says to print (essentially) 5,000 results.   -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 22:52, 15 June 2015 (UTC)
 
=== What to do? ===
 
:Seems like a flaw to me to. Why not edit the task to ask for shuffle counts for 2^(2*n) for n = 1..7 i.e only for counts: [4, 16, 64, 256, 1024, 4096, 16384]
Line 26 ⟶ 28:
:--[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 22:33, 15 June 2015 (UTC)
 
:: Well... I've documented the algorithm I'm using in the J entry, and... 16384 has a cycle length of 14, which takes less than a millisecond for me to compute (though in general the cycle length for this task for a sequence of unique values of length 2^N should be N). So even if you brute force it, that form of the task shouldn't take that long. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 22:40, 15 June 2015 (UTC)
 
:::'''Who would object''' to my suggested change and why? I did not start the draft task or do a language implementation but the task as written could be improved by defining drastically shorter output requirements. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 00:01, 16 June 2015 (UTC)
 
:::: I cannot think of any grounds for objection to shortening the sequence. Though for a decent workout, perhaps the sequence should be factorial values: 2 6 24 120 720 5040? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 04:20, 16 June 2015 (UTC)
6,951

edits