Picture Maze Generation by Successive Insertion of Path Segment
Tomio Kurokawa *
Department of Information Science, Aichi Institute of Technology, Toyota 470-0392, Japan.
*Author to whom correspondence should be addressed.
Abstract
Picture maze is a maze on which some picture appears when it is solved. This paper aims to present a very simple method to construct a picture maze. It is always possible to construct a spanning tree on a connected region of a binary picture. A spanning tree connects all vertices on the region. A 2-by-2 extended picture of a connected picture is the one such that each cell in the picture is transformed to four cells which constitute a square block with the cells. Then by analogy, it is always possible to construct a block spanning tree on the extended picture region, where a block is the square unit of four cells. Construction of the block spanning tree and the generation of the corresponding Hamiltonian path can be done at the same time. The Hamiltonian path is constructed along a data structure of a linked list in a simple manner. It traverses every cell on the 2-by-2 extended picture. The similar procedure but with the smaller block with two vertices, instead of four, can be applied to a non-extended picture, an ordinary one, which produces a near Hamiltonian path, which can then be a maze solution path. The near Hamiltonian path traverses nearly all the vertices on the picture, hence depicting a picture on the maze when it is solved. This paper demonstrates the method and its efficiency.
Keywords: Maze, Picture maze, Spanning tree, Block spanning tree, Path extension, Hamiltonian path