SlideShare a Scribd company logo
1 of 11
DATA STRUCTURE -GRAPHS
Dr.M.UMADEVI
ASSISTANT PROFESSOR
DEPARTMENT OF CS
SACWC
CUMBUM
Introduction to Graphs
 Graph is a non linear data structure; A map is a well-known example of a graph.
 In a map various connections are made between the cities. The cities are connected
via roads, railway lines and aerial network.
 We can assume that the graph is the interconnection of cities by roads. Euler used
graph theory to solve Seven Bridges of Königsberg problem.
Defining the degree of a vertex to be the number of edges incident to it,
Euler showed that there is a walk starting at any vertex, going through
each edge exactly once and terminating at the start vertex iff the degree
of each, vertex is even. A walk which does this is called Eulerian. There is
no Eulerian walk for the Koenigsberg bridge problem as all four vertices
are of odd degree.
A graph contains a set of points known as nodes (or vertices) and set of
links known as edges (or Arcs) which connects the vertices.
A
A graph is defined as Graph is a collection of vertices and arcs which connects vertices
in the graph. A graph G is represented as G = ( V , E ), where V is set of vertices and E is
set of edges.
Example: graph G can be defined as G = ( V , E ) Where V = {A,B,C,D,E} and
E = {(A,B),(A,C)(A,D),(B,D),(C,D),(B,E),(E,D)}. This is a graph with 5 vertices and 6 edges
Graph Terminology
1.Vertex : An individual data element of a graph is called as Vertex. Vertex is also known as
node. In above example graph, A, B, C, D & E are known as vertices.
2.Edge : An edge is a connecting link between two vertices. Edge is also known as Arc. An
edge is represented as (starting Vertex, ending Vertex).
In above graph, the link between vertices A and B is represented as (A,B).
Edges are three types:
1.Undirected Edge - An undirected edge is a bidirectional edge. If there is an undirected
edge between vertices A and B then edge (A , B) is equal to edge (B , A).
2.Directed Edge - A directed edge is a unidirectional edge. If there is a directed edge
between vertices A and B then edge (A , B) is not equal to edge (B , A
THANK
YOU

More Related Content

What's hot

Abstract (English) Amalia Indrawati Gunawan 90112007
Abstract (English) Amalia Indrawati Gunawan 90112007Abstract (English) Amalia Indrawati Gunawan 90112007
Abstract (English) Amalia Indrawati Gunawan 90112007Amalia Indrawati Gunawan
 
6161103 2.5 cartesian vectors
6161103 2.5 cartesian vectors6161103 2.5 cartesian vectors
6161103 2.5 cartesian vectorsetcenterrbru
 
Königsberg, Euler and the origins of graph theory
Königsberg, Euler and the origins of graph theoryKönigsberg, Euler and the origins of graph theory
Königsberg, Euler and the origins of graph theorypupbroeders
 
Application of Vertex Colorings with Some Interesting Graphs
Application of Vertex Colorings with Some Interesting GraphsApplication of Vertex Colorings with Some Interesting Graphs
Application of Vertex Colorings with Some Interesting Graphsijtsrd
 
CombinatorialModels_Poster2016 (2)
CombinatorialModels_Poster2016 (2)CombinatorialModels_Poster2016 (2)
CombinatorialModels_Poster2016 (2)Yicheng Pu
 
Lecture 16 graph introduction
Lecture 16 graph introductionLecture 16 graph introduction
Lecture 16 graph introductionAbirami A
 
Vector And Illustrator 03
Vector And Illustrator 03Vector And Illustrator 03
Vector And Illustrator 03PaperStainer
 
Geometry semester 1 vocabulary terms
Geometry semester 1 vocabulary termsGeometry semester 1 vocabulary terms
Geometry semester 1 vocabulary termsCarolinaDay3
 
Congruence between triangles
Congruence between trianglesCongruence between triangles
Congruence between trianglesRaymundo Raymund
 
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
 
Line graphs, slope, and interpreting line graphs
Line graphs, slope, and interpreting line graphs Line graphs, slope, and interpreting line graphs
Line graphs, slope, and interpreting line graphs Charalee
 

What's hot (20)

Basics of graph
Basics of graphBasics of graph
Basics of graph
 
Abstract (English) Amalia Indrawati Gunawan 90112007
Abstract (English) Amalia Indrawati Gunawan 90112007Abstract (English) Amalia Indrawati Gunawan 90112007
Abstract (English) Amalia Indrawati Gunawan 90112007
 
Research
ResearchResearch
Research
 
Discrete2
Discrete2Discrete2
Discrete2
 
Discrete ad
Discrete adDiscrete ad
Discrete ad
 
6161103 2.5 cartesian vectors
6161103 2.5 cartesian vectors6161103 2.5 cartesian vectors
6161103 2.5 cartesian vectors
 
Triangles
TrianglesTriangles
Triangles
 
Graphs
GraphsGraphs
Graphs
 
Königsberg, Euler and the origins of graph theory
Königsberg, Euler and the origins of graph theoryKönigsberg, Euler and the origins of graph theory
Königsberg, Euler and the origins of graph theory
 
Topic 2
Topic 2Topic 2
Topic 2
 
Learning the structure of Gaussian Graphical models with unobserved variables...
Learning the structure of Gaussian Graphical models with unobserved variables...Learning the structure of Gaussian Graphical models with unobserved variables...
Learning the structure of Gaussian Graphical models with unobserved variables...
 
Application of Vertex Colorings with Some Interesting Graphs
Application of Vertex Colorings with Some Interesting GraphsApplication of Vertex Colorings with Some Interesting Graphs
Application of Vertex Colorings with Some Interesting Graphs
 
Posulate and theoroem
Posulate and theoroemPosulate and theoroem
Posulate and theoroem
 
CombinatorialModels_Poster2016 (2)
CombinatorialModels_Poster2016 (2)CombinatorialModels_Poster2016 (2)
CombinatorialModels_Poster2016 (2)
 
Lecture 16 graph introduction
Lecture 16 graph introductionLecture 16 graph introduction
Lecture 16 graph introduction
 
Vector And Illustrator 03
Vector And Illustrator 03Vector And Illustrator 03
Vector And Illustrator 03
 
Geometry semester 1 vocabulary terms
Geometry semester 1 vocabulary termsGeometry semester 1 vocabulary terms
Geometry semester 1 vocabulary terms
 
Congruence between triangles
Congruence between trianglesCongruence between triangles
Congruence between triangles
 
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
 
Line graphs, slope, and interpreting line graphs
Line graphs, slope, and interpreting line graphs Line graphs, slope, and interpreting line graphs
Line graphs, slope, and interpreting line graphs
 

Similar to Graphs: A Non-Linear Data Structure

Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptxARVIND SARDAR
 
Tn 110 lecture 8
Tn 110 lecture 8Tn 110 lecture 8
Tn 110 lecture 8ITNet
 
Ass. (3)graph d.m
Ass. (3)graph d.mAss. (3)graph d.m
Ass. (3)graph d.mSyed Umair
 
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
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2showslidedump
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptishan743441
 
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theoryBCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theoryRai University
 
Lecture 5b graphs and hashing
Lecture 5b graphs and hashingLecture 5b graphs and hashing
Lecture 5b graphs and hashingVictor Palmar
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringSaurabh Kaushik
 
Graph Introduction.ppt
Graph Introduction.pptGraph Introduction.ppt
Graph Introduction.pptFaruk Hossen
 
Class01_Computer_Contest_Level_3_Notes_Sep_07 - Copy.pdf
Class01_Computer_Contest_Level_3_Notes_Sep_07 - Copy.pdfClass01_Computer_Contest_Level_3_Notes_Sep_07 - Copy.pdf
Class01_Computer_Contest_Level_3_Notes_Sep_07 - Copy.pdfChristianKapsales1
 

Similar to Graphs: A Non-Linear Data Structure (20)

Magtibay buk bind#2
Magtibay buk bind#2Magtibay buk bind#2
Magtibay buk bind#2
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
 
Graphs.pptx
Graphs.pptxGraphs.pptx
Graphs.pptx
 
Tn 110 lecture 8
Tn 110 lecture 8Tn 110 lecture 8
Tn 110 lecture 8
 
Graph
GraphGraph
Graph
 
Ass. (3)graph d.m
Ass. (3)graph d.mAss. (3)graph d.m
Ass. (3)graph d.m
 
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
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2
 
Graphs.pdf
Graphs.pdfGraphs.pdf
Graphs.pdf
 
Graphs
GraphsGraphs
Graphs
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).ppt
 
gsm nithya.pdf
gsm nithya.pdfgsm nithya.pdf
gsm nithya.pdf
 
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theoryBCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
 
Lecture 5b graphs and hashing
Lecture 5b graphs and hashingLecture 5b graphs and hashing
Lecture 5b graphs and hashing
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
 
Graph Introduction.ppt
Graph Introduction.pptGraph Introduction.ppt
Graph Introduction.ppt
 
Class01_Computer_Contest_Level_3_Notes_Sep_07 - Copy.pdf
Class01_Computer_Contest_Level_3_Notes_Sep_07 - Copy.pdfClass01_Computer_Contest_Level_3_Notes_Sep_07 - Copy.pdf
Class01_Computer_Contest_Level_3_Notes_Sep_07 - Copy.pdf
 

More from Uma mohan

Web technology javascript
Web technology   javascriptWeb technology   javascript
Web technology javascriptUma mohan
 
Web programming css
Web programming cssWeb programming css
Web programming cssUma mohan
 
Web programming xml
Web programming  xmlWeb programming  xml
Web programming xmlUma mohan
 
Rdbms ER model
Rdbms ER modelRdbms ER model
Rdbms ER modelUma mohan
 
Programming in c arrays
Programming in c   arraysProgramming in c   arrays
Programming in c arraysUma mohan
 
Dip color image processing
Dip  color image processingDip  color image processing
Dip color image processingUma mohan
 
Data structure stack
Data structure   stackData structure   stack
Data structure stackUma mohan
 
Data Structure - Elementary Data Organization
Data Structure - Elementary  Data Organization Data Structure - Elementary  Data Organization
Data Structure - Elementary Data Organization Uma mohan
 
DS Introduction
DS IntroductionDS Introduction
DS IntroductionUma mohan
 
Cg introduction
Cg introductionCg introduction
Cg introductionUma mohan
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manualUma mohan
 

More from Uma mohan (17)

Web technology javascript
Web technology   javascriptWeb technology   javascript
Web technology javascript
 
Web programming css
Web programming cssWeb programming css
Web programming css
 
Web programming xml
Web programming  xmlWeb programming  xml
Web programming xml
 
Rdbms ER model
Rdbms ER modelRdbms ER model
Rdbms ER model
 
Rdbms 2
Rdbms 2Rdbms 2
Rdbms 2
 
Rdbms 1
Rdbms 1Rdbms 1
Rdbms 1
 
Programming in c arrays
Programming in c   arraysProgramming in c   arrays
Programming in c arrays
 
Json
JsonJson
Json
 
Dip
DipDip
Dip
 
Dip color image processing
Dip  color image processingDip  color image processing
Dip color image processing
 
Data structure stack
Data structure   stackData structure   stack
Data structure stack
 
Animation
AnimationAnimation
Animation
 
Data Structure - Elementary Data Organization
Data Structure - Elementary  Data Organization Data Structure - Elementary  Data Organization
Data Structure - Elementary Data Organization
 
DS Introduction
DS IntroductionDS Introduction
DS Introduction
 
Quick sort
Quick sortQuick sort
Quick sort
 
Cg introduction
Cg introductionCg introduction
Cg introduction
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 

Recently uploaded

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
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
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
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
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
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
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
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
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 

Recently uploaded (20)

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
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 🔝✔️✔️
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
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
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
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
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
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
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 

Graphs: A Non-Linear Data Structure

  • 1. DATA STRUCTURE -GRAPHS Dr.M.UMADEVI ASSISTANT PROFESSOR DEPARTMENT OF CS SACWC CUMBUM
  • 2. Introduction to Graphs  Graph is a non linear data structure; A map is a well-known example of a graph.  In a map various connections are made between the cities. The cities are connected via roads, railway lines and aerial network.  We can assume that the graph is the interconnection of cities by roads. Euler used graph theory to solve Seven Bridges of Königsberg problem.
  • 3.
  • 4. Defining the degree of a vertex to be the number of edges incident to it, Euler showed that there is a walk starting at any vertex, going through each edge exactly once and terminating at the start vertex iff the degree of each, vertex is even. A walk which does this is called Eulerian. There is no Eulerian walk for the Koenigsberg bridge problem as all four vertices are of odd degree. A graph contains a set of points known as nodes (or vertices) and set of links known as edges (or Arcs) which connects the vertices. A
  • 5. A graph is defined as Graph is a collection of vertices and arcs which connects vertices in the graph. A graph G is represented as G = ( V , E ), where V is set of vertices and E is set of edges. Example: graph G can be defined as G = ( V , E ) Where V = {A,B,C,D,E} and E = {(A,B),(A,C)(A,D),(B,D),(C,D),(B,E),(E,D)}. This is a graph with 5 vertices and 6 edges
  • 6. Graph Terminology 1.Vertex : An individual data element of a graph is called as Vertex. Vertex is also known as node. In above example graph, A, B, C, D & E are known as vertices. 2.Edge : An edge is a connecting link between two vertices. Edge is also known as Arc. An edge is represented as (starting Vertex, ending Vertex). In above graph, the link between vertices A and B is represented as (A,B). Edges are three types: 1.Undirected Edge - An undirected edge is a bidirectional edge. If there is an undirected edge between vertices A and B then edge (A , B) is equal to edge (B , A). 2.Directed Edge - A directed edge is a unidirectional edge. If there is a directed edge between vertices A and B then edge (A , B) is not equal to edge (B , A
  • 7.
  • 8.
  • 9.
  • 10.