SlideShare a Scribd company logo
1 of 30
NADAR SARASWATHI COLLEGE OF ARTS&SCIENCE,THENI
DEPARTMENT OF COMPUTER SCIENCE&INFORMATION
TECHNOLOGY
V.VANMATHY
I-MSC(CS)
NO SQL
TOPIC: Element of Graph, Operation on Graph
GRAPH
GRAPH
DIFFERENT TYPES OF GRAPH
DIFFERENT TYPES OF GRAPH
GRAPH DATABASE
COMPARED TO RELATION DATABASE
COMPARED TO VALUE STORES
COMPARED TO KEY VALUE STORES
ELEMENT OF GRAPH
Elements of Graph
Identify the vertices, edges, and loops of a graph
Identify the degree of a vertex
Identify and draw both a path and a circuit through a
graph
Determine whether a graph is connected or
disconnected
Find the shortest path through a graph using
Dijkstra’s Algorithm
ELEMENT OF GRAPH
 Graphs, Vertices, and Edges
 A graph consists of a set of dots, called vertices,
and a set of edges connecting pairs of vertices.
While we drew our original graph to correspond
with the picture we had, there is nothing particularly
important about the layout when we analyze a graph.
Both of the graphs below are equivalent to the one
drawn above.
GRAPHS VERTICES AND EDGES
VERTEX
Vertex
 A vertex is a dot in the graph that could represent an
intersection of streets, a land mass, or a general
location, like “work” or “school”. Vertices are often
connected by edges. Note that vertices only occur
 when a dot is explicitly placed, not whenever two
edges cross. Imagine a freeway overpass—the
freeway and side street cross, but it is not possible to
change from the side street to the freeway at that
point, so there is no intersection and no vertex would
be placed.
EDGES
Edges
 Edges connect pairs of vertices. An edge can
represent a physical connection between locations,
like a street, or simply that a route connecting the
two locations exists, like an airline flight.
LOOP
Loop
A loop is a special type of edge that connects a vertex
to itself. Loops are not used much in street network
graphs.
DEGREE OF A VERTEX
Degree of a vertex
 The degree of a vertex is the number of edges
meeting at that vertex. It is possible for a vertex to
have a degree of zero or larger.
Degree 4
Degree 3
Degree 2
Degree 1
PATH
Path
A path is a sequence of vertices using the edges.
Usually we are interested in a path between two
vertices. For example, a path from vertex A to vertex
M is shown below. It is one of many possible paths in
this graph.
CIRCUIT
Circuit
A circuit is a path that begins and ends at the same
vertex. A circuit starting and ending at vertex A is
shown below.
CONNECTED
Connected
A graph is connected if there is a path from any
vertex to any other vertex. Every graph drawn so far
has been connected. The graph below is
disconnected; there is no way to get from the
vertices on the left to the vertices on the right.
WEIGHTS
Weights
Depending upon the problem being solved,
sometimes weights are assigned to the edges. The
weights could represent the distance between two
locations, the travel time, or the travel cost. It is
important to note that the distance between vertices
in a graph does not necessarily correspond to the
weight of an edge.
GRAPH OPERATIONS
Graph Operations – Extracting sub graphs
In this section we will discuss about various types of
sub graphs we can extract from a given Graph.
Sub graph
Getting a sub graph out of a graph is an interesting
operation. A sub graph of a graph G(V,E) can be
obtained by the following means:
Removing one or more vertices from the vertex set.
Removing one or more edges from the edge family.
Removing either vertices or edges from the graph.
VERTICES&EDGES
The vertices of sub graphs are subsets of the original
vertices
The edges of sub graphs are subsets of the original
edges
NEIGHBIURHOOD GRAPH
Neighbourhood graph
 The neighbourhood graph of a graph G(V,E) only makes
sense when we mention it with respect to a given vertex
set. For e.g. if V = {1,2,3,4,5} then we can find out the
Neighbourhood graph of G(V,E) for vertex set {1}.
 So, the neighbourhood graphs contains the vertices 1 and
all the edges incident on them and the vertices connected
to these edges.
Below is a graph and its neighbourhood graphs as
described above.
NEIGHBIURHOOD GRAPG
SPANNING TREE
Spanning Tree
 A spanning tree of a connected graph G(V,E) is a sub
graph that is also a tree and connects all vertices in V.
For a disconnected graph the spanning tree would be the
spanning tree of each component respectively.
 There is an interesting set of problems related to finding
the minimum spanning tree (which we will be discussing
in upcoming posts). There are many algorithms available
to solve this problem, for e.g.: Kruskal’s, Prim’s etc. Note
that the concept of minimum spanning tree mostly
makes sense in case of weighted graphs. If the graph is
not weighted, we consider all the weights to be one and
any spanning tree becomes the minimum spanning tree.
SPANNING TREE GRAPH
GRAPH OPERATIONS
Graph Operations – Conversions of Graphs
 In this section we discuss about converting one graph into
another graph. Which means all the graphs can be converted
into any of the below forms.
Conversion from Directed Graph to Undirected graph
 This is the simplest conversions possible. A directed graph has
directions represented by arrows, in this conversion we just
remove all the arrows and do not store the direction
information. Below is an example of the conversion.
Please note that the graph remains unchanged in terms of its
structure. However, we can choose to remove edges if there
are multi edges. But it is strictly not required.
GRAPH OPERATIONS
Conversion from Undirected Graph to Directed
graph
This conversion gives a directed graph given an
undirected graph G(V,E). It is the exact reverse of
the above. The trick to achieve this is to add one edge
for each existing edge in the edge family E. Once the
extra edges are added, we just assign opposite
direction to each pair of edges between connecting
vertices.
DIRECTED&UNDIRECTED GRAPH

More Related Content

Similar to Vanmathy no sql

Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2showslidedump
 
Lecture 5b graphs and hashing
Lecture 5b graphs and hashingLecture 5b graphs and hashing
Lecture 5b graphs and hashingVictor Palmar
 
Lecture 2.3.1 Graph.pptx
Lecture 2.3.1 Graph.pptxLecture 2.3.1 Graph.pptx
Lecture 2.3.1 Graph.pptxking779879
 
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
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjtepournima055
 
Graphs and eularian circuit & path with c++ program
Graphs and eularian circuit & path with c++ programGraphs and eularian circuit & path with c++ program
Graphs and eularian circuit & path with c++ programMuhammad Danish Badar
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabatinabati
 
Unit-6 Graph.ppsx ppt
Unit-6 Graph.ppsx                                       pptUnit-6 Graph.ppsx                                       ppt
Unit-6 Graph.ppsx pptDhruvilSTATUS
 
Graph_data_structure_information_engineering.pptx
Graph_data_structure_information_engineering.pptxGraph_data_structure_information_engineering.pptx
Graph_data_structure_information_engineering.pptxsahilpawar2426
 
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
 
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
 
Graphs in data structures
Graphs in data structuresGraphs in data structures
Graphs in data structuresSavit Chandra
 

Similar to Vanmathy no sql (20)

Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2
 
UNIT III.pptx
UNIT III.pptxUNIT III.pptx
UNIT III.pptx
 
Lecture 5b graphs and hashing
Lecture 5b graphs and hashingLecture 5b graphs and hashing
Lecture 5b graphs and hashing
 
Lecture 2.3.1 Graph.pptx
Lecture 2.3.1 Graph.pptxLecture 2.3.1 Graph.pptx
Lecture 2.3.1 Graph.pptx
 
NON-LINEAR DATA STRUCTURE-Graphs.pptx
NON-LINEAR DATA STRUCTURE-Graphs.pptxNON-LINEAR DATA STRUCTURE-Graphs.pptx
NON-LINEAR DATA STRUCTURE-Graphs.pptx
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
 
Graphs and eularian circuit & path with c++ program
Graphs and eularian circuit & path with c++ programGraphs and eularian circuit & path with c++ program
Graphs and eularian circuit & path with c++ program
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
 
Unit-6 Graph.ppsx ppt
Unit-6 Graph.ppsx                                       pptUnit-6 Graph.ppsx                                       ppt
Unit-6 Graph.ppsx ppt
 
Graphs
GraphsGraphs
Graphs
 
Ch18
Ch18Ch18
Ch18
 
ppt 1.pptx
ppt 1.pptxppt 1.pptx
ppt 1.pptx
 
Graph_data_structure_information_engineering.pptx
Graph_data_structure_information_engineering.pptxGraph_data_structure_information_engineering.pptx
Graph_data_structure_information_engineering.pptx
 
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
 
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
 
Siegel
SiegelSiegel
Siegel
 
Graphs.pptx
Graphs.pptxGraphs.pptx
Graphs.pptx
 
Graphs in data structures
Graphs in data structuresGraphs in data structures
Graphs in data structures
 
Data structure and algorithm
Data structure and algorithmData structure and algorithm
Data structure and algorithm
 
DS team2 ppt new.ppt
DS team2 ppt new.pptDS team2 ppt new.ppt
DS team2 ppt new.ppt
 

More from PriyadharshiniVS

R Ramya devi digital image processing
R  Ramya devi digital image processingR  Ramya devi digital image processing
R Ramya devi digital image processingPriyadharshiniVS
 
R ramya devi cloud computing
R ramya devi cloud computingR ramya devi cloud computing
R ramya devi cloud computingPriyadharshiniVS
 
Ramya devi R women empowerment
Ramya devi R women empowermentRamya devi R women empowerment
Ramya devi R women empowermentPriyadharshiniVS
 
R Ramya devi artificial intelligence and machine learning
R Ramya devi  artificial intelligence and machine learningR Ramya devi  artificial intelligence and machine learning
R Ramya devi artificial intelligence and machine learningPriyadharshiniVS
 
Ramya devi R internet of things
Ramya devi R internet of thingsRamya devi R internet of things
Ramya devi R internet of thingsPriyadharshiniVS
 
MOBILE APP DEVELOPMENT USING PYTHON
MOBILE APP DEVELOPMENT USING PYTHONMOBILE APP DEVELOPMENT USING PYTHON
MOBILE APP DEVELOPMENT USING PYTHONPriyadharshiniVS
 
PriyaDharshini distributed operating system
PriyaDharshini distributed operating systemPriyaDharshini distributed operating system
PriyaDharshini distributed operating systemPriyadharshiniVS
 
Vanmathy distributed operating system
Vanmathy distributed operating system Vanmathy distributed operating system
Vanmathy distributed operating system PriyadharshiniVS
 
vanmathy cryptography network security
vanmathy cryptography network securityvanmathy cryptography network security
vanmathy cryptography network securityPriyadharshiniVS
 
vanmathy cryptography network security
vanmathy cryptography network security vanmathy cryptography network security
vanmathy cryptography network security PriyadharshiniVS
 
Vanmathy distributed operating system
Vanmathy distributed operating system Vanmathy distributed operating system
Vanmathy distributed operating system PriyadharshiniVS
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network securityPriyadharshiniVS
 
Graph, graph and network modeling, advantage of graph database
Graph, graph and network modeling, advantage of graph databaseGraph, graph and network modeling, advantage of graph database
Graph, graph and network modeling, advantage of graph databasePriyadharshiniVS
 

More from PriyadharshiniVS (20)

R Ramya devi digital image processing
R  Ramya devi digital image processingR  Ramya devi digital image processing
R Ramya devi digital image processing
 
R ramya devi cloud computing
R ramya devi cloud computingR ramya devi cloud computing
R ramya devi cloud computing
 
Ramya devi R women empowerment
Ramya devi R women empowermentRamya devi R women empowerment
Ramya devi R women empowerment
 
R Ramya devi artificial intelligence and machine learning
R Ramya devi  artificial intelligence and machine learningR Ramya devi  artificial intelligence and machine learning
R Ramya devi artificial intelligence and machine learning
 
Ramya devi R internet of things
Ramya devi R internet of thingsRamya devi R internet of things
Ramya devi R internet of things
 
vs.pptx
vs.pptxvs.pptx
vs.pptx
 
WE.pptx
WE.pptxWE.pptx
WE.pptx
 
IOT.pptx
IOT.pptxIOT.pptx
IOT.pptx
 
cc.pptx
cc.pptxcc.pptx
cc.pptx
 
MOBILE APP DEVELOPMENT USING PYTHON
MOBILE APP DEVELOPMENT USING PYTHONMOBILE APP DEVELOPMENT USING PYTHON
MOBILE APP DEVELOPMENT USING PYTHON
 
Vanmathy python
Vanmathy python Vanmathy python
Vanmathy python
 
PriyaDharshini distributed operating system
PriyaDharshini distributed operating systemPriyaDharshini distributed operating system
PriyaDharshini distributed operating system
 
Vanmathy distributed operating system
Vanmathy distributed operating system Vanmathy distributed operating system
Vanmathy distributed operating system
 
vanmathy cryptography network security
vanmathy cryptography network securityvanmathy cryptography network security
vanmathy cryptography network security
 
vanmathy cryptography network security
vanmathy cryptography network security vanmathy cryptography network security
vanmathy cryptography network security
 
Vanmathy distributed operating system
Vanmathy distributed operating system Vanmathy distributed operating system
Vanmathy distributed operating system
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 
No sql
No sql No sql
No sql
 
Graph, graph and network modeling, advantage of graph database
Graph, graph and network modeling, advantage of graph databaseGraph, graph and network modeling, advantage of graph database
Graph, graph and network modeling, advantage of graph database
 
Compiler design
Compiler designCompiler design
Compiler design
 

Recently uploaded

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
_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
 
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
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
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
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
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
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
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
 
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
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 

