Assignment 5

Written Assignment - Game Playing

The assignment should be submitted via Blackboard.

Instructions


Problem 1

20 points.

Let S1 be a statement in propositional logic. Write a function CHECK_TRUE(S1) that:

Your pseudocode can re-use any code from the textbook or slides, and can call any of the functions given in the textbook or slides, as long as such code and functions are used correctly, with correct names for the functions, and with well-specified values for all variables and arguments.

Remember that a model is a complete assignment of Boolean values for each symbol of S1. In other words, a model corresponds to a row of the truth table. Thus, given a model, for any symbol of S1 we know whether that symbol is true or false in that model.


Problem 2

20 points.

Two logical statements A and B are logically equivalent if A <=> B. We have two knowledge bases, KB1 and KB2.. Write a function CHECK_EQUIVALENCE(KB1, KB2) that: Your pseudocode can re-use any code from the textbook or slides, and can call any of the functions given in the textbook or slides, as long as such code and functions are used correctly, with correct names for the functions, and with well-specified values for all variables and arguments.


Problem 3

20 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 False False
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.



Problem 4

10 points.

Convert the following to CNF

Part a: A => (NOT (C OR B))

Part b: (NOT (C OR B))  => A


Problem 5

10 points.

Let S1 and S2 be two logical statements in propositional logic. Write pseudocode that determines if the statement (S1 XOR S2) is valid (a statement is valid if it is true in all models). The XOR of the two statements S1 and S2 is true in two cases:

    When S1 is true and S2 is false  
    When S1 is false and S2 is true.

Your pseudocode can use as building blocks any of the functions given in the textbook, as long as such functions are called correctly and with well-specified arguments.


Problem 6

10 points.

Consider a knowledge base with these facts:

Convert the above knowledge-base to a first-order logic knowledge base. For each predicate, function, constant, or variable that you use, explicitly state:

Problem 7

10 points.

Consider this first-order logic knowledge base:

taller(John, Bill)
for-every x, taller(x, Bill) => tall(x)
In this first-order logic knowledge base, taller and tall are predicates, x is a variable, and John, Bill are constants. Convert this first-order logic knowledge base into a propositional logic knowledge base, by performing the following two steps:
  1. Define symbols for the propositional-logic version of the knowledge base, and specify what their equivalents are in the original first-order logic knowledge base.
  2. Define the statements that should be stored in the propositional-logic version of the knowledge base.
The symbols you define should be comprehensive enough to allow us to translate any well-defined inference problem in the original knowledge base to an equivalent problem for the propositional knowledge base. Anything that we can infer from the original first-order logic knowledge base we should also be able to infer from the propositionalized knowledge base, and vice versa.