0% found this document useful (0 votes)
18 views40 pages

Discrete Structures Lecture 06

Uploaded by

rg709pk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views40 pages

Discrete Structures Lecture 06

Uploaded by

rg709pk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

CS-- Discrete Structures

Lecture - 7
Introduction
to
Proofs
Proof
s
• Proof:
A proof is a valid argument that establishes the
truth of a mathematical statement.
• Proofs are essential in mathematics and
computer science.
• Some applications of proof methods
• Proving mathematical theorems
• Designing algorithms and proving they meet their
specifications
• Verifying computer programs
• Establishing operating systems are secure
• Making inferences in artificial intelligence
• Showing system specifications are consistent
• …
Terminolo
gy
• Theorem: A statement that can be shown true.
Sometimes
called facts.
• Lemma: A less important theorem that is useful to
prove a
theorem.
• Proof: Demonstration that a theorem is true.

• Axiom: A statement that is assumed to be true.

• Corollary: A theorem that can be proven directly

from a theorem that has been proved.


• Conjecture: A statement that is being proposed
to be a true
Theorem
Definition: A theorem is a statement that has
been proven to be true through a logical series of
steps.
Example: The Pythagorean theorem in geometry
is a classic example. It states that in a right-
angled triangle, the square of the hypotenuse
(the side opposite the right angle) is equal to the
sum of the squares of the other two sides.
In symbols:
a2+b2=c2
Lemma
Definition: A lemma is a "helping" theorem, a
small result used to assist in proving a larger,
more significant theorem.
Example: Before proving the Pythagorean
theorem, we might prove a lemma about the
properties of squares and rectangles that we’ll
use in the main proof. Lemmas are generally less
famous or standalone than theorems.
Proof
Definition: A proof is a logical argument that
demonstrates the truth of a theorem. Proofs use
known facts, lemmas, or axioms to show that a
theorem is true.
Example: Proving that the sum of two even
numbers is always even.
Proof: Let a and b be two even numbers. By
definition of even numbers, we can write
a=2m and
b=2n where
m and n are integers. Then
a+b=2m+2n=2(m+n), which is also an even
number because it’s divisible by 2.
Axiom
Definition: An axiom is a fundamental
statement assumed to be true without
proof. Axioms are used as starting points
in logical reasoning.
Example: One common axiom in set
theory is that a set contains all its
elements. For instance, if
A={1,2,3}, it’s assumed (without needing
proof) that
1∈A, 2∈A, and 3∈A.
Corollary
Definition: A corollary is a
statement that follows directly from a
theorem that has already been
proven. It’s often a “bonus” result
that uses the theorem’s truth.
Example: After proving the
Pythagorean theorem, a corollary
would be: "In a right triangle, if two
sides are of equal length, then the
hypotenuse is 2 underroot​times the
length of each side."
Conjecture
Definition: A conjecture is a
statement proposed to be true based
on observations but has not yet been
proven or disproven.
Example: The Goldbach Conjecture
states that "Every even integer
greater than 2 can be expressed as
the sum of two prime numbers." This
has been checked for many numbers
but has not been proven for all even
numbers.
Summary:
Theorem: Proven, significant statement
(e.g., Pythagorean theorem).
Lemma: Supporting result used in proofs.
Proof: The logical steps to show a
theorem is true.
Axiom: Accepted statement without proof
(basic truths).
Corollary: Direct consequence of a
theorem.
Conjecture: Proposed statement that
hasn’t been proven yet.
Stating
Theorems
• Theorem: If 𝑥 > 𝑦, where 𝑥 and 𝑦 are positive real

then 𝑥 2 > 𝑦 2 .
numbers,

• Theorem: For all positive real numbers 𝑥 and 𝑦, if 𝑥


>
𝑥 2 𝑦,
> then
𝑦2 .
Theore
m
• Conditional statement (review):
• p  q is true unless p is false and q is
true.

p q p q
T T T
T F F
F T T
F F T
Methods of Proving
Theorems
Vacuous
Proof
• Consider an implication: 𝑝→𝑞

• If it can be shown that 𝑝 is false, then the


implication is
always true.
• By definition of an implication

• Note that you are showing that the hypothesis is


false
Vacuous Proof
• Assume P(n) is “if n > 0, then 𝑛2 > 0”. Show
Example
that P(0) is
true.

