1. for-every x, exists y: son(x) = y 2. for-every x, for-every y: son(x) = y <=> father(y) = xIn 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)
Answer:
Male(x) and Spouse(x, y) => Female(y)
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.
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}
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.
Answer:
1. {x/A, y/B, z/B}
2. none
3. {y/John, x/John}
4. none
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.
Answer:
Fly(P1, JFK, SFO)
Fly(P2, SFO, JFK)
Answer:
In class on Tuesday, November 13.
Answer:
We would replace the effect of the action shown on figure 11.4 with the following effect:
(On(b, y) and Clear(x) and (not On(b, x)) and (not Clear(y))) or
(On(b, table) and Clear(x) and (not (On(b, x))))
Answer:
No, there is no conditional plan that guarantees success, because it is theoretically possible that an infinite number of moves be required to successfully move a block on top of another block.
P(day == Monday) = 0.4 P(day == Tuesday) = 0.4 P(day == Wednesday) = 0.2
P(day == Monday) = 0.4 P(day == Tuesday) = 0.4 P(day == Wednesday) = 0.2 P(day == Thursday) = 0.1
P(x) = 0.1, if 10 <= x <= 20. P(x) = 0 otherwise.
P(x) = 0.01, if 10 <= x <= 20. P(x) = 0 otherwise.
Answer:
In (1) and (3), P is valid. In (2), P is not a valid probability function, because the sum of probabilities is not 1. In (4), P is not a valid probability density function, because the integral is not 1.
P(alarm | fire) = A P(alarm | not fire) = B P(fire) = C
Answer:
P(alarm) = P(alarm | fire) * P(fire) + P(alarm | not fire) * P(not fire)
= A*C + B*(1-C).
P(fire | alarm) = P(alarm | fire) * P(fire) / P(alarm)
= A*C / A*C + B*(1-C)
P(fire) = 0.1 P(earthquake) = 0.2 P(flood) = 0.4
Answer:
We can only compute the probability P(fire and earthquake and flood) in case (2), where we know that the events are independent. In that case, P(fire and earthquake and flood) = P(fire) * P(earthquake) * P(flood) = 0.1 * 0.2 * 0.4 = 0.008.
Commute time 40-60 Fahrenheit 60-80 Fahrenheit above 80 Fahrenheit < 20 min 0.1 0.05 0.1 20-40 min 0.2 0.1 0.1 > 40 min 0.05 0.1 0.2
Answer:
P(temperature > 80) = 0.1 + 0.1 + 0.2 = 0.4
P(commute time < 20 min AND temperature > 80) = 0.1
P(commute time < 20 min | temperature > 80) = P(commute time < 20 min AND temperature > 80) / P(temperature > 80)
= 0.1 / 0.4 = 0.25
Answer:
P(Earthquake | Alarm) is larger than P(Earthquake | Alarm and Burglary) because burglary and earthquake are competing causes of the alarm event. If we know that one of those causes is true, it makes the other cause less likely.
Answer:
P(Earthquake | Alarm) is equal to P(Earthquake | Alarm and MaryCalls) because the probability distribution of Earthquake is conditionally independent of MaryCalls given knowledge of whether Alarm occurred.