Intro To Graph
Intro To Graph
Group Members
Abdullah (004)
Sajawal (049)
M.Ahmer (022)
Ehtesham (094)
1 1
Click to edit Master title style
Introduction To
Graph
Discrete Structure
2
Click to edit Master title styleWhat is Graph?
• Pictorial representation that represent data or values in
organized form.
• I t i s d r a w n b y c o n n e c t i n g d i f f e r e n t p o i n t s t o e a c h o t h e r.
• Importance: Used to model relationships and
structures in various fields.
3 3
Click to edit Vertices And
Master title styleEdges
Edges
• An Edge is created by connecting two Nodes with a
straight or curved Line or by connect one node to
itself.
Vertices
• Ve r t e x i s a p o i n t o r n o d e i n a n y g r a p h t h a t r e p r e s e n t
entities and objects and they are connected through
edges.
4 4
Click to edit Vertices And
Master title styleEdges
Vertices
Edges 5 5
Loops And Edges
Click to edit Master title style
Self Loop
An edge that connects a vertex to itself, is called as self loop.
Parallel/Multiple Edges
Same two vertices that are connected with more than one edge and these
edges are called as Parallel / Multiple edges.
6 6
Click to edit Master title style
Degree of vertex
In graph theory, the degree of a vertex of a graph is the number of edges that
are connected to the vertex
• Degree of a,b,c,d and e =4
7 7
Vertices
Click to edit Master title style
Isolated Vertices
When a vertex has zero degree (no edges going in and out of it) then this is called
isolated vertex.
8 8
Vertices
Click to edit Master title style
Pendent Vertices
Pendant vertices are the vertices that have a degree of 1, means they are connected to
only one edge.
9 9
Types Of Graph
Click to edit Master title style
Simple Graph
When a graph has no self loop and parallel edge that type of graph is
called simple graph.
10
10
Types Of Graph
Click to edit Master title style
Multiple Graph
A graph which is permitted to have multiple edges (also called parallel
edges), that is, edges that have the same end nodes
11
11
Types Of Graph
Click to edit Master title style
Weighted Graph
A graph in which every edge has some value called weighted graph.
12
12
Types Of Graph
Click to edit Master title style
Finite Graph
A graph that have countable number of edges and vertices, called finite
graph.
13
13
Types Of Graph
Click to edit Master title style
Infinite Graph
A graph that have uncountable number of edges and vertices, called infinite
graph.
14
14
Types Of Graph
Click to edit Master title style
Labeled Graph
A graph in which edges have some name, called label graph.
15
15
Matrix Representation
Click to edit Master title style
16
16
Matrix Representation
Click to edit Master title style
Vertices
Vertices
17
17
Matrix Representation
Click to edit Master title style
18
18
Matrix Representation
Click to edit Master title style
Vertices
Vertices
19
19
Matrix Representation
Click to edit Master title style
20
20
Matrix Representation
Click to edit Master title style
Edges
Vertices
21
21
Matrix Representation
Click to edit Master title style
22
22
Matrix Representation
Click to edit Master title style
Vertices 23
23
Directed Graph/Diagraph
Click to edit Master title style
24
24
Degree Of Graph
Click to edit Master title style
Degree In:
Number of edges directed towards a vertex , called degree in of that vertex.
It is represented by d (1) = 2.
25
25
Degree Of Graph
Click to edit Master title style
Degree Out:
Number of edges leaving a vertex , called degree out of that vertex.
It is represented by d (1) = 3.
26
26
Handshaking Lemma
Click to edit Master title style
Statement:
In any undirected graph, the sum of the degrees of all vertices is equal to
twice the number of edges.
Handshaking Lemma
27
27
Handshaking Lemma
Click to edit Master title style
Mathematically:
Let G=(V,E) be a graph where V is the set of vertices and E is
the set of edges.
If deg(v) represents the degree of vertex v, then:
∑deg(v)=2∣E∣
Applications:
• Used to prove properties about graphs, such as the existence of Eulerian
circuits.
• Helps in analyzing network structures, social graphs, and more.
28
28
Types Of Graph
Click to edit Master title style
Null Graph:
A graph in which vertices are not connected by edges, called Null Graph.
29
29
Types Of Graph
Click to edit Master title style
Complete Graph:
Each vertex is connected to every other vertex that type of graph is called complete graph.
30
30
Types Of Graph
Click to edit Master title style
Regular Graph:
When every vertex in graph have same degree, called regular graph.
31
31
Types Of Graph
Click to edit Master title style
Bipartite Graph:
Where the set of vertices can be divided into two disjoint sets such that no two
vertices within the same set are adjacent.
32
32
Types Of Graph
Click to edit Master title style
Trivial Graph:
A graph is said to be trivial if a finite graph contains only one vertex and no edge.
33
33
Types Of Graph
Click to edit Master title style
Cyclic Graph:
A graph G consisting of n vertices and n> = 3 that is V1, V2, V3- – – – Vn and
edges (V1, V2), (V2, V3), (V3, V4)- – – – (Vn, V1) are called cyclic graph.
34
34
Types Of Graph
Click to edit Master title style
Tree Graph:
An undirected graph G that satisfies any of the following equivalent conditions:
G is connected and acyclic (contains no cycles).
35
35
Functions On Graph
Click to edit Master title style
Complement of Graph:
Remove the existing edges from given graph and build or create new edges with same
vertices.
36
36
Functions On Graph
Click to edit Master title style
Union On Graph:
Combine all graphs in only one graph is called union on graph.
37
37
Functions On Graph
Click to edit Master title style
Intersection On Graph:
Create only common edges from two graph is intersection on graph.
38
38
Click to edit Master title style
D o Yo u H a v e A n y
Q u e s t i o n s ?
39