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
 
141205 graphulo ingraphblas
141205 graphulo ingraphblas141205 graphulo ingraphblas
141205 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

會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 

Dernier (20)

ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).
 
Word Stress rules esl .pptx
Word Stress rules esl               .pptxWord Stress rules esl               .pptx
Word Stress rules esl .pptx
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...
Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...
Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 

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|).