sitelogo
JigsawPuzzle

A 20-line solver. To play this game:

  1. stack four sheets of different colored paper
  2. cut picture into jigsaw puzzle
  3. do four puzzles so that adjoining pieces get different colors

Now matter how wild your scissor art is, there is always a solution to the puzzle. This -if my memory is correct- is guaranteed by some clever guys of the University of Illinois who solved the infamous 4 color problem and proved that 4 colors suffice.

The MINERVA program that computes the solution is brute force search, about 20 lines. The puzzle is given in 60 or so lines, the other programs are for drawing.

The program illustrates a fairly rich set of techniques

Notes: The 'Show All Solutions' button will produce 192 new windows for this example; repeated use will quickly exhaust your Windowing resources.

Netscape 4.0 may not execute this example properly.


Darueber read on...
scroll to top managed with ubiCMS