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