Вы находитесь на странице: 1из 12

COMP1805 (Winter 2017)  "Discrete Structures I"

Specification for Assignment 1 of 4

Your submission must be created using Microsoft Word, Google Docs, or LaTeX.

Your submission must be saved as a "pdf" document and have the name "a1.pdf"

Do not compress your submission into a "zip" file.

Late assignments will not be accepted and will receive a mark of 0.

Submissions written by hand, compressed into an archive, or submitted in the


wrong format (i.e., are not "pdf" documents) will receive a mark of 0.

The due date for this assignment is January 21, 2017, by 11:30pm.

1. Let p be the proposition "It is January", q be the proposition "It is cold outside",
and r be the proposition "I am Canadian". Translate the following expressions
into English. 4 marks total

a. 𝑞 ∨ 𝑟

It is cold outside or I am Canadian (or both)

b. ¬𝑝 ⋀ ¬𝑞

It is not January and it is not cold outside

c. 𝑟 ⋀ 𝑝 → ¬𝑞

If I am Canadian and it is January then it is not cold outside

d. 𝑞 ⊕ 𝑟

Either it is cold outside or I am Canadian but not both.


COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 1 of 4

2. Translate the following English expressions into logical statements. You must
explicitly state what the atomic propositions are (e.g., "Let p be proposition ...")
and then show their logical relation. 4 marks total

a. I like computer science and I like teaching but I don't like email.

Let C be the proposition "I like computer science"


Let T be the proposition "I like teaching"
Let E be the proposition "I like email"
C  T  E

b. If it is early then I need to drink coffee.

Let E be the proposition "it is early"


Let C be the proposition "I need to drink coffee"
EC

c. Either I was born in Canada or I was not.

Let C be the proposition "I was born in Canada"


C  C (or, alternatively, C  C)

d. I am your instructor if and only if you are a Carleton University student.

Let I be the proposition "I am your instructor"


Let S be the proposition "you are a Carleton University student"
IS
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 1 of 4

3. Determine which of the following are True and explain why or why not.
4 marks total

a. 2 < 4 and 4 < 6 and 6 < 2

(2 < 4)  (4 < 6)  (6 < 2)


True  True  False
True  False
False
(or, alternatively: "Since 6 is not less than 2, at least one of the
propositions in this conjunction of three propositions will be false, and
since conjunctions are only true if all the component propositions are
true, this expression must evaluate to false.")

b. 1 = 2 or 2 > 1.

(1 = 2)  (2 > 1)
False  True
True
(or, alternatively: "Since 6 is not less than 2, at least one of the
propositions in this conjunction of three propositions will be false, and
since conjunctions are only true if all the component propositions are
true, this expression must evaluate to false.")
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 1 of 4

c. If 9 = 8 then your instructor is actually Nyarlathotep.

(9 = 8)  Nyarlathotep
False  Nyarlathotep
True
(or, alternatively: "Since 9  8 the antecedent of this implication
statement is false and so, regardless of whether or not the instructor is
Nyarlathotep this statement is true.")

d. If 8 = 8 then either 8 = 23 or 8 = 22.

(8 = 8)  (8 = 23  8 = 22)
True  (8 = 8  8 = 4)
True  (True  False)
True  True
True
(or, alternatively: "Since 8 = 23 = 8 and since the consequent is a
disjunction with 8 = 23, this consequent must be true. Since the
consequent is true, the implication statement must also be true." )
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 1 of 4

4. Using only the , , and  operators, find a logical expression that is equivalent
to (𝑝 ⋁ 𝑞) ↔ (𝑞 ⋁  𝑟). 3 marks

((p  q)  (q  r))  ((q  r)  (p  q))

(this is the most likely answer)

5. Prove that the expression you found for question 4 above is equivalent to
(𝑝 ⋁ 𝑞) ↔ (𝑞 ⋁  𝑟) by using logical equivalences. Show all your work.
4 marks

(p  q)  (q  r)

((p  q)  (q  r))  ((q  r)  (p  q)) by Biconditional Equivalence

(  (p  q)  (q  r))  ((q  r)  (p  q)) by Double Negation


(  (p  q)    (q  r))  ((q  r)  (p  q)) by Double Negation
(  (p  q)    (q  r))  (  (q  r)  (p  q)) by Double Negation
(  (p  q)    (q  r))  (  (q  r)    (p  q)) by Double Negation

( (p  q)    (q  r))  (  (q  r)    (p  q)) by DeMorgan's Law


( (p  q)   (q   r))  (  (q  r)    (p  q)) by DeMorgan's Law
( (p  q)   (q   r))  ( (q   r)    (p  q)) by DeMorgan's Law
( (p  q)   (q   r))  ( (q   r)   (p  q)) by DeMorgan's Law

( (p  q)   (q  r))  ( (q   r)   (p  q)) by Double Negation
( (p  q)   (q  r))  ( (q  r)   (p  q)) by Double Negation
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 1 of 4

6. Prove that the expression you found for question 4 above is equivalent to
(𝑝 ⋁ 𝑞) ↔ (𝑞 ⋁  𝑟) by using truth tables. Show all your work. 8 marks

p q r p q r pq q  r (p  q)  (q  r)
T T T F F F T T T
T T F F F T T T T
T F T F T F T F F
T F F F T T T T T
F T T T F F T T T
F T F T F T T T T
F F T T T F F F T
F F F T T T F T F

p  q (p  q) q  r (q  r) (p  q)  (q  r) (q  r)  (p  q)


F T F T T T
F T F T T T
F T T F F T
F T F T T T
F T F T T T
F T F T T T
T F T F T T
T F F T T F

((p  q)  (q  r))  ((q  r)  (p  q))


T
T
F
T
T
T
T
F
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 1 of 4

7. Determine if the following expressions are tautologies, contradictions, or


contingencies by using truth tables. Show all your work.

a. ¬(¬(𝑝 ∧ ¬(¬𝑞 ∧ 𝑞)) ∧ ¬¬𝑝) 4 marks

p q p q q  q (q  q) p  (q  q) (p  (q  q)) p (p  (q  q))  p
T T F F F T T F T F
T F F T F T T F T F
F T T F F T F T F F
F F T T F T F T F F

((p  (q  q))  p)


T
T
T
T
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 1 of 4

b. (𝑞 ⟷ ((𝑝 ∨ 𝑟) ∧ 𝑟)) ∧ ¬(𝑝 → 𝑝) 8 marks

p q r pr (p  r)  r q  ((p  r)  r) pp  (p  p) (q  ((p  r)  r))   (p  p)


T T T T T T T F F
T T F T F F T F F
T F T T T F T F F
T F F T F T T F F
F T T T T T T F F
F T F F F F T F F
F F T T T F T F F
F F F F F T T F F

c. (((𝑝 ∧ 𝑟) ∨ 𝑞 ∨ (𝑝 ∧ ¬𝑟)) ∧ (𝑟 ∨ 𝑝) 8 marks

p q r pr (p  r)  q r (p  r) (p  r)  q  (p  r) (r  p) ((p  r)  q  (p  r))  (r  p)


T T T T T F F T T T
T T F F T T T T T T
T F T T T F F T T T
T F F F F T T T T T
F T T F T F F T T T
F T F F T T F T F F
F F T F F F F F T F
F F F F F T F F F F
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 1 of 4

8. Determine if the following expressions are tautologies, contradictions, or


contingencies by using logical equivalences. Show all your work.

a. ¬(¬(𝑝 ∧ ¬(¬𝑞 ∧ 𝑞)) ∧ ¬¬𝑝) 4 marks

((p  (q  q))  p) by Commutativity


((p  (False))  p) by Negation
((p  True)  p) -
(p  p) by Identity
(p  p) by Double Negation
(False) by Negation
True -

b. (𝑞 ⟷ ((𝑝 ∨ 𝑟) ∧ 𝑟)) ∧ ¬(𝑝 → 𝑝) 4 marks

(q  ((p  r)  r))   (p  p)

(q  ((p  r)  r))   (p  p) by Implication Equivalence

(q  ((p  r)  r))   (p  p) by Commutativity

(q  ((p  r)  r))   (True) by Negation

(q  ((p  r)  r))  False -

False by Domination
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 1 of 4

c. (((𝑝 ∧ 𝑟) ∨ 𝑞 ∨ (𝑝 ∧ ¬𝑟)) ∧ (𝑟 ∨ 𝑝) 4 marks

((p  r)  q  (p  r))  (r  p)

((p  r)  (p  r)  q)  (r  p) by Commutativity

((p  (r  r))  q)  (r  p) by Distributivity

((p  (True))  q)  (r  p) by Negation

(p  q)  (r  p) by Identity

(p  q)  (p  r) by Commutativity

p  (q  r) by Distributivity
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 1 of 4

9. Let P(x) be the predicate "x is a penguin", B(x) be the predicate "x is a bird", and
S(x) be the predicate "x eats squid". Translate the following expressions into
English. The universe of discourse is all animals. 3 marks total

a. ∃𝑎 (𝑃(𝑎) ↔ 𝑆(𝑎))

There is at least one animal that is a penguin if and only if it eats squid.

b. ∃𝑏 (𝑃(𝑏) ∧ ¬𝑆(𝑏))

There is at least one animal that is a penguin but does not eat squid.

c. ∀𝑐 (𝐵(𝑐) → (𝑃(𝑏) ∨ ¬𝐵(𝑐)))

Every animal that is a bird is either a penguin or it is not a bird.


COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 1 of 4

10. Negate the following predicate logic statements using the quantifier negation
rules discussed in class. Show all your work and ensure that no negation
operations appear before any of the quantifiers in the expression you create.

a. Every penguin is aquatic and flightless. 4 marks

Let P(x) be the predicate "x is a penguin"


Let A(x) be the predicate "x is aquatic"
Let F(x) be the predicate "x can fly"
x P(x)  A(x)  F(x)
... this is the expression but now it must be negated...
x (P(x)  A(x)  F(x))
x  (P(x)  A(x)  F(x))
x  (P(x)  (A(x)  F(x))) by Implication Equivalence
x  P(x)   (A(x)  F(x)) by DeMorgan's Law
x P(x)   (A(x)  F(x)) by Double Negation
x P(x)  (A(x)  F(x)) by DeMorgan's Law
x P(x)  (A(x)  F(x)) by Double Negation

b. There is at least one penguin who doesn't eat squid and can fly. 4 marks

Let P(x) be the predicate "x is a penguin"


Let S(x) be the predicate "x eats squid"
Let F(x) be the predicate "x can fly"
x P(x)  S(x)  F(x)
... this is the expression but now it must be negated...
x P(x)  S(x)  F(x)
x (P(x)  S(x)  F(x))
x ((P(x)  S(x))  F(x)) by Associativity
x ( (P(x)  S(x))  F(x)) by DeMorgan's Law
x ((P(x)  S(x))  F(x)) by DeMorgan's Law
x ((P(x)  S(x))  F(x)) by Double Negation

Вам также может понравиться