9
FAKULTI SAINS KOMPUTER DAN MATEMATIK CSC 510 - Discrete Structures Assignment 1

CSC510 Discrete Structures Assignment 1

Embed Size (px)

DESCRIPTION

Discrete Structures, Assignment Q&A

Citation preview

Page 1: CSC510 Discrete Structures  Assignment 1

FAKULTI SAINS KOMPUTER DAN MATEMATIK

CSC 510 - Discrete Structures

Assignment 1

Page 2: CSC510 Discrete Structures  Assignment 1

10. For each of these sets of premises, what relevant conclusion or conclusions can be drawn? Explain the rules of inference used to obtain each conclusion from the premises.

a) “If I play hockey, then I am sore the next day.” “I use the whirlpool if I am sore.” “I did not use the whirlpool.”

If I play hockey, then I am sore the next day. h sI use the whirlpool if I am sore. s wI did not use the whirlpool. ̴w

h : i play hockey.s : i am sore.w : i use the whirlpool.

1. ̴w Premise2. s w Premise3. ̴s 1, 2 Modus tollens 4. h s Premise5. h w 2,4 Hypothetical Syllogism 6. ̴h 1, 5 Modus tollens I did not play hockey.

b) “If I work, it is either sunny or partly sunny.” “I worked last Monday or I worked last Friday.” “It was not sunny on Tuesday.” It was not partly sunny on Friday.”

If I work, it is either sunny or partly sunny. x (W(x) (S(x) v P(x)))I worked last Monday or I worked last Friday. W (Monday) v W(Friday)It was not sunny on Tuesday. ̴S (Tuesday)It was not partly sunny on Friday. ̴P (Friday)

W(x): I work on x.S(x): It is sunny on x.P(x): It is partly sunny on x.

Domain for all is {days of the week}1. W (Monday) v W (Friday) Premise2. W(x) (S(x) v P(x)) Premise3. ̴P(Friday) Premise4. W (Monday) (S (Monday) v P(Monday)) 2, Universal instantiation 5. W (Friday) (S(Friday) v P(Friday)) 2, Universal instantiation 6. W (Friday) S(Friday) 3, 5 Disjunctive syllogism 7. S(Monday) v r (Monday) v S(Friday) v P(Friday) 1, 4, 6 Modus ponens from

It was either sunny or partly sunny on Monday or sunny on Friday.

Page 3: CSC510 Discrete Structures  Assignment 1

c) “All insects have six legs.” “Dragonflies are insects.” “Spiders do not have six legs.” “Spiders eat dragonflies.”

All insects have six legs. x [I(x) L(x)]Dragonflies are insects. x (D(x) I(x))Spiders do not have six legs. x (S(x) ̴L(x))Spiders eat dragonflies. x ((S(x) ^ D(y) E(x, y))

I(x): x is an insect.D(x): x is a dragonfly.L(x): x has six legs.S(x): x is a spider.E(x, y): x eats y.

Domain for all is {animals}.1. x [I(x) L(x)] Premise2. I(c) L(c) 1, Universal instantiation 3. x (D(x) I(x)) Premise4. D(c) I(c) 3, Universal instantiation 5. D(c) L(c) 2, 4, Hypothetical syllogism6. x (D(x) L(x)) 5, Universal generalization7. X(S(x) ̴L(x)) Premise8. S(c) ̴L(c) 7, Universal instantiation9. ̴L(c) ̴I(c) 2, Contrapositive 10. S(c) ̴I(c) 8, 9, Hypothetical syllogism 11. x(S(x) ̴I(x)) Universal generalization from (10)

All spiders are not insects, or just\Spiders are not insects

d) “Every student has an Internet account.” “Homer does not have Internet account.” “Maggie has Internet account.”

Every student has an internet account. x(S(x) I(x))Homer does not have an internet account. ~I(Homer)Maggie has an internet account. I(Maggie)

S(x): x is a student.I(x): x has an internet account.

Domain for both is {people}.1. x(S(x) I(x)) Premise2. S (Homer) I (Homer)) 1, Universal instantiation 3. ~I (Homer) Premise4. ~S (Homer) 2, 3 Modus tollens

Homer is not a student.

e) All foods that are healthy to eat do not taste good.” Tofu is healthy to eat.” “You only eat what taste good.” “You do not eat tofu.” “Cheeseburgers are not healthy to eat.”

Page 4: CSC510 Discrete Structures  Assignment 1

All foods that are healthy to eat do not taste good. x (H(x) ~G(x))Tofu is healthy to eat. H (tofu)You only eat what tastes good. x (E(x) ↔ G(x))You do not eat tofu. ~E (tofu)Cheeseburgers are not healthy to eat. ~H (cheeseburger)

H(x): x is healthy to eat.G(x): x tastes good.E(x): You eat x.

Domain for all is {foods}.1. x (H(x) ~G(x)) Premise2. H (tofu) ~G (tofu) 1, Universal instantiation3. H (tofu) Premise4. ~G (tofu) 2, 3, Modus 5. x (E(x) ↔ G(x)) Premise6. E(c) ↔ G(c) 5, Universal instantiation 7. H(c) ~G(c) 1, Universal instantiation8. ~E(c) ↔ ~G(c) 6, Contrapositive 9. H(c) ~E(c) 7, 8 Hypothetical syllogisms 10. x (H(x) ~E(x)) 9, Universal generalization

