I have started reading Rosen's Discrete Mathematics and I have reached the topic of propositional satisfiability and it's application in solving Sudoku.
Solving such puzzles consists of solving the following assertions:
- Every row contains every number
- Every column contains every number
- Every 9 x 9 block contains every number
- And then taking a conjunctions of the values so obtained.
The book has solved the predicate function for the first case as:
$$ \land_{i=1}^9 \land_{n=1}^9 \lor_{j=1}^9 \ \ p(i,j,n) $$
The explanation will be something like:
[cell(1,1) contains 1 or cell(1,2) contains 1 or ...] and [cell(1,1) contains 2 or cell(1,2) contains 2 or ...] for all 9 rows.
I came up with my a different solution:
$$ \land_{i=1}^9 \land_{j=1}^9 \lor_{n=1}^9 \ \ p(i,j,n) $$
thinking along the lines:
[cell(1,1) contains 1 or cell(1,1) contains 2 or ...] and [cell(1,2) contains 1 or cell(1,2) contains 2 or ...] for all 9 rows.
When I think about this, both of the formulas appear to be the same -- going through all the columns and validating that every row contain every number.
Are these the same really? Or am I missing out on something?