Talk:Permutations by swapping: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Does "Python: recursive" fit this task?: No it doesn't; this task is broken)
(→‎Does "Python: recursive" fit this task?: Yep. But the task wording might need clarification.)
Line 4: Line 4:


: It also doesn't generate the output requested (it's missing the signs). Not that I think it should, though; right now, too much of this task smells of “let's write the task to force my code to be a solution”. OTOH, if I was to take the version that ''does'' formally satisfy the task as described, it wouldn't be usable in the other task linked. Oh dear, oh dear! I think this draft task needs cleaning up, and the cleaning needs to be done by someone other than the original author with an eye to maximizing coherence and the ability to implement reasonably in many languages. –[[User:Dkf|Donal Fellows]] 19:27, 26 July 2012 (UTC)
: It also doesn't generate the output requested (it's missing the signs). Not that I think it should, though; right now, too much of this task smells of “let's write the task to force my code to be a solution”. OTOH, if I was to take the version that ''does'' formally satisfy the task as described, it wouldn't be usable in the other task linked. Oh dear, oh dear! I think this draft task needs cleaning up, and the cleaning needs to be done by someone other than the original author with an eye to maximizing coherence and the ability to implement reasonably in many languages. –[[User:Dkf|Donal Fellows]] 19:27, 26 July 2012 (UTC)


Hi Spoon, Donal; A quote from the Wikipedia article:
: ''"Each permutation in the sequence that it generates differs from the previous permutation by swapping two adjacent elements of the sequence."''
Do I need to make clear that the program does not have to generate using swaps - only that the above holds true? --[[User:Paddy3118|Paddy3118]] 20:11, 26 July 2012 (UTC)

Revision as of 20:11, 26 July 2012

Does "Python: recursive" fit this task?

The "Python: recursive" solution doesn't seem to use swaps, which I thought was the whole point of this task. We already have a Permutations task for generating permutations in general. --Spoon! 17:58, 26 July 2012 (UTC)

It also doesn't generate the output requested (it's missing the signs). Not that I think it should, though; right now, too much of this task smells of “let's write the task to force my code to be a solution”. OTOH, if I was to take the version that does formally satisfy the task as described, it wouldn't be usable in the other task linked. Oh dear, oh dear! I think this draft task needs cleaning up, and the cleaning needs to be done by someone other than the original author with an eye to maximizing coherence and the ability to implement reasonably in many languages. –Donal Fellows 19:27, 26 July 2012 (UTC)


Hi Spoon, Donal; A quote from the Wikipedia article:

"Each permutation in the sequence that it generates differs from the previous permutation by swapping two adjacent elements of the sequence."

Do I need to make clear that the program does not have to generate using swaps - only that the above holds true? --Paddy3118 20:11, 26 July 2012 (UTC)