SlideShare a Scribd company logo
Some remarks on
distributed depth-first search
SUBMITTED BY: NIDHI BARANWAL
MCA 3RD SEM
University of Allahabad
INTRODUCTION
 Depth-first search (DFS) is a powerful technique that
has been used in designing many efficient graph
algorithms on the computer model.
 DFS is an algorithm for traversing or searching tree or
graph data structures. We start at the root and explores
as far as possible along each branch before backtracking
HOW IT WORKS?
 Input: A graph G and a vertex v of G
 Output: All vertices reachable from v labelled as discovered
A non-recursive implementation of DFS
1. procedure DFS-iterative(G,v):
2. let S be a stack
3. S.push(v)
4. while S is not empty
5. v = S.pop()
6. if v is not labeled as discovered:
7. label v as discovered
8. for all edges from v to w in G.adjacentEdges(v) do
9. S.push(w)
DISTRIBUTED DFS
 A distributed DFS algorithm constructs a DFS tree for a
communication network distributively so that when
execution terminates at all the nodes, a depth-first search
tree is available in a distributed fashion
 specifically, every node knows only its parent node and
the children nodes
 In the distributed setting, several algorithms have been
reported, among them the best known ones are those of
Cheung , Awerbuch,Cidon,Lakshmanan , Sharma
and Makki .
AN OVERVIEW
 The time complexity is the maximum time elapsed
from the beginning to the termination of the algorithm,
assuming that delivering a message over a link requires
at most one unit of time.
 The communication complexity is the total number of
messages sent during the execution of the algorithm
CONTD…
 The algorithm of Cheung simply probes all the edges of the graph, and
therefore requires 2|E| messages and time units.
 Awerbuch improves the time complexity of Cheung's algorithm from
O(|E|) to O(|V|) by using parallel message passing but at the cost of
increasing the number of exchanged messages.
 Lakshmanan and Cidon improve the message complexity of
Awerbuch's algorithm by a constant factor through the elimination of
some of the parallelism. The algorithm of Lakshmanan will run correctly
even if the FIFO rule is relaxed
 Sharma proposed algorithms which improved the communication
complexity of distributed DFS from O(|E|) to O(|V|) by removing more
unnecessary parallelism at the cost of increasing the message size.
AN INNOVATIVE IDEA
 The time and message complexity of both Lakshmanan
and the Cidon’s algorithm can be improved by using the
dynamic backtracking technique of Makki .
 The idea is to have each node, except the node source,
keep track of the lowest ancestor node, called split point,
such that no internal node lying on the tree-path
connecting the node and its split point has an ‘unvisited’
link.
 That means when the search backtracks at a node, the
backtracking will continue until it reaches the split point
of that node.
ALGORITHM
 We use Forward and Return messages to explore the
tree. Our key improvement is to reduce the number of
Return messages by using dynamic backtracking.
 Each node has a copy of the procedure Ddfs .We define a
node to be a split point if, when visited, it has two or
more unvisited neighbours or if it is the root node.
 Nodes which are not split points may be bypassed by
Return messages.
 Our messages comprise four components: message
originator; message type; the set visited of visited nodes;
and splitpoint, the previous split point.
CONTD…
 A node which receives a message executes the Ddfs
procedure. Forward messages lead to execution of
initialization code for local variables.
 In each case, a Forward message is issued to a neighbour
, else a Return message is issued to an ancestor, else the
algorithm terminates.
 Our DDFS algorithm constructs the DFS tree for the
distributed system in the order in which nodes are visited
during the execution of the algorithm.
 The DFS tree is stored in a standard way: at termination
the root node is informed. Each node has local variables
parent and childset for storing the DFS-tree, a variable
unvisited for storing its set of unvisited neighbours.
ANALYSIS
 The message and time complexity of this DDFS
algorithm is b/w |V| and 2|V|-2.
 The message complexity is the total number of Forward
and Return messages. The number of Forward messages
is |V|-1, because each non root node has exactly one
Forward message sent to it.
 The number of Return messages is at least one, since a
Return message must be received by the root ; and at
most |V|-1, because each non root node sends at most
one Return message. Thus the total number of messages
is between |V| and 2|V|-2.
 In this algorithm the message and time complexities are
the same.
distributed depth-first search

More Related Content

PPTX
Dijkstra's algorithm presentation
PPTX
IOT DATA MANAGEMENT AND COMPUTE STACK.pptx
PPTX
Dijkstra's Algorithm
PPTX
And or graph
PPTX
Dijkstra’s algorithm
PPTX
8 queen problem
PPTX
Vm migration techniques
PPT
Amortized Analysis of Algorithms
Dijkstra's algorithm presentation
IOT DATA MANAGEMENT AND COMPUTE STACK.pptx
Dijkstra's Algorithm
And or graph
Dijkstra’s algorithm
8 queen problem
Vm migration techniques
Amortized Analysis of Algorithms

What's hot (20)

PDF
Dijkstra's Algorithm
PPTX
Np hard
PPTX
IOT - Design Principles of Connected Devices
PPTX
Dijkstra's Algorithm
PPTX
Longest Common Subsequence
PPTX
IOT and Application Performance Monitoring
PPTX
M2M - Machine to Machine Technology
PPT
Spanning trees
PPTX
8 QUEENS PROBLEM.pptx
PPTX
switching techniques in data communication and networking
PPTX
DAA-Floyd Warshall Algorithm.pptx
PPTX
Graph coloring using backtracking
PPTX
PPT
Switching
PPTX
Dijkstra’S Algorithm
PPT
3.2 partitioning methods
PDF
Mobile computing : Indirect TCP
PPTX
Rehashing
PPT
A Study on:Green Cloud Computing
PPTX
Backtracking
Dijkstra's Algorithm
Np hard
IOT - Design Principles of Connected Devices
Dijkstra's Algorithm
Longest Common Subsequence
IOT and Application Performance Monitoring
M2M - Machine to Machine Technology
Spanning trees
8 QUEENS PROBLEM.pptx
switching techniques in data communication and networking
DAA-Floyd Warshall Algorithm.pptx
Graph coloring using backtracking
Switching
Dijkstra’S Algorithm
3.2 partitioning methods
Mobile computing : Indirect TCP
Rehashing
A Study on:Green Cloud Computing
Backtracking
Ad

Similar to distributed depth-first search (20)

PPTX
Depth-First Search
PPTX
Introduction of Depth First Search with example
PPTX
temp.pptxsusueueuune ueieoekeebhe ejene h
PPTX
Riya Bepari_34700122020_Artificial Intelligence_PEC-IT501B.pptx
PPTX
PPT
artificial intelligence
PPTX
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
PPTX
Graph Traversal Algorithms - Depth First Search Traversal
PPTX
Dfs presentation
PPTX
Graph Traversing and Seaching - Data Structure- AIUB.pptx
PPTX
Sec B Graph traversal.pptx
PDF
DFS ppt.pdf
PPTX
Lec 15-graph Searching in data structure and lgorithm.pptx
PPT
Depth firstsearchalgorithm
PPTX
Bfs & dfs application
PDF
Analysis of Pathfinding Algorithms
PPTX
Topological Sort and BFS
PPTX
Analysis & design of algorithm
PDF
dfs-180809142044.pdf
PPTX
algoritmagraph_breadthfirstsearch_depthfirstsearch.pptx
Depth-First Search
Introduction of Depth First Search with example
temp.pptxsusueueuune ueieoekeebhe ejene h
Riya Bepari_34700122020_Artificial Intelligence_PEC-IT501B.pptx
artificial intelligence
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
Graph Traversal Algorithms - Depth First Search Traversal
Dfs presentation
Graph Traversing and Seaching - Data Structure- AIUB.pptx
Sec B Graph traversal.pptx
DFS ppt.pdf
Lec 15-graph Searching in data structure and lgorithm.pptx
Depth firstsearchalgorithm
Bfs & dfs application
Analysis of Pathfinding Algorithms
Topological Sort and BFS
Analysis & design of algorithm
dfs-180809142044.pdf
algoritmagraph_breadthfirstsearch_depthfirstsearch.pptx
Ad

More from Nidhi Baranwal (12)

PPTX
Modulation
PPTX
A new approach and algorithm of sentiment analysis and product rating
PPTX
Image compression: Techniques and Application
PPTX
Fourier Transform
PPTX
Naïve multi label classification of you tube comments using
PPTX
A multiplatform Java wrapper for the BioAPI framework
PPT
Distributed Multimedia Systems(DMMS)
PPTX
Digital modulation technique
PPTX
Ide description
PPTX
Digital modulation techniques...
PPT
Software Engineering Ontology
PPTX
Graphics
Modulation
A new approach and algorithm of sentiment analysis and product rating
Image compression: Techniques and Application
Fourier Transform
Naïve multi label classification of you tube comments using
A multiplatform Java wrapper for the BioAPI framework
Distributed Multimedia Systems(DMMS)
Digital modulation technique
Ide description
Digital modulation techniques...
Software Engineering Ontology
Graphics

Recently uploaded (20)

