SlideShare ist ein Scribd-Unternehmen logo
1 von 12
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!

Weitere ähnliche Inhalte

Was ist angesagt?

India's narayan-pandit[1]
India's  narayan-pandit[1]India's  narayan-pandit[1]
India's narayan-pandit[1]Poonam Singh
 
Graphs in datastructures
Graphs in datastructuresGraphs in datastructures
Graphs in datastructuresLikhithaGunturi
 
Graph Application in Traffic Control
Graph Application in Traffic ControlGraph Application in Traffic Control
Graph Application in Traffic ControlMuhammadu Isa
 
2.1 Points, Lines, and Planes
2.1 Points, Lines, and Planes2.1 Points, Lines, and Planes
2.1 Points, Lines, and Planessmiller5
 
1.1.1A Points, Lines, and Planes
1.1.1A Points, Lines, and Planes1.1.1A Points, Lines, and Planes
1.1.1A Points, Lines, and Planessmiller5
 
4.6 quick graphs using slope intercept form
4.6 quick graphs using slope intercept form4.6 quick graphs using slope intercept form
4.6 quick graphs using slope intercept formAnibal Aguilar Barahona
 
IRJET- On the Generalization of Lami’s Theorem
IRJET- On the Generalization of Lami’s TheoremIRJET- On the Generalization of Lami’s Theorem
IRJET- On the Generalization of Lami’s TheoremIRJET Journal
 
power point presentation
power point presentationpower point presentation
power point presentationakhilabethel
 
Points, Lines & Planes Powerpoint
Points, Lines & Planes PowerpointPoints, Lines & Planes Powerpoint
Points, Lines & Planes Powerpointknoxbaggett
 
Building Blocks Of Geometry
Building Blocks Of GeometryBuilding Blocks Of Geometry
Building Blocks Of Geometryacavis
 
Solid mensuration lecture #1
Solid mensuration lecture #1Solid mensuration lecture #1
Solid mensuration lecture #1Denmar Marasigan
 
Geometry in sizes and shapes
Geometry in sizes and shapesGeometry in sizes and shapes
Geometry in sizes and shapesbeasecosana
 

Was ist angesagt? (20)

India's narayan-pandit[1]
India's  narayan-pandit[1]India's  narayan-pandit[1]
India's narayan-pandit[1]
 
Graphs in datastructures
Graphs in datastructuresGraphs in datastructures
Graphs in datastructures
 
Week2
Week2Week2
Week2
 
Graph Application in Traffic Control
Graph Application in Traffic ControlGraph Application in Traffic Control
Graph Application in Traffic Control
 
Basics of graph
Basics of graphBasics of graph
Basics of graph
 
Posulate and theoroem
Posulate and theoroemPosulate and theoroem
Posulate and theoroem
 
2.1 Points, Lines, and Planes
2.1 Points, Lines, and Planes2.1 Points, Lines, and Planes
2.1 Points, Lines, and Planes
 
1.1.1A Points, Lines, and Planes
1.1.1A Points, Lines, and Planes1.1.1A Points, Lines, and Planes
1.1.1A Points, Lines, and Planes
 
4.6 quick graphs using slope intercept form
4.6 quick graphs using slope intercept form4.6 quick graphs using slope intercept form
4.6 quick graphs using slope intercept form
 
IRJET- On the Generalization of Lami’s Theorem
IRJET- On the Generalization of Lami’s TheoremIRJET- On the Generalization of Lami’s Theorem
IRJET- On the Generalization of Lami’s Theorem
 
Geometry sizes and shapes
Geometry   sizes and shapesGeometry   sizes and shapes
Geometry sizes and shapes
 
Types of graphs
Types of graphsTypes of graphs
Types of graphs
 
power point presentation
power point presentationpower point presentation
power point presentation
 
Points, Lines & Planes Powerpoint
Points, Lines & Planes PowerpointPoints, Lines & Planes Powerpoint
Points, Lines & Planes Powerpoint
 
Building Blocks Of Geometry
Building Blocks Of GeometryBuilding Blocks Of Geometry
Building Blocks Of Geometry
 
1 3 points, lines, planes
1 3 points, lines, planes1 3 points, lines, planes
1 3 points, lines, planes
 
GEOMETRY: POINTS, LINES. PLANES
GEOMETRY: POINTS, LINES. PLANESGEOMETRY: POINTS, LINES. PLANES
GEOMETRY: POINTS, LINES. PLANES
 
Solid mensuration lecture #1
Solid mensuration lecture #1Solid mensuration lecture #1
Solid mensuration lecture #1
 
Geometry in sizes and shapes
Geometry in sizes and shapesGeometry in sizes and shapes
Geometry in sizes and shapes
 
Vectors
VectorsVectors
Vectors
 

Ähnlich wie Graph theory

Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2showslidedump
 
Introduction to Graphs
Introduction to GraphsIntroduction to Graphs
Introduction to GraphsFulvio Corno
 
Crossing patterns in Nonplanar Road networks
Crossing patterns in Nonplanar Road networksCrossing patterns in Nonplanar Road networks
Crossing patterns in Nonplanar Road networksAjinkya Ghadge
 
358 33 powerpoint-slides_13-graphs_chapter-13
358 33 powerpoint-slides_13-graphs_chapter-13358 33 powerpoint-slides_13-graphs_chapter-13
358 33 powerpoint-slides_13-graphs_chapter-13sumitbardhan
 
VANU no sql ppt.pptx
VANU no sql ppt.pptxVANU no sql ppt.pptx
VANU no sql ppt.pptxMJeyavarthini
 
8.-Graphs information technologies graph
8.-Graphs information technologies graph8.-Graphs information technologies graph
8.-Graphs information technologies graphiloveyoucarlo0923
 
Graph terminology and algorithm and tree.pptx
Graph terminology and algorithm and tree.pptxGraph terminology and algorithm and tree.pptx
Graph terminology and algorithm and tree.pptxasimshahzad8611
 
NON-LINEAR DATA STRUCTURE-Graphs.pptx
NON-LINEAR DATA STRUCTURE-Graphs.pptxNON-LINEAR DATA STRUCTURE-Graphs.pptx
NON-LINEAR DATA STRUCTURE-Graphs.pptxRajitha Reddy Alugati
 
Graphs in Data Structure
 Graphs in Data Structure Graphs in Data Structure
Graphs in Data Structurehafsa komal
 
Hamilton Path & Dijkstra's Algorithm
Hamilton Path & Dijkstra's AlgorithmHamilton Path & Dijkstra's Algorithm
Hamilton Path & Dijkstra's AlgorithmMahesh Singh Madai
 
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)Mohanlal Sukhadia University (MLSU)
 
Skiena algorithm 2007 lecture10 graph data strctures
Skiena algorithm 2007 lecture10 graph data strcturesSkiena algorithm 2007 lecture10 graph data strctures
Skiena algorithm 2007 lecture10 graph data strctureszukun
 

Ähnlich wie Graph theory (20)

Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2
 
Introduction to Graphs
Introduction to GraphsIntroduction to Graphs
Introduction to Graphs
 
Crossing patterns in Nonplanar Road networks
Crossing patterns in Nonplanar Road networksCrossing patterns in Nonplanar Road networks
Crossing patterns in Nonplanar Road networks
 
358 33 powerpoint-slides_13-graphs_chapter-13
358 33 powerpoint-slides_13-graphs_chapter-13358 33 powerpoint-slides_13-graphs_chapter-13
358 33 powerpoint-slides_13-graphs_chapter-13
 
Spanningtreesppt
SpanningtreespptSpanningtreesppt
Spanningtreesppt
 
Vanmathy no sql
Vanmathy no sql Vanmathy no sql
Vanmathy no sql
 
VANU no sql ppt.pptx
VANU no sql ppt.pptxVANU no sql ppt.pptx
VANU no sql ppt.pptx
 
8.-Graphs information technologies graph
8.-Graphs information technologies graph8.-Graphs information technologies graph
8.-Graphs information technologies graph
 
Graph terminology and algorithm and tree.pptx
Graph terminology and algorithm and tree.pptxGraph terminology and algorithm and tree.pptx
Graph terminology and algorithm and tree.pptx
 
Graphs.pptx
Graphs.pptxGraphs.pptx
Graphs.pptx
 
NON-LINEAR DATA STRUCTURE-Graphs.pptx
NON-LINEAR DATA STRUCTURE-Graphs.pptxNON-LINEAR DATA STRUCTURE-Graphs.pptx
NON-LINEAR DATA STRUCTURE-Graphs.pptx
 
Chapter 1
Chapter   1Chapter   1
Chapter 1
 
Graph.pptx
Graph.pptxGraph.pptx
Graph.pptx
 
Graphs in Data Structure
 Graphs in Data Structure Graphs in Data Structure
Graphs in Data Structure
 
Hamilton Path & Dijkstra's Algorithm
Hamilton Path & Dijkstra's AlgorithmHamilton Path & Dijkstra's Algorithm
Hamilton Path & Dijkstra's Algorithm
 
logic.pptx
logic.pptxlogic.pptx
logic.pptx
 
DATA STRUCTURES.pptx
DATA STRUCTURES.pptxDATA STRUCTURES.pptx
DATA STRUCTURES.pptx
 
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
 
Skiena algorithm 2007 lecture10 graph data strctures
Skiena algorithm 2007 lecture10 graph data strcturesSkiena algorithm 2007 lecture10 graph data strctures
Skiena algorithm 2007 lecture10 graph data strctures
 

Kürzlich hochgeladen

Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 

Kürzlich hochgeladen (20)

Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 

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.