CS 380/480 - Foundations
of Artificial Intelligence
- Winter 2007
Assignment
2
Sample Problems and
Solutions
- Consider the sentence F:
(A /\
B) => (B \/
C)
(a) Is this sentence satisfiable? If so, how many models does it have?
ANSWER:
A sentence is satisfiable if there is at least one interpretation that makes
it true. For propositional sentences such as the one in this problem, we can
determine this by constructing the truth table for the sentence and see if there
is one assignment of truth values to the variables that makes this sentence true
(in other words, if we find a row in the truth table which results in the value
"true" for the sentence). The truth table below shows the intermediate columns
for different sub-sentences in F with the final column corresponding to the full
sentence. The first 3 columns represent the different combinations of truth
value assignments to the individual variables A, B, and C in the sentence.
[Note that there are 8 = 23 possible truth value assignments because
we have 3 variables. In general, the truth table would have 2n rows,
where n is the number of propositional variables in the sentence].
A |
B |
C |
B |
A /\
B |
C |
B \/
C |
(A /\
B) => (B \/
C) |
false |
false |
false |
true |
false |
true |
true |
true |
false |
false |
true |
true |
false |
false |
false |
true |
false |
true |
false |
false |
false |
true |
true |
true |
false |
true |
true |
false |
false |
false |
true |
true |
true |
false |
false |
true |
true |
true |
true |
true |
true |
false |
true |
true |
true |
false |
false |
false |
true |
true |
false |
false |
false |
true |
true |
true |
true |
true |
true |
false |
false |
false |
true |
true |
Note that the two intermediate columns for A /\
B and B \/
C represent the two sides of the
implication in the full sentence F. By definition of =>, F would be true if the
left-hand-side is false or if the right-had-side is true. This gives the final
column for F in the above truth table.
An interpretation for the sentence F is any truth value assignment for the
variables A, B, and C (a row in the truth table). Clearly the sentence F is
satisfiable because it is true in at least one interpretation (i.e. it has at
least one model). The models for F are all the interpretations that make the
sentence true. In this case we see that F has 7 models.
It is also worth noting that F is only false in one interpretation (namely,
A=true, B=false, C=true). If F had been true in all of the 8 possible
interpretations, then it would have been a valid sentence (a.k.a., a
tautology). In this case, F is not valid, because it is not true in all
interpretations.
(b) Is the sentence B entailed by
F (i.e., does it logically
follow from F)?
ANSWER:
To answer this type of question, we must construct truth tables for F and for
B. The sentence
B is entailed by F (written as F |=
B), if any interpretation that makes F
true, also makes
B true. In other words, any model of F
should also be a model of
B (note, however, that models of
B need not be models of F). In this case
we can easily observe (form the above truth table) that there are several
interpretations that make F true, but for which
B is false. For example, the
interpretations A=false, B=true, C=false (3rd row in the truth table), is a
model for F, but is not a model for
B. Therefore,
B is not entailed by F (does not
logically follow from F). To see an example of a situation where one
sentence entails another, consider the sentence B \/
C. We can observe in the above truth
table that any interpretation that makes B \/
C true also makes F true. Therefore, B \/
C entails F (or, F logically follows from
B \/
C). We can express this using the
notation: (B \/
C) |= F.
- Problem 7.4 on Page 237 of Russell and Norvig.
In this problem you are asked to "prove" various assertions that reflect
different properties of the entailment relationship ( |= ). To prove these
assertions, you need to give an argument based on the definitions of entailment
and various logical operations. Here we consider parts (a) and (c) of this
problem as examples of what you need to do. (a) a
sentence a is valid, if and only if True |=
a. ANSWER:
Because this is an "if and only if" assertions, we need to argue in both
direction. So, we must show that if a is valid,
then True |= a; and conversely, we must also
show that if True |= a, then
a is valid. First let us assume that
a is valid. By definition of validity,
a must be true in every interpretation. In
particular, is true in every interpretation that makes any other sentence
b true. In other words, if a is valid then it
is entailed by any other sentence b (including the
universal constant True which by itself is a sentence). Therefore,
True |= a. This shows the assertion in the "if"
direction. Now, we need to also show the "only if" direction. To do so, let us
assume that True |= a. This would mean that
a is true in every interpretation that makes the
sentence True also true (i.e., every model of True is also a model
of a). But, by definition, the constant True
is always true in every interpretation. Therefore, every interpretation is also
a model for a. This, by definition of validity means
that a is a valid sentence.
(c) a |= b if and only
if the sentence (a => b)
is valid. ANSWER:
As in the previous case, we must show both direction.
"If" Direction: Assume that a
|= b. By definition of entailment, this means any
model of a is also a model of b.
Now, suppose that I is any arbitrary interpretation. If I makes
a true, then by the entailment assumption it would
also make b true, in which case
(a => b) is true by the definition of
implication operator. On the other hand, if I makes a
false, then regardless of b, by the definition of
implication, (a => b) is
true. So, we can conclude that (a =>
b) is true under any interpretation, and hence, by
definition of validity, it is a valid sentence. "Only If" Direction:
Let us assume that the sentence a =>
b is valid, in other words it is true in every
interpretation. We want to show that any interpretation that makes
a true, will also make b
true. Suppose that I is an arbitrary interpretation that makes
a true (i.e., I is an arbitrary model of
a). Since by our assumption a
=> b is valid, then I must also be a model of
a => b (i.e.,
a => b is true in I).
Since a is true in I, then b
must also be true in I, or else a =>
b would be false, contradiction our validity
assumption. Thus, if we assume that is a =>
b valid, then any model of a
is also a model of b. In other words,
a |= b. This completed
the proof of the assertion.
Back
to Assignments
Back
to Main Page
|