SlideShare a Scribd company logo
3
Most read
6
Most read
10
Most read
PRESENTATION
ABOUT:
GRAPH
Contents For Our
Presentation...
1. what is Graph,vertices and Edge?
2. kinds of Graph.
3. Graph Coloring.
4. Adjacent Matrix.
5. Adjacent List .
6. Depth First search.
7. Breath First search.
WHAT IS GRAPH?
A graph is a pair of
(V.E). where 'V ' is a
set of Vertices and 'E'
is a set of Edges.
Vertices
Edge
kinds of Graph:
Undirected Graph:
In an undirected graph, the order of the
vertices in the pairs in the Edge set
doesn't matter
Directed Graph:
In a directed graph the order of the
vertices in the pairs in the edge set
matters.
Cyclic Graph:
A cyclic graph is a directed graph with at
least one cycle. A cycle is a path along the
directed edges from a vertex to itself. The
vertex labeled graph above as several
cycles.
Directed Acyclic Graph(DAG):
A Dag is a directed graph without cycles.
Proper graph:
proper graph is a graph that which has
no cycle and not more than one Edge.
Graph Coloring:
Graph coloring is a special case of graph labeling,it is
an assignment of labels traditionally called "colors"
to elements of a Graph subject to certain
constraints. In its simplest form, it is a way of
coloring the vertices of a graph such that no two
adjacent vertices share the same color; this is called
a vertex coloring. Similarly, an edge coloring assigns a
color to each edge so that no two adjacent edges
share the same color, and a face coloring of a planar
graph assigns a color to each face or region so that
no two faces that share a boundary have the same
color.
Adjacency Matrix:
Adjacency matrix:
A two-dimensional matrix, in which the rows
represent source vertices and columns represent
destination vertices. Data on edges and vertices
must be stored externally. Only the cost for one edge
can be stored between each pair of vertices.
A
D
E
Adjacency list:
Vertices are stored as records or objects, and every
vertex stores a list of adjacent vertices. This data
structure allows the storage of additional data on the
vertices. Additional data can be stored if edges are also
stored as objects, in which case each vertex stores its
incident edges and each edge stores its incident vertices.
For That Example Adjacency list Will be:
A->B->E->F->D
A->B->C->D
A->C->D
There are two types of traversal
1. Dfs(Depth first search)
2.Bfs(Breadth first search)
Depth-first search (DFS) :
DFS is an algorithm for traversing or searching tree or
graph data structures. One starts at the root(selecting
some arbitrary node as the root in the case of a graph)
and explores as far as possible along each branch
before backtracking.
1
0
6
Output: 1 0 5 2 3
Breadth-first search:
(BFS) is an algorithm for traversing or searching tree
or graph data structures. It starts at the tree rootand
explores the neighbor nodes first, before moving to the
next level neighbours.Compare BFS with the equivalent,
but more memory-efficient Interactive deeping depth
and contrast with depth-first search and contrast with
depth first search.
A
B
c E
F H
Queue Status
OUTPUT : A B S C G D E F H G
S
Thank you...!!!

More Related Content

PPTX
Graph in data structure
PPTX
Data structure - Graph
PPT
Design and Analysis of Algorithms
PPTX
Queue - Data Structure - Notes
PPTX
Hamiltonian path
DOC
Unit 3 daa
PPTX
Graph representation
PPTX
Slides Chapter10.1 10.2
Graph in data structure
Data structure - Graph
Design and Analysis of Algorithms
Queue - Data Structure - Notes
Hamiltonian path
Unit 3 daa
Graph representation
Slides Chapter10.1 10.2

What's hot (20)

PPTX
Mid point circle algorithm
PPTX
Queue in Data Structure
PDF
introduction to graph theory
PPT
Graphs bfs dfs
PPTX
Stack using Array
PPT
Graph colouring
PPTX
3 searching algorithms in Java
PPTX
Gradient Boosting
PPTX
Classification and prediction in data mining
PPTX
Decision tree in artificial intelligence
PDF
Problem solving
PPTX
graph theory
PPT
GRAPH COLORING AND ITS APPLICATIONS
PPTX
Trees in data structures
PPTX
Depth first search [dfs]
PDF
Applications of stack
PPTX
Matrix Representation Of Graph
PPT
Graphs
PPTX
Prims and kruskal algorithms
PPT
Graphs In Data Structure
Mid point circle algorithm
Queue in Data Structure
introduction to graph theory
Graphs bfs dfs
Stack using Array
Graph colouring
3 searching algorithms in Java
Gradient Boosting
Classification and prediction in data mining
Decision tree in artificial intelligence
Problem solving
graph theory
GRAPH COLORING AND ITS APPLICATIONS
Trees in data structures
Depth first search [dfs]
Applications of stack
Matrix Representation Of Graph
Graphs
Prims and kruskal algorithms
Graphs In Data Structure
Ad

Viewers also liked (20)

PPT
Types of graphs
PPTX
Data Structures - Lecture 10 [Graphs]
PPT
Types of graphs
PPTX
Graphs ppt
PPTX
Presentation graph vocab_review
PDF
Example Company Report
PDF
Dashboard Report Example Pg3
PDF
The Social Graph in 6.5 Minutes
PPT
How to build the Open Mesh
PDF
Transforming your Sales Organization
PPTX
Graphs in data structure
PDF
Pie Chart or Bar Chart?
PDF
Randomized Algorithms in Linear Algebra & the Column Subset Selection Problem
PPTX
Dynamic programming
PPT
Chap08alg
PDF
Solving The Shortest Path Tour Problem
PPT
21 backtracking
PDF
PPTX
Adjacency list
PPT
5.5 back track
Types of graphs
Data Structures - Lecture 10 [Graphs]
Types of graphs
Graphs ppt
Presentation graph vocab_review
Example Company Report
Dashboard Report Example Pg3
The Social Graph in 6.5 Minutes
How to build the Open Mesh
Transforming your Sales Organization
Graphs in data structure
Pie Chart or Bar Chart?
Randomized Algorithms in Linear Algebra & the Column Subset Selection Problem
Dynamic programming
Chap08alg
Solving The Shortest Path Tour Problem
21 backtracking
Adjacency list
5.5 back track
Ad

Similar to Graph Basic In Data structure (20)

PPSX
Unit-6 Graph.ppsx ppt
PPTX
ppt 1.pptx
PDF
graph representation.pdf
PDF
LEC 12-DSALGO-GRAPHS(final12).pdf
PPTX
Graph data structures for ppt for understanding.pptx
PPT
Data Structures-Non Linear DataStructures-Graphs
PPTX
Lecture 2.3.1 Graph.pptx
PPT
Lecture 5b graphs and hashing
PDF
unit-3-dsa-graph introduction to grapgh and graph type
PPTX
DOCX
Graphs and eularian circuit & path with c++ program
PDF
Talk on Graph Theory - I
PPTX
Data Structure of computer science and technology
PPTX
Spanningtreesppt
PPTX
Graph theory
PPTX
Graph terminology and algorithm and tree.pptx
PPT
Graphs (1)
PPTX
UNIT-VIQueueQueueQueueQueueQueueQueueQueueQueue.pptx
PDF
Daa chpater 12
PPTX
UNIT IV NON LINEAR DATA STRUCTURES - GRAPH
Unit-6 Graph.ppsx ppt
ppt 1.pptx
graph representation.pdf
LEC 12-DSALGO-GRAPHS(final12).pdf
Graph data structures for ppt for understanding.pptx
Data Structures-Non Linear DataStructures-Graphs
Lecture 2.3.1 Graph.pptx
Lecture 5b graphs and hashing
unit-3-dsa-graph introduction to grapgh and graph type
Graphs and eularian circuit & path with c++ program
Talk on Graph Theory - I
Data Structure of computer science and technology
Spanningtreesppt
Graph theory
Graph terminology and algorithm and tree.pptx
Graphs (1)
UNIT-VIQueueQueueQueueQueueQueueQueueQueueQueue.pptx
Daa chpater 12
UNIT IV NON LINEAR DATA STRUCTURES - GRAPH

More from Ikhlas Rahman (12)

PPTX
Working Procedure Of E-commerce
PPTX
Linux as an open source platform
PPTX
Policy , Fiscal Policy and Monetary Policy
PPTX
OSI MODEL AND ITS PROTOCOL
PPTX
Geometry in real life
PPTX
Addressing Modes Of 8086
PPTX
3G & 4G COMMUNICATION
PPT
Basic concept of probability
PPTX
Transistor
PPTX
special Type Of integral
PPTX
Nuclear power
PPTX
Thevenin's Theorem,Mesh analysis and sine wave Basic
Working Procedure Of E-commerce
Linux as an open source platform
Policy , Fiscal Policy and Monetary Policy
OSI MODEL AND ITS PROTOCOL
Geometry in real life
Addressing Modes Of 8086
3G & 4G COMMUNICATION
Basic concept of probability
Transistor
special Type Of integral
Nuclear power
Thevenin's Theorem,Mesh analysis and sine wave Basic

Recently uploaded (20)

PDF
Basic Mud Logging Guide for educational purpose
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Sports Quiz easy sports quiz sports quiz
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Lesson notes of climatology university.
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
master seminar digital applications in india
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Institutional Correction lecture only . . .
Basic Mud Logging Guide for educational purpose
102 student loan defaulters named and shamed – Is someone you know on the list?
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Microbial disease of the cardiovascular and lymphatic systems
Complications of Minimal Access Surgery at WLH
Renaissance Architecture: A Journey from Faith to Humanism
Sports Quiz easy sports quiz sports quiz
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPH.pptx obstetrics and gynecology in nursing
Microbial diseases, their pathogenesis and prophylaxis
Anesthesia in Laparoscopic Surgery in India
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
Lesson notes of climatology university.
Final Presentation General Medicine 03-08-2024.pptx
master seminar digital applications in india
O5-L3 Freight Transport Ops (International) V1.pdf
Institutional Correction lecture only . . .

Graph Basic In Data structure

  • 2. Contents For Our Presentation... 1. what is Graph,vertices and Edge? 2. kinds of Graph. 3. Graph Coloring. 4. Adjacent Matrix. 5. Adjacent List . 6. Depth First search. 7. Breath First search.
  • 3. WHAT IS GRAPH? A graph is a pair of (V.E). where 'V ' is a set of Vertices and 'E' is a set of Edges. Vertices Edge
  • 4. kinds of Graph: Undirected Graph: In an undirected graph, the order of the vertices in the pairs in the Edge set doesn't matter Directed Graph: In a directed graph the order of the vertices in the pairs in the edge set matters. Cyclic Graph: A cyclic graph is a directed graph with at least one cycle. A cycle is a path along the directed edges from a vertex to itself. The vertex labeled graph above as several cycles.
  • 5. Directed Acyclic Graph(DAG): A Dag is a directed graph without cycles. Proper graph: proper graph is a graph that which has no cycle and not more than one Edge.
  • 6. Graph Coloring: Graph coloring is a special case of graph labeling,it is an assignment of labels traditionally called "colors" to elements of a Graph subject to certain constraints. In its simplest form, it is a way of coloring the vertices of a graph such that no two adjacent vertices share the same color; this is called a vertex coloring. Similarly, an edge coloring assigns a color to each edge so that no two adjacent edges share the same color, and a face coloring of a planar graph assigns a color to each face or region so that no two faces that share a boundary have the same color.
  • 7. Adjacency Matrix: Adjacency matrix: A two-dimensional matrix, in which the rows represent source vertices and columns represent destination vertices. Data on edges and vertices must be stored externally. Only the cost for one edge can be stored between each pair of vertices. A D E
  • 8. Adjacency list: Vertices are stored as records or objects, and every vertex stores a list of adjacent vertices. This data structure allows the storage of additional data on the vertices. Additional data can be stored if edges are also stored as objects, in which case each vertex stores its incident edges and each edge stores its incident vertices. For That Example Adjacency list Will be: A->B->E->F->D A->B->C->D A->C->D
  • 9. There are two types of traversal 1. Dfs(Depth first search) 2.Bfs(Breadth first search)
  • 10. Depth-first search (DFS) : DFS is an algorithm for traversing or searching tree or graph data structures. One starts at the root(selecting some arbitrary node as the root in the case of a graph) and explores as far as possible along each branch before backtracking. 1 0 6 Output: 1 0 5 2 3
  • 11. Breadth-first search: (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree rootand explores the neighbor nodes first, before moving to the next level neighbours.Compare BFS with the equivalent, but more memory-efficient Interactive deeping depth and contrast with depth-first search and contrast with depth first search. A B c E F H Queue Status OUTPUT : A B S C G D E F H G S