Ramka is a Soviet puzzle with 9 numbered tiles arranged in 3 rows of 3 tiles. These rows lie in a frame which provides two empty spaces, one on either side of a row, each capable of holding one of the tiles. The centre section containing the tile rows can be shifted up and down so that any of the three rows lies between the spaces provided by the frame. The tiles can individually only slide sideways along a row, not vertically.
The Russian word "Ramka" means "frame". On the back of the puzzle the price is given as 80 kopeks.
If your browser supports JavaScript, then you can play Ramka by clicking the link below:
This depends on what are considered to be distinct positions. There are 11 tile locations, with 9
distinct tiles and 2 empty spaces. That would lead to 11!/2 = 19,958,400 tile positions, or 3·11!/2 =
59,875,200 if vertical shifts of the block of rows are counted as distinct.
I prefer to ignore not only the vertical shifts of the rows, but also horizontal shifts within the
three locations on a row. In that case there are 13 arrangements for the empty spaces (both in the frame;
one on the left of the frame and the other in any row; one on the right of the frame and the other in any row;
both on the same row, or both on different rows). Combined with the 9! ways to rearrange the 9 tiles,
that gives 13*9! = 4,717,440 distinct positions.
I have used a computer to calculate God's Algorithm, and the results are shown in the table below. A move is the sliding of a tile from a row into one of the frame spaces, or vice versa. Sliding the block of rows vertically or sliding tiles horizontally within a row are not counted as moves, and arrangements that differ by such changes are considered identical. The table shows that the puzzle takes at most 42 moves to solve (26.420 on average).




One of the four antipodes is the mirror image position (with the rows reading 321, 654, 987). The other three antipodes are similar to that position but with the two outer tiles of one row slid into the frame's spaces.
This puzzle is slightly trickier than it looks. It can be solved however by using the following two techniques (both start with the frame locations empty):


















These two techniques are sufficient to solve any position.
Phase 1: Solve the top row
Phase 2: Bring the tiles to their rows
Phase 3: Order the tiles in each row
In this phase you will reorder each unsolved row by swapping adjacent tiles. You need at
most 3 such swaps to solve a row. The worst case is when you have to swap the two outer tiles,
for example 654 which is solved in three swaps for example like this: 654, 645, 465, 456.