Sunday, April 19, 2009

Sudoku and Architecture creation

Here is how i solve Sudoku puzzles. I look at the whole problem and try to see from my memory if i have ever seen a pattern like this or even a sub-pattern. If i find one then i try to see if whole or part of or learning from the old solution could be used. In either case i proceed as below. Let me call it pattern approach.

The simplest of sudokus have a weak part of the problem. If you get that part and solve it, suddenly the whole sudoku solution comes up on its own like a thread that has been pulled from a woven cloth. Sometimes it is multiple threads, so when u take out one thread, you have to find the start of another thread and so on. Same might be true when u are solving a huge set of simultaneous equations with pen and paper. You look for equation with least variables or some peculiar form that has clue in it. Looks like a detective approach. Let me call it weakest part of problem approach.

In some of the harder sudokus author removes all the starting points. One can however find a starting point that needs assumptions of a small part of initial solution. One starts, tries it and backtracks on findind deadend. Then starts again with a different assumptions. Let me call it trial and backtrack.

Given the problem specification (i.e. all requirement and context analysis done), an architect tries a similar approach:

1. Pattern approach
2. Weakest part of problem approach
3. Trial and backtrack approach

No comments: