a simple parallel algorithm for the single-source shortest path problem on planar digraphs authors:...

51
A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation: Journal of Parallel and Distributed Computing. Vol. 60, Issure 9, Sep. 2000, pp 1103-1124. Presented by Beifang Yi

Upload: laureen-baldwin

Post on 11-Jan-2016

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

A Simple Parallel Algorithm for the Single-Source

Shortest Path Problem on Planar Digraphs

Authors: Jesper L. Traff and Christos D. Zaroliagis

Citation: Journal of Parallel and Distributed

Computing. Vol. 60, Issure 9, Sep. 2000,

pp 1103-1124.

Presented by Beifang Yi

Page 2: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

About presentation

1. Introduction

2. The parallel algorithm

3. Other algorithms needed for this

so-called simple implementation

Page 3: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

What is the shortest path problem?

Crazy Question ?

Page 4: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

? What is the shortest path ?

Page 5: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

? Again, what is shortest path ?

Page 6: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

The shortest path? Yes! Our dog does a good job,

by intuition.

Page 7: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

But onto this intuition,

• We Human Beings spread a bunch of conceited, snobbish, mind-splitting, glittering glazes, such as:

• Direction (a path has direction),

• Weight or cost of a path… and …

Digraph.

Page 8: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

To strength our advantage over the animal,

• We further borrow an item “ planar” to meddle with the relative simple “Digraph”.

• Planar graph: it can be drawn on a plane so that the edges intersect only at the vertices.

Page 9: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

for example,

• In the first 5 complete graphs, the first 4 are

planar graphs, but K5 is not.

Page 10: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Legs in another stubborn, mulish phrase: ssspp

• i.e. single-source shortest path problem:

• To find shortest paths (tree) from a given source vertex to every other vertex in G.

Page 11: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

To our temporary relief,

• A guy called Dijkstra intruded in the arena, picking up the dog’s intuition:

• Find from the limited connected points the nearest point, and remove it into the sought set of points.

Page 12: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Dijkstra’s algorithm operation:

From :

http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/dij-op.html

Page 13: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Dijkstra’s algorithm:

• Initial graphAll nodes have infinite cost except the source

Page 14: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Dijkstra’s algorithm:

• Choose the closest node to s. As we initialised d[s] to 0, it's s.

• Add it to S • Relax all nodes

adjacent to s. • Update predecessor

(red arrows) for all nodes updated.

Page 15: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Dijkstra’s algorithm:

Choose the closest node, x

Relax all nodes adjacent to x

Update predecessors for u, v and y.

Page 16: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Dijkstra’s algorithm:

Now y is the closest, add it to S.

Relax v and adjust its predecessor

Page 17: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Dijkstra’s algorithm:

u is now closest, choose it and adjust its neighbour, v.

Page 18: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Dijkstra’s algorithm:

Finally, add v. The predecessor list now defines the shortest path from each node to s.

Page 19: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

The algorithms presented in this paper

Page 20: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

To our dismay:

The authors of this paper tried to manipulate Dijkstra’s initiative to crack

ssspp in the showy, brassy Parallel stadium, not a good performing stage for

ssspp.

Page 21: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Even worse:

They used one of the dullest, most strident languages, mathematical

jargon, to portray their deliberation.

Page 22: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

So,

I have to add some spicy seasoning in the process of interpreting their boring, mind-numbing essay:

-----by using exemplar pictures.

Page 23: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

pizza 1: given G, suppose the rectangles are circles.

Page 24: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

pizza 2’:

We divide G into 3 regions (R1-3) such that:

1. Source V1 is in R1,

2. Interior vertices (circled ones),

3. Boundary vertices (round rectangles), shared among at least 2 regions,

4. No edges between 2 interior vertices in different regions.

Page 25: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

pizza 2: G divided into 3 regions.

Page 26: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Pizza 3: Shortest paths in every region.

• For boundary Vs (as the source vertices), find in parallel the single shortest path trees.

• e.x. Vj keeps 7 shortest paths (because of 7 boundary vertices).

