CompSci102DiscreteMathforComputerScience.ppt

duplicate * Duplicate * duplicate * Duplicate * * * Encoding as a Satisfiability Problem Let p(i,j,n) denote the proposition that is true when the number n is in the cell in the ith row and the jth column. There are 9?9 ? 9 = 729 such propositions. In the sample puzzle p(5,1,6) is true, but p(5,j,6) is false for j = 2,3,…9 Encoding (cont) For each cell with a given value, assert p(d,j,n), when the cell in row i and column j has the given value. Assert that every row contains every number. Assert that every column contains every number. Encoding (cont) Assert that each of the 3 x 3 blocks c

文档评论(0)

1亿VIP精品文档

相关文档