Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

CSci 102: Discrete Structures I

List of Equivalences
n n n n
Theorem 1.3.1.  ( xi + y i + z i ) =  xi +  y i +  z i
i =1 i =1 i =1 i =1

n n
Theorem 1.3.2.  cxi = c xi
i =1 i =1

n
Theorem 1.3.3.  c = nc
i =1

~ true = false
Law 2.1.1
~ false = true

Law 2.1.2 ~~ p = p

Law 2.2.1 p^ p = p

Law 2.2.2 p^ true = p

Law 2.2.3 p^ false = false

Law 2.2.4 p^ ~ p = false

Law 2.2.5 p^ q = q^ p

Law 2.2.6 p^ (q^ r ) = ( p^ q)^ r

Law 2.3.1 p p = p

Law 2.3.2 p  false = p

Law 2.3.3 p  true = true

Law 2.3.4 pq = q p

Law 2.3.5 p  ( q  r ) = ( p  q)  r

Law 2.3.6 p  ~ p = true


p  (q^ r ) = ( p  q)^ ( p  r )
Law 2.3.7
( p^ q)  r = ( p  r )^ (q  r )
p ^ ( q  r ) = ( p ^ q)  ( p ^ r )
Law 2.3.8
( p  q)^ r = ( p^ r )  (q^ r )
Law 2.4 𝑝 → 𝑞 = ~𝑝 ∨ 𝑞

Law 2.5.1 ~ ( p  q) =~ p^ ~ q

Law 2.5.2 ~(𝑝^𝑞) = ~𝑝 ∨ ~𝑞

Law 2.5.3 ~ ( p → q) = p ^ ~ q

Law 2.6.1 p  ( q  r ) = ( p  q)  r

Law 2.6.2 pq=q p

Law 2.6.3 p  p = true

Law 2.6.4 p ~ p = false

Law 2.6.5 p  q = ( p → q)^ (q → p)

Contrapositive Law p → q =~ q →~ p
CSci102 : Discrete Mathematics I
Learning Task #5
Answer Key

Problem #1

(p  (q  r))  (~r  (p  q))

~p  (q  r) Law 2.4 : p  q  ~p  q

r  (~p  q) Law 2.3.5: Associative property of disjunction

r  (p  q) Law 2.4 : p  q  ~p  q

~r  (p  q) Law 2.4 : p  q  ~p  q

Problem #2

(p  true)  p

((p  true)  (true  p))  p Law 2.6.5

((~p  true)  (~true  p))  p Law 2.4

(true  (false  p))  p Law 2.3.3

(true  p)  p Law 2.3.2

pp Law 2.2.2

~p  p Law 2.4

True Law 2.3.6


T. 1.2.1
𝟐 2 2

∑ 𝟑𝒙𝒊 − ∑ 𝑦𝑖 + ∑ 4
𝒊=𝟏 𝑖=1 𝑖=1

T.1.2.2
𝟐 2 2

𝟑 ∑ 𝒙𝒊 − ∑ 𝑦𝑖 + ∑ 4
𝒊=𝟏 𝑖=1 𝑖=1

T.1.2.3
𝟐 2

𝟑 ∑ 𝒙𝒊 − ∑ 𝑦𝑖 + 2(4)
𝒊=𝟏 𝑖=1

{3[x1 + x2] } – {y1 + y2} + 8

[3(2+4)] – [3 -1] + 8

18 – 2 + 8 = 24

= (3x1 – y1 + 4) + (3x2 – y2 + 4)

= [3(2) – 3 + 4] + [3(4) + 1 + 4]

= 7 + 17

= 24
𝑛 𝑚

∑ ∑ 𝑋𝑖𝑗
𝑖=1 𝑗=1

= ∑[𝑋𝑖1 + 𝑋𝑖2 + 𝑋𝑖3 + ⋯ + 𝑋𝑖𝑚 ]


𝑖=1

= ∑𝒏𝒊=𝟏 𝑿𝒊𝟏 + ∑𝑛𝑖=1 𝑋𝑖2 + ∑𝑛𝑖=1 𝑋𝑖3 + . . . . + ∑𝑛𝑖=1 𝑋𝑖𝑚

= [X11 + X21 + X31 + . . . + Xn1] + [X12 + X22 + X32 + . . . + Xn2] + [X13 + X23 + X33 + . . . + Xn3] + … +

