SlideShare une entreprise Scribd logo
1  sur  31
IMPROVEMENT OF SHORTEST-PATH ALGORITHMS
USING SUBGRAPHS' HEURISTICS
FAISAL KHAMAYSEH, NABIL ARMAN
1
Outline
1. Introduction.
2. Graph Representations.
3. Proposed Algorithm.
4. Experiments & Results
This template is free to use under Creative Commons Attribution license. If you use the graphic assets (photos,
icons and typographies) provided with this presentation you must keep the Credits slide.
2
Hello!
I am Mahdi Atawneh
You can find me at:
@mshanak
mahdi@ppu.edu
3
1.
Introduction
4
▷Let G=(V,E,w) be a directed graph, where
V is a set of vertices, E is a set of edges and
w is the weight function, where w(e)>0 for
each edge e∈E. Let each edge e has a non-
negative weight. Assume <s> and <t> are
given vertices where <s> and <t>∈V, <s> is
the source vertex and <t> is the destination.
The single pair source-destination shortest
path is to find the path with the minimum
cost sum of edges from source <s> to
destination <t>.
5
Introduction
Shortest-path problem is the most encountered problem in graph
algorithm and used in many applications such as maps, networks
routing, databases, and more other applications.
5
Introduction
Types of shortest path :
• single-source shortest path with the possibility of negative
weights.
• k-shortest paths.
• Single-pair using heuristics,
• All-pairs shortest paths, etc.
▷To solve it, we could use simple algorithms such as simple
minimum spanning tree or advanced algorithms such as Dijkstra's
algorithm.
5
Introduction
▷In this paper, the authors made a contribution in the field of
shortest path and proposed an algorithm that outperforms the
performance of many algorithms in this area.
5
Introduction
2.
Data structures
Graph Representations
13
Graph Representations
▷Graph matrix representation.
▷Linear Array Representation.
▷Reverse Matrix Representation.
▷Weight representations .
Graph Representations
1. Graph matrix representation
What are the benefits?
• Store all paths from each node to all other
reachable nodes.
• It could be used to check path existence
between source and destination in linear time.
• Show all roots and ends.
• Avoid duplicate representation of common
sub-paths by using the duplicate node
coordinates.
Graph Representations
1. Graph matrix representation
Another representation of the graph matrix that
present the matrix in vector of the values of the
matrix.
Graph Representations
2. Linear Array Representation
Graph Representations
3. Reverse Matrix Representation
Graph Representations
3. Reverse Matrix Representation
 Constructed same as graph matrix, but the
paths are traced reversely .
 The root nodes are the nodes that cannot reach
any other nodes.
 We start tracing from the destination vertices, in
each traced vertices we find all nodes that lead
to this current node (in-arrow)these nodes
which has arrow directed to current node is
candidate nodes.
 It do not store duplicate node (same as original
graph matrix).
Graph Representations
3. Reverse Matrix Representation
What are the benefits of Reverse Matrix
Representation?
• It stores all paths that can reach the node
from the source nodes.
• We use this matrix to mark all candidate
nodes in main matrix (will be used in the
proposed algorithm).
Graph Representations
3. Reverse Matrix Representation
Weight representations
Weight representations
 the simplest way to represent the
graph weights is by modifying the
original matrix so each cell contains
node name, accumulative weight to
this node, and the previously utilized
predecessor vertex.
(Vertex, Dist, Pred node)
Weight representations
the benefits of this representation :
 we will use this matrix in finding the shortest path down to
the current vertex by adding either the current weight or by
adding the weight of the new Pred node .
 in this matrix we calculate the weight only for the candidate
nodes, this will save some time by ignoring the rest of the
graph.
4.
PROPOSED ALGORITHM
13
PROPOSED ALGORITHM
▷The proposed algorithm will take advantage of the
previous discussed graph representations to minimize
the graph and exclude that do not lead to the
destination vertex.
PROPOSED ALGORITHM
The steps of the algorithm:
1. Construct a main matrix that represent the graph.
2. Construct the Reverse Matrix to represent the graph rooted with
destinations.
3. Mark all candidate nodes in the main matrix .
4. starting from the given source s, the algorithm adds all neighbor
edges by visiting all nodes listed in the next column (breadth fashion)
of the current node (vertex).
PROPOSED ALGORITHM
5.
Results
Performance improvements and measurements
13
Performance improvements and measurements
Experiment :
Random generated graphs with
different sizes range from 100 to 500
nodes.
Performance improvements and measurements
Performance Of Proposed Algorithm
Vs.
Improved Dijkstra’s Algorithm
On Sparse Graph
Performance improvements and measurements
Performance Of Proposed Algorithm
Vs.
Improved Dijkstra’s Algorithm
On Dense Graph
Performance improvements and measurements
• Traditional algorithms requires O ((|V|+|E|)log |V|)
• But using this new proposed algorithm it will not exceed O((|V|+|E|) log |V|).
“Thanks
S
C
a
b
z
i
k
j
l
m
n
t
d
h
e
f
g
w
v
q
3
2
6
5
7
7
2
12
3
7
6
8
12 4
11
5
12
9
6
8
12
11
4
6
2
8
11
3
3

Contenu connexe

Tendances

Building 3D Morphable Models from 2D Images
Building 3D Morphable Models from 2D ImagesBuilding 3D Morphable Models from 2D Images
Building 3D Morphable Models from 2D Images
Shanglin Yang
 
December 19
December 19December 19
December 19
khyps13
 
Pattern Recognition and Machine Learning : Graphical Models
Pattern Recognition and Machine Learning : Graphical ModelsPattern Recognition and Machine Learning : Graphical Models
Pattern Recognition and Machine Learning : Graphical Models
butest
 
Social network analysis study Chap 4.3
Social network analysis study Chap 4.3Social network analysis study Chap 4.3
Social network analysis study Chap 4.3
Jaram Park
 

Tendances (20)

Bt9301, computer graphics
Bt9301, computer graphicsBt9301, computer graphics
Bt9301, computer graphics
 
Analysis of Impact of Graph Theory in Computer Application
Analysis of Impact of Graph Theory in Computer ApplicationAnalysis of Impact of Graph Theory in Computer Application
Analysis of Impact of Graph Theory in Computer Application
 
Topology
TopologyTopology
Topology
 
Few More Results on Sum Labeling of Split Graphs
Few More Results on Sum Labeling of Split GraphsFew More Results on Sum Labeling of Split Graphs
Few More Results on Sum Labeling of Split Graphs
 
KL Algorithm
 KL Algorithm KL Algorithm
KL Algorithm
 
Lecture two
Lecture twoLecture two
Lecture two
 
Building 3D Morphable Models from 2D Images
Building 3D Morphable Models from 2D ImagesBuilding 3D Morphable Models from 2D Images
Building 3D Morphable Models from 2D Images
 
Computer Science Assignment Help
Computer Science Assignment Help Computer Science Assignment Help
Computer Science Assignment Help
 
Shortest path algorithm
Shortest  path algorithmShortest  path algorithm
Shortest path algorithm
 
Shortest path problem
Shortest path problemShortest path problem
Shortest path problem
 
Introduction to Graph and Graph Coloring
Introduction to Graph and Graph Coloring Introduction to Graph and Graph Coloring
Introduction to Graph and Graph Coloring
 
Application of interpolation and finite difference
Application of interpolation and finite differenceApplication of interpolation and finite difference
Application of interpolation and finite difference
 
Data structure
Data structureData structure
Data structure
 
Graphs data structures
Graphs data structuresGraphs data structures
Graphs data structures
 
December 19
December 19December 19
December 19
 
Curve Fitting - Linear Algebra
Curve Fitting - Linear AlgebraCurve Fitting - Linear Algebra
Curve Fitting - Linear Algebra
 
On Edge Control Set of a Graph in Transportation Problems
On Edge Control Set of a Graph in Transportation ProblemsOn Edge Control Set of a Graph in Transportation Problems
On Edge Control Set of a Graph in Transportation Problems
 
Pattern Recognition and Machine Learning : Graphical Models
Pattern Recognition and Machine Learning : Graphical ModelsPattern Recognition and Machine Learning : Graphical Models
Pattern Recognition and Machine Learning : Graphical Models
 
Map Coloring and Some of Its Applications
Map Coloring and Some of Its Applications Map Coloring and Some of Its Applications
Map Coloring and Some of Its Applications
 
Social network analysis study Chap 4.3
Social network analysis study Chap 4.3Social network analysis study Chap 4.3
Social network analysis study Chap 4.3
 

Similaire à Improvement of shortest path algorithms using subgraphs heuristics

Similaire à Improvement of shortest path algorithms using subgraphs heuristics (20)

logic.pptx
logic.pptxlogic.pptx
logic.pptx
 
Graphs
GraphsGraphs
Graphs
 
DATA STRUCTURES.pptx
DATA STRUCTURES.pptxDATA STRUCTURES.pptx
DATA STRUCTURES.pptx
 
Graph Algorithms
Graph AlgorithmsGraph Algorithms
Graph Algorithms
 
dsa.pptx
dsa.pptxdsa.pptx
dsa.pptx
 
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
 
Bigdata analytics
Bigdata analyticsBigdata analytics
Bigdata analytics
 
Unit V - ppt.pptx
Unit V - ppt.pptxUnit V - ppt.pptx
Unit V - ppt.pptx
 
DAA_Presentation - Copy.pptx
DAA_Presentation - Copy.pptxDAA_Presentation - Copy.pptx
DAA_Presentation - Copy.pptx
 
Graph applications chapter
Graph applications chapterGraph applications chapter
Graph applications chapter
 
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam LermaGraph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
 
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
 
UNIT III.pptx
UNIT III.pptxUNIT III.pptx
UNIT III.pptx
 
Graph_data_structure_information_engineering.pptx
Graph_data_structure_information_engineering.pptxGraph_data_structure_information_engineering.pptx
Graph_data_structure_information_engineering.pptx
 
Graphs in Data Structure
 Graphs in Data Structure Graphs in Data Structure
Graphs in Data Structure
 
Unit-6 Graph.ppsx ppt
Unit-6 Graph.ppsx                                       pptUnit-6 Graph.ppsx                                       ppt
Unit-6 Graph.ppsx ppt
 
VANU no sql ppt.pptx
VANU no sql ppt.pptxVANU no sql ppt.pptx
VANU no sql ppt.pptx
 
Vanmathy no sql
Vanmathy no sql Vanmathy no sql
Vanmathy no sql
 
141222 graphulo ingraphblas
141222 graphulo ingraphblas141222 graphulo ingraphblas
141222 graphulo ingraphblas
 

Plus de Mahdi Atawneh

Bat algorithm explained. slides ppt pptx
Bat algorithm explained. slides ppt pptxBat algorithm explained. slides ppt pptx
Bat algorithm explained. slides ppt pptx
Mahdi Atawneh
 

Plus de Mahdi Atawneh (6)

Improving ip geolocation using query logs
Improving ip geolocation using query logsImproving ip geolocation using query logs
Improving ip geolocation using query logs
 
Optimized index structures for querying rdf from the web
Optimized index structures for querying rdf from the webOptimized index structures for querying rdf from the web
Optimized index structures for querying rdf from the web
 
SILT: A Memory-Efficient, High-Performance Key-Value Store
SILT: A Memory-Efficient, High-Performance Key-Value StoreSILT: A Memory-Efficient, High-Performance Key-Value Store
SILT: A Memory-Efficient, High-Performance Key-Value Store
 
OWL reasoning with WebPIE: calculating the closer of 100 billion triples
OWL reasoning with WebPIE: calculating the closer of 100 billion triplesOWL reasoning with WebPIE: calculating the closer of 100 billion triples
OWL reasoning with WebPIE: calculating the closer of 100 billion triples
 
Bat algorithm explained. slides ppt pptx
Bat algorithm explained. slides ppt pptxBat algorithm explained. slides ppt pptx
Bat algorithm explained. slides ppt pptx
 
01 nosql and multi model database
01   nosql and multi model database01   nosql and multi model database
01 nosql and multi model database
 

