Hashiwokakero - Solution Methods

Solution Methods

Solving a Hashiwokakero puzzle is a matter of procedural force: having determined where a bridge must be placed, placing it there can eliminate other possible places for bridges, forcing the placement of another bridge, and so on.

An island showing '3' in a corner, '5' along the outside edge, or '7' anywhere must have at least one bridge radiating from it in each valid direction, for if one direction did not have a bridge, even if all other directions sported two bridges, not enough will have been placed. Obviously, a '4' in a corner, '6' along the border, or '8' anywhere must have two bridges in each direction. This can be generalized as added bridges obstruct routes: a '3' that can only be travelled from vertically must have at least one bridge each for up and down, for example.

It is common practice to cross off islands whose bridge quota has been reached. In addition to reducing mistakes, this can also help locate potential "short circuits": keeping in mind that all islands must be connected by one network of bridges, a bridge that would create a closed network that no further bridges could be added to can only be permitted if it immediately yields the solution to the complete puzzle. The simplest example of this is two islands showing '1' aligned with each other; unless they are the only two islands in the puzzle, they cannot be connected by a bridge, as that would complete a network that cannot be added to, and would therefore force those two islands to be unreachable by any others.

There is a solution using integer linear programming in the MathProg examples included in GLPK.

Read more about this topic:  Hashiwokakero

Famous quotes containing the words solution and/or methods:

    To the questions of the officiously meddling police Falter replied absently and tersely; but, when he finally grew tired of this pestering, he pointed out that, having accidentally solved “the riddle of the universe,” he had yielded to artful exhortation and shared that solution with his inquisitive interlocutor, whereupon the latter had died of astonishment.
    Vladimir Nabokov (1899–1977)

    The methods by which a trade union can alone act, are necessarily destructive; its organization is necessarily tyrannical.
    Henry George (1839–1897)