Goishi Hiroi

Last updated
Solving a Goishi Hiroi puzzle
1.
An example with a fixed first stone.
2.
A failed attempt: as U-turns are not allowed, the top-right stone must be the last stone.
3.
A failed attempt: as stone 4 is removed on passing it, there is nowhere to go from stone 7.
4.
The unique solution, even if stone 1 is not fixed. Hiroimono example.svg
Solving a Goishi Hiroi puzzle
1. An example with a fixed first stone.
2.A failed attempt: as U-turns are not allowed, the top-right stone must be the last stone.
3.A failed attempt: as stone 4 is removed on passing it, there is nowhere to go from stone 7.
4.The unique solution, even if stone 1 is not fixed.

Goishi Hiroi, also known as Hiroimono, is a Japanese variant of peg solitaire. In it, pegs (or stones on a Go board) are arranged in a set pattern, and the player must pick up all the pegs or stones, one by one. In some variants, the choice of the first stone is fixed, while in others the player is free to choose the first stone. [1] After the first stone, each stone that is removed must be taken from the next occupied position along a vertical or horizontal line from the previously-removed stone. Additionally, it is not possible to reverse direction along a line: each step from one position to the next must either continue in the same direction as the previous step, or turn at a right angle from the previous step.

These puzzles were used for bar bets in 14th-century Japan, [2] and a collection of them was published in a Japanese puzzle book from 1727. [3]

Determining whether a given puzzle can be solved is NP-complete. This can be proved either by a many-one reduction from 3-satisfiability, [1] or by a parsimonious reduction from the closely related Hamiltonian path problem. [4]

Related Research Articles

The subset sum problem (SSP) is a decision problem in computer science. In its most general formulation, there is a multiset of integers and a target-sum , and the question is to decide whether any subset of the integers sum to precisely . The problem is known to be NP-complete. Moreover, some restricted variants of it are NP-complete too, for example:

<span class="mw-page-title-main">Peg solitaire</span> Board game for one player

Peg Solitaire, Solo Noble, Solo Goli, Marble Solitaire or simply Solitaire is a board game for one player involving movement of pegs on a board with holes. Some sets use marbles in a board with indentations. The game is known as solitaire in Britain and as peg solitaire in the US where 'solitaire' is now the common name for patience.

<i>Sokoban</i> 1981 video game

Sokoban is a puzzle video game in which the player pushes boxes around in a warehouse, trying to get them to storage locations. The game was designed in 1981 by Hiroyuki Imabayashi, and first published in December 1982.

In computational complexity theory, a decision problem is PSPACE-complete if it can be solved using an amount of memory that is polynomial in the input length and if every other problem that can be solved in polynomial space can be transformed to it in polynomial time. The problems that are PSPACE-complete can be thought of as the hardest problems in PSPACE, the class of decision problems solvable in polynomial space, because a solution to any one such problem could easily be used to solve any other problem in PSPACE.

<span class="mw-page-title-main">Tower of Hanoi</span> Mathematical puzzle game

The Tower of Hanoi is a mathematical game or puzzle consisting of three rods and a number of disks of various diameters, which can slide onto any rod. The puzzle begins with the disks stacked on one rod in order of decreasing size, the smallest at the top, thus approximating a conical shape. The objective of the puzzle is to move the entire stack to one of the other rods, obeying the following rules:

  1. Only one disk may be moved at a time.
  2. Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack or on an empty rod.
  3. No disk may be placed on top of a disk that is smaller than it.
<i>Mastermind</i> (board game) Board game

Mastermind or Master Mind is a code-breaking game for two players invented in Israel. It resembles an earlier pencil and paper game called Bulls and Cows that may date back a century.

<span class="mw-page-title-main">TwixT</span> Connection board game in the 3M bookshelf game series

TwixT is a two-player strategy board game, an early entrant in the 1960s 3M bookshelf game series. It became one of the most popular and enduring games in the series. It is a connection game where players alternate turns placing pegs and links on a pegboard in an attempt to link their opposite sides. While TwixT itself is simple, the game also requires strategy, so young children can play it, but it also appeals to adults. The game has been discontinued except in Germany and Japan.

<span class="mw-page-title-main">Nonogram</span> Logic puzzle forming a picture in a grid

Nonograms, also known as Hanjie, Paint by Numbers, Picross, Griddlers, and Pic-a-Pix are picture logic puzzles in which cells in a grid must be colored or left blank according to numbers at the edges of the grid to reveal a hidden picture. In this puzzle, the numbers are a form of discrete tomography that measures how many unbroken lines of filled-in squares there are in any given row or column. For example, a clue of "4 8 3" would mean there are sets of four, eight, and three filled squares, in that order, with at least one blank square between successive sets.

<span class="mw-page-title-main">Sudoku</span> Logic-based number-placement puzzle

Sudoku is a logic-based, combinatorial number-placement puzzle. In classic Sudoku, the objective is to fill a 9 × 9 grid with digits so that each column, each row, and each of the nine 3 × 3 subgrids that compose the grid contains all of the digits from 1 to 9. The puzzle setter provides a partially completed grid, which for a well-posed puzzle has a single solution.

<span class="mw-page-title-main">Nurikabe (puzzle)</span> Logic puzzle

