You are on page 1of 40

DISCRETE

MATHEMATICS
(10B21MA211)

L T P Cr.
3 1 0 4
DISCRETE MATHEMATICS
(L T P : 3 1 0)

Topics No. of Lectures


• Basics of set theory, Mathematical induction 02
• Relations, Equivalence relation, partial ordered relation03
• Algorithms, complexity of algorithms, Big O notation 02
• Functions, recursive function, generating function 03
• Propositions- simple and compound 01
• Basic logical operators, valid arguments and fallacy, 03
Propositional functions and quantifiers
First Test – T1
Topics No. of Lectures
• Graphs and related definitions,
Sub graphs, Isomorphism 02
• Eulerian graph and Hamiltonian graphs 02
• Trees, Graph colorings 03
• Digraphs and related definitions 02
• Rooted trees, Binary trees, 03
Algebraic expressions
and Polish notation
• Shortest path, Linked representation
of directed graphs 02
Second Test – T2
Topics No. of Lectures
• Lattices, Boolean algebra 05
• Groups, rings and fields 05
• Languages, Finite state automata
and machines, grammars 04
Third Test - T3
Total: 42
Books

• Lipschutz, S., Lipson, M. , “ Discrete


Mathematics”, Schaum Series (TMH).

• Kolman B., Busby R. C., Ross S., “Discrete


Mathematical Structures”, Prentice Hall.

• Rosen,Kenneth H., Discrete mathematics and its


applications, Tata Mc-Graw Hill.
SETS
• Set-Collection of well defined objects
• Member-Objects constituting a set
• Ex:- A set of books or a set of numbers
• Note:-In general the set is denoted by
capital letters and their elements by small
letters.
Representation of a set
• Tabular form
• Set builder form
Tabular form

In tabular form, a set is represented by


listing all its members enclosed in brackets
and separated by commas.

Ex:-A={3,5,7,9}
Set Builder form

A={x:P(x)}, where P(x) is a statement about


the elements.
Ex:- A={x:x is odd number and }
3 x9
Finite and Infinite Sets
A set consisting of finite number of
elements is a finite set otherwise it is
infinite set.
Null, empty or void set

A set consisting of no elements is


called a null, empty or void set

Notation:-  or {}
Subset:- A set A is a subset of a set B if all
the elements of a set A are in set B.

Notation:- 
Ex:- A={2,4,5}, B={2,4,5,6} A  B
Note:- Every set is a subset of itself.

Equal Set:- If A, B are sets such that every


element of A belongs to B, and every
element of B belongs to A, then A and B are
the same sets and we write A=B
A=B iff A  B and B  A.
Proper Subset:- A is proper subset of B if A is
subset of B but A is not equal to B
Notation:- 
Universal Set:-All the sets under consideration will
likely be subsets of a fixed set. Such fixed set is
called Universal set.
Power Set- The set of all subsets of a set X,
denoted by P(X), is called the power set of X.
Ex:- If A={a,b,c}, then
P(A)={ , {a}, {b}, {c}, {a, b}, {a, c}, {b, c},
{a, b, c}}
Note: The power set of a set with n elements has
elements.
n
2
Family of sets:- If the elements of a set are
sets themselves, then such a set is said to be
a family of sets.

Ex:-A={{a}, {b}, {c}}


Operations on Sets
Union:- A B={x: x A or x  B}
Ex:- A={a, b, c, d}, B={a, e}, then
A  B={a, b, c, d, e}.

Intersection:- A B={x: x A and x B}


Ex:- From the above example
A  B={a}
Disjoint Sets:- A B= 
Difference of two sets:-
A-B={x: x A and x B}
Note: A-B  B-A

Ex:- A={a, b, c, d}, B={a, e}, then

A - B={b, c, d}
• Absolute Complement or Complement of a
set A
A = U-A={x: x  U, x  A}, U-Universal
C

set.
• Symmetric Difference:
A  B=(A-B)  (B-A)
Ex:- A={a, b, c, d}, B={a, e}, then
A - B={b, c, d}
B - A={e}
A  B={b, c, d, e}
Laws of operations on sets
(i) Idempotent Laws (Laws of tautology)
(a) A A=A
(b) A  A=A
(ii) Identity laws
(a) A   =A
(b) A   = 
(c) A  U=A
(d) A  U=U
(iii) Commutative Laws
(a) A  B = B A
(b) A  B = B  A
(iv) Associative Laws
(a) (A B)C=A (BC)
(b) (A  B) C=A  (B C)
(v) Distributive Laws
(a) A (B C)=(A B)  (A  C)
(b) A  (B C)=(A  B)  (A  C)
(vi) (A')' =A (law of double
Complementation or Involution law)

(vii) (AUB)' = A'  B'


(A  B)' = A' U B'
(De Morgan’s laws)
Prove that (A  B)'=A' B '

(A B)'  A'B' & A'  B'  (A B)'


Let x (A  B)'
 x(A  B)
 xA and x B
 x  A' and x  B'
 x  A' B'
 (A  B)'  A'  B'
• Similarly converse can be proved.

Let x  A' B'


 x  A' and x  B'
 x A and x B
 x (A  B)
 x  (A  B)'
 A'  B' (A  B)'

Hence
(A  B)'  A'  B ' and A'  B' (A  B)'
Both implies (A  B)' = A'  B '
Duality
• Let E be an equation of set algebra
• The dual E* of E is the equation obtained by
replacing each occurance of  ,  ,U,  in E
by ,  , ,U, respectively
• Dual of U  A   B  A  A
is    A   B  A  A
Partition of a set:
Let S be a nonempty set. A partition of S is a subdivision of S into
non-overlapping, non-empty subsets. i.e. a partition of S is a
collection { Ai } of non-empty subsets of S such that
(i) Each a  S  a  Ai for some i
(ii) the sets { Ai } are mutually disjoint
i.e. Ai  A j   for i  j
The subsets in a partition are
called cells. A1 A5
Example: Let S = { 1,2,3,….9} A2
A1 ={1,2} A2={5,6,7} A3 ={8}
A4 ={3,4} and A5 ={9} A3 A4 S
Then
A 5
i i 1  { A1 , A2 ,...... A5 } is a partition of S.
S = {1, 2, 3}, A1 = {1}, A2 = {2, 3}. Then {A1,
A2} is the partition of S.
Determine other possible partitions of the set
S.
Finite sets
• n(A) or #(A) or card(A).
Counting Principle:
• If A and B are finite then A  B and A  B are finite and
n (A  B)  n (A)  n (B) – n (A  B)
• If A and B are disjoint finite sets, then A  B is finite and
n (A  B)  n (A)  n (B)
• Similarly if A, B, C are finite sets then A  B  C is finite and
n (A  B  C)  n (A)  n (B)  n(C) – n (A  B)  n(B  C )  n ( A  C )
 n( A  B  C ).
Examples:
1. In a class of 50 college freshmen, 30 are studying
JAVA, 25 studying UNIX, and 10 are studying both. How
many freshmen are studying either computer language?

U
5 A B
| A  B |  | A| | B | | A  B |

20 10 15
Ordered Pairs & n-tuples
• Two objects in a given fixed order.
• Set consisting of two elements is not an ordered pair
• e. g. {a, b}
• (a, b) = (c, d) iff a = c & b = d
• {1,2} = {2,1} = {1,1,2}
but (1,2)  (2,1)  (1,1,2)
• ordered triplet (a,b,c)
• n-tuple (x1, x2, x3, . . ., xn)
Cartesian Products-
• Let A & B be any two sets. The set of all ordered
pairs such that the first member of the ordered pair is
an element of A & second member is an element of
B.
• AB={(x,y): (xA) and( yB)}.
• A  (B  C) = {(a,(b,c)):(a A) and (b,c)  B  C}.
• If A = {a, b} & B = {1,2,3} then find A  B, B  A,
and A  A  A.
• A  (B  C)  (A  B)  C.
• n(AB)=n(A)*n(B)
EXAMPLE

If A={a}, B={b}, C={c}, then

A  B  C  {(a, b, c)}
( A  B)  C  {((a, b), c)}

A  ( B  C )  {( a, (b, c))}
Properties of Cartesian Product
For the four sets A, B, C and D

Prove the following identities:


1.( A  B )  (C  D)  ( A  C)  (B  D)
2.( A  B )  C  ( A  C)  (B  C)
3.( A  B )  C  ( A  C)  (B  C)
4.A  (B  C)  ( A  B )  ( A  C)
Prove that: A  B  C    A  B   A  C 

Let  x, y   A   B  C 
 x  A and y   B  C 
 x  A and  y  B and y  C 
  x  A and y  B  and  x  A and y  C 
  x, y   A  B and  x, y   A  C
  x, y    A  B    A  C 
Hence
A   B  C    A  B   A  C 
Mathematical Induction
• Let P be a proposition defined on the natural number
N that is P(n) is either true or false for each n in N.
• Suppose P has the following two properties
(i) P(1) is true (Basic step)
(ii) P(m+1) is true if P(m) is true (Induction step)
• Then P is true for all natural numbers.
Example 1
n n  1
P n  : S  n   1  2  3      n  ,n 1
2
11  1
• Case n=1: S 1  1  , so P(1) is true
2
• Now assume P(k) is true
– Need to show P(k+1) is true
– I.e. need to show that
S  k  1 
 k  1 k  2 
2
Example 1 (continued)

S  k  1  1  2      k   k  1
 S  k    k  1 Step 1: Write S(k+1) in
k  k  1 terms of S(k)
   k  1
2
k  k  1  2 k  1
Step 2: Use the fact
 that P(k) is true
2

 k  1 k  2 Step 3: Manipulate to
get the right formula
2
Example 1 (concluded)

S  k  1 
 k  1 k  2 
• So,
2
• Therefore P(k+1) is true
• Therefore, by the principle of mathematical
induction, n:P(n)
Example 2
• Let P(n) be the predicate defined by:
P(n): ‘n3-n is divisible by 3’
Show that n:P(n)
• Case n=1: n3-n=1-1=0, which is divisible
by 3. Hence P(1) is true
• Now assume that P(k) holds
• Need to prove that P(k+1) holds
Example 2 (continued)
• Case n=k+1:
(k+1)3 - (k+1) = (k3+3k2+3k+1) - (k+1)
= (k3-k)+(3k2+3k)
= (k3-k) + 3(k2+k)
Divisible by 3 since
divisible by 3
P(k) is true
• Hence if k3-k is divisible by 3, then (k+1)3-(k+1) is also divisible
by 3
• In other words, k:(P(k)  P(k+1))
• Also, P(1) is true
• Therefore, by mathematical induction, n:P(n)
Example 3: To show n3 + 2n is divisible by 3
Solution: Let n=1
Substituting value of n we get 13+ 2 1 = 3 which
is divisible by 3
 P(1) is true
Let P(m) be true
 m3+2m is divisible by 3
Check for P(m+1)

(m+1)3+2(m+1)=m3+3m 2+3m+1+2m+2
= m 3+2m+3(m2+m+1)
It is divisible by 3
 P(m+1) is true
Hence P(n) is true for all n.
Example 4:
Solution:

You might also like