Preparation for Second Midterm - Answers

Answers

  1. Convert the following knowledge base to conjunctive normal form:
    A AND B
    B => (A OR C)

    Answer:

    A
    B
    (NOT B) OR A OR C

  2. Consider the following knowledge base:
    A
    B
    NOT A
    Does this knowledge base entail the following sentence:
    B OR C

    Justify your answer.

    Answer:

    The knowledge base given in this question is not satisfiable, since it contains both A and NOT A. Since it is not satisfiable it entails every possible statement, including B OR C.

  3. Given a propositional-logic vocabulary with only four symbols, A, B, C, D, how many models are there for the following sentences? In other words, for each of those statements, determine how many models that statement is true in. Note that each model is defined by assigning boolean values to all four symbols A, B, C, D.

    (a) (A and B) or (B and C)
    (b) A or B
    (c) A <=> B <=>C

    Answer:

    For each case, the number of possible models that entail the given logical sentence are:

    (a): The following 3:

    (A AND B AND C)
    ((NOT A) AND B AND C)
    (A AND B AND (NOT C))
    (b): The following 3:
    (A AND NOT B)
    ((NOT A) AND B)
    (A AND B)
    (c): The following 2:
    (A AND B AND C)
    ((NOT A) AND (NOT B) AND (NOT C))

  4. Textbook exercise 7.6 (second edition), exercise 7.8 (third edition)

    Answer:

    (a): XOR is another connective that people often find useful. In general, what is useful or not useful is highly subjective. People might also find it useful to define connectives for the negation of AND, OR, IF, IFF, XOR.

    (b): Each connective is defined using a truth table. For two symbols, a truth table has four rows, so there are 2^4 = 16 unique truth tables. Therefore, we can define up to 16 unique binary connectives.

    (c): Consider the statement a and not(b). While a binary connective could be defined for this statement, most people would probably find it more natural to just see that statement written as a and not b.

  5. Textbook exercise 7.8 (second edition), exercise 7.10 (third edition)

    Answer:

    (a): valid
    (b): neither
    (c): neither
    (d): valid
    (e): valid
    (f): neither
    (g): valid
    (h) (for 2nd edition only): neither

  6. For some sentence S involving literals A, B, C, here is the truth table:
    A B C Sentence
    false false false true
    false false true false
    false true false false
    false true true true
    true false false false
    true false true false
    true true false false
    true true true true
    Give a conjunctive normal form for sentence S.

    Answer:

    Here are some intermediate steps in producing a conjunctive normal form, and the actual CNF:

    1. (B <=> C) AND (A => B)
    2. (B => C) AND (C => B) AND (A => B)
    3. ((NOT B) OR C) AND ((NOT C) OR B) AND ((NOT A) OR B)

  7. What is the negation of each of the following sentences:
    1. for-every x, exists y: son(x) = y
    2. for-every x, for-every y: son(x) = y <=> father(y) = x
    In your answers, any "not" may only appear after the last appearance of a universal or existential quantifier.

    Answer:

    1. exists x, for every y: son(x) != y
    2. exists x, exists y: not (son(x) = y <=> father(y) = x)

  8. Textbook exercise 8.8 (in both second and third edition).

    Answer for exercise 8.8 in the 2nd edition:

    There is an extra axiom needed:

    (Male(x) and Spouse(x, y)) => Female(y)

    Answer for exercise 8.8 in the 3nd edition:

    No, not(Spouse(George, Laura)) does not follow from the given facts. We need the additional axiom:

    (Spouse(x, y) and (z != x)) => not(Spouse(z, y))
    If Spouse becomes a unary function, then no additional axiom is needed. Then, the facts would be written as:
    Jim != George
    Spouse(Laura) = Jim
    and the statement not(Spouse(Laura) = George) can be proven as follows:
    ((Spouse(Laura) = Jim) and (Jim != George)) => not(Spouse(Laura) = George)
    If Spouse is a function, then it can only return a single value for each argument (such as Laura).

  9. Consider the technique of propositionalization. For each of the following two knowledge bases, decide if propositionalization can be applied successfully. If not, why not?
    KB 1:

    for-every x: king(x) and greedy(x) => evil(x)
    king(John)
    greedy(John)
    brother(Richard, John)


    KB 2:
    for-every x: king(x) and greedy(x) => evil(x)
    king(John)
    greedy(John)
    brother(Richard, John)
    king(father(John))

    Answer:

    For KB1, propositionalization can be applied successfully because there are no functions. For KB2, propositionalization cannot be applied successfully because there are functions.

  10. What is the most general unifier for each of the following pairs of expressions:
    1. major(John, x), major(y, mathematics)
    2. major(John, x), major(y, z)
    3. major(John, x), major(y, x)
    4. major(John, x), major(x, y)

    Answer:

    1. {y/John, x/mathematics}
    2. {y/John, x/z}
    3. {y/John}
    4. {x/John, y/John}

  11. Textbook exercise 9.3 (in both second and third edition).

    Answer:

    Only (b) is valid, because in (b) we replace the existential quantifier with a variable that does not appear elsewhere in the database, whereas in (a) we have replaced the existential quantifier with a variable that already appeared in the database, and in (c) we have introduced two new variables (Kilimanjaro and BenNevis) instead of one.

  12. Textbook exercise 9.4 (in both second and third edition).

    Answer:

    1. {x/A, y/B, z/B}
    2. none
    3. {y/John, x/John}
    4. none

  13. Textbook exercise 9.19, parts (a), (b), (c) (second edition), exercise 9.24, parts (a), (b), (c) (third edition).

    Answer:
    (a): (A) becomes: for every natural number x there exists a natural number y such that x is greater than or equal to y.
    (B) becomes: there exists a natural number y such that every natural number x is greater than or equal to y.
    (b): (A) is true: any natural number is >= 0.
    (c): (B) is true: If y = 0, then any natural number x is greater than or equal to 0.