• Proof:

P(0) is “if 0 > 0, then 02 > 0”.


Since the hypothesis of P(0) is false, then
P(0) is true.

• Vacuous proof:
p  q is true when p is false.
Vacuous Proof
• If n is both odd and even then n2 =
Example
n+n
Trivial
• Consider an implication: 𝑝 → 𝑞
Proof
• If it can be shown that q is true, then the
implication is always true
• By definition of an implication

• Note that you are showing that the conclusion


is true
Trivial Proof
• Assume P(n) is “if ab > 0, then (𝑎𝑏)𝑛 > 0”. Show
Example
that P(0)
is true.

• Proof:

P(0) is “if ab >0, then (𝑎𝑏)0 > 0”.


(𝑎𝑏)0 = 1 > 0
Since the conclusion of P(0) is true, P(0) is true.

• Trivial proof:
p  q is true when q is true.
Trivial Proof
Example
• If n is the sum of two prime numbers,
then either n is odd or n is even.

•If you are in CS-305 then you are a


student.
Direct
Proof
•A direct of a conditional
constructed
proof when
statement
the first stepp is the assumption
→ q is
that p is true; use axioms, definitions, and
previously proven theorems, together with rules of
inference, with the final step showing that q must
also be true.

• A direct proof shows that a conditional statement p


→ q is true by showing that if p is true, then q must
also be true, so that the combination p true and q
false never occurs.
Direct
Proof
•Direct proof of p 
q:

• Assume p is true.

These steps are constructed


using Rules of inference
Axioms
Lemmas
Definitio
ns
Proven
• q must be theorem
true. s
Direct
Proof
• Odd Number:
n is odd if n=2k+1 for some k of type
integer.

• Even Number:
n is even if n=2k for some k of type
integer.
Direct
Proof
If n is an odd integer, then 𝑛2 is
• Theorem:

odd.
• Proof:

integer. By definition, ∃
Assume n is an odd

integer k, such that n =


2k + 1
𝑛2 = (2k + 1)2
𝑛2 = 4𝑘2 + 4k + 1 = 2 (2𝑘2 +
2k) + 1 Let m = 2𝑘2 + 2k.
𝑛2 = 2m + 1
2
Direct
Proof
• Theorem:
If n and m are both perfect squares then nm
is also a perfect square.
• Proof:
Assume n and m are perfect Definition:
An integer a
squares.
By definition, ∃ integers s
is perfect

∃ integer b
and t such that n = 𝑠 2
square if

and m = 𝑡 2 . that a= 𝑏2 .
such

nm = 𝑠 2 𝑡 2 = (𝑠𝑡)2
Let k =
st. nm
Direct
Proof
• Prove If n and m are odd integers then n + m
is even.
Exampl
e
• Theorem:
The sum of two rational numbers is
rational.
• Proof:

∃ p,q r =r p/q
q≠0
Assume and s are rational. Definition:
The real

∃ u ≠= (pu+tq) / (qu)
number r is
t,u= sp/q
= t/u
Since q ≠ 0 and u ≠ 0 then qu ≠
r+s + t/u rational if

∃ integers p
0 r=p/q,

that q ≠ 0.
and q

where n ≠ 0. So, r+s = m/n,


0. Let m=(pu+tq) and n=qu

where n ≠ 0.
So, r+s is rational.
Proof
Techniques
• Direct proof leads from the hypothesis of a
theorem to the conclusion.

• Proofs of theorems that do not start with the


hypothesis and end with the conclusion, are
called indirect proofs.
Proof By
Contraposition
p  q  ¬q 
¬p

Condition Its
al contrapositi
stateme ve
nt
• In a proof by contraposition of p  q, we take
¬q as a hypothesis and we show that ¬p
must follow.
• Thus, show that if ¬q is true, then ¬p is
true

• Proof by contraposition is an indirect proof.


Proof By
Contraposition
•Proof by contraposition of p
 q:

• Assume ¬q is true.

These steps are constructed


using Rules of inference
Axioms
Lemmas
Definitio
ns
Proven
• ¬p must be theorem
true. s
Proof By Contraposition
(Example)
• Theorem:
If n is an integer and 3n+2 is odd, then n
is odd.
• Proof (by
contraposition):
Assume n is even.
 integer k, such that
