Professional Documents
Culture Documents
MATHEMATICS
(10B21MA211)
L T P Cr.
3 1 0 4
DISCRETE MATHEMATICS
(L T P : 3 1 0)
Ex:-A={3,5,7,9}
Set Builder form
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.
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 (BC)
(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)
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.
• AB={(x,y): (xA) and( yB)}.
• 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(AB)=n(A)*n(B)
EXAMPLE
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
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
11 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: