CS101 - Chapter4 Discrete Math
CS101 - Chapter4 Discrete Math
Page 1
Introduction
Logic that deals with propositions is
incapable of describing most of the
statements in mathematics and
computer science.
Recall that a proposition is a
statement that is either true or false,
thus, the statement:
p: n is an odd integer.
is not a proposition because whether
p is true or false depends on the
value of n. If n = 103, p is true and
false if n = 8.
Free Powerpoint Templates
Page 2
Introduction
• x2 - x - 6 = 0
- D = set of students
- D = set of actresses
Free Powerpoint Templates
Page 10
Universal and Existential
Quantifiers
Most of the statements in mathematics
and computer science use terms such
as "for every" and "for some." For
example in mathematics we have the
statements:
– For every triangle T, the sum of the
angles of T is equal to 180°.
– For some triangle S, the sum of two
angles is less than 90o.
Definition:
The statement
for some x, P(x)
is said to be an existentially
quantified statement. The symbol
means "for some." Thus the statement
for some x, P(x) may be written
x, P(x).
Proof:
We must verify that the statement
if x > 1, then x + 1 > 1 is true for every
real number x.
Let x be any real number
whatsoever. It is true that for any real
number x, either xFree 1Powerpoint
or x > 1. Templates
Page 21
Quantifiers : Example2
Case1: x 1
The conditional proposition
If x > 1, then x + 1 > 1 is true
because the hypothesis x > 1 is
false. (Recall that when the
hypothesis is false, the
conditional proposition is true
regardless of whether the
conclusion is true or false.)
Free Powerpoint Templates
Page 22
Quantifiers : Example 2
Case 2: x > 1
x>1→x+1>1+1>1
(API)
→ x + 1 > 1 (transitivity of >)
hence the conditional proposition
if x > 1, then x + 1 > 1 is true.
Note:
To show that the universally
quantified statement
for every x, P(x}
is false, it is sufficient to find one
value x in the domain of discourse for
which the proposition P(x} is false,
that is, it is sufficient to give a
counterexample.
Free Powerpoint Templates
Page 26
Quantifiers : Example 3
A counterexample is obtained by
taking n = 38. The conditional
proposition if 38 is even, then 382 + 38
+ 19 is prime is false because the
hypothesis 38 is even is true, but the
conclusion 382 + 38 + 19 is prime is
false. 382 + 38 + 19 is not prime since
it can be factored:
382 + 38 + 19 = 38 38 + 38 + 19
= 19(2 38 + 2 + 1) = 19 79.
Free Powerpoint Templates
Page 29
Quantifiers : Example 5
1
1
x 1
2
Contradiction
A contradiction is a proposition of
the form r Λ ~ r (r may be any
proposition whatever).
A proof by contradiction is
sometimes called an indirect proof
since to establish (*) using proof by
contradiction, one follows an indirect
route: derive r , then conclude that
(*) is true.
pq
p
q
is valid.
p q pq p q
T T T T T
T F F T F
F T T F T
F F T F F
Solution.
If we let
p: 2 =3, q: I ate my hat.
the argument may be written
pq
q
p
pq pq
~q qr
~ p pr
pq pq
~p p q r
q r
( p q) (r s)
~ q ~ s
~ p ~FreerPowerpoint Templates
Page 111
Rules of Inference
8. Constructive Dilemma (C.D.)
( p q) (r s)
pr
q s
9. Simplification (Simp.)
pq
p
Free Powerpoint Templates
Page 112
Rules of Inference
10. Conjunction (Conj.)
p
q
pq
11. Addition (Add.)
p
pq Free Powerpoint Templates
Page 113
Rules of Inference
These eleven Rules of Inference are
elementary valid argument forms,
whose validity is easily established by
truth tables. They can be used to
construct formal proofs of validity for a
wide range of more complicated
arguments. The names listed are
standard for the most part, and the use
of their abbreviations permits formal
proofs to be set down with a minimum of
writing.
Solution:
Symbolically, the above arguments may
be written as:
A ( B D)
~ C (D E)
AC
~C
B E
Free Powerpoint Templates
Page 117
Example 3
where
A: Attorney General imposes a strict
censorship.
B: Black mails the letter.
C: Our lines of communication
breaks down completely.
D: Davis receives a warning.
E: Emory was informed about the
matter.
Free Powerpoint Templates
Page 118
Example 3
To establish the validity of this
argument by means of a truth table
would require a table with thirty-two
rows. We can prove the given
argument valid, however, by
deducing its conclusion from its
premises by a sequence of just four
arguments whose validity has
already been established.
Free Powerpoint Templates
Page 119
Example 3
1.A v (B D)
2. ~ C (D E)
3. A C
4. ~ C /B E
5. ~ A 3, 4, M.T.
6. B D 1, 5, D.S.
7. D E 2, 4, M.P.
8. B E 6, 7, H.S.
Free Powerpoint Templates
Page 124
Example 3
One matter that needs to be emphasized here
is that any substitution instance of an
elementary valid argument form is an
elementary valid argument. Thus the
argument
~ C (D E)
~C
DE
Sn+1 = 1 + 2, + . . . + n + (n + 1).
r 1
for n = 0, 1, . . . .
The sum on the left is called a geometric
sum. In a geometric sum, the ratio of
consecutive terms (ar i + 1/ar i = r) is constant.
Proof:
Basis Step. The Basis Step, which in this
case is obtained by setting n = 0, is
which is true.
Free Powerpoint Templates
Page 147
Principle of Mathematical
Induction: Example 3
Inductive Step . Assume that statement is
true for n. Now,
n 1
n 1 a ( r 1)
a ar ar ... ar ar
1 2 n
ar n 1
r 1
a (r n 1 1) ar n 1 (r 1)
r 1 r 1
a (r n 2 1)
r 1
Free Powerpoint Templates
Page 148
Principle of Mathematical
Induction: Example 3
Since the modified Basis Step and the
Inductive step have been verified, the
Principle of Mathematical Induction tells
us that
n 1
a ( r 1)
a ar ar ... ar
1 2 n
r 1
is true for n = 0, 1, …
Therefore,
(X) = 2(Y)= 2 2n =
2n+1.
Thus the formula holds for n + 1 and
the inductive step is complete. By the
Principle of Mathematical Induction,
Law 3.6.2 holds for all n 0.