TYPED-CHAINS in KAKURO

In another thread (http://forum.enjoysudoku.com/typed-chains-2d-chains-t37823.html), I defined various kinds of typed-chains (typed-bivalue-chains, typed-z-chains, typed-t-whips and typed-whips), that are special cases of the long established untyped versions.

All the examples I gave there are for Sudoku. Indeed, Sudoku is the more natural case for typed-chains, as there are 4 kinds of CSP-Variables, corresponding to the 4 2D-spaces introduced as early as 2007 in "The Hidden Logic of Sudoku".

However, there are many ways the CSP-Variables of a puzzle can be typed. In Kakuro as I modelled it, there are three natural kinds of CSP-Variables:

- - rc, representing the white cells

- hrc, representing the combinations allowed for a horizontal sector (and attached to a black cell)

- vrc, representing the combinations allowed for a vertical sector (and attached to a black cell)

A more interesting typing system would allow to restrict chains to sectors*. And that's what I've just done for Kakuro:

For each horizontal sector, represented by it's controller (black) cell (ri, cj) and named correspondingly hricj, the following three kinds of CSP-Variables are assigned the hricj type

- - hricj (the variable representing the allowed combinations for this horizontal sector)

- ri'cj' for any white rc-cell (ri' cj') in the sector

- ri'nk' for any rn-cell (ri' nk') in the sector

Similarly, for each vertical sector, represented by it's controller (black) cell (ri, cj) and named correspondingly vricj, 3 similar kinds of CSP-Variables are assigned type vricj

Remark: CSP-Variables corresponding to (white) rc-cells have two types, which is not a problem in CSP-Rules ("type" is not a function but a predicate). I didn't have to make any change to the generic typed-chain rules for making them work with these definitions.

(*) The first time I met the idea of solving a puzzle using only patterns in a single sector at a time was in an example by Mathimagic (http://forum.enjoysudoku.com/24-x-14-kakuro-challenge-t37104.html). I don't know how usual it is to make such a distinction. But that clearly makes a puzzle much simpler to solve. The only interaction between sectors is via assertions and eliminations in the white cells.

Remark: few puzzles are solvable by chain rules limited to a sector at a time.

I have to leave now, but I'll give an example in my next post.