• (Sequential Dijkstra’s).

Page 27: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Pizza 4: Shortest paths in region 1.

• If source V1 is not a boundary vertex of

R1, solve the ssspp inside R1 with source vertex V1;

• Else: skip this step.

Page 28: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Pizza 5: Contraction of G into G’

• Vertices of G’: source V1 and all boundary vertices of G;

• Add an edge between any two boundary vertices in the same Ri with weight equal to the distance in Ri (calculated in step 2 or 3).

• Consider V1 as a boundary vertex.

Page 29: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Pizza 5-1: G’

Page 30: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Pizza 5: The shortest path tree in G’

• Find the shortest path tree in G’ rooted as source V1;

• Using parallel Dijkstra’s algorithm.

Page 31: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Pizza 5-2: Shortest path tree T’s in G’

Page 32: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Pizza 6: Shortest path tree in G

• for each interior vertex u in Ri,

• in parallel for every boundary Vb in Ri,

find the minimum distance of V1 to u

through Vb,

while recording the parent of u.

Page 33: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Pizza 6: The shortest path tree in G

Page 34: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Pizza 6’: Shortest path tree Ts in G

• Distances from V1 to every boundary vertex ub have been computed in previous step, so only the parent pb of ub needs to be updated if necessary.

• We have to consider some trivial cases: pb and ub are in the same Ri? pb= V1? pb is a boundary vertex?

Page 35: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Pizza 6”: Shortest path tree Ts in G

• In this step 6, one special case: if V1 is not a boundary vertex.

• The distance and parent information for the interior vertices in R1 needs to be updated with that obtained in step 4.

Page 36: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

? How to divide G ?

Because of time limit, I could only cook one piece of tasteless bland cookie for this part.

Page 37: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Piece 1: Separator

A separator of a graph (V, E): a subset C of V whose removal

partitions V into 2 disjoint A, B, such that any path from a vertex in A to a

vertex in B contains at least one vertex from C.

Page 38: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Piece 2: Planar separator theorem

G=(V,E): an n-vertex planar graph with nonnegative costs on its vertices summing up to one a separator S partitions V into 2 sets V1, V2, such that |S|=O(n1/2) and V1, V2 has total

cost at most 2/3 each.

Page 39: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Piece 3: r-Division

A region decomposition of G into O(n/r) regions such that each region has at most c1r vertices and at most

c2 r1/2 boundary vertices.

Page 40: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Piece 4: Decomposition of G

1. Recursively applying the planar separator theorem.

2. Doing BFS (breadth first search) from V1: all vertices at any

level/depth make up a separator!

Page 41: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Piece 5: The most insipid piece

The authors here present an “explicit” EREW PRAM

implementation of Frederickson’s

algorithm by using

Page 42: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Piece 5’: The most insipid piece

Gazit—Miller separator algorithm, which is a “clever”

parallelization of the sequential

approach by

Page 43: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Piece 6: The most insipid piece

Lipton and Tarjan. After painstakingly sketching those

schemes, the authors conclude:

Page 44: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Piece 7: Finally, finale

“Our algorithm runs in O((n2e + n1-e)log n) time and performs (n1+elog n)

work on an EREW PRAM, for any 0<e<1/2.”

And

Page 45: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Piece 7: Ending “Climax” ( A brag? Seems not)

ssspp “can be solved in O(n2e + n1-e) time and performs (n1+e) work on an EREW PRAM”, if Sam’s sequential

Dijkstra and John’s parallel Dijkstra are used!!!

Page 46: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Huh, …

Thanks for patience!and

Welcome for questions.

Page 47: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Moore’s parallel for ssspp

Page 48: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Moore’s parallel for ssspp

Page 49: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Moore’s parallel for ssspp

Page 50: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation:

Moore’s parallel for ssspp

Page 51: A Simple Parallel Algorithm for the Single-Source Shortest Path Problem on Planar Digraphs Authors: Jesper L. Traff and Christos D. Zaroliagis Citation: