Graph Algorithm
Graph Algorithm
Graph Algorithm
Sumber dari :
dna.cs.byu.edu/CS484/lectures/GraphAlgorithms.ppt
Definitions and Representation
• Use n processors,
– each processor Pi finds the shortest paths from vertex vi to all
other vertices by executing Dijkstra's sequential single-source
shortest paths algorithm.
• Requires no interprocess communication
– provided that the adjacency matrix is replicated at all processes.
• The parallel run time is: Θ(n2).
(a) Communication patterns used in the 2-D block mapping. When computing di(,kj),
information must be sent to the highlighted process from two other processes along
the same row and column. (b) The row and column of √p processes that contain the
kth row and column send them along process columns and rows.
Floyd's Algorithm: Parallel Formulation
Using 2-D Block Mapping
Examples of sparse graphs: (a) a linear graph, in which each vertex has two incident
edges; (b) a grid graph, in which each vertex has four incident vertices; and (c) a
random sparse graph.
Algorithms for Sparse Graphs
A street map (a) can be represented by a graph (b). In the graph shown
in (b), each street intersection is a vertex and each edge is a street
segment. The vertices of (b) are the intersections of (a) marked by
dots.
Single-Source Shortest Paths