n = 2k
3n+2 = 3(2k)+2 =
2(3k+1)
Let m = 3k+1.
3n+2 = 2m
Proof By Contraposition
(Example)
• Theorem:

integers, then b ≤ 𝑛 or a ≤ 𝑛.
If n = ab, where a and b are positive

• Proof (by contraposition):


• Assume b > 𝑛 and a > 𝑛.
ab > ( 𝑛) . ( 𝑛)

So, n ≠ ab.
ab > n

𝑛 or a ≤
then b ≤ 𝑛.
By contraposition, if n = ab,
Exampl
e
• Theorem:

If n is an integer and 𝑛2 is even, then n is


even.
Direct proof or proof by contraposition?
• Proof (direct proof):

Assume 𝑛2 is an even integer.


𝑛2 = 2k (k is integer)
n = ± 2k
???
dead end!
Exampl
e
• Theorem:

If n is an integer and 𝑛2 is even, then n is


even.
Direct proof or proof by contraposition?
• Proof (proof by contraposition):
Assume n is an odd integer.
n = 2k+1 (k is integer)
𝑛2 = (2𝑘 + 1)2 = 4𝑘2 + 4𝑘 + 1 = 2 2𝑘2 +
2𝑘
+1
Assume integer m = 2 𝑘 2 + 2k.
𝑛2 = 2m +
Proof By
Contradiction
• How to prove a proposition by
contradiction?

• Assume the proposition is false.


• Using the assumption and other facts to
reach a contradiction.
• This is another kind of indirect proof.
Proof By
Contradiction
•Proof by contradiction of p
 q:

• Assume p and ¬q is true.

These steps are constructed


using Rules of inference
Axioms
Lemmas
Definitio
ns
contradiction Proven
theorem
s
Proof By Contradiction
(Example)
• Prove if 3n+5 is even then n is odd.
• Proof (proof by contradiction):
Assume 3n+5 is even and n is
even. n = 2k (k is some
integer)
3n+5 = 3(2k) + 5 = 6k + 5 =
2(3k + 2) + 1
Assume m =
3k+2. 3n+5 =
2m + 1
So, 3n+5 is odd.
Which contradicts over assumption that 3n+5
Proof By Contradiction
• Prove if 𝑛2 is odd then n is
(Example)
odd.
• Proof (proof by

∃ integer k
contradiction): Assume
n= 𝑛2 is
𝑛2 =and
odd 4𝑘2n = 2k
is even.
2(2𝑘2) Let m
= 2𝑘2
𝑛2 = 2m
So, 𝑛 is even.
2
Which2 contradicts over assumption that p is “𝑛

is odd ”. So by contradiction, if 𝑛2 is odd then n


is odd.
Proof By Contradiction
(Example)
• Prove The difference of any rational number and any
irrational
number is irrational.
• Proof:

true.] Suppose ∃ a rational number x and an irrational


[We take the negation of the theorem and suppose it to be

number y such x= that


a/b (x − y)forissome
rational. By definition
integers a and b of
with
rational,
an we have
x − y = c/d b ≠ 0. for some integers c and
d x − y = c/d d with d ≠ 0.
a/b − y =
c/d y = a/b
=−(adc/d− bc)/bd
But (ad − bc) are integers and bd ≠ 0. Therefore, by
definition of rational, y is rational. This contradicts the
supposition that y is irrational. [Hence, the supposition is
false and the theorem is true.]
Proof By Contradiction
Prove that 2 is not rational by
(Example)

2 isby
contradiction.

2 = a/b
• Proof
Assum (proof contradiction):
rational. Definition:


e The real

b≠0
number r
a and
If a , b b have common factor,
is rational if
remove it
∃ integers p
r=p/q,

by it 2 = 𝑎2 / 𝑏2
by dividing a and b

2 𝑏2𝑎= is
𝑎2even and by previous theorem, a is≠even.
2
and q that q

∃k
So, 0.

2k. 2 𝑏2 =
a=

4 𝑘2
𝑏2 = 2 𝑘2
So, 𝑏2 is
even and
by previous
Practice Exercise and Chapter
Reading
• Q – 1,2,3,6,9,10,17,18,19
• Chapter 1, Kenneth H. Rosen, Discrete
Mathematics and Its Applications, Section 1.7

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy