CIS630 Homework 3: Propositional and Predicate Logic

Due: Monday, May 10 at 11:59 p.m.
1 point late penalty for each minute late

For notational convenience, you can spell out 'ForAll' and 'Exists' if you're using a text editor that doesn't support the logic symbols. Also, you can use & for 'And'.

  1. (15 points) Express the following statements in Propositional Logic:
    1. P can only be true if Q is.
    2. Either R or S is true.
    3. Harry has a car but Jim does not. (define the proposition symbols you use).
  2. (15 points) Derive the indicated statements using inference rules for propositional logic: The KB initially contains:
    1. P -> (~Q & S)
    2. S & ~W
    3. P V R
    4. S -> (~Q & T)
    5. R -> W
    • derive: ~W & ~Q
    • derive: P Note: this has changed! The buggy version was "derive ~P"
    • derive: ~(Q & S)
  3. (10 points) Rewrite the following statements in FOL, stating definitions for the predicates you use:
    1. Freddy is a green frog
    2. Frogs croak.
    3. There is at least one frog that lives in Buckeye Creek.
  4. (5 points) Consider a KB containing just two sentences: P(a) and P(b). Does this KB entail All x P(x)? Explain your answer in terms of models.
  5. (21 points) 8.6 a,b,c,d,e,h,i from the textbook. Some of these are challenging, but do your best. Start by figuring out how many separate entities are being described, and what relationships obtain between them. You can use arithmetic operators such as greater-than or less-than as predicates.
  6. (9 points) 8.8 from the book
  7. (25 points) Using the following first-order logic predicates:
    1. Create a KB that describes the wumpus world shown in Figure 7.2, and logical axioms that show the relationship between the maze properties (PIT(x,y), WUMPUS(x,y), GOLD(x,y)) and the perceptions they cause. (HINT: your KB should include at least 7 facts and 3 axioms.)
    2. Assume your archer has moved through the maze to build a KB containing all the percepts and facts to fully represent the first 2 rows of the maze (i.e. squares (1,1), (2,1), (3,1), (4,1), (1,2), (2,2), (3,2), and (4,2) in terms of the labeling on figure 7.3). Use these facts and axioms to prove ~PIT(2,3). Note: this is corrected! The buggy version listed rows 1 & 2 as (1,1), (1,2), (1,3), (1,4), (2,1), (2,2), (2,3), and (2,4)).

      Submission instructions:

      Write up all of your answers in a text editor so that it can be submitted electronically. Put all of the files you want to submit, and ONLY those files, in a directory on STDSUN, and use the submit command to send the files to the grader. The syntax of the submit command is:

      > submit c630aa lab3 (lab3_dir)

      Where lab3_dir is the directory containing the files you want to submit. You can learn about using the submit command by typing man submit at a unix command prompt. If you cannot get the submit command to work, you can email your files to the grader, but please don't use this option unless you're having trouble with submit.