Chapter 1
Chapter 1
Definition 2: ( Conjunction)
Let p and q be propositions. The conjunction
of p and q, denoted by p ∧ q, is the
proposition
“p and q.”
The conjunction p ∧ q is true when both p
and q are true and is false otherwise.
6/4/2023 Discrete Mathematics 5
Cont’d
• Note that in logic the word “but” sometimes is
used instead of “and” in a conjunction. For
example, the statement “The sun is shining, but it
is raining” is another way of saying “The sun is
shining and it is raining.”
6/4/2023 9
Discrete Mathematics
Propositional Equivalences
• Definition: A compound proposition that is always
true, no matter what the truth values of the
propositional variables that occur in it, is called a
tautology. A compound proposition that is always
false is called a contradiction. A compound
proposition that is neither a tautology nor a
contradiction is called a contingency.
The compound propositions p and q are called
logically equivalent if p ↔ q is a tautology.
• The notation p ≡ q denotes that p and q are
logically equivalent.
6/4/2023 Discrete Mathematics 10
Cont’d
p
p q
q
q
p q
¬𝑝
q
p q
p
pq
p
p
p q q
p pq p q
6/4/2023 q p q p p 25 23
Discrete Mathematics
r
p1 p2 ... pn q
Proof by cases!
Case 1: (m=n) → (m2=n2)
2 2 2 2
(m) = m , and (n) = n , so this case is proven
(m =n ) → [(m=n)(m=-n)]
2 2
• if a | b and a | c, then a | (b + c)
• Example: 3 | 6 and 3 | 9, so 3 | 15.
• if a | b and b | c, then a | c
• Example: 4 | 8 and 8 | 24, so 4 | 24.
•Example:
•When we divide 17 by 5, we have
•17 = 53 + 2.
• 17 is the dividend,
• 5 is the divisor,
• 3 is called the quotient, and
• 2 is called the remainder.
•Another example:
•What happens when we divide -11 by 3 ?
•Note that the remainder cannot be negative.
•-11 = 3(-4) + 1.
•Example:
a = 60 = 22 31 51
b = 54 = 21 33 50
gcd(a, b) = 21 31 50 = 6
•Examples:
•Are 15 and 28 relatively prime?
•Yes, gcd(15, 28) = 1.
•Are 55 and 28 relatively prime?
•Yes, gcd(55, 28) = 1.
•Are 35 and 28 relatively prime?
•No, gcd(35, 28) = 7.
6/4/2023 Discrete Mathematics 67
Cont’d
•Definition:
•The integers a1, a2, …, an are pairwise relatively prime if
gcd(ai, aj) = 1 whenever 1 i < j n.
•Examples:
•Are 15, 17, and 27 pairwise relatively prime?
•No, because gcd(15, 27) = 3.
•Are 15, 17, and 28 pairwise relatively prime?
•Yes, because gcd(15, 17) = 1, gcd(15, 28) = 1 and gcd(17,
28) = 1.
•Example:
a = 60 = 22 31 51
b = 54 = 21 33 50
lcm(a, b) = 22 33 51 = 4275 = 540
a = 60 = 22 31 51
b = 54 = 21 33 50
gcd(a, b) = 21 3 1 50 =6
lcm(a, b) = 22 3 3 51 = 540
•Examples:
9 mod 4 = 1
9 mod 3 = 0
9 mod 10 = 9
-13 mod 4 = 3
•So we divide 14 by 7:
•14 = 72 + 0
•We find that 7 | 14, and thus gcd(14, 7) = 7.
•Therefore, s = a + b = (11001)2.
1 11 carry
•Example: 7583
+ 4932
1 25 1 5
1 1 carry
Binary expansions: (1011)2
+ (1010)2
( 1 0 1 0 1 )2
•Therefore, s = a + b = (11001)2.