Sie sind auf Seite 1von 5

Discrete Mathematics and Algorithms[CSE611]

Team - 1
Pramathesh Trivedi - 201541537
Raunak Nangalia - 201541545
Abhishek Bhardwaj - 201541552
Prasan Kumar Mishra - 201541567
Lecture Date: August 16, 2016

Topics
1. Proof by Contradiction
2. Mathematical Induction
3. Logic and Sets
4. Principle of Inclusion-Exclusion

Proof by Contradiction

Theorem . If r is a real number such that r2 = 2, then r is irrational


P = r is a real number such that r2 = 2
R = r is irrational
Proof. suppose r R and r2 = 2, but r is not rational.
If r is the rational m, n Z
m
r=
n
Without loss of generality we can assume that m and n do not have any common factor.
m2
=2
n2
m2 = 2n2 m2 is even
r2 =

m must be even
(proof by Contrapositive)
If m is even, m Z m = 2p
2n2 = m2 = 4p2
n2 = 2p2
n2 is even n is even
Since, both the m & n are even, they have a common divisor (2)
This is a contradiction
the assumption P Q is false
PQ

(1)

Theorem . There are infinite number of primes assuming finite primes till 31.
Proof. 2 3 4 5 7 11 . . . . . . 31 + 1 is not divisible by 2,3,5,7,11. . . . . . 31.
Case 1: New number is prime number itself.
Case 2: It has a prime factor which is itself a prime other then the one listed in multiplication.
There is a prime number > 31.

Mathematical Induction
Specific examples A particular rule

Triangle numbers:

Tn =

n(n + 1)
2

Example: (n+1) people shaking hands with each other, total number of hand shakes ?

n(n + 1)
n1
=
Round robin tournament
n

..
.
What is the maximum number of pieces that a circle can be cut into by n line cuts?
Cut
1
2
3
4
n

Piece
2
4
7
11
Pn

New line should cut all previous lines at unique intersections.


Pn = Tn + 1
Tn =Triangle numbers
Pn = Pn1 + n
2

Theorem . Pn = Tn + 1
Proof:
Base case: n=1 , P1 = T1 + 1 = 1+1 = 2
Assume that Pn = Tn + 1 holds true
Need to prove , Pn+1 = Tn+1 + 1
We know that

Pn+1 = Pn + (n + 1)
= Tn + 1 + (n + 1)
= Tn + n + 2
= [Tn + (n + 1)] + 1
= Tn+1 + 1

By induction Pn = Tn + 1

Logic and Sets

Verify Boolean equations using


1. By truth table (Brute force)
2. Logical equivalents
Example : Verify (R W ) (R W ) = (R W ) (R W )
LHS = (R W ) (R W )
= (R W ) (R W )

By De Morgans

= (R W ) (W R)

By Distributive law

= (R W ) (R W )

By Commutative law

Truth table :
R
0
0
1
1

W
0
1
0
1

RW
0
1
1
0

R W
1
0
0
1

XOR used for swapping variables


Distributive law:
(R W ) S (R S) (W S)
(R W ) S (R S) (W S)

De Morgans law:
(A B) A B
(A B) A B

NOR

NOT-OR

X = X X
X Y = (X Y ) (X Y )
X Y = (X X) (X X)

Example:
(P Q) P = (P Q) (P Q) (P P )
= [(P Q) (P Q)] [(P Q) (P Q)] [(P P ) (P P )]
Example: Prove A (B C) = (A B) (A C).
Part 1:
x A (B C)

Let

xA xBC
(x A) ((x B) (x C))
[(x A) (x B)] [(x A) (x C)]

Distributive Property over

(x (A B)) (x (A C))
x (A B) (A B)
A (B C) (A B) (A C)

Part 2:
Let

x (A B) (A C)
x (A B) (A C)
x (A B) x (A C)
[(x A) (x B)] [(x A) (x C)]
(x A) ((x B) (x C))

Distributive Property over

(x A) (x (B C))
x A (B C)

(A B) (A C) A (B C)

Hence, A (B C) = (A B) (A C)
Theorem . Prove A (B1 B2 . . . . . . Bn ) = (A B1 ) (A B2 ) . . . . . . (A bn )
Proof by Mathematical Induction :
Base Case n=2:
A (B1 B2 ) = (A B1 ) (A B2 )
Hence, Base case is true.
Assume given A (B1 B2 . . . . . . Bn ) = (A B1 ) (A B2 ) . . . . . . (A bn )
To prove: A (B1 B2 . . . . . . Bn+1 ) = (A B1 ) (A B2 ) . . . . . . (A bn+1 )
LHS = A (B1 B2 . . . . . . Bn Bn+1 )
= A ([B1 B2 . . . . . . Bn ] Bn+1 )
= (A (B1 B2 . . . . . . Bn )) (A Bn+1 )
= (A B1 ) (A B2 ) . . . . . . (A bn ) (A Bn+1 )
= RHS

Distribute over

Principle of Inclusion-Exclusion

Tricks:
1. Count the things you are not interested in.
2. Count double (Multiple) occurrence in a controlled way.

|A B| = |A| + |B| |A B|

|A B C| = |A| + |B| + |C| |A B|


|A C| |B C| + |A B C|

Example:In a college, 10 students selected CS, 5 students selected VLSI and 12 students selected
either CS or VLSI. Calculate the number of students selected both.

|CS V LSI| = |CS| + |V LSI| |CS V LSI|


= 10 + 5 12
=3

Das könnte Ihnen auch gefallen