Talk:Topswops

Revision as of 23:28, 23 November 2012 by rosettacode>Paddy3118 (→‎Repitition?: Always terminating.)

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)
Return to "Topswops" page.