Talk:Sattolo cycle: Difference between revisions

remarks about the problem definition
(remarks about the problem definition)
Line 26:
 
: The pseudocode in the task description performs this operation zero times for that case. The reason for this is the same reason it does not shuffle the two element array twice (resulting in an identity operation). --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 15:39, 3 April 2017 (UTC)
 
== Definition "each element ends up in a new position" ==
 
The definition "each element ends up in a new position" is insufficient. In addition to each element being in a new position, it also holds that the resulting permutation (of length ''n'') is a length-''n'' cycle (consult Wikipedia for explanation). Consider input <code>ABCD</code> and its permutation <code>BADC</code>. Each element is in a new position, yet the permutation is not a cycle, and therefore is not a valid output of Sattolo's algorithm. --[[User:Dick de Bill|Dick de Bill]] ([[User talk:Dick de Bill|talk]]) 17:44, 26 April 2020 (UTC)