DM Till 22 Aug - 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Unit I

Set Theory
Hitesh Kag
Syllabus
• UNIT-I
Sets, sub-sets & operations on sets, Finite and infinite sets, principle of
inclusion and exclusion Relations & Properties of relations –
equivalence relation, Functions: Definition, Classification of functions,
Composition of functions, Growth of Functions, Pigeon hole principle.

• UNIT-II
Partial order relation, Poset, least upper bound, greatest lower bound,
maximal and minimal elements of a poset – Definition & example of
Boolean algebra – Lattices, Distributive laws in lattices –
Complemented lattices – Propositional Calculus – Boolean functions,
minimum & maximum terms, simplification of Boolean function with
Karnaugh map & Quiane Mc Clusky method. Applications in computer
Science.
• UNIT-III
Binary composition, algebraic structure, Semi group, Monoid, Groups, Abelian Group,
properties of groups, Coset Decomposition, Subgroup, Cyclic Group, Normal subgroup,
Rings and Fields (definition and standard results). Applications in Computer Science.

• UNIT-IV
Trees : Definition , Binary tree , Binary tree traversal , Binary search tree. .Graphs:
Definition and terminology , Representation of graphs , Multigraphs , Bipartite graphs ,
Planar graphs , Isomorphism and Homeomorphism of graphs , Euler and Hamiltonian
paths , Graph coloring. Application in Computer Science.

• UNIT – V
Recurrence Relation & Generating function: Recursive definition of functions,
Recursive algorithms, Method of solving recurrence relation. Combinatorics:
Introduction, Counting Techniques -Basic theorems on permutations & combinations.
Applications in Computer Science.
Discrete mathematics
• Discrete mathematics is the study
of mathematical structures that are
fundamentally discrete rather than continuous.
• In contrast to real numbers that have the
property of varying "smoothly", the objects
studied in discrete mathematics – such
as integers, graphs, and statements in logic– do
not vary smoothly in this way, but have distinct,
separated values.
Applications
• Computers run software and store files.
• Networks
• Doing web searches
• Google Maps
• Scheduling problems
• Wiring a computer network
• Encryption and decryption are part of cryptography,
which is part of discrete.
• Area codes
• Designing password criteria is a counting problem
• Machine Job Scheduling
• Railway planning uses discrete math
• Computer graphics (such as in video games) use linear
algebra in order to transform (move, scale, change
perspective) objects.
• Bankruptcy proceedings can involve lots of different
reasonable ways to resolve claims. Some involve discrete
optimization. Cell phone communications: Making efficient
use of the broadcast spectrum for mobile phones uses linear
algebra and information theory. Assigning frequencies so
that there is no interference with nearby phones can use
graph theory or can use discrete optimization.
• Digital image processing uses discrete
mathematics to merge images or apply filters.
• Electronic health care records are kept as parts
of databases, and there is a lot of discrete
mathematics involved in the efficient and
effective design of databases.
• Compact discs store a lot of data, which is
encoded using a modified Reed-Solomon code (a
binary code, and thus discrete math) to
automatically correct transmission errors.
• Voting systems
• Methods of encoding data and reducing the
error in data transmission-mathematics.
• Hidden Markov models, which are part of
linear algebra, are used for large vocabulary
continuous speech recognition.
• Delivery Route Problems:
Discrete Mathematics in AI
• Many of the structures in AI are discrete. For
example a neural network has an integer number
of nodes and links. It can’t really have 0.45 of a
node or a tenth of a link.
• So the mathematical modelling of a neural net
must include a discrete element, the integer that
is the number of nodes and links.
• Often in the mathematics of AI there are
elements that are discrete, thus discrete
mathematics is a very important component of
AI.
Set
• A set is an unordered collection of different
elements
• Examples:
– A set of all positive integers
– A set of all the planets in the solar system
– A set of all the states in India
– A set of all the lowercase letters of the alphabet
Representation of a Set
• Roster or Tabular Form
• Set Builder Notation
Roster form
The set is represented by listing all the
elements comprising it.
• Ex 1 Set of vowels in English
alphabet, A={a,e,i,o,u}
• Set Builder
Ex 1- The set {a,e,i,o,u} is written as
A={x: x is a vowel in English alphabet}
Ex 2- The set {1,3,5,7,9} is written as
B={x: 1≤x<10 and (x%2)≠0}
Ex 3- C= {x | x is prime and 3 ≤ x ≤ 10}
• A = {x : x is an integer and- 1≤ x < 5}
• In roster form: A = {-1, 0,1, 2, 3, 4}

