Graph Theory
Gaurav Yadav
IIIT Sonepat
Contents
● Introduction to Graphs
● Representation of Graphs
● Weighted Graphs
● Non-weighted Graphs
● Directed Graphs
● Undirected Graphs
● Self-loops
● Multigraphs
● Real World Examples
Introduction to Graphs
● A graph G, consists of Vertices(V) and Edges(E).
● G = (V,E).
● V is the set of Vertices.
● E is the set of Edges.
Representation of Graphs
● Let V = {a, b, c}, and E = { { a, b }, { a, c } }.
a b
c
Set describing all the
vertices(or nodes) a, b,
and c.
Set describing an edge
between node a and c.
|V| = 3
|E| = 2
Weighted Graphs
● Weight or cost is a numerical value associated to every edge of a graph. We
encounter with it in real world, when we need to calculate shortest path between two
points, for example – when we see maps to find the shortest driving distance. The
path is chosen which has the minimum cost.
A
E
C
D
B
3
1
1
2
4
2
Shortest path between A & E : A -> D -> C -> E
8
4
Non-weighted Graphs
● In non weighted graphs, when we doesn’t have weights, all edges are considered
equal. The path which has less number of nodes is considered effective.
A
E
C
D
B
Shortest path between A & E : A -> B -> E
Undirected Graphs
● Undirected graphs have edges that do not have a direction. The edges indicate a two-
way relationship, in that each edge can be traversed in both directions.
A
B
D
C
Directed Graphs
● Directed graphs have edges with direction. The edges indicate a one-way relationship,
in that each edge can only be traversed in a single direction.
A
B
D
C
Self-loops
● Graphs created can have one or more self-loops, which are edges connecting a node
to itself.
A
B
D
C
Multigraphs
● Graphs can have multiple edges with the same source and target nodes, and the graph
is then known as a multigraph. A multigraph may or may not contain self-loops.
A
B
D
C
Real World Examples
● Social Graphs – Connections on LinkedIn.
● Path Optimization Algorithms – Google Maps.
● Routing Algorithms in Computer Networks – Routing IP Table in Router.
● Scientific Computations - Edge Chasing in Operating Systems.
Thank You!

More Related Content

PPTX
Data structure
PPTX
Graph therory
PPTX
Data structure graphs
PPTX
Graphical reprsentation dsa (DATA STRUCTURE ALGORITHM)
PPTX
Lecture 16 graph introduction
PPT
2.1 graph basic
PDF
PGL (Persamaan Garis Dari Gambar Garis Lurus & Dari Dua Titik) - Pertemuan 1
PPTX
GRAPH THEORY
Data structure
Graph therory
Data structure graphs
Graphical reprsentation dsa (DATA STRUCTURE ALGORITHM)
Lecture 16 graph introduction
2.1 graph basic
PGL (Persamaan Garis Dari Gambar Garis Lurus & Dari Dua Titik) - Pertemuan 1
GRAPH THEORY

What's hot (20)

PPT
India's narayan-pandit[1]
PDF
Graphs in datastructures
PPTX
PPTX
Graph Application in Traffic Control
PPT
Basics of graph
PPTX
Posulate and theoroem
PDF
2.1 Points, Lines, and Planes
PDF
1.1.1A Points, Lines, and Planes
PPTX
4.6 quick graphs using slope intercept form
PDF
IRJET- On the Generalization of Lami’s Theorem
PPT
Geometry sizes and shapes
DOCX
Types of graphs
PPTX
power point presentation
PPT
Points, Lines & Planes Powerpoint
PPT
Building Blocks Of Geometry
PPT
1 3 points, lines, planes
PDF
GEOMETRY: POINTS, LINES. PLANES
PPTX
Solid mensuration lecture #1
PPTX
Geometry in sizes and shapes
PPT
Vectors
India's narayan-pandit[1]
Graphs in datastructures
Graph Application in Traffic Control
Basics of graph
Posulate and theoroem
2.1 Points, Lines, and Planes
1.1.1A Points, Lines, and Planes
4.6 quick graphs using slope intercept form
IRJET- On the Generalization of Lami’s Theorem
Geometry sizes and shapes
Types of graphs
power point presentation
Points, Lines & Planes Powerpoint
Building Blocks Of Geometry
1 3 points, lines, planes
GEOMETRY: POINTS, LINES. PLANES
Solid mensuration lecture #1
Geometry in sizes and shapes
Vectors
Ad

Similar to Graph theory (20)

PPTX
Graph Theory
PPTX
Data Structures - Introduction to Graph.pptx
PPTX
Slides Chapter10.1 10.2
PDF
Introduction to Graphs
PPTX
Chapter 4_introduction on Graph theory.pptx
PPTX
Crossing patterns in Nonplanar Road networks
PPTX
Data Structure of computer science and technology
PPT
358 33 powerpoint-slides_13-graphs_chapter-13
PPTX
Spanningtreesppt
PPTX
VANU no sql ppt.pptx
PPTX
Vanmathy no sql
PPTX
8.-Graphs information technologies graph
PPTX
Graph terminology and algorithm and tree.pptx
PDF
unit-3-dsa-graph introduction to grapgh and graph type
PPTX
Graphs.pptx
PPTX
NON-LINEAR DATA STRUCTURE-Graphs.pptx
PPTX
Graphs aktu notes computer networks.pptx
PPTX
Chapter 1
PPTX
Graph.pptx
PPT
Graphs in Data Structure
Graph Theory
Data Structures - Introduction to Graph.pptx
Slides Chapter10.1 10.2
Introduction to Graphs
Chapter 4_introduction on Graph theory.pptx
Crossing patterns in Nonplanar Road networks
Data Structure of computer science and technology
358 33 powerpoint-slides_13-graphs_chapter-13
Spanningtreesppt
VANU no sql ppt.pptx
Vanmathy no sql
8.-Graphs information technologies graph
Graph terminology and algorithm and tree.pptx
unit-3-dsa-graph introduction to grapgh and graph type
Graphs.pptx
NON-LINEAR DATA STRUCTURE-Graphs.pptx
Graphs aktu notes computer networks.pptx
Chapter 1
Graph.pptx
Graphs in Data Structure
Ad

Recently uploaded (20)

PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
advance database management system book.pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
Trump Administration's workforce development strategy
PDF
IGGE1 Understanding the Self1234567891011
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
Uderstanding digital marketing and marketing stratergie for engaging the digi...
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
Complications of Minimal Access-Surgery.pdf
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
HVAC Specification 2024 according to central public works department
Paper A Mock Exam 9_ Attempt review.pdf.
FORM 1 BIOLOGY MIND MAPS and their schemes
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
advance database management system book.pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
Trump Administration's workforce development strategy
IGGE1 Understanding the Self1234567891011
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
Unit 4 Computer Architecture Multicore Processor.pptx
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Cambridge-Practice-Tests-for-IELTS-12.docx
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Uderstanding digital marketing and marketing stratergie for engaging the digi...
Weekly quiz Compilation Jan -July 25.pdf
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Complications of Minimal Access-Surgery.pdf
History, Philosophy and sociology of education (1).pptx
HVAC Specification 2024 according to central public works department

Graph theory

  • 2. Contents ● Introduction to Graphs ● Representation of Graphs ● Weighted Graphs ● Non-weighted Graphs ● Directed Graphs ● Undirected Graphs ● Self-loops ● Multigraphs ● Real World Examples
  • 3. Introduction to Graphs ● A graph G, consists of Vertices(V) and Edges(E). ● G = (V,E). ● V is the set of Vertices. ● E is the set of Edges.
  • 4. Representation of Graphs ● Let V = {a, b, c}, and E = { { a, b }, { a, c } }. a b c Set describing all the vertices(or nodes) a, b, and c. Set describing an edge between node a and c. |V| = 3 |E| = 2
  • 5. Weighted Graphs ● Weight or cost is a numerical value associated to every edge of a graph. We encounter with it in real world, when we need to calculate shortest path between two points, for example – when we see maps to find the shortest driving distance. The path is chosen which has the minimum cost. A E C D B 3 1 1 2 4 2 Shortest path between A & E : A -> D -> C -> E 8 4
  • 6. Non-weighted Graphs ● In non weighted graphs, when we doesn’t have weights, all edges are considered equal. The path which has less number of nodes is considered effective. A E C D B Shortest path between A & E : A -> B -> E
  • 7. Undirected Graphs ● Undirected graphs have edges that do not have a direction. The edges indicate a two- way relationship, in that each edge can be traversed in both directions. A B D C
  • 8. Directed Graphs ● Directed graphs have edges with direction. The edges indicate a one-way relationship, in that each edge can only be traversed in a single direction. A B D C
  • 9. Self-loops ● Graphs created can have one or more self-loops, which are edges connecting a node to itself. A B D C
  • 10. Multigraphs ● Graphs can have multiple edges with the same source and target nodes, and the graph is then known as a multigraph. A multigraph may or may not contain self-loops. A B D C
  • 11. Real World Examples ● Social Graphs – Connections on LinkedIn. ● Path Optimization Algorithms – Google Maps. ● Routing Algorithms in Computer Networks – Routing IP Table in Router. ● Scientific Computations - Edge Chasing in Operating Systems.