6

Click here to load reader

20120927 Quiz 2b Solutions

Embed Size (px)

Citation preview

Page 1: 20120927 Quiz 2b Solutions

CS 205 Quiz #2B - Sept 27, 2012

NAME: ___________________________SOLUTIONS_____________________________________

RUID:___________________________________________________________________________

Electronic Devices are not permitted during the quiz. These include but are not restricted to calculators,

computers and cell phones.

No communication between students or anyone outside of class is permitted during the quiz.

Textbooks, notes and any other written materials are not permitted during the quiz.

DO NOT OPEN UNTIL

INSTRUCTED TO DO SO

Page 2: 20120927 Quiz 2b Solutions

1. Let F(x,y) be the statement “x can fool y”, where the domain consists of all people in the world.

Use quantifiers to express each of these statements.

a) Evelyn can fool everybody.

∀y F(“Evelyn”,y) 2 points possible

b) Everyone can be fooled by somebody.

∀y ∃x F(x,y) 2 points possible

c) Nancy can fool exactly two people.

∃a (F(“Nancy”,a) ∧ ∃b ((F(“Nancy”,b) ∧ (a ≠ b))

∧ ( ∀c (c = a) ∨ (c = b) ∨ ¬F(“Nancy”,c))))

2 points possible

2. Let I(x) be the statement “x has an Internet connection” and C(x,y) be the statement “x and y

have chatted over the Internet,” where the domain for the variables x and y consists of all students

in your class. Use quantifiers to express each of these statements.

a) Sanjay has chatted with everyone except Joseph.

∀x ( ((x = “Joseph) ∧ ¬ F(“Sanjay”, “Joseph”))

∨ ((x ≠ “Joseph) ∧ F(“Sanjay”, x)) )

Alternatively,

∀x (x ≠ “Joseph ⟷ F(“Sanjay”, x)) 2 points possible

b) There are at least two students in your class who have not chatted with the same person in your

class.

∃x ∃y ( x ≠ y ∧ ∀z (x ≠ z ∧ y ≠ z ∧ ¬( C(x,z) ∧ C(y,z) ) ) )

2 points possible

Page 3: 20120927 Quiz 2b Solutions

3. Rewrite each of these statements so that negations appear only within predicates (that is, so that no

negation is outside a quantifier or an expression involving logical connectives). Show your work.

a) ¬∀x ∃y P(x,y)

∃x ∀y ¬P(x,y) 2 points possible

b) ¬∃y (Q(y) ∨ (∀x ¬R(x,y)))

∀y ¬(Q(y) ∨ (∀x ¬R(x,y))) 2 points possible

∀y (¬Q(y) ∧ ¬(∀x ¬R(x,y)))

∀y (¬Q(y) ∧ (∃x ¬( ¬R(x,y))))

∀y (¬Q(y) ∧ (∃x R(x,y)))

4. Use rules of inference to show that the hypotheses “If it does not rain or if it is not foggy, then the

sailing race will be held and the lifesaving demonstration will go on,” “If the sailing race is held, then

the trophy will be awarded,” and “The trophy was not awarded” imply the conclusion “It rained.”

r = “it rains”

f = “it is foggy”

s = “the sailing race will be held”

d = “the lifesaving demonstration will go on”

t = “the trophy will be awarded”

1. s t Premise

2. ¬t Premise

3. ¬s Modus Tollens with (1) and (2)

4. ( ¬r ∨ ¬f ) ( s ∧ d ) Premise

5. ¬ ( s ∧ d ) ¬ ( ¬r ∨ ¬f ) Contrapositive from (4)

6. ¬ ( s ∧ d ) ¬ ( ¬( r ∧ f )) De Morgan’s Law from (5)

7. ¬ ( s ∧ d ) ( r ∧ f ) Double Negation from (6)

8. ¬s ∨ ¬d Addition from (3)

9. ¬ ( s ∧ d ) De Morgan’s Law from (8)

10. ( r ∧ f ) Modus Ponens with (7) and (9)

11. r Simplification from (10)

2 points possible

Page 4: 20120927 Quiz 2b Solutions

5. What rule of inference is used in each of these arguments? Indicate your propositions and how

those propositions along with the rule of inference are used to form an argument. (That is, convert

the English sentences into propositional statements and indicate which statements are inferred

from the others.)

a) Jerry is a mathematics major and a computer science major. Therefore, Jerry is a mathematics

major.

p = “Jerry is a mathematics major” 2 points possible

q = “Jerry is a computer science major”

Argument: p ∧ q

-----------------------------------

∴ p

Rule of Inference: Simplification

b) If I work all night on this homework, then I can answer all the exercises. If I answer all the

exercises, I will understand the material. Therefore, if I work all night on this homework, then I

will understand the material.

p = “I will work all night on this homework” 2 points possible

q = “I can answer all the exercises”

r = “I will understand the material”

Argument: p q

q r

-----------------------------------

∴ p r

Rule of Inference: Hypothetical Syllogism

6. Identify the error or errors in this argument that supposedly shows that if ∀ x (P(x) ∨ Q(x))

is true then ∀x (P(x) ∨ ∀x Q(x)) is true.

1. ∀ x (P(x) ∨ Q(x)) Premise

2. P(c) ∨ Q(c) Universal instantiation from (1)

3. P(c) Simplification from (2)

4. ∀x P(x) Universal generalization from (3)

5. Q(c) Simplification from (2)

6. ∀x Q(x) Universal generalization from (5)

7. ∀x (P(x) ∨ ∀x Q(x)) Conjunction from (4) and (6)

Steps 3 and 5 are incorrect. Simplification has a conjunction in the premise, not a disjunction.

2 points possible

Page 5: 20120927 Quiz 2b Solutions

7. Determine whether the following argument is valid:

Rainy days make gardens grow.

Gardens don’t grow if it is not hot.

It always rains on a day that is not hot.

Therefore, if it is not hot, then it is hot.

r = “it is raining” 3 points possible

g = “gardens grow”

h = “it is hot”

Argument: r g

¬h ¬g

¬h r

-----------------------------------

∴ ¬h h

1. ¬h r Premise

2. r g Premise

3. ¬h g Hypothetical Syllogism from (1) and (2)

4. ¬h ¬g Premise

5. g h Contrapositive from (4)

6. ¬h h Hypothetical Syllogism from (3) and (5)

Therefore, the argument is valid. The conclusion may at first appear to be nonsense, however,

note that the premises are only true under settings (h,r,g) = (1,0,0), (1,0,1) or (1,1,1). Thus, h must

be true for the premises to be true and when h is true, then ¬h h is true.

8. Determine whether the following argument is valid:

p r

q r

q ∨ ¬r

-----------------------------------

∴ ¬ p

Not Valid. 3 points possible

Counterexample: p = 1, q = 1, r = 1

With these values, premises are true, but the conclusion is false.

Page 6: 20120927 Quiz 2b Solutions

The following table reprinted from the textbook may be useful to you: