0% found this document useful (0 votes)
10 views39 pages

Intro To Graph

Uploaded by

ahmedilyas5440
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views39 pages

Intro To Graph

Uploaded by

ahmedilyas5440
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

Click to edit Master title style

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.

A and C are pendent vertexes because


degree of both vertexes is one

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

Adjacent Matrix (Undirected Graph)


• Adjacency matrices are used in various algorithms for finding shortest paths, detecting cycles, and
other graph-related computations.
• Vertex to vertex relationship.
• There is no direction shown in this case.

16
16
Matrix Representation
Click to edit Master title style

Adjacent Matrix (Undirected Graph)

Vertices

Vertices
17
17
Matrix Representation
Click to edit Master title style

Adjacent Matrix (Directed Graph)


• Adjacency matrices are used in various algorithms for finding shortest paths, detecting cycles, and
other graph-related computations.
• Vertex to vertex relationship.
• There is direction shown in this case.

18
18
Matrix Representation
Click to edit Master title style

Adjacent Matrix (Directed Graph)

Vertices

Vertices
19
19
Matrix Representation
Click to edit Master title style

Incident Matrix (Undirected graph)


• Incidence matrices are used in algorithms involving network flows, connectivity, and more.
• Vertex to edge relationship.
• It doesn’t consists any direction.

20
20
Matrix Representation
Click to edit Master title style

Incident Matrix (Undirected graph)

Edges

Vertices
21
21
Matrix Representation
Click to edit Master title style

Incident Matrix (Directed graph)


• Incidence matrices are used in algorithms involving network flows, connectivity, and more.
• Vertex to edge relationship.
• It consists a direction.

22
22
Matrix Representation
Click to edit Master title style

Incident Matrix (Directed graph) Edges

Vertices 23
23
Directed Graph/Diagraph
Click to edit Master title style

A graph that has some direction.

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.

• It is also known as a singleton graph or a single vertex graph

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy