Assignment 3

Written Assignment - Logic and Planning

Max points:
The assignment should be submitted via Canvas.


Task 1

Max: [4308: 8 Points, 5360: 8 Points]

A B C KB S1
   True       True       True       True       True   
True True False False True
True False True True True
True False False False True
False True True False False
False True False False False
False False True True True
False False False False False

KB and S1 are two propositional logic statements, that are constructed using symbols A, B, C, and using various connectives. The above truth table shows, for each combination of values of A, B, C, whether KB and S1 are true or false.

Part a: Given the above information, does KB entail S1? Justify your answer.

Part b: Given the above information, does statement NOT(KB) entail statement NOT(S1)? Justify your answer.



Task 2

Max: [4308: 8 Points, 5360: 8 Points]

Suppose that some  knowledge base contains various propositional-logic sentences that utilize symbols A, B, C, D (connected with various connectives). There are only two cases when the knowledge base is false:
- First case: when A is true, B is false, C is true, D is false.
- Second case: when A is false, B is false, C is true, D is true.

In all other cases, the knowledge base is true. Write a conjunctive normal form (CNF)  for the knowledge base.


Task 3

Max: [4308: 24 Points, 5360: 24 Points]

Consider the KB

(A => C) AND (B <=> C) AND (D => A) AND E AND [(B AND E) => G] AND (B => F) AND D

Show that this entails G (if possible) by

i. Forward Chaining
ii. Backward Chaining
iii. Resolution


Task 4

Max: [4308: 30 Points (+5 Points EC), 5360: 30 Points (+5 Points EC)]

John and Mary sign the following contract:

- If it rains on Monday, then John must give Mary a check for $100 on Tuesday
- If John gives Mary a check for $100 on Tuesday, Mary must mow the lawn on Wednesday.

What truly happened those days is the following:
- It did not rain on Monday
- John gave Mary a check for $100 on Tueday
- Mary mowed the lawn on Wednesday.

Part a (10 pts): Write a first order logic statement to express the contract. Make sure that you clearly define what constants and predicates that you use are. (NOTE: DO NOT use functions)

Part b (8 pts): Write a logical statement to express what truly happened. When possible, use the same predicates and constants as in question 6a. If you need to define any new predicates or constants, clearly define what they stand for.

Part c (12 pts): Define the symbols required to convert any KB involved in the above domanin from FOL to Propositional logic. Use this to convert the answers to part a and b to Propositional Logic.

Part d (5 pts) (Extra Credit): Was the contract violated or not, Justify your answer [Note: Contract is definitely not violated if the events entail the contract. Contract is definitly violated if the events entail the opposite of the contract. Unknown otherwise]


Task 5

Max: [4308: 10 Points, 5360: 10 Points]

Does a unifier exist for these pairs of predicates. If they do, give the unifier

i. Taller(x, John); Taller(Bob, y)
ii. Taller(y, Mother(x)); Taller(Bob, Mother(Bob))
iii. Taller(Sam, Mary); Shorter(x, Sam)
iv. Shorter(x, Bob); Shorter(y, z)
v. Shorter(Bob, John); Shorter(x, Mary)


Task 6

Max: [4308: 18 Points (+5 Points EC), 5360: 10 Points (+5 Points EC)]

Two adults and two children are on the left side of the river. They all want to cross to the right side of the river. However, the only means of transportation they can use is a boat (also initially on the left bank) which can carry either just one adult or one adult and one child or just one child or two children from one bank to the other bank. Any adult or child can operate the boat, but the boat cannot be operated without having at least one person on the boat. The goal is to come up with a plan for moving everyone from the left side to the right side using multiple boat trips.

Describe the initial state and the goal, using PDDL. Define appropriate actions for this planning problem, in the PDDL language. For each action, provide a name, arguments, preconditions, and effects.

Extra Credit (5 pts): Also, give a complete plan (using the actions described) for getting from the start to the goal state


Task 7

Max: [4308: 12 Points, 5360: 12 Points]

Consider the problem in the previous task. Let us say that, if there is only one person in the boat, the boat can be blown off course and end up back on the side it originally started from rather than the other bank. How would you modify the actions you previously described to account for this if you were going to try and handle this scenario by
In both cases, show what the modifications are (If no modification is necessary, Justify).


Task 8

Max: [4308: 10 Points, 5360: 10 Points]

Suppose that we are using PDDL to describe facts and actions in a certain world called JUNGLE. In the JUNGLE world there are 3 predicates, each predicate takes at most 4 arguments, and there are 5 constants. Give a reasonably tight bound on the number of unique states in the JUNGLE world. Justify your answer.


How to submit

The assignment should be submitted via CANVAS. No other methods of submission will be accepted.