You don't eat healthy foods.

f) “I am either dreaming or hallucinating.” “I am not dreaming.” “If I am dreaming, I see elephants running down the road.”

I am either dreaming or hallucinating. d v hI am not dreaming. ~dIf I am hallucinating, I see elephants running down the road. h e

d: I am dreaming.h: I am hallucinating.e: I see elephants running down the road.

1. ~d Premise2. d v h Premise3. h Disjunctive syllogism 4. h e Premise5. e 3, 4 Modus ponens

I see elephants running down the road.

Page 5: CSC510 Discrete Structures  Assignment 1

14. For each of these arguments, explain which rules of inference are used for each step.

a) “Linda, a student in this class, owns a red convertible. Everyone who owns a red convertible has gotten at least one speeding ticket. Therefore, someone in this class has gotten a speeding ticket.”

Let c(x) be “x is in this class,” Let r(x) be “x owns a red convertible,” Let t(x) be “x has gotten speeding ticket.”

Given premises c(Linda) , r(Linda) , ∀x(r(x) → t(x)) , and conclusion (c(x) ∧ t(x)) .

Step Reason1. ∀x(r(x) → t(x)) Hypothesis2. r(Linda) → t(Linda) 1, Universal instantiation3. r(Linda) Hypothesis4. t(Linda) 2,3, Modus ponens 5. c(Linda) Hypothesis6. c(Linda) ∧ t(Linda) 4,5 Conjunction 7. ∃x(c(x) ∧ t(x)) 6, Existential generalization

b) “Each of five roommates, Melissa, Aaron, Ralph, Veneesha, and Keeshawn, has taken a course in discrete mathematics. Every student who has taken a course in discrete mathematic can take a course in algorithms. Therefore, all five roommates can take a course in algorithms next year.”

Let r(x) be “r is one of the five roommates listed,” Let d(x) be “x has taken a course in discrete mathematics,” Let a(x) be “x can take a course in algorithms.”

Given premises ∀x(r(x) → d(x)) and ∀x (d(x) → a(x)) , and conclusion ∀x(r(x) → a(x)) . y: represents an arbitrary person.

Step Reason1. ∀x(r(x) → d(x)) Hypothesis2. r(y) → d(y) 1, Universal instantiation3. ∀x(d(x) → a(x)) Hypothesis4. d(y) → a(y) 3, Universal instantiation5. r(y) → a(y) 2,4, Hypothetical syllogism6. ∀x(r(x) → a(x)) 5, Universal generalization

Page 6: CSC510 Discrete Structures  Assignment 1

c) “All movie produced by John Sayles are wonderful. John Sayles produced a movie about coal miners. Therefore, there is wonderful movie about coal miners.”

Let s(x) be “x is a movie produced by Sayles,”Let c(x) be “x is a movie about coal miners,”Let w(x) be “movie x is wonderful.”

Given premises ∀x(s(x) → w(x)) and ∃x(s(x) ∧ c(x)) , and conclusion ∃x(c(x) ∧ w(x)) .y: represents an unspecified particular movie.

Step Reason1. ∃x(s(x) ∧ c(x)) Hypothesis2. s(y) ∧ c(y) 1, Existential instantiation3. s(y) 2, Simplification4. ∀x(s(x) → w(x)) Hypothesis5. s(y) → w(y) 4, Universal instantiation6. w(y) 3, 5 Modus ponens7. c(y) 2, Simplification8. w(y) ∧ c(y) 6, 7 Conjunction

d) “There is someone in this class who has been to France. Everyone who goes to France visits Louvre. Therefore, someone in this class has visited the Louvre.”

Let c(x ) be “x is in this class,” Let f(x) be “x has been to France,” Let l(x) be “x has visited the Louvre.” Given premises ∃x(c(x) ∧ f(x)) , ∀x(f(x) → l(x)) , and conclusion ∃x(c(x) ∧ l(x)) .y: represents an unspecified particular person.

Step Reason1. ∃x(c(x) ∧ f(x)) Hypothesis2. c(y) ∧ f(y) 1, Existential instantiation3. f(y) 2, Simplification4. c(y) 2, Simplification5. ∀x(f(x) → l(x)) Hypothesis6. f(y) → l(y) 5, Universal instantiation7. l(y) 3, 6 Modus ponens8. c(y) ∧ l(y) 4,7 Conjunction9. ∃x(c(x) ∧ l(x)) 8, Existential generalization

Page 7: CSC510 Discrete Structures  Assignment 1

16. For each of these arguments determine whether the argument is correct or incorrect and explain why.

a) Everyone enrolled in the university has lived in a dormitory. Mia has never lived in a dormitory. Therefore, Mia is not enrolled in the university.

Correct: using universal instantiation and modus tollens.

b) A convertible car is fun to drive. Isaac’s car is not a convertible. Therefore, Isaac’s car is not fun to drive.

Incorrect: denying the hypothesis is used.

c) Quincy likes all action movies. Quincy likes the movie Eight Men Out. Therefore, Eight Men Out is an action movie.

Incorrect: affirming the conclusion is used.

d) All lobstermen set at least a dozen traps. Hamilton is a lobsterman. Therefore, Hamilton sets at least a dozen traps.

Correct: using universal instantiation and modus ponens.