Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 61

DISCRETE

MATHEMATICS
AND
ITS APPLICATIONS
Book: Discrete Mathematics and Its Applications
Author: Kenneth H. Rosen
Sixth Edition
McGraw-Hill International Edition
Chapter 1
The Foundations:
Logic and Proofs
Logical Operators (connective)
 Negation p (NOT)

 Conjunction p^q (AND/BUT)


 Disjunction pvq (OR)
 Exclusive-or pq (XOR)
“p or q (but not both)”
Logical Operators (connective)
- If p, then q
- q if p
Implication p→q - p only if q
- p is sufficient condition for q
- q is necessary condition for p

p → q is false when p is true and q is false, and true otherwise.

 Biconditional pq (if and only if)


p  q is true when p and q have the same truth values,
and is false otherwise.
1.1.2- Precedence of Logical Operators

(1) Parentheses from inner to outer


(2) ¬
(3) ^
(4) v
(5) →
(6) ↔

 Ex: p ^ q → r v s means [(p) ^ q] → (r v s)

n
A truth table will need 2 rows if there are n variables.
1.1 Propositional Logic
1. Construct a truth table for each of these compound
propositions.
a) p ∨ ¬p
b) (p ∨ q) → (p ∧ q)
c) (q → ¬p) ↔ (p ↔ q)
d) (p ⊕ q) → (p ∧ q)
1.1 Propositional Logic
3. Determine whether these biconditionals are true or false.

a) 2 + 2 = 4 if and only if 1 + 1 = 2.

b) 1 + 1 = 2 if and only if 2 + 3 = 4.

c) If 1 + 1 = 3, then dogs can fly.

d) If 1 + 1 = 2, then 2 + 2 = 5.

e) If monkeys can fly, then 1 + 1 = 3.


1.1 Propositional Logic
4. How many rows appear in a truth table for each of
these compound propositions?
1.1 Propositional Logic
6. Evaluate each of these expressions.
a) 1 1000 ∧ (0 1011 ∨ 1 1011)
b) (0 1111 ∧ 1 0101) ∨ 0 1000
c) (0 1010 ⊕ 1 1011) ⊕ 0 1000
d) (1 1011 ∨ 0 1010) ∧ (1 0001 ∨ 1 1011)
 Tautology is a proposition that is always true.
 Contradiction is a proposition that is always false.
 p  q when p ↔ q is tautology.
Equivalence Name
¬(p^q) ≡ ¬p v ¬q ¬(pvq) ≡ ¬p^¬q De Morgan Laws
1.2. Propositional Equivalences
1. Show that each of these conditional statements is a
tautology by using truth tables.
a) (p ∧ q) → p
b) p → (p ∨ q)
c) ¬p → (p → q)
d) (p ∧ q) → (p → q)
e) ¬(p → q) → p
f) ¬(p → q) → ¬q
1.2. Propositional Equivalences
5. Show that p → q and ¬q → ¬p are logically equivalent.
Quantifier
Predicate Proposition
- Universal quantification: "all of," "for each," "given any," "for arbitrary,“
- Existential quantification: "there exists”, "for some," "for at least one," or "there is."
1.5.2- Rules Inferences
Rule Name Rule Name
p Modus ponen p Addition
p →q pvq
q
¬q Modus tollen p^q Simplication
p→q p
¬p

p →q Hypothetical p Conjunction
q →r syllogism q
p →r p^q

pvq Disjunctive pvq Resolution


¬p syllogism ¬pvr
q qvr
1.5.4- Rules of Inference for
Quantified Statements
Rule Name
xP(x) Universal Instantiation
P(c)
P(c) for arbitrary c Universal generalization
xP(x)
xP(x) Existential instantiation
P(c) for some element c
P(c) for some element c Existential generalization
xP(x)
1.5- Rules of Inference
1. What rule of inference is used in each of these arguments?
a) Alice is a mathematics major. Therefore,
Alice is either a mathematics major or a
computer science major.

b) Jerry is a mathematics major and a


computer science major. Therefore, Jerry
is a mathematics major.

c) If it is rainy, then the pool will be closed.


It is rainy. Therefore, the pool is closed.
1.5- Rules of Inference
1. What rule of inference is used in each of these arguments?

d) If it snows today, the university will close.


The university is not closed today. Therefore,
it did not snow today.

e) 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.
1.5- Rules of Inference
2. 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.”
1.5- Rules of Inference
3. For this argument determine whether the argument is correct
or incorrect and explain why.
All students in this class understand logic. Xavier is a student in
this class. Therefore, Xavier understands logic.

You might also like