Abstract
Depth first search (DFS) tree is a fundamental data structure for solving various graph problems. The classical algorithm [54] for building a DFS tree requires O ( m + n ) time for a given undirected graph G having n vertices and m edges. Recently, Baswana et al. [5] presented a simple algorithm for updating the DFS tree of an undirected graph after an edge/vertex update in Õ( n ) 1 time. However, their algorithm is strictly sequential. We present an algorithm achieving similar bounds that can be easily adopted to the parallel environment. In the parallel environment, a DFS tree can be computed from scratch in expected Õ(1) time [2] on an EREW PRAM, whereas the best deterministic algorithm takes Õ(√ n ) time [2, 27] on a CRCW PRAM. Our algorithm can be used to develop optimal time (to poly log n factors) deterministic parallel algorithms for maintaining fully dynamic DFS and fault tolerant DFS of an undirected graph. (1) Parallel Fully Dynamic DFS : Given an arbitrary online sequence of vertex or edge updates, we can maintain a DFS tree of an undirected graph in Õ(1) time per update using m processors on an EREW PRAM. (2) Parallel Fault tolerant DFS : An undirected graph can be preprocessed to build a data structure of size O ( m ), such that for any set of k updates (where k is constant) in the graph, a DFS tree of the updated graph can be computed in Õ(1) time using n processors on an EREW PRAM. For constant k , this is also work optimal (to poly log n factors). Moreover, our fully dynamic DFS algorithm provides, in a seamless manner, nearly optimal (to poly log n factors) algorithms for maintaining a DFS tree in the semi-streaming environment and a restricted distributed model. These are the first parallel, semi-streaming, and distributed algorithms for maintaining a DFS tree in the dynamic setting.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.