Recently uploaded (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
_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
 
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 🔝✔️✔️
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
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
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
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🔝
 
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
 
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
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
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
 
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
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 

Vanmathy no sql

  • 1. NADAR SARASWATHI COLLEGE OF ARTS&SCIENCE,THENI DEPARTMENT OF COMPUTER SCIENCE&INFORMATION TECHNOLOGY V.VANMATHY I-MSC(CS)
  • 2. NO SQL TOPIC: Element of Graph, Operation on Graph
  • 10. COMPARED TO KEY VALUE STORES
  • 11. ELEMENT OF GRAPH Elements of Graph Identify the vertices, edges, and loops of a graph Identify the degree of a vertex Identify and draw both a path and a circuit through a graph Determine whether a graph is connected or disconnected Find the shortest path through a graph using Dijkstra’s Algorithm
  • 13.  Graphs, Vertices, and Edges  A graph consists of a set of dots, called vertices, and a set of edges connecting pairs of vertices. While we drew our original graph to correspond with the picture we had, there is nothing particularly important about the layout when we analyze a graph. Both of the graphs below are equivalent to the one drawn above. GRAPHS VERTICES AND EDGES
  • 14. VERTEX Vertex  A vertex is a dot in the graph that could represent an intersection of streets, a land mass, or a general location, like “work” or “school”. Vertices are often connected by edges. Note that vertices only occur  when a dot is explicitly placed, not whenever two edges cross. Imagine a freeway overpass—the freeway and side street cross, but it is not possible to change from the side street to the freeway at that point, so there is no intersection and no vertex would be placed.
  • 15. EDGES Edges  Edges connect pairs of vertices. An edge can represent a physical connection between locations, like a street, or simply that a route connecting the two locations exists, like an airline flight.
  • 16. LOOP Loop A loop is a special type of edge that connects a vertex to itself. Loops are not used much in street network graphs.
  • 17. DEGREE OF A VERTEX Degree of a vertex  The degree of a vertex is the number of edges meeting at that vertex. It is possible for a vertex to have a degree of zero or larger. Degree 4 Degree 3 Degree 2 Degree 1
  • 18. PATH Path A path is a sequence of vertices using the edges. Usually we are interested in a path between two vertices. For example, a path from vertex A to vertex M is shown below. It is one of many possible paths in this graph.
  • 19. CIRCUIT Circuit A circuit is a path that begins and ends at the same vertex. A circuit starting and ending at vertex A is shown below.
  • 20. CONNECTED Connected A graph is connected if there is a path from any vertex to any other vertex. Every graph drawn so far has been connected. The graph below is disconnected; there is no way to get from the vertices on the left to the vertices on the right.
  • 21. WEIGHTS Weights Depending upon the problem being solved, sometimes weights are assigned to the edges. The weights could represent the distance between two locations, the travel time, or the travel cost. It is important to note that the distance between vertices in a graph does not necessarily correspond to the weight of an edge.
  • 22. GRAPH OPERATIONS Graph Operations – Extracting sub graphs In this section we will discuss about various types of sub graphs we can extract from a given Graph. Sub graph Getting a sub graph out of a graph is an interesting operation. A sub graph of a graph G(V,E) can be obtained by the following means: Removing one or more vertices from the vertex set. Removing one or more edges from the edge family. Removing either vertices or edges from the graph.
  • 23. VERTICES&EDGES The vertices of sub graphs are subsets of the original vertices The edges of sub graphs are subsets of the original edges
  • 24. NEIGHBIURHOOD GRAPH Neighbourhood graph  The neighbourhood graph of a graph G(V,E) only makes sense when we mention it with respect to a given vertex set. For e.g. if V = {1,2,3,4,5} then we can find out the Neighbourhood graph of G(V,E) for vertex set {1}.  So, the neighbourhood graphs contains the vertices 1 and all the edges incident on them and the vertices connected to these edges. Below is a graph and its neighbourhood graphs as described above.
  • 26. SPANNING TREE Spanning Tree  A spanning tree of a connected graph G(V,E) is a sub graph that is also a tree and connects all vertices in V. For a disconnected graph the spanning tree would be the spanning tree of each component respectively.  There is an interesting set of problems related to finding the minimum spanning tree (which we will be discussing in upcoming posts). There are many algorithms available to solve this problem, for e.g.: Kruskal’s, Prim’s etc. Note that the concept of minimum spanning tree mostly makes sense in case of weighted graphs. If the graph is not weighted, we consider all the weights to be one and any spanning tree becomes the minimum spanning tree.
  • 28. GRAPH OPERATIONS Graph Operations – Conversions of Graphs  In this section we discuss about converting one graph into another graph. Which means all the graphs can be converted into any of the below forms. Conversion from Directed Graph to Undirected graph  This is the simplest conversions possible. A directed graph has directions represented by arrows, in this conversion we just remove all the arrows and do not store the direction information. Below is an example of the conversion. Please note that the graph remains unchanged in terms of its structure. However, we can choose to remove edges if there are multi edges. But it is strictly not required.
  • 29. GRAPH OPERATIONS Conversion from Undirected Graph to Directed graph This conversion gives a directed graph given an undirected graph G(V,E). It is the exact reverse of the above. The trick to achieve this is to add one edge for each existing edge in the edge family E. Once the extra edges are added, we just assign opposite direction to each pair of edges between connecting vertices.