Turnstyle



a.k.a. Tom's Turnstile
Copyright Brainwright, a division of Ceaco, 2016;
U.S. Patent 7,604,234 of Tom Cutrofello, 2009.
(plastic: 2 x 2.25 x 5/8 inches;
brass version: 2 x 2.25 x 5/8 inches, 6.1 ounces; box is 4 x 4 x 2 inches)

Two discs connected by a gear on the back, that spin together by turning the knob; similar but different from the Top Spin puzzle. Easy to rotate the discs, a bit slow to slide the numbers due to the small size (but it fits nicely into a pocket). The basic moves are:
Shift all pieces one position right (clockwise) or left (counter-clockwise).

Flip the discs to change four consecutive pieces from ABCD to BADC.
It is tempting to argue parity for the number of exchanges in a solution, but since the pieces lie on a cycle and not a line, every piece is both ahead of and behind every other, and it is possible to exchange just two adjacent pieces and leave the rest of the puzzle the same (as shown in the photo above); call that transformation SWAP. Hence, solving is always possible from any permutation (although from any given permutation, faster solutions may be possible):
Phase 1: Consider 12 solved. Then, starting with 11 in the rightmost position, successively move 11 right one position with a shift left followed by a flip, until 11 is next to 12. Then repeat this for 10, 9, ... 5.

Phase 2: The final four can always be rearranged using successive swaps. For example, starting with 4321, swap(43), swap(42), swap(41), swap(32), swap(31), swap(21) results in 1234 (or, using only two swaps do flip, swap(41), flip, swap(32)).

SWAP Sequence
Computer search found this SWAP sequence; R denotes move right (clockwise), L denotes move left (counterclockwise), and F denotes flip, and the letters 0,A,B stand for 10,11,12:


The existence of a SWAP sequence means that all permutations are possible and the solution method proposed on the previous page is well defined. Phase 1 placement of numbers 5 through 12 is straightforward, although it could be shorter for a given permutation. An interesting general question is to improve Phase 2 to fix the final 4 in a way faster than "brute force" use of SWAP. For example, the previous page noted that a final 4 of 4321 can be fixed with 2 flips and two SWAPs, for a total of 66 moves. However, it can be done in only 18 moves:


Computer search for all 24 permutations found that on average about 22.12 moves are needed to fix the final 4; here is a table of the lengths found for each permutation:

Reversing The Turnstyle
A natural task for this puzzle is to reverse the the numbers. After doing your best, compare the number of steps used to the sequence below, found by computer search, to convert the reversed sequence back to the original one. Note that this sequence is only 9 steps more than the minimum number of steps for a single SWAP.

Turnstyle Puzzles of Smaller Sizes
One can imagine Turnstyle with a smaller number of pieces, and consider what sizes have the property that any permutation can be reached; i.e., for which a SWAP is possible.

Computer search shows that a SWAP is not possible for sizes less than 8, and also that it is not possible for puzzles of size 9 and 11.

Here are SWAP sequences for puzzles of sizes 8 and 10, where R denotes move right, L denotes move left, and F denotes flip, and the letters 0,A,B stand for 10,11,12.

Puzzle of size 8:


Puzzle of size 10:

Turnstyle Puzzles of Larger Sizes
Define JUMP4 to advance a pair of pieces right past 4 pieces; it can be implemented in 10 moves (the discs are in bold face, L = shift left, R = shift right, F = flip):


Define JUMP6 by using the first 8 moves of a JUMP4 followed by 8 additional moves to advance a pair of pieces right past 6 pieces:


Now consider a puzzle of size 14. A SWAP can be implemented by the sequence for 10 pieces presented earlier and using JUMP4 sequences to keep the turntable in the "zone" of 10 positions. That is, call the positions initially under the turntable EF, the four positions to the left of the turntable ABCD and the positions to the right of the turntable GHIJ, and use the SWAP sequence for 10 pieces to SWAP the pieces in position EF, with the modification that whenever shift operations cause the turntable to be at positions AB and the next operation is a shift left, then first do a JUMP4 on positions IJ, and whenever shift operations cause the turntable to be at positions IJ and the next operation is a shift right, then first do a reverse JUMP4 on position AB.

Similarly, SWAP for 12 pieces combined with JUMP4 gives SWAP for 16 pieces, and SWAP for 12 pieces combined with JUMP6 gives SWAP for 18 pieces. Doing the jumps in pairs gives swaps for 20, 22, 24 pieces, in triples gives swaps for 26, 28 30 pieces, and so on, to conclude that SWAP is possible for any even number of pieces of 8 or more.

Of course a shortest solution for a given permutation that may be much more efficient than a sequence of SWAPS.

Given that SWAP is not possible for sizes 9 and 11 but it is for sizes 8, 10, and 12, an interesting question is whether SWAP is not possible for puzzles of odd size.