You are here

Modeling

18 March, 2015 - 09:46
Available under Creative Commons-ShareAlike 4.0 International License. Download for free at http://cnx.org/contents/383d4b87-2d7b-454e-99fe-2eaa43eae8ff@20.20

Exercise 4.4.21

Translate the following into first-order logic: " Raspberry sherbet with hot fudge (rshf) is the tastiest dessert. " Use tastier as your only relation. What is the intended domain for your formula? What is a relation which makes this statement true? One which makes it false?

Exercise 4.4.22

Even allowing for ellision, the list of WaterWorld domain axioms (Section 6.6) is incomplete, in a sense. The game reports how many pirates exist in total, but that global information is not refected in the propositions or axioms. We had the same problem (Exercise 2.5.13) with the propositional logic domain axioms

  1. First, assume we only use the default WaterWorld board size and number of pirates, i.e., fve. What additional axiom or axioms do we need?
  2. Next, generalize your answer to model the program's ability to play the game with a different number of pirates. What problem do you encounter?

Exercise 4.4.23

The puzzle game of Sudoku is played on a 9 × 9 grid, where each square holds a number between 1 and 9. The positions of the numbers must obey constraints. Each row and each column has each of the 9 numbers. Each of the 9 non-overlapping 3 ×3 square sub-grids has each of the 9 numbers.

Like WaterWorld, throughout the game, some of the values have not been discovered, although they are determined. You start with some numbers revealed, enough to guarantee that the rest of the board is uniquely determined by the constraints. Thus, like in WaterWorld, when deducing the value of another location, what has been revealed so far would serve as premises in a proof.

Fortunately, there are the same number of rows, columns, subgrids, and values. So, our domain is {1, 2, 3, 4, 5, 6, 7, 8, 9}. To model the game, we will use the following relations:

  • value(r, c, v)indicates that at row r, column c is the value v.
  • v = w is the standard equality relation.
  • subgrid(g, r, c)indicates that subgrid g includes the location at row r, column c.

Provide domain axioms for Sudoku, and briefy explain them. These will model the row, column, and subgrid constraints. In addition, you should include constraints on our above relations, such as that each location holds one value.