There is a 3x3 grid. Each cell in the grid may have a mine or not. For each cell,

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.

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

- Annote the molecular ion peak and the basse peak of mass spectrum and draw structure. Identify at least one other fragment ion and draw its structure.

- What factor must be presented to use the units of production method of depreciation ?

- The amino and carboxyl functional groups tend to form bases and acids by attracting or dropping