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 Q expression Value T T ¬P Λ Q F T F P V ¬Q T F T P  ¬Q T F F ¬P → Q F

2. Logical identities - fill in the right side (P, T, or F)

P Λ P = P P V P = P P V ~P = T P Λ ~P = F

P V T = T P Λ T = P

P V F = P P Λ F = F

De Morgan’s Laws:

~( P V Q) = ~P Λ ~Q

~( P Λ Q) = ~P V ~Q

1 3. Represent as a propositional expression the sentence below, find its negation using De Morgan's laws, and translate in English the negation:

The concert will be canceled if not enough tickets are sold or if one of the singers gets sick Use the propositions P, Q and R: P: The concert will be canceled Q: enough tickets are sold R: one of the singers gets sick

Expression: (~Q V R)  P

Negation: (~Q V R)  ~P

Translation: The concert was not canceled even though either not enough tickets were sold or one of the singers got sick

4. 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)

5. 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

2 6. 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

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

Let P = John is playing, Q = the team will win, R = the trip will be postponed The argument is: P  Q ~Q  R P Therefore ~R . This is inverse error. We can conclude Q, and if the second premise was Q  ~R we could conclude ~R.

b. Premises: Valid Invalid

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.

Converse error c. Premises: Valid 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

Let P = you don’t leave early. Q = you are late, R = you oversleep The argument is: P  Q R  P ~Q therefore ~R, MT to conclude ~P, MT to conclude ~R

3 7. 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. In problems 8 and 9, translate the sentences in quantified expressions of predicate logic, write down the negated expression and then translate the negated expression in English.

8. Some birds don't fly

bird(x), fly(x) expression:  x bird(x) ~fly(x) negation:  x bird(x) fly(x) translation: All birds fly

9. 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

In the next problems, assume the domain is all people. Use the predicate loves(x,y) to be true if x loves y, false otherwise. Translate the sentences in quantified expressions of predicate logic, write down the negated expression and then translate the negated expression in English.

10. Everybody loves somebody expression:  x  y loves(x,y) negation:  x y ~ loves(x,y) translation: There is a person that loves nobody

11. Nobody loves Tom

4 expression:  x ~loves(x,Tom) negation:  x loves(x,Tom) translation: Someone loves Tom

12. There is a person that everybody loves expression:  x  y, loves(y,x) negation:  x  y, ~ loves(y,x) translation: Nobody is loved by all people

13. Nobody loves everybody expression:  x  y, ~ loves(x,y) negation:  x  y, loves(x,y) translation: There is a person that loves everybody

14. Mary loves everybody expression:  x, loves(Mary,x) negation:  x , ~loves(Mary,x) translation: There is a person that Mary does not love

15. Someone loves Mary expression:  x , loves(x,Mary) negation:  x , ~loves(x,Mary) translation: Nobody loves Mary

5