[X1m + X2m + X3m + . . . + Xnm]

Example #1:
3 4 3 3 3 3

∑∑ 𝑥𝑦 = ∑[𝑥 2 + 𝑥3 + 𝑥 4] = ∑ 𝑥2 + ∑ 𝑥3 + ∑ 𝑥4
𝑥=1 𝑦=2 𝑥=1 𝑥=1 𝑥=1 𝑥=1

= [12 + 22 + 32] + [13 + 23 + 33] + [14 + 24 + 34]

= 14 + 36 + 98 = 148

Example #2:
2 5

∑ ∑ 𝑥 𝑦𝑦𝑥
𝑥=1 𝑦=3

∑[𝑥 𝟑 𝟑 𝑥 + 𝑥 4 4𝑥 + 𝑥 5 5𝑥 ]
𝑥=1

= [1331 + 2332] + [1441 + 2442] + [1551 + 2552]

= 75 + 260 + 805 = 1140


CSci 102 – Discrete Structures I
Module 2 Quiz
ANSWERS
I. Write the following proposition using p, q, r and logical operators
Let p, q and r be the propositions
p : I spend many hours in studying
q : The problems are too hard
r : I do well in my exam

1. If I do not perform well in my exam then I did not spend many hours studying or the
problems are too hard. ~r  (~p  q)

2. If I will spend many hours in studying and the problems are not too hard then I will
do well in my exam. (p  ~q)  r

II. Write the given logical proposition into its equivalent symbolic notation.
Let p and q be the following propositions:
p: the pie is opened
q: the birds begin to sing

1. If the pie is opened then birds won’t sing - p  ~q


2. The birds will only sing once the pie is opened - qp
3. If the pie is not opened then the birds won’t sing - ~p  ~q
4. When the pie is opened the birds begin to sing - pq

III. Write the letter of the term that is best described by the following statement.
1. The contrapositive is logically equivalent form of the ____.b a. contrapositive
2. The converse of the inverse of p  q is ____
a of p  q. b. conditional proposition
3. The inverse of the contrapositive of p  q is the ____
d of p  q. c. inverse
4. ~p  ~q is the _____
c form of p  q. d. converse

IV. Determine whether the given proposition is a tautology, contradiction or contingency.


1. ~q  ~(p  (~p  q)) - tautology
2. (~q  ( p  q ))  ~p - tautology
3. (p  q)  (q  p) - contingency

V. Prove using equational reasoning the equivalence of the given propositions:

[(p  q)  (p  ~q)]  q  p  q

[(p  q)  (p  ~q)]  q

[p  (q  ~q)]  q 2.3.7

[p  F]  q 2.2.4

pq 2.3.2
Given the following definitions:
add_two(1) = 1+1+1
add_two(x+1) = (x + 1)+1+1
subtract(x+1, 1) = x
subtract(x+1, y+1) = (x, y)
mult (1, n) = n
mult (m + 1, n) = mult (m, n) + n
square (n) = mult (n, n)

Solve the following:


mult((subtract(add_two(x + 1 + 1 + 1), 1 + 1)), y + 1 + 1 + 1)

Solution:
mult((subtract(add_two(x + 1 + 1 + 1), 1 + 1)), y + 1 + 1 + 1)
= mult((subtract((x + 1 + 1 + 1) + 1 + 1, 1 + 1)), y + 1 + 1 + 1)
= mult(x + 1 + 1 + 1, y + 1 + 1 + 1)
= mult (x + 1 + 1, y + 1 + 1 + 1) + y + 1 + 1 + 1
= mult (x + 1 + 1, y + 1 + 1 + 1) + y + 3
= mult (x + 1, y + 1 + 1 + 1) + y + 1 + 1 + 1 + y + 3
= mult (x + 1, y + 1 + 1 + 1) + 2y + 6
= mult (x, y + 1 + 1 + 1) + y + 1 + 1 + 1 + 2y + 6
= mult (x, y + 1 + 1 + 1) + 3y + 9
= mult (y + 1 + 1 + 1, x) + 3y + 9
= mult (y + 1 + 1, x) + x + 3y + 9
= mult (y + 1, x) + x + x + 3y + 9
= mult (y + 1, x) + 2x + 3y + 9
= mult (y, x) + x + 2x + 3y + 9
= mult (y, x) + 3x + 3y + 9

You might also like