Que: Write the set A = { x : x is a natural


number ≤ 8} in roster form.
Que: Represent the following sets in set-builder
form A = {1, 1/2, 1/3, 1/4, ...............}
Que: Write the following sets in Set-Builder form.
The set of all whole numbers less than 20
Standard Set
If an element x is a member of any set S, it is
denoted by x∈S
• N − the set of all natural numbers = {1,2,3,4,.....}
• Z − the set of all integers
= {.....,−3,−2,−1,0,1,2,3,.....}
• Z+ − the set of all positive integers
• Q − the set of all rational numbers
• R − the set of all real numbers
• W − the set of all whole numbers
Cardinality
• Cardinality of a set S, denoted by |S|, is the
number of elements of the set.
• If a set has an infinite number of elements, its
cardinality is ∞.
• So there are finite sets and infinite sets.
Types of Set
Subset
• A set X is a subset of set Y (Written as X⊆Y) if every
element of X is an element of set Y.
• Example 1 − Let, X={1,2,3,4,5,6}and Y={1,2}. Here set
Y is a subset of set X as all the elements of set Y is in
set X.
Hence, we can write Y⊆X.
• Example 2 − Let, X={1,2,3}and Y={1,2,3}. Here set Y is
a subset (Not a proper subset) of set X as all the
elements of set Y is in set X.
Hence, we can write Y⊆X
Proper Subset
• The term “proper subset” can be defined as
“subset of but not equal to”.
• Written as X⊂Y, if every element of X is an
element of set Y and |X|<|Y|
• Example − Let, X={1,2,3,4,5,6}and Y={1,2}.
Here set Y⊂X since all elements in Y are
contained in X too and X has at least one
element is more than set Y.
Universal Set
• It is a collection of all elements in a particular
context or application.
Ex 1: we have defines all the students of your
class as universal.
Ex 2: All integers.
Empty Set or Null Set
• An empty set contains no elements. It is
denoted by ∅
Ex: integers between 7 and 8
Singleton Set or Unit Set
• Singleton set or unit set contains only one
element.
Ex: S={x|x∈Z, 7<x<9}= {8}
Equal Set:
• If two sets contain the same elements they are said to be
equal.
Ex 1- If A={1,2,6}and B={6,1,2}
Ex 2- If A = {b, o, y} and B = {b, o, b, y, y} then also A = B because
both contain same elements.
Equivalent Set:
• Equivalent sets are those which have an equal number of
elements irrespective of what the elements are.
• Ex − If A={1,2,6}and B={16,17,22}, they are equivalent as
cardinality of A is equal to the cardinality of B. i.e. |A|=|B|=3
Disjoint Set
• Two sets A and B are called disjoint sets if they
do not have even one element in common.
Therefore, disjoint sets have the following
properties −
• n(A∩B)=∅
• n(A∪B)=n(A)+n(B)
Power Set
• The collection of ALL the subsets of a given set
is called a power set of that set under
consideration.
Ex:
• A = {a, b} then,
• Power set – P (A) = {φ,{a},{b},{a, b}}.

• If n (A) = m then generally, n [P (A)] = 2m


If X = {1, 2, 3, 4, 5}, Y = {a, e, i, o, u} and Z = {u, o, a, i, e}; determine the nature
of sets.

