$30 off During Our Annual Pro Sale. View Details »

Mathematics of the game Spinpossible

Dana Ernst
March 08, 2013

Mathematics of the game Spinpossible

The game Spinpossible is played on a 3 by 3 board of scrambled tiles numbered 1 to 9, each of which may be right-side-up or up-side-down. The objective of the game is to return the board to the standard configuration where tiles are arranged in numerical order and right-side-up. This is accomplished by a sequence of "spins", each of which rotates a rectangular region of the board by 180 degrees. The goal is to minimize the number of spins used. It turns out that the group generated by the set of spins allowed in Spinpossible is identical to the symmetry group of the 9 dimensional hyper-cube. A number of interesting results about Spinpossible have been shown either computationally or analytically. Using brute-force, Sutherland and Sutherland verified that every scrambled board can be solved in at most 9 moves. In this talk, we will relay our progress on finding a short proof of this fact.

This talk was given by my undergraduate research students Dane Jacobson and Michael Woodward on March 8, 2013 at the Friday Afternoon Mathematics Undergraduate Seminar (FAMUS) at Northern Arizona University.

This talk is a slight modification of this deck: http://goo.gl/ry0Ue.

Dana Ernst

March 08, 2013
Tweet

More Decks by Dana Ernst

Other Decks in Research

Transcript

  1. The mathematics of the game Spinpossible
    Dane Jacobson & Michael Woodward
    Directed by D.C. Ernst
    Northern Arizona University
    Mathematics & Statistics Department
    F.A.M.U.S.
    Northern Arizona University
    March 8, 2013
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 1 / 15

    View Slide

  2. Introduction to Spinpossible
    Game Summary
    The game Spinpossible is played on a 3 × 3 board. A scrambled board consists of the
    numbers 1–9 arranged on the board, where each tile of the board contains a single
    number and that number can be either right side up or up side down.
    The object of the game is to convert a scrambled board into the solved board by
    applying a sequence of spins, where a spin consists of rotating an m × n
    subrectangles by 180◦.
    ?

    → · · · −

    To win, you must return the scrambled board to the solved board using the minimum
    possible number of spins.
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 2 / 15

    View Slide

  3. Introduction to Spinpossible (continued)
    Example
    Let’s play with an example:
    2
    9
    1
    4
    6
    5
    7
    3
    8

    2
    8
    3
    4
    5
    6
    7 1 9

    2
    1
    3
    4 5 6
    7 8 9

    1 2 3
    4 5 6
    7 8 9
    In this case, we were able to optimally solve the scrambled board in 3 moves in a way
    that is not unique.
    Comment
    • We will make a distinction between a tile labeled i versus position (i). For
    example, in the scrambled board above, the tile labeled 9 is in position (2).
    • A board is in the solved position iff every tile i is in position (i) with the correct
    orientation.
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 3 / 15

    View Slide

  4. Rectangle
    Defintion
    A rectangle Rij
    denotes the rectangle having position (i) in the upper left corner and
    position (j) in lower right corner. If i = j, then Rii
    is the rectangle consisting only of
    position (i).
    (i)
    (j)
    (i)
    Example
    R13
    is the entire top row of a board:
    (1) (3)
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 4 / 15

    View Slide

  5. Spin
    Definition
    Given a rectangle R, we denote the corresponding spin of R by sR
    . In particular, if
    R = Rij
    , then we may write sR
    = sij
    .
    Example
    2
    9
    1
    4
    6
    5
    7
    3
    8
    s29


    2
    8
    3
    4
    5
    6
    7 1 9
    s28


    2
    1
    3
    4 5 6
    7 8 9
    s12


    1 2 3
    4 5 6
    7 8 9
    This solution is expressed as s12
    s28
    s29
    , like function composition (right to left).
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 5 / 15

    View Slide

  6. Observations
    Comments
    • 6 spin types: 1 × 1, 1 × 2, 2 × 2, 1 × 3, 2 × 3, 3 × 3 (36 total spins).
    • sij
    sij
    is the same as “doing nothing.”
    • sij
    smn
    = smn
    sij
    iff Rij
    and Rmn
    are disjoint or have a common center.
    1 2 3
    4 5 6
    7 8 9

    1
    8
    3
    6
    5
    4
    7
    2
    9

    1 2 3
    4 5 6
    7 8 9
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 6 / 15

    View Slide

  7. Spin3×3
    Definition
    Spin3×3
    is the group generated by all possible spins of the 3 × 3 board, where the
    group operation is composition of spins.
    Comments
    • Every b ∈ Spin3×3
    can be expressed as a product of spins (not necessarily
    unique).
    • Every product of spins yields a scrambled board.
    • Conversely, every scrambled board is determined by a product of spins.
    • Consequently, there is a 1-1 correspondence between elements of Spin3×3
    and
    scrambled boards.
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 7 / 15

    View Slide

  8. Spin3×3
    Properties
    • |Spin3×3| = 9!29 = 185, 794, 560 possible boards.
    • If b ∈ Spin3×3
    , then b−1 will return the corresponding scrambled board to the
    solved board. In other words, b−1b corresponds to the solved board.
    • Finding a solution to a scrambled board is equivalent to finding a minimal length
    expression for b−1.
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 8 / 15

    View Slide

  9. Upper Bound Theorem
    Kindergarden algorithm
    2 3 3
    2 3 3
    2 2 1
    This shows that Spinpossible has an upper bound of 21 moves to solve any board.
    Theorem (Upper Bound)
    Every element of Spinm×n
    can be expressed as a product of at most 3mn-(m+n).
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 9 / 15

    View Slide

  10. Optimal solutions
    Definition
    We define the number k(m, n) to be the maximum of all the minimal length
    solutions in Spinm×n
    .
    Example
    Claim: k(1, 1) = 1. This number is the the maximum of all the minimal length
    solutions in Spin1×1
    .
    • |Spin1×1| = 2 possible boards.
    • Case 1: Solution length 0
    1
    • Case 2: Solution length 1
    1
    → 1
    Example
    Claim: k(1, 2) = 3. |Spin1×2| = 8, but an exhaustive approach yields the following
    maximally scrambled board in Spin1×2
    .
    2 1 →
    1
    2
    → 1
    2
    → 1 2
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 10 / 15

    View Slide

  11. Optimal solutions (continued)
    Theorem
    It has been shown computationally that k(3, 3) = 9. That is, every board in
    Spinpossible can be unscrambled in at most 9 moves.
    Goal
    Find a short proof that k(3, 3) = 9. There are several ways to approach this:
    • algorithmically (unlikely)
    • by properties of reflection on the 9-dimensional hypercube.
    • concepts of parity
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 11 / 15

    View Slide

  12. Minimal generating set of Spin3×3
    Proposition
    Let
    c0
    = s11
    c1
    = s12
    c2
    = s23
    c3
    = s36
    .
    .
    .
    c8
    = s89
    Then Spin3×3
    has a generating set with these 9 elements.
    c0
    c1
    c2
    c3
    c4
    c5
    c6
    c7
    c8
    4
    Figure : Coxeter graph of type B9.
    Corollary
    Spin3×3
    is the Coxeter group of type B9
    , equivalently, it is isomorphic to the
    symmetry group of the 9-dimensional hypercube.
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 12 / 15

    View Slide

  13. Reflections
    Definition
    A reflection is a conjugation of a Coxeter generator.
    Theorem
    It is well-known that the longest word in terms of reflections of the 9-dimensional
    hypercube is 9.
    Question
    Is this related to k(3, 3) being 9?
    Unfortunately...
    Counterexample
    The spin s13
    can be written as c0
    c1
    c2
    c0
    c1
    c0
    , which is of even length, and hence
    cannot be a conjugate. Therefore, not every spin is a reflection.
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 13 / 15

    View Slide

  14. Parity
    Definition
    Parity plays a role in the number of spins required to orient a tile in its correct
    position.
    1. If tile i is upside down in any position (j), then tile i will require an odd number
    of spins.
    2. If tile i is rightside up in any position (j), then tile i will require an even number
    of spins.
    Example
    3
    1 2 s13


    2
    1
    3 s12

    → 1 2 3
    • Tile 1 spin path: s12
    s13
    (even)
    • Tile 2 spin path: s12
    s13
    (even)
    • Tile 3 spin path: s13
    (odd)
    Can we analyze parity in order to maximize overlap and, in turn, minimize the
    number of moves?
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 14 / 15

    View Slide

  15. Conclusion
    Open Problems
    • Determine k(4, 4).
    • Analyze the distribution of solution lengths in Spinm×n
    .
    • Determine which spin types sij
    are equivalent.
    • Give bounds on the number of boards with unique solutions in Spinm×n
    .
    • Determine whether limn→∞
    k(n, n)/n2 exists, and if so, its value.
    • Show k(2, 2) = 5.
    Thank You!
    Dane Jacobson & Michael Woodward Directed by D.C. Ernst The mathematics of the game Spinpossible 15 / 15

    View Slide