Dernier

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Dernier (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 

Improvement of shortest path algorithms using subgraphs heuristics

  • 1. IMPROVEMENT OF SHORTEST-PATH ALGORITHMS USING SUBGRAPHS' HEURISTICS FAISAL KHAMAYSEH, NABIL ARMAN 1
  • 2. Outline 1. Introduction. 2. Graph Representations. 3. Proposed Algorithm. 4. Experiments & Results This template is free to use under Creative Commons Attribution license. If you use the graphic assets (photos, icons and typographies) provided with this presentation you must keep the Credits slide. 2
  • 3. Hello! I am Mahdi Atawneh You can find me at: @mshanak mahdi@ppu.edu 3
  • 5. ▷Let G=(V,E,w) be a directed graph, where V is a set of vertices, E is a set of edges and w is the weight function, where w(e)>0 for each edge e∈E. Let each edge e has a non- negative weight. Assume <s> and <t> are given vertices where <s> and <t>∈V, <s> is the source vertex and <t> is the destination. The single pair source-destination shortest path is to find the path with the minimum cost sum of edges from source <s> to destination <t>. 5 Introduction
  • 6. Shortest-path problem is the most encountered problem in graph algorithm and used in many applications such as maps, networks routing, databases, and more other applications. 5 Introduction
  • 7. Types of shortest path : • single-source shortest path with the possibility of negative weights. • k-shortest paths. • Single-pair using heuristics, • All-pairs shortest paths, etc. ▷To solve it, we could use simple algorithms such as simple minimum spanning tree or advanced algorithms such as Dijkstra's algorithm. 5 Introduction
  • 8. ▷In this paper, the authors made a contribution in the field of shortest path and proposed an algorithm that outperforms the performance of many algorithms in this area. 5 Introduction
  • 10. Graph Representations ▷Graph matrix representation. ▷Linear Array Representation. ▷Reverse Matrix Representation. ▷Weight representations .
  • 11. Graph Representations 1. Graph matrix representation
  • 12. What are the benefits? • Store all paths from each node to all other reachable nodes. • It could be used to check path existence between source and destination in linear time. • Show all roots and ends. • Avoid duplicate representation of common sub-paths by using the duplicate node coordinates. Graph Representations 1. Graph matrix representation
  • 13. Another representation of the graph matrix that present the matrix in vector of the values of the matrix. Graph Representations 2. Linear Array Representation
  • 14. Graph Representations 3. Reverse Matrix Representation
  • 15. Graph Representations 3. Reverse Matrix Representation
  • 16.  Constructed same as graph matrix, but the paths are traced reversely .  The root nodes are the nodes that cannot reach any other nodes.  We start tracing from the destination vertices, in each traced vertices we find all nodes that lead to this current node (in-arrow)these nodes which has arrow directed to current node is candidate nodes.  It do not store duplicate node (same as original graph matrix). Graph Representations 3. Reverse Matrix Representation
  • 17. What are the benefits of Reverse Matrix Representation? • It stores all paths that can reach the node from the source nodes. • We use this matrix to mark all candidate nodes in main matrix (will be used in the proposed algorithm). Graph Representations 3. Reverse Matrix Representation
  • 19. Weight representations  the simplest way to represent the graph weights is by modifying the original matrix so each cell contains node name, accumulative weight to this node, and the previously utilized predecessor vertex. (Vertex, Dist, Pred node)
  • 20. Weight representations the benefits of this representation :  we will use this matrix in finding the shortest path down to the current vertex by adding either the current weight or by adding the weight of the new Pred node .  in this matrix we calculate the weight only for the candidate nodes, this will save some time by ignoring the rest of the graph.
  • 22. PROPOSED ALGORITHM ▷The proposed algorithm will take advantage of the previous discussed graph representations to minimize the graph and exclude that do not lead to the destination vertex.
  • 23. PROPOSED ALGORITHM The steps of the algorithm: 1. Construct a main matrix that represent the graph. 2. Construct the Reverse Matrix to represent the graph rooted with destinations. 3. Mark all candidate nodes in the main matrix . 4. starting from the given source s, the algorithm adds all neighbor edges by visiting all nodes listed in the next column (breadth fashion) of the current node (vertex).
  • 26. Performance improvements and measurements Experiment : Random generated graphs with different sizes range from 100 to 500 nodes.
  • 27. Performance improvements and measurements Performance Of Proposed Algorithm Vs. Improved Dijkstra’s Algorithm On Sparse Graph
  • 28. Performance improvements and measurements Performance Of Proposed Algorithm Vs. Improved Dijkstra’s Algorithm On Dense Graph
  • 29. Performance improvements and measurements • Traditional algorithms requires O ((|V|+|E|)log |V|) • But using this new proposed algorithm it will not exceed O((|V|+|E|) log |V|).