PPTX
Geodesy 1.pptx...............................................
PDF
Well-logging-methods_new................
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPT
Project quality management in manufacturing
PDF
composite construction of structures.pdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
web development for engineering and engineering
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Construction Project Organization Group 2.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
additive manufacturing of ss316l using mig welding
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Geodesy 1.pptx...............................................
Well-logging-methods_new................
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Project quality management in manufacturing
composite construction of structures.pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
web development for engineering and engineering
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Construction Project Organization Group 2.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
additive manufacturing of ss316l using mig welding
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...

distributed depth-first search

  • 1. Some remarks on distributed depth-first search SUBMITTED BY: NIDHI BARANWAL MCA 3RD SEM University of Allahabad
  • 2. INTRODUCTION  Depth-first search (DFS) is a powerful technique that has been used in designing many efficient graph algorithms on the computer model.  DFS is an algorithm for traversing or searching tree or graph data structures. We start at the root and explores as far as possible along each branch before backtracking
  • 3. HOW IT WORKS?  Input: A graph G and a vertex v of G  Output: All vertices reachable from v labelled as discovered A non-recursive implementation of DFS 1. procedure DFS-iterative(G,v): 2. let S be a stack 3. S.push(v) 4. while S is not empty 5. v = S.pop() 6. if v is not labeled as discovered: 7. label v as discovered 8. for all edges from v to w in G.adjacentEdges(v) do 9. S.push(w)
  • 4. DISTRIBUTED DFS  A distributed DFS algorithm constructs a DFS tree for a communication network distributively so that when execution terminates at all the nodes, a depth-first search tree is available in a distributed fashion  specifically, every node knows only its parent node and the children nodes  In the distributed setting, several algorithms have been reported, among them the best known ones are those of Cheung , Awerbuch,Cidon,Lakshmanan , Sharma and Makki .
  • 5. AN OVERVIEW  The time complexity is the maximum time elapsed from the beginning to the termination of the algorithm, assuming that delivering a message over a link requires at most one unit of time.  The communication complexity is the total number of messages sent during the execution of the algorithm
  • 6. CONTD…  The algorithm of Cheung simply probes all the edges of the graph, and therefore requires 2|E| messages and time units.  Awerbuch improves the time complexity of Cheung's algorithm from O(|E|) to O(|V|) by using parallel message passing but at the cost of increasing the number of exchanged messages.  Lakshmanan and Cidon improve the message complexity of Awerbuch's algorithm by a constant factor through the elimination of some of the parallelism. The algorithm of Lakshmanan will run correctly even if the FIFO rule is relaxed  Sharma proposed algorithms which improved the communication complexity of distributed DFS from O(|E|) to O(|V|) by removing more unnecessary parallelism at the cost of increasing the message size.
  • 7. AN INNOVATIVE IDEA  The time and message complexity of both Lakshmanan and the Cidon’s algorithm can be improved by using the dynamic backtracking technique of Makki .  The idea is to have each node, except the node source, keep track of the lowest ancestor node, called split point, such that no internal node lying on the tree-path connecting the node and its split point has an ‘unvisited’ link.  That means when the search backtracks at a node, the backtracking will continue until it reaches the split point of that node.
  • 8. ALGORITHM  We use Forward and Return messages to explore the tree. Our key improvement is to reduce the number of Return messages by using dynamic backtracking.  Each node has a copy of the procedure Ddfs .We define a node to be a split point if, when visited, it has two or more unvisited neighbours or if it is the root node.  Nodes which are not split points may be bypassed by Return messages.  Our messages comprise four components: message originator; message type; the set visited of visited nodes; and splitpoint, the previous split point.
  • 9. CONTD…  A node which receives a message executes the Ddfs procedure. Forward messages lead to execution of initialization code for local variables.  In each case, a Forward message is issued to a neighbour , else a Return message is issued to an ancestor, else the algorithm terminates.  Our DDFS algorithm constructs the DFS tree for the distributed system in the order in which nodes are visited during the execution of the algorithm.  The DFS tree is stored in a standard way: at termination the root node is informed. Each node has local variables parent and childset for storing the DFS-tree, a variable unvisited for storing its set of unvisited neighbours.
  • 10. ANALYSIS  The message and time complexity of this DDFS algorithm is b/w |V| and 2|V|-2.  The message complexity is the total number of Forward and Return messages. The number of Forward messages is |V|-1, because each non root node has exactly one Forward message sent to it.  The number of Return messages is at least one, since a Return message must be received by the root ; and at most |V|-1, because each non root node sends at most one Return message. Thus the total number of messages is between |V| and 2|V|-2.  In this algorithm the message and time complexities are the same.