SlideShare a Scribd company logo
1 of 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!

More Related Content

What's hot

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
 

What's hot (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
 

Similar to 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
 

Similar to 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
 

Recently uploaded

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 

Recently uploaded (20)

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 

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.