Docsity

CS 381 Logic Exercises Solutions, Exams of Discrete Structures and Graph Theory

Toggle sidebar
bg1
CS 381 Solutions to Test
October, 2005
1. Fill in the blanks with the SHORTEST string of characters so that the
resultant proposition is valid. [20]
(a) ¬(P→(P∧Q)) ⇔P∧ ¬(P∧Q)
⇔P∧(¬P∨ ¬Q)
⇔P∧ ¬Q
(b) (P→Q)∧(P→ ¬Q)⇔(¬P∨Q)∧(¬P∨ ¬Q)
⇔ ¬P∨(Q∧ ¬Q)
⇔ ¬P∨False
⇔ ¬P
(c) P→(Q→R)⇔(P∧Q)→R
2. State each of the following formulas in English,if it is a wff. If it is
not a wff, then give a reason why it is not a wff. Here L(x, y) means xis
larger than y,I(x) means xis an integer and the universe is the set of real
numbers: [12]
(a) ∃x∀yL(x, y)
There is a number that is larger than all the numbers.
(b) ∀x[I(x)→ ∃y[I(y)∧L(x, y)]]
For every integer there is an integer which is less than that.
(c) ∀x∃yL(x, I (y))
Not a wff because I(y), being a wff itself, can not be an argument of L.
(d) ∀x∃yL(x, y)
For every number there is a number which is less than that.
3. Negate the following sentences. DO NOT simply say ”It is not the case
that ...” or something similarly trivial. [12]
(a) Someone is missing.
No one is missing / Everyone is here.
(b) Everyone passed every course.
Someone did not pass at least one (some) course.
pf3

Partial preview of the text

Download CS 381 Logic Exercises Solutions and more Exams Discrete Structures and Graph Theory in PDF only on Docsity!

CS 381 Solutions to Test

October, 2005

  1. Fill in the blanks with the SHORTEST string of characters so that the resultant proposition is valid. [20] (a) ¬(P → (P ∧ Q)) ⇔ P ∧ ¬(P ∧ Q) ⇔ P ∧ (¬P ∨ ¬Q) ⇔ P ∧ ¬Q (b) (P → Q)∧(P → ¬Q) ⇔ ( ¬P ∨Q)∧(¬P ∨ ¬Q ) ⇔ ¬P ∨ (Q ∧ ¬Q ) ⇔ ¬P ∨ False ⇔ ¬P (c) P → (Q → R) ⇔ (P ∧ Q) → R
  2. State each of the following formulas in English, if it is a wff. If it is not a wff, then give a reason why it is not a wff. Here L(x, y) means x is larger than y, I(x) means x is an integer and the universe is the set of real numbers: [12] (a) ∃x∀yL(x, y) There is a number that is larger than all the numbers.

(b) ∀x[I(x) → ∃y[I(y) ∧ L(x, y)]] For every integer there is an integer which is less than that.

(c) ∀x∃yL(x, I(y)) Not a wff because I(y), being a wff itself, can not be an argument of L.

(d) ∀x∃yL(x, y) For every number there is a number which is less than that.

  1. Negate the following sentences. DO NOT simply say ”It is not the case that ...” or something similarly trivial. [12] (a) Someone is missing. No one is missing / Everyone is here.

(b) Everyone passed every course. Someone did not pass at least one (some) course.

(c) There are people who are happy only if they are rich. Everyone is happy and (but) not rich.

  1. Express the assertions given below as a proposition of a predicate logic using the following predicates. The universe is the set of objects.[12] K(x, y): x likes y. L(x): x is a lion. P (x): x is a person. S(x): x is strong. (a) Everyone likes a (any) lion if it is strong.

∀x∀y[[P (x) ∧ L(y)] → [S(y) → K(x, y)]]

(b) Some person likes a (any) lion only if it is strong.

∃x[P (x) ∧ ∀y[[L(y) ∧ K(x, y)] → S(y)]]

(c) Not everyone likes a (any) lion. ∃x∃y[P (x) ∧ L(y) ∧ ¬K(x, y)]

  1. Find the power set of each of the following sets: [9]

(a) { 1 , 5 } { ∅, { 1 }, { 5 }, { 1, 5 } }

(b) ∅ { ∅ }

(c) {1 , {∅}} { ∅, { 1 }, { { ∅ } }, { 1, { ∅ } } }

  1. Indicate which of the following are true and which are false. [15] (a) {x} ∈ {x, {x}} : True (b) {x} ⊆ {{x}} : False (c) {x} ∈ {x} : False (d) ∅ ⊆ {∅} : True (e) ∅ ∈ {∅} : True