Talk:Sattolo cycle: Difference between revisions

From Rosetta Code
Content added Content deleted
Line 10: Line 10:


Should we be looking forward to tasks like "bubble sort with descending iteration"? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 14:52, 5 September 2016 (UTC)
Should we be looking forward to tasks like "bubble sort with descending iteration"? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 14:52, 5 September 2016 (UTC)

: It's not invisible, as it affects the algorithm's behavior. For example, for <code>[10, 20, 30]</code> the Knuth shuffle has six possible outputs, but the Sattolo cycle only two, because it cannot output permutations that have elements in their original place. That makes it interesting, at least. I suppose the two algorithms could have been covered by a single combined task, but it's too late for that now that [[Knuth shuffle]] has existed for so long and has so many solutions. --[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 17:19, 7 September 2016 (UTC)

Revision as of 17:20, 7 September 2016

Yet another task needing a description

Linking to a wikipedia page really is not good enough. Those pages change over time, and are not written specifically for our site. Anyways, this task needs an adequate description. --Rdm (talk) 07:21, 5 September 2016 (UTC)

Done. --Smls (talk) 08:40, 5 September 2016 (UTC)

Not sure this is a worthwhile issue

Given that the Sattolo cycle is almost identical to the Knuth Shuffle - with the only difference being an otherwise invisible implementation detail - what makes this task worth doing?

Should we be looking forward to tasks like "bubble sort with descending iteration"? --Rdm (talk) 14:52, 5 September 2016 (UTC)

It's not invisible, as it affects the algorithm's behavior. For example, for [10, 20, 30] the Knuth shuffle has six possible outputs, but the Sattolo cycle only two, because it cannot output permutations that have elements in their original place. That makes it interesting, at least. I suppose the two algorithms could have been covered by a single combined task, but it's too late for that now that Knuth shuffle has existed for so long and has so many solutions. --Smls (talk) 17:19, 7 September 2016 (UTC)