You are on page 1of 3

TRNG I HC BCH KHOA TP.

HCM Khoa Khoa hc & K thut My tnh

TUTORIAL SESSION 4 PROPOSITIONAL LOGIC

1. Let p, q, and r be the following propositions:


p: You get an A on the final exam. q: You do every exercise in the book. r: You get an A in this class. Write the following formulas using p, q, and r and logical connectives. a. You get an A in this class, but you do not do every exercise in the book. b. To get an A in this class, it is necessary for you to get an A on the final. c. Getting an A on the final and doing every exercise in the book is sufficient for getting an A in this class. Solution: a. r q b. r => p c. p q => r

2. Is the sentences valid, unsatisfiable, or neither?


a. Smoke => Smoke b. Smoke => Fire c. ((Smoke Heat) => Fire) ((Smoke => Fire) (Heat => Fire)) Solution: a. valid b. neither c. neither

3. Express sentences in propositional logic:


a. You can stay in dormitory only if you are an honor student or you are not a graduate student. b. You cannot pass the driver license exam if your knowledge exams score is under 60 unless you are older than 45 years old. c. If the photo is digital or in black and white, then it is a portrait, else not. d. If it is a portrait, then it is a picture of my friend. Solution: a. Symbolize the related predicates as follows:

p: you can stay in dormitory q: you are a honor student r: you are a graduate student Propositional logic representation: p => q r b. Symbolize the related predicates as follows: p: you can pass the driver license exam q: your knowledge exams score is under 60 r: you are older than 45 years old Propositional logic representation: r => (q => p) (or (p q) => r). c. Symbolize the related predicates as follows: p: the photo is digital q: the photo is in black and white r: the photo is a portrait t: the photo is a picture of my friend Propositional logic representation: p q r d. Symbolize the related predicates as question 3c: Propositional logic representation: r => t

4. Assuming that we have three propositional-logic-based KBs as follows:


a. If the temperature and the pressure are constant then it does not rain. The temperature remained constant. It rained. Using resolution to answer the question: Did the pressure remain constant or not? b. Men eat when they are hungry. John always wears his best suit to eat. At this moment John is not hungry. Using resolution to answer the question: Is John wearing his best suit or not? Solution: a. T: the temperature is constant P: the pressure is constant R: its rain KB = {T P R, T, R} = {T P R, T, R} Assume the pressure didnt remain constant: = P KB {} = {T P R, T, R, P} Resolution: T P R ---- T => P R P R ---- R => P P ---- P => [] Thus, the pressure didnt remain constant.

b. E: John eats H: John is hungry S: John wears his best suit KB = {H E, E S, H} = {H E, E S, H} Assume John is wearing his best suit: = S KB {} = {H E, E S, H, S} Resolution: H E ---- E S => H S H S ---- S => H Assume John is not wearing his best suit: = S KB {} = {H E, E S, H, S} Resolution: H E ---- E S => H S Thus, we cant conclude John is wearing his best suit or not.

You might also like