Skip to main content
Open navigation menu
Close suggestions
Search
Search
en
Change Language, English
Upload
Sign in
Sign in
0 ratings
0% found this document useful (0 votes)
28 views
13 pages
Parallel Graph Search Algorithms
Uploaded by
Geeta Meena
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Parallel Graph Search Algorithms For Later
Share
0%
0% found this document useful, Mark this document as useful
0%
0% found this document not useful, Mark this document as not useful
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
28 views
13 pages
Parallel Graph Search Algorithms
Uploaded by
Geeta Meena
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Go to previous items
Download
Save
Save Parallel Graph Search Algorithms For Later
Share
0%
0% found this document useful, Mark this document as useful
0%
0% found this document not useful, Mark this document as not useful
Print
Embed
Report
Go to next items
Download
324 72 Parallel Processing and Parallel Algorithms 3. Those processor P, for which x = Ey. juqo, Update index=(k ~ 1)(n/N)+j In general, the parallel algorithm can be represented as follows to address the speedup over the sequential version. Procedure Parallel-Divide-and-Conquer(Input, Output) Divide(Input, Input, Input, ...mput,) for i= 1 tom do in parallel, Parallel-Divide-and-Conquer(Input,, Output, Input,, Output, Inpat,, Output,) endfor Combine(Output,, Output, ...Output,, Output) End Parallel-Divide-and-Conquer Depth-First Search Sequential graph algorithms often employ some form of graph traversal, which is equivalent to tracing the edges of a spanning tree of the graph, Perhaps, from the sequential complexity point of view, the most successful and commonly used form of graph traversal is the Depth-First Search (DFS). The importance of the depth-first search is that many efficient sequential algorithms on graphs use DFS as the basic procedure. The graph G is represented by its adjacency list and for each vertex v there is a list of all vertices adjacent to v. Depth-first search is the process of searching a graph in such a way that the search moves forward until it reaches a vertex whose neighbors have all been examined. At this point it backtracks a minimum distance and continues in a new direction. In other words, in a depth-first search, if v is the vertex being searched from (starting vertex), (v.w) is the edge being examined and w is unvisited, w will be the next vertex searched from (the new starting point). The DFS is called recursively. However, if vis the starting vertex and (v,w) is the edge being examined and w is already visited, v remains the vertex being searched from, and another ver- tex adjacent to v which has not been visited, is chosen as the vertex to be ex- amined. This indicates that in the DFS strategy the vertices are examined in or- der of decreasing depth in the tree. Although in a depth-first search it is not required the children of a vertex be visited in any particular order, we follow the convention that the children of a vertex are visited from left to right. The depth-first search algorithm assigns a number to each vertex v which specifies the order in which the vertex is visited during the graph traversal. This number is called the depth-first index of the vertex. Formally, the DFS is described as follows.Chapter 7. Parallel Search Algorithms 325 Depth-First-Search (DFS) Input: A directed connected graph G and a specified starting vertex v. Output: The depth-first indices of the vertices of G starting with v = 1. ie 7.2 shows a depth-first search of a tree performed in this manner such that the vertices are numbered in the order they are visited, with the starting vertex being A. The sequential DFS can be represented in terms of the following recursive procedure. The algorithm is called a depth-first search because it initi- ates as many recursive calls as possible before it ever returns from a call. The recursion stops only when exploration of the graph is blocked and can go no further. At this point the recursion stops so alternate possibilities at higher levels, ccan be explored. ABCDEFGH BAA A AE AE c FGF F D HOH E G @ ® © @ Figure 7.2. A graph and its comesponding depth-first tree. (a) Graph G. (b) Adjacency of graph G. (c) Depth-fist tre obtained from depth-first traversal. (4) Depth-first index tree obtained from depth-first traversal. Procedure Depth-First(A) begin mark every vertex “unvisited” veestart vertex ‘1 vis the vertex being searched from */ Call Depth-First-Search(v)326 Parallel Processing and Parallel Algorithms Procedure Depth-First-Search(v) begin mark v “visited” for each vertex w adjacent to v do if w is marked “unvisited” then Call Depth-First-Search(w) endfor End Depth-First-Search end End Depth-First We analyze the time complexity of DFS in a graph with n vertices and m edges, with respect to two basic operations, visiting a vertex and examining a vertex, to determine if it has been visited. The worst-case complexity for both operations occurs when the graph is connected. If the graph is connected, we can verify that every vertex is visited exactly once with a total of n vertex visits. Each edge in the graph addresses exactly two vertex examinations, thus yielding the number of vertices to be examined as 2m. Therefore, the total number of op- erations by DFS in the worst-case is n + 2m, resulting in a complexity of O(n + m). In general, parallel processing is a major approach to enhance the efficiency of search algorithms. We focus entirely on bounded parallelism, which corre- sponds to the more realistic assumption that a given computing system has only a fixed number of processors functioning in parallel. The computational eff ciency of the algorithms depends on the data structure and the search strategies. Alton and Eckstein [Alton 77} proposed a parallel algorithm for a depth-first search. Reghbati and Corneil [Reghbati 78] conjectured that a depth-first search ‘was inherently sequential. It is generally assumed that the use of DFS is incom- patible with efforts to process the search space in parallel, meaning it seems that the problem of finding a depth-first search tree is hardly parallelizable. Hence, ‘many fast parallel computations in graph theory avoid depth-first search com- putations. For the moment, consider the instructions of the depth-first search procedure given earlier. The crucial issue in an effort to parallelize the algorithm. are the lines for each vertex w adjacent to v do if w is marked “unvisited" then .. ‘which mean to find the next unvisited vertex on the adjacency list of v. Alterna- tively, instead of an adjacency list representation of the adjacent vertices to each vertex, we consider an “adjacency list matrix” such that every row represents all the adjacent vertices to each vertex. With this assumption, different processors can simultaneously examine successive vertices to identify whether they are visited or unvisited. We also define an “unvisited adjacency list” U(v) whichChapter 7. Parallel Search Algorithms 327 lists all vertices that are adjacent to v and are still labeled “unvisited.” As soon as a vertex w is “visited,” it will be removed from the lists U(v) for all v adja- ‘cent to w. Of course, the problem of finding an “unvisited” vertex adjacent to v now becomes trivial, by taking the first element of U(v) if U(v) is not empty. Such an approach of deleting elements from “unvisited” adjacent lists is com- patible with DFS, since the flow of control of DFS-based algorithms, the order in which the various recursive calls are performed, depends only on the vertices which remain “unvisited.” In this approach the need for communication between processors is eliminated. Two lists, ARC_LIST and FROND_LIST, as the output of the DFS are de- fined such that the final FROND_LIST(v) isa list of vertices w such that there is 1 frond from v to w, and the final ARC_LIST is a list of vertices w such that there is an arc from v to w. Figure 7.3 illustrates the representation of a graph in the adjacency list matrix, adjacency list, associated end-marker vector, and un- visited adjacency matrix forms. The Adjacency List visit i 1): 2434 45 ml UC): null 32 3 4> null ‘L(2): 1 null U(2): null > 1 null 3): 1 null U@3): null 1 — null ‘1L(4): 1 null ‘U(4): null 31 > null ‘The Adjacency List Matrix The er 132331 133 231-300 271 331300 31 4-100 451 Figure 7.3. Representation of graph regarding different forms. A parallel depth-first search algorithm is now defined follows.328 Parallel Processing and Parallel Algorithms Input: Adjacency list matrix, ALM(L:n,I:n—1), the associated end-marker vector EM(|:n), the initial unvisited adjacency list, U(), 1 Si
You might also like
Depth-First Search in Graphs Explained
PDF
No ratings yet
Depth-First Search in Graphs Explained
13 pages
Parallel BFS and DFS with OpenMP
PDF
No ratings yet
Parallel BFS and DFS with OpenMP
9 pages
Depth-First Search in Graphs Explained
PDF
No ratings yet
Depth-First Search in Graphs Explained
4 pages
Depth First Search Explained
PDF
No ratings yet
Depth First Search Explained
19 pages
Understanding Depth-First Search (DFS)
PDF
No ratings yet
Understanding Depth-First Search (DFS)
9 pages
Depth First Search Algorithm Overview
PDF
No ratings yet
Depth First Search Algorithm Overview
11 pages
AI Search Algorithms: BFS & DFS Explained
PDF
No ratings yet
AI Search Algorithms: BFS & DFS Explained
28 pages
Tarjan1972 Sccs
PDF
No ratings yet
Tarjan1972 Sccs
15 pages
Document 3
PDF
No ratings yet
Document 3
4 pages
AI Lab Manual: Search Algorithms
PDF
No ratings yet
AI Lab Manual: Search Algorithms
37 pages
Depth First Search Algorithm Overview
PDF
No ratings yet
Depth First Search Algorithm Overview
10 pages
Depth-First Search Algorithm Overview
PDF
No ratings yet
Depth-First Search Algorithm Overview
18 pages
Depth First Search Algorithm Overview
PDF
No ratings yet
Depth First Search Algorithm Overview
11 pages
Cycle Detection in Graphs: DFS vs BFS
PDF
No ratings yet
Cycle Detection in Graphs: DFS vs BFS
16 pages
Depth-First Search Algorithm Overview
PDF
No ratings yet
Depth-First Search Algorithm Overview
8 pages
Vi Ece Cs3491-Ai&Ml Lab Manual
PDF
No ratings yet
Vi Ece Cs3491-Ai&Ml Lab Manual
45 pages
Advantages of Depth-First Search
PDF
No ratings yet
Advantages of Depth-First Search
2 pages
DFS and BFS in Graph Traversal
PDF
No ratings yet
DFS and BFS in Graph Traversal
22 pages
Reducing DFS Complexity with RHS Algorithm
PDF
No ratings yet
Reducing DFS Complexity with RHS Algorithm
8 pages
Depth First Search in Python Code
PDF
No ratings yet
Depth First Search in Python Code
6 pages
Depth-First Search Algorithm Explained
PDF
No ratings yet
Depth-First Search Algorithm Explained
13 pages
Back Tracking
PDF
No ratings yet
Back Tracking
29 pages
DFS and BFS Algorithms Explained
PDF
No ratings yet
DFS and BFS Algorithms Explained
4 pages
Depth First Search (DFS) Explained
PDF
No ratings yet
Depth First Search (DFS) Explained
8 pages
Depth-First Search Applications Guide
PDF
No ratings yet
Depth-First Search Applications Guide
43 pages
Depth First Search Algorithm Explained
PDF
No ratings yet
Depth First Search Algorithm Explained
6 pages
DFS: Pros and Cons Explained
PDF
No ratings yet
DFS: Pros and Cons Explained
8 pages
Parallel DFS for 8-Puzzle Optimization
PDF
No ratings yet
Parallel DFS for 8-Puzzle Optimization
10 pages
Depth First Search Algorithm Overview
PDF
No ratings yet
Depth First Search Algorithm Overview
4 pages
Manual GRP A - Assignment 1b - Dfs
PDF
No ratings yet
Manual GRP A - Assignment 1b - Dfs
8 pages
Graph Search Algorithms: BFS & DFS
PDF
No ratings yet
Graph Search Algorithms: BFS & DFS
43 pages
11b. Graph (Dfs & BFS)
PDF
No ratings yet
11b. Graph (Dfs & BFS)
28 pages
Daa Mod 3
PDF
No ratings yet
Daa Mod 3
34 pages
Advanced Sorting and Searching Algorithms
PDF
No ratings yet
Advanced Sorting and Searching Algorithms
21 pages
Parallel BFS Implementation with OpenMP
PDF
No ratings yet
Parallel BFS Implementation with OpenMP
40 pages
Search Algorithms - Ai
PDF
No ratings yet
Search Algorithms - Ai
96 pages
Graph Algorithms: BFS & DFS Explained
PDF
No ratings yet
Graph Algorithms: BFS & DFS Explained
71 pages
Dfs 3
PDF
No ratings yet
Dfs 3
3 pages
Depth-First Search Overview and Analysis
PDF
No ratings yet
Depth-First Search Overview and Analysis
13 pages
Parallel Depth-First and Best-First Search
PDF
No ratings yet
Parallel Depth-First and Best-First Search
35 pages
Depth-First Search Algorithm Overview
PDF
No ratings yet
Depth-First Search Algorithm Overview
6 pages
Depth-First Search (DFS) Explained
PDF
No ratings yet
Depth-First Search (DFS) Explained
7 pages
BFS vs DFS: Pros and Cons Explained
PDF
No ratings yet
BFS vs DFS: Pros and Cons Explained
3 pages
Depth-First Search: Overview & Analysis
PDF
No ratings yet
Depth-First Search: Overview & Analysis
2 pages
Parallel DFS Tree Recognition
PDF
No ratings yet
Parallel DFS Tree Recognition
11 pages
BFS and DFS Algorithms Overview
PDF
No ratings yet
BFS and DFS Algorithms Overview
14 pages
lec26-PA
PDF
No ratings yet
lec26-PA
26 pages
Depth First Search (DFS) Algorithm
PDF
No ratings yet
Depth First Search (DFS) Algorithm
6 pages
Dijkstra's and DFS Algorithms Explained
PDF
No ratings yet
Dijkstra's and DFS Algorithms Explained
11 pages
Graph Search Algorithms Overview
PDF
No ratings yet
Graph Search Algorithms Overview
42 pages
Graph Traversal Algorithms Explained
PDF
No ratings yet
Graph Traversal Algorithms Explained
32 pages
AI Exp4 31 1
PDF
No ratings yet
AI Exp4 31 1
4 pages
Graph Search Techniques: DFS Overview
PDF
No ratings yet
Graph Search Techniques: DFS Overview
26 pages
Graph Traversal Methods 4
PDF
No ratings yet
Graph Traversal Methods 4
8 pages
Understanding Breadth First Search Algorithm
PDF
No ratings yet
Understanding Breadth First Search Algorithm
14 pages
DFS Algorithm in C: Graph Traversal Guide
PDF
No ratings yet
DFS Algorithm in C: Graph Traversal Guide
3 pages
AI Lab Manual by Trinity CLG
PDF
No ratings yet
AI Lab Manual by Trinity CLG
40 pages
Flynn's Classification of Computer Architectures
PDF
No ratings yet
Flynn's Classification of Computer Architectures
9 pages
Broker and Pipes & Filters Patterns Assignment
PDF
No ratings yet
Broker and Pipes & Filters Patterns Assignment
2 pages
Understanding Amdahl's Law in Computing
PDF
No ratings yet
Understanding Amdahl's Law in Computing
25 pages
Microprocessor Sales Information
PDF
No ratings yet
Microprocessor Sales Information
105 pages