Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
78 views
Parallel Graph Search Algorithms
Uploaded by
Geeta Meena
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Parallel Graph Search Algorithms For Later
Download
Save
Save Parallel Graph Search Algorithms For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
78 views
Parallel Graph Search Algorithms
Uploaded by
Geeta Meena
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Parallel Graph Search Algorithms For Later
Carousel Previous
Carousel Next
Save
Save Parallel Graph Search Algorithms For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 13
Search
Fullscreen
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
Graph Apps
PDF
No ratings yet
Graph Apps
33 pages
Parallel DFS
PDF
No ratings yet
Parallel DFS
7 pages
COMP20007 Design of Algorithms: Graph Traversal
PDF
No ratings yet
COMP20007 Design of Algorithms: Graph Traversal
22 pages
Algorithm Design & Analysis Presentation - E-60th
PDF
No ratings yet
Algorithm Design & Analysis Presentation - E-60th
18 pages
AI Lab Assignment 1
PDF
No ratings yet
AI Lab Assignment 1
4 pages
HPC prac1T
PDF
No ratings yet
HPC prac1T
9 pages
Parallel DFS
PDF
No ratings yet
Parallel DFS
10 pages
Outline and Reading
PDF
No ratings yet
Outline and Reading
3 pages
Depth First Search (DFS) Algorithm
PDF
No ratings yet
Depth First Search (DFS) Algorithm
6 pages
Presentation On Depth First Search Algorithm Morshed Arifin
PDF
No ratings yet
Presentation On Depth First Search Algorithm Morshed Arifin
11 pages
Nptel Week3 Module4 Dfs
PDF
No ratings yet
Nptel Week3 Module4 Dfs
43 pages
DFS PDF
PDF
No ratings yet
DFS PDF
3 pages
Graph Search Methods
PDF
No ratings yet
Graph Search Methods
51 pages
Presentation On Depth First Search Algorithm (Morshed Arifin)
PDF
No ratings yet
Presentation On Depth First Search Algorithm (Morshed Arifin)
11 pages
Graph Traversal Algorithm: Recapitulation
PDF
No ratings yet
Graph Traversal Algorithm: Recapitulation
14 pages
DFS BFS
PDF
No ratings yet
DFS BFS
23 pages
Depth-First Search 1
PDF
No ratings yet
Depth-First Search 1
15 pages
DSE_2223_L14_L15
PDF
No ratings yet
DSE_2223_L14_L15
16 pages
17-BFS, DFS-22-02-2024
PDF
No ratings yet
17-BFS, DFS-22-02-2024
30 pages
8 Graph
PDF
No ratings yet
8 Graph
49 pages
Lab - P - LL - Artificial Intelligence
PDF
No ratings yet
Lab - P - LL - Artificial Intelligence
38 pages
DS UNIT IV - Part I - Graphs
PDF
No ratings yet
DS UNIT IV - Part I - Graphs
99 pages
Practical Assignment LP-II-1
PDF
No ratings yet
Practical Assignment LP-II-1
11 pages
54AIexp2
PDF
No ratings yet
54AIexp2
8 pages
Module 2 Lecture 3
PDF
No ratings yet
Module 2 Lecture 3
28 pages
Depth-First Search 1
PDF
No ratings yet
Depth-First Search 1
15 pages
Title: Implement Depth-First Search: Department of Computer Science and Engineering
PDF
No ratings yet
Title: Implement Depth-First Search: Department of Computer Science and Engineering
5 pages
DFS
PDF
No ratings yet
DFS
13 pages
WINSEM2023-24 BSTS302P SS CH2023240500208 Reference Material I 19-02-2024 BFS DFS
PDF
No ratings yet
WINSEM2023-24 BSTS302P SS CH2023240500208 Reference Material I 19-02-2024 BFS DFS
30 pages
Graphs
PDF
No ratings yet
Graphs
29 pages
Depth-First Search Algorithm ?
PDF
No ratings yet
Depth-First Search Algorithm ?
3 pages
MIT6 006F11 Lec14
PDF
No ratings yet
MIT6 006F11 Lec14
7 pages
DFS Final
PDF
No ratings yet
DFS Final
16 pages
DAA Decrease and Conquer ADA
PDF
No ratings yet
DAA Decrease and Conquer ADA
16 pages
Depth first search ( dfs )
PDF
No ratings yet
Depth first search ( dfs )
7 pages
Csbp319 Sp22 LCN 9.Pptx (Part One)
PDF
No ratings yet
Csbp319 Sp22 LCN 9.Pptx (Part One)
75 pages
Daa Mod 3
PDF
No ratings yet
Daa Mod 3
34 pages
Introduction To DFS
PDF
No ratings yet
Introduction To DFS
9 pages
Unit - 5
PDF
No ratings yet
Unit - 5
34 pages
AIML PRAC 1
PDF
No ratings yet
AIML PRAC 1
8 pages
Advance Analysis of Algorithm: Depth First Search & Breadth First Search
PDF
No ratings yet
Advance Analysis of Algorithm: Depth First Search & Breadth First Search
46 pages
Continuous Assesment 1 (Ca1) AY-2022-2023 (ODD SEM) (Makaut Examination) Assessment Type-Presentation
PDF
No ratings yet
Continuous Assesment 1 (Ca1) AY-2022-2023 (ODD SEM) (Makaut Examination) Assessment Type-Presentation
11 pages
Research
PDF
No ratings yet
Research
11 pages
Lecture 2 - Graph Traversal
PDF
No ratings yet
Lecture 2 - Graph Traversal
68 pages
Digital Assignment Theory 18bca0045
PDF
No ratings yet
Digital Assignment Theory 18bca0045
16 pages
17-BFS, DFS-05-02-2025
PDF
No ratings yet
17-BFS, DFS-05-02-2025
32 pages
02 CME4422 SearchAndSortAlgorithms
PDF
No ratings yet
02 CME4422 SearchAndSortAlgorithms
65 pages
Depth First Search: Name-Gaurav Thakur ROLL NO. - 114/20 Class Cse (6) Submitted To: - DR Parveen Kakkar
PDF
No ratings yet
Depth First Search: Name-Gaurav Thakur ROLL NO. - 114/20 Class Cse (6) Submitted To: - DR Parveen Kakkar
9 pages
Practical No1 3
PDF
No ratings yet
Practical No1 3
20 pages
Graph Traversal Depth First Search: B.Tech (CSE), Semester 5, Analysis and Design of Algorithms
PDF
No ratings yet
Graph Traversal Depth First Search: B.Tech (CSE), Semester 5, Analysis and Design of Algorithms
57 pages
Ai LP-II Lab Manual
PDF
No ratings yet
Ai LP-II Lab Manual
42 pages
Strong Components Are Directed Analogs of Connected Components We'll Define Them Later in This Lecture
PDF
No ratings yet
Strong Components Are Directed Analogs of Connected Components We'll Define Them Later in This Lecture
8 pages
AI Lab Manual
PDF
No ratings yet
AI Lab Manual
37 pages
Updated Final Ai Manual
PDF
No ratings yet
Updated Final Ai Manual
36 pages
Graphs
PDF
No ratings yet
Graphs
43 pages
Graph Algorithms
PDF
No ratings yet
Graph Algorithms
51 pages
BFS_AND_DFS_29
PDF
No ratings yet
BFS_AND_DFS_29
95 pages
Depth-First Search Algorithm: Maqsood Ahmad
PDF
No ratings yet
Depth-First Search Algorithm: Maqsood Ahmad
13 pages
Assignment 01
PDF
No ratings yet
Assignment 01
3 pages
Parallel DFS and BFS
PDF
No ratings yet
Parallel DFS and BFS
35 pages
Motilal Nehru National Institute of Technology Allahabad, Prayagraj Computer Science & Engineering Department Formal Methods Lab - CS18201 (CS-8 Sem) Assignment-3 1
PDF
No ratings yet
Motilal Nehru National Institute of Technology Allahabad, Prayagraj Computer Science & Engineering Department Formal Methods Lab - CS18201 (CS-8 Sem) Assignment-3 1
2 pages
Amdahl's Law
PDF
No ratings yet
Amdahl's Law
25 pages
Flynn's Classification
PDF
No ratings yet
Flynn's Classification
9 pages
Microprocessor
PDF
No ratings yet
Microprocessor
105 pages