Talk:Topswops: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Repitition?: new section)
(→‎Repitition?: Always terminating.)
Line 6: Line 6:


I assume you're not allowed to repeat configurations? Otherwise you could swap infinitely for any initial setup that didn't start with 1. --[[User:Mwn3d|Mwn3d]] 20:26, 23 November 2012 (UTC)
I assume you're not allowed to repeat configurations? Otherwise you could swap infinitely for any initial setup that didn't start with 1. --[[User:Mwn3d|Mwn3d]] 20:26, 23 November 2012 (UTC)

: I think I read that for all starting permutations you either start at or end up with one on top. There was no mention of it not terminating. There is [http://oeis.org/A000376 a variant] where you only count a perm if it ends up sorted when the one is on top. (It doesn't always). --[[User:Paddy3118|Paddy3118]] 23:28, 23 November 2012 (UTC)

Revision as of 23:28, 23 November 2012

Speed?

Should I change the limits and ask for an output table for n in 1..8 instead? The idea is not to solicit heavily speed optimised solutions but to show an accurate solution in idiomatic code. --Paddy3118 22:48, 22 November 2012 (UTC)

I would be surprised if there was not a better algorithm than the straightforward translation of the rounding process. So I think it's fine to let n from 1 to 10 in order to give an incentive to find a good algorithm.--Grondilu 23:16, 22 November 2012 (UTC)

Repitition?

I assume you're not allowed to repeat configurations? Otherwise you could swap infinitely for any initial setup that didn't start with 1. --Mwn3d 20:26, 23 November 2012 (UTC)

I think I read that for all starting permutations you either start at or end up with one on top. There was no mention of it not terminating. There is a variant where you only count a perm if it ends up sorted when the one is on top. (It doesn't always). --Paddy3118 23:28, 23 November 2012 (UTC)