either it is observed or not. If a cell is observed, an indicator for that cell is true
iff that cell or one of its diagonally adjacent cells (northeast, northwest, southeast,
southwest) has a mine in it (note that the “or” here is a standard “disjunctive or”,
not an “exclusive or”).
(a) Define all binary variables required for a propositional encoding of this
Minesweeper problem. Give your propositional variables interpretable names
like m 1 2 for the variable indicating whether a mine is in cell (1, 2). As a
function of n, how many variables are needed to encode Minesweeper for a
grid of dimension n × n?
(b) Define the constraints that encode that the cell (1, 2) is observed and indicates
a mine is not present, that the cell (2, 1) is observed and indicates a mine is
present, and that the remaining cells are unobserved.
(c) Define the remaining constraints for this problem required to enforce consistency
between all of the variables. Note that corner, edge, and middle portions
of the grid must be treated separately when determining adjacency, e.g., a corner
only has one diagonally adjacent cell whereas the middle cell (2, 2) has four
diagonally adjacent cells. Your constraint encoding should use ) and , and
thus should not be in CNF.
(d) Provide the step-by-step CNF transformation of the shortest
axiom from (c) that involves the proposition m 1 1.
(e) Encode the knowledge base constraints (b) and (c) in the DIMACS CNF format
described below. In the DIMACS comments, show the mapping between
the variable names and the DIMACS variable IDs (e.g., m 1 2 ! 5). Provide a
listing of your DIMACS file. To avoid errors, it is strongly suggested that you
write a short program or script to generate the DIMACS file automatically.
Recently Asked Questions
- What is the difference between an income statement and a cash flow statement? Please also explain how each are used. Emergency Response Mary Ann, a medical
- According to IDC , Apple 's share of the smartphone market was 40.4 % during a recent quarter . A random sample of 90 smartphone users was selected . The
- Picture a competitive market with the usual upward sloping supply curve and downward sloping demand curve . If the current price is creating a shortage , then