Title: Sets, Functions, Graphs, Trees
1Sets, Functions, Graphs, Trees
2Sets
A set is a collection of objects, called members
or elements
xÏS
xÎS
We can describe set by explicitly listing its
members
Sa,s,d,f,g
A set can not contain same object more than once
Two sets are equal if they contain same elements
A¹B
AB
3Some frequently encountered sets
4Subsets
If all the elements of a set A are contained in a
set B then A is a subset B
A Í B
A Í B
If A Í B and A ¹ B than A is proper subset B
A Ì B
AB if and only if A Í B and B Í A
For any A, B, and C if A Í B and B Í C , then A
Í C
For any A Æ Í A
5Definition of set in terms of other sets
Xx x/2 Î Z
Directly
Applying set operations
6Set operations laws
7Set operations laws II
8Set operations laws III
Venn diagram
9Universe
U
A
10DeMorgans laws
11Collection of sets
12Size (cardinality) of the set
- finite
- infinite
- countably infinite
- uncountably infinite
For any two finite sets A and B AÈB A
B - AÇB AÈB A B
13Cartesian product
A x B (a,b) a Î A, b Î B
A x B A B
14Binary relation
15Functions
16Functions
17Graphs
directed undirected
18Directed Graphs
19Undirected Graphs
20Adjacency relation
21Degree of a vertex
22Path
23Cycles
24Isomorphism
25Representation of graphs in memory (undirected
graph)
26Representation of graphs in memory (directed
graph)
27Tree Forrest
28Rooted Tree
29Height of the Tree
30Ordered Tree
31Ordered Tree
32Binary Tree
33Binary Tree II
34Binary Tree representation
35Binary Tree representation II