Write set {1, 5, 15, 25,…} in set-builder form.


a) {x: either x=1 or x=5n, where n is a real number}
b) {x: either x=1 or x=5n, where n is a integer}
c) {x: either x=1 or x=5n, where n is an odd natural number}
d) {x: x=5n, where n is a natural number}

Subset of the set A= { } is?


a) A
b) {}
c) ∅
d) All of the mentioned
Set Operation
• Union
• Intersection
• Difference
• Complement
Union
Let A = {2, 4, 6, 8} and B = {6, 8, 10, 12}. Then, A U B is
represented as the set containing all the elements that belong to
both the sets individually. Mathematically,
A U B = {x : x ϵ A or x ϵ B}
So, A U B = {2, 4, 6, 8, 10, 12},
Properties of (A U B)
• Commutative law (A U B) = (B U A)
• Associative law (A U B) U {C} = {A} U (B U C)
• A U φ = A (Law of identity element)
• Idempotent Law – A U A = A
• Law of the Universal set (U): (A U U) = U
• Let A = {1, 2} B = {3, 4} and C = {5, 6}

• A U B = {1, 2, 3, 4}
and (A U B) U C = {1, 2, 3, 4, 5, 6}

• B U C = {3, 4, 5, 6}
and A U (B U C) = {1, 2, 3, 4, 5, 6}

Thus, Associative law holds true and is verified.


Intersection
An intersection is the collection of all the elements that
are common to all the sets under consideration.
Ex: Let A = {2, 4, 6, 8} and B = {6, 8, 10, 12} then A ∩ B or “A
intersection B” is given by:
A ∩ B = {6, 8}
Mathematically, A ∩ B = {x : x ϵ A and x ϵ B}
Properties of the Intersection
• Commutative law – A ∩ B = B∩ A
• Associative law – (A ∩ B)∩ C = A ∩ (B∩ C)
• φ∩A=φ
• U∩A=A
• A∩ A = A; Idempotent law.
• Distributive law – A ∩ (BU C) = (A ∩ B) U (A ∩ C)
Difference
The difference of set A and B is represented as:
A – B = {x : x ϵ A and x ϵ B}
Ex: Let, A = {1, 2, 3, 4, 5, 6} and B = {2, 4, 6, 8} then
A – B = {1, 3, 5}
and B – A = {8}.
The sets (A – B), (B – A) and (A ∩ B) are mutually
disjoint sets; it means that there is NO element
common to any of the three sets and the
intersection of any of the two or all the three sets
will result in a null or void or empty set.
Complement
• If U represents the Universal set and any set A is the subset of
A then the complement of set A (represented as A’) will
contain ALL the elements which belong to the Universal set U
but NOT to set A.
• Mathematically, A’ = U – A
• Properties of Complement Sets
• A U A’ = U
• A ∩ A’ = φ
• De Morgan’s Law – (A U B)’ = A’ ∩ B’ OR (A ∩ B)’ = A’ U B’
• (A’)’ = A
• φ’ = U
• U’ = φ
Cartesian Product
The Cartesian product of sets A and B, written A x B,
is expressed as:
A x B = {(a,b)│a is every element in A, b is
every element in B}
Ex:
A = {1,2}
B = {4,5,6}
The Cartesian product of A and B (i.e. A x B) is
{(1,4), (1,5), (1,6), (2,4), (2,5), (2,6)}
• Theory
Venn Diagram
• A Venn diagram is a diagrammatic
representation of ALL the possible
relationships between different sets of a finite
number of elements. Venn diagrams were
conceived around 1880 by John Venn.
Overlapping Set: Two sets that have at least one
common element are called overlapping sets.
In case of overlapping sets −
• n(A∪B)=n(A)+n(B)−n(A∩B)
• n(A∪B)=n(A−B)+n(B−A)+n(A∩B)
• n(A)=n(A−B)+n(A∩B)
• n(B)=n(B−A)+n(A∩B)

You might also like