CmSc 180 Discrete Mathematics Unit Exam 1 Solution Propositional and Predicate logic 1. Fill in the corresponding truth values (T or F) of the expressions P T T F F Q T F T F expression ¬P Λ Q P V ¬Q P ¬Q ¬P → Q Value F T T F 2. Logical identities - fill in the right side (P, T, or F) PΛP= P PVP= P P V ~P = T P Λ ~P = F PVT= T PΛT= P PVF= P PΛF= F P Λ (P V Q) = P P V (P Λ Q) = P P V (P Λ ~Q) = P De Morgan’s Laws: ~( P V Q) = ~P Λ ~Q ~( P Λ Q) = ~P V ~Q 1 3. Match the disjunctive representations of the following conditional statements P → ~Q (b) ~P V Q (a) ~P → Q (d) ~P V ~Q (b) Q→ P (c) P V ~Q (c) ~Q → ~P (a) P V Q (d) 4. For the implication ~ P → ~Q indicate which of the following expressions is its contrapositive, its converse and its inverse (circle the correct one): Contrapositive: P → Q, P → ~Q, ~P → Q, Q → P, Q → ~P , ~Q → ~P Inverse: P → Q, P → ~Q, ~P → Q, Q → P, Q → ~P , ~Q → ~P Converse: P → Q, P → ~Q, ~P → Q, Q → P, Q → ~P , ~Q → ~P 5. Which one of the following statements is logically equivalent to the following statement: “If interest rates are up then stock market prices are down.” (Circle the correct answer) a. If interest rates are down then stock market prices are up. b. If stock market prices are up then interest rates are down. c. If stock market prices are down then interest rates are up. 2 6. "If compound X is boiling then its temperature must be at least 250°F" Assuming that this statement is true, which of the following statements must also be true: a. If the temperature of compound X is at least 250°F, then compound X is boiling b. If the temperature of compound X is less than 250°F, then compound X is not boiling c. If compound X is not boiling then its temperature is less than 250°F. 7. Using P = “the food is good”, Q = the service is excellent” and R = “the price is high”, represent in propositional logic the statements below. Write the negation of each expression and translate back in English : a. If the food is good then the service is excellent Expression: P Q Negation: P ~Q Translation: the food is good but the service is not excellent b. Either the food is good or the service is excellent Expression: P V Q Negation: ~P ~Q Translation: neither the food is good nor the service is excellent 3 c. Either the food is good and the service is excellent, or the price is high. Expression: (P Q) V R Negation: (~P V ~Q) ~R Translation: The price is low but either the service is not good or the service is not excellent 8. In the next problems, translate the sentences in quantified expressions of predicate logic, write down the negated expression and then translate the negated expression in English. a. Some birds don't fly bird(x), fly(x) expression: negation: x bird(x) ~fly(x) x bird(x) fly(x) translation: All birds fly b. No cats like water cat(x), like_water(x) expression: x cat(x) ~like_water(x) negation: x cat(x) like_water(x) translation: Some cats like water 4 c. All students need financial aid. student(x), needs_aid(x) expression: x students(x) needs_aid(x) negation: x students(x) ~needs_aid(x) translation: Some students don’t need financial aid d. Some happy people are healthy and wealthy happy(x), healthy(x), wealthy(x) expression: negation: x happy(x) healthy(x) wealthy(x) x happy(x) ~(healthy(x) wealthy(x)) translation: No happy people are healthy and wealthy e. All healthy and happy people are wise happy(x), healthy(x), wise(x) expression: x healthy(x) happy(x) wise(x) negation: x healthy(x) happy(x) ~wise(x) translation: Some healthy and happy people are not wise 5 9. Determine whether the following arguments are valid or invalid. If valid, state the inference rules. If invalid, determine the type of error(s): a. Premises: Valid Invalid inverse error 1. If John is playing, the team will win. 2. If the team does not win, the trip will be postponed. 3. John is playing. Therefore the trip is not postponed b. Premises: Valid Invalid converse error 1. If there is an undeclared variable then there is a syntax error. 2. There is a syntax error. Therefore there is an undeclared variable. c. Premises: Valid MT Invalid 1. If you don’t leave early you will be late. 2. If you oversleep you will not leave early. 3. You are not late. Therefore you have not overslept 6 10. Given the statements below (assuming they are true) (1) (2) (3) (4) (5) P Q R S ~S V Q ~Q V R Q Can you conclude each of the following statements: a) R, and if yes, what inference rules you applied and which statements you used? b) ~R, and if yes, what inference rules you applied and which statements you used? c) S, and if yes, what inference rules you applied and which statements you used? d) ~S, and if yes, what inference rules you applied and which statements you used? e) P, and if yes, what inference rules you applied and which statements you used? f) ~P, and if yes, what inference rules you applied and which statements you used? Hint: you may need to use more than one inference rule, for example: Given 1. A B 2. C ~B 3. C We can conclude ~A in the following way: From (2) and (3) by MP we conclude (4) ~B From (4) and (1) by MT we conclude ~A Write here the answers a) Yes, DS (4) and (5) b) No c) Yes, from a) above , (2) by MP d) No e) No f) No 7