6
CS 205 Quiz #2A - 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

20120927 Quiz 2a Solutions

Embed Size (px)

Citation preview

Page 1: 20120927 Quiz 2a Solutions

CS 205 Quiz #2A - 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 2a 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) Everybody can fool Fred.

∀x F(x,”Fred”) 2 points possible

b) Everybody can fool somebody.

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

c) No one can fool both Fred and Jerry.

¬ ∃x ( F(x,”Fred”) ∧ F(x,”Jerry”) ) 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) No one in the class has chatted with Bob.

¬ ∃ x C(x,”Bob”) 2 points possible

b) Everyone in your class with an Internet connection has chatted over the Internet with at least

one other student in your class.

∀x ( I(x) ∃ y ( x ≠ y ∧ C(x,y)) ) 2 points possible

Page 3: 20120927 Quiz 2a 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) ¬∃y ∃x P(x,y)

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

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

∀y ¬((∃x R(x,y)) ∨ (∀x S(x,y)))

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

∀y ( (∀x ¬R(x,y)) ∧ (∃x ¬S(x,y))) 2 points possible

4. Use rules of inference to show that the hypotheses “Randy works hard,” “If Randy works hard, then

he is a dull boy,” and “If Randy is a dull boy, then he will not get the job” imply the conclusion

“Randy will not get the job.”

p = “Randy works hard”

q = “Randy is a dull boy”

r = “Randy will get the job”

1. p q Premise

2. q r Premise

3. p r Hypothetical Syllogism with (1) and (2)

4. p Premise

5. r Modus Ponens with (3) and (4)

2 points possible

Page 4: 20120927 Quiz 2a 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) Alice is a mathematics major. Therefore, Alice is a mathematics major or a computer science

major.

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

q = “Alice is a computer science major”

Argument: p

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

∴ p ∨ q

Rule of Inference: Addition

b) If I go swimming, then I will stay in the sun too long. If I stay in the sun too long, then I will

sunburn. Therefore, if I go swimming, then I will sunburn.

p = “I will go swimming” 2 points possible

q = “I will stay in the sun too long”

r = “I will sunburn”

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) ∧ ∃x Q(x)

is true then ∃x (P(x) ∧ Q(x)) is true.

1. ∃x P(x) ∧ ∃x Q(x) Premise

2. ∃x P(x) Simplification from (1)

3. P(c) Existential instantiation from (2)

4. ∃x Q(x) Simplification from (1)

5. Q(c) Existential instantiation from (4)

6. P(c) ∧ Q(c) Conjunction from (3) and (5)

7. ∃x (P(x) ∧ Q(x)) Existential generalization

Step 6 is incorrect because the “c” in step 3 is not necessarily the same as the “c” in step 5.

2 points possible

Page 5: 20120927 Quiz 2a Solutions

7. Determine whether the following argument is valid:

She is a Math Major or a Computer Science Major.

If she does not know discrete math, she is not a Math Major.

If she knows discrete math, she is smart.

She is not a Computer Science Major.

Therefore, she is smart.

p = “she is a math major” 3 points possible

q = “she is a computer science major”

r = “she knows discrete math”

s = “she is smart”

Argument: p ∨ q

¬r ¬p

r s

¬q

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

∴ s

1. p ∨ q Premise

2. ¬q Premise

3. p Disjunctive Syllogism from (1) and (2)

4. ¬r ¬p Premise

5. p r Contrapositive from (4)

6. r Modus Ponens from (3) and (5)

7. r s Premise

8. s Modus Ponens from (6) and (7)

Therefore, the argument is valid.

8. Determine whether the following argument is valid:

p r

q r

¬ (p ∨ q)

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

∴ ¬ r

Not Valid. 3 points possible

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

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

Page 6: 20120927 Quiz 2a Solutions

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