Nurikabe is a binary determination puzzle named for Nurikabe, an invisible wall in Japanese folklore that blocks roads and delays foot travel. Nurikabe was apparently invented and named by the publisher Nikoli; other names for the puzzle include Cell Structure and Islands in the Stream.

Nikoli Co., Ltd. is a Japanese publisher that specializes in games and, especially, logic puzzles. Nikoli is also the nickname of a quarterly magazine issued by the company in Tokyo. Nikoli was established in 1980, and became prominent worldwide with the popularity of Sudoku.

<span class="mw-page-title-main">Heyawake</span>

Heyawake is a binary-determination logic puzzle published by Nikoli. As of 2013, five books consisting entirely of Heyawake puzzles have been published by Nikoli. It first appeared in Puzzle Communication Nikoli #39.

<span class="mw-page-title-main">Hasami shogi</span>

Hasami shogi is a variant of shogi. The game has two main variants, and all Hasami variants, unlike other shogi variants, use only one type of piece, and the winning objective is not checkmate. One main variant involves capturing all but one of the opponent's men; the other involves building an unbroken vertical or horizontal chain of five-in-a-row.

<span class="mw-page-title-main">Minesweeper (video game)</span> Puzzle video game

Minesweeper is a logic puzzle video game genre generally played on personal computers. The game features a grid of clickable tiles, with hidden "mines" scattered throughout the board. The objective is to clear the board without detonating any mines, with help from clues about the number of neighboring mines in each field. Variants of Minesweeper have been made that expand on the basic concepts, such as Minesweeper X, Crossmines, and Minehunt. Minesweeper has been incorporated as a minigame in other games, such as RuneScape and Minecraft's 2015 April Fools update.

<span class="mw-page-title-main">Layered graph drawing</span> Graph drawing with vertices in horizontal layers

Layered graph drawing or hierarchical graph drawing is a type of graph drawing in which the vertices of a directed graph are drawn in horizontal rows or layers with the edges generally directed downwards. It is also known as Sugiyama-style graph drawing after Kozo Sugiyama, who first developed this drawing style.

In computational complexity theory and combinatorics, the token reconfiguration problem is a reconfiguration problem on a graph with both an initial and desired state for tokens.

In theoretical computer science, nondeterministic constraint logic is a combinatorial system in which an orientation is given to the edges of a weighted undirected graph, subject to certain constraints. One can change this orientation by steps in which a single edge is reversed, subject to the same constraints. The constraint logic problem and its variants have been proven to be PSPACE-complete to determine whether there exists a sequence of moves that reverses a specified edge and are very useful to show various games and puzzles are PSPACE-hard or PSPACE-complete.

<i>Sakura Wars</i> (1996 video game) 1996 video game

Sakura Wars is a cross-genre video game developed by Sega and Red Company and published by Sega in 1996. It is the first installment in the Sakura Wars series, created by Oji Hiroi. Originally released for the Sega Saturn, it was later ported to other systems including the Dreamcast, and had a remake for the PlayStation 2. Defined by Sega as a "dramatic adventure" game, Sakura Wars combines overlapping tactical role-playing, dating sim, and visual novel gameplay elements.

<span class="mw-page-title-main">Planar SAT</span> Boolean satisfiability problem restricted to a planar incidence graph

In computer science, the planar 3-satisfiability problem (abbreviated PLANAR 3SAT or PL3SAT) is an extension of the classical Boolean 3-satisfiability problem to a planar incidence graph. In other words, it asks whether the variables of a given Boolean formula—whose incidence graph consisting of variables and clauses can be embedded on a plane—can be consistently replaced by the values TRUE or FALSE in such a way that the formula evaluates to TRUE. If this is the case, the formula is called satisfiable. On the other hand, if no such assignment exists, the function expressed by the formula is FALSE for all possible variable assignments and the formula is unsatisfiable. For example, the formula "a AND NOT b" is satisfiable because one can find the values a = TRUE and b = FALSE, which make (a AND NOT b) = TRUE. In contrast, "a AND NOT a" is unsatisfiable.

References

  1. 1 2 Andersson, Daniel (2007), "HIROIMONO Is NP-Complete", in Crescenzi, Pierluigi; Prencipe, Giuseppe; Pucci, Geppino (eds.), Fun with Algorithms: 4th International Conference, FUN 2007, Castiglioncello, Italy, June 3-5, 2007, Proceedings, Lecture Notes in Computer Science, vol. 4475, Springer, pp. 30–39, doi:10.1007/978-3-540-72914-3_5, ISBN   978-3-540-72913-6
  2. Costello, Matthew J. (1988), The Greatest Puzzles of All Time, Dover books on mathematical & logical puzzles, cryptography and word recreations, Courier Corporation, pp. 9–10, ISBN   9780486292250
  3. Tagaya, K. (1727), Wakoku Chie Kurabe. As cited by Fukui, Suetsugu & Suzuki (2017).
  4. Fukui, Masanori; Suetsugu, Koki; Suzuki, Akira (2017), "Complexity of "Goishi Hiroi"", Abstracts from the 20th Japan Conference on Discrete and Computational Geometry, Graphs, and Games (JCDCG³ 2017) (PDF), pp. 142–143, archived from the original (PDF) on 2017-09-12, retrieved 2017-09-11