View the step-by-step solution to:

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.

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.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.


Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question