Most probably because of AI::Prolog
I have the impression - I might be wrong - that these clauses can be represented as entries in a 3x3x3 matrix = (name x profession x fruit) in the example given.
Entries would be undef, 0 and 1 and each 3x3 sub-square must have exactly one 1 entry and all others 0 for a solution.
A solver could be built by filling that matrix and constantly checking all 9 sub layers for deduced entries. (see example here)
Giving a set of random clauses it should be possible to pick n til the solver proves it's solvable (rejecting contradictory clauses)
This reminds me of a graphic technique we learned at uni for finding boolean rules and logical circuits from a given truth table, but I can't remember the name.
(Update: this looks right http://en.wikipedia.org/wiki/Karnaugh_map )
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery
In reply to Re^2: My first cpan module - App::ForKids::LogicalPuzzleGenerator
by LanX
in thread My first cpan module - App::ForKids::LogicalPuzzleGenerator
by pawel.biernacki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |