SlideShare uma empresa Scribd logo
1 de 22
Self-stabilizing depthfirst search
Zeev Collin, Shlomi Dolev

Intan Dzikria / M10109802
Management Information System Lab.
Department of Information Management NTUST
INTRODUCTION

SELF-STABILIZING DISTRIBUTED SYSTEM

Outline
SELF-STABILIZING DFS SPANNING TREE

CONCLUDING REMARKS
Distributed Algorithm

Self-Stabilizing

Can be started from any possible global state and once started, the
algorithm regains consistency by itself.

Introduction

The processors in a system may crash and the spontaneously
recover in arbitrary state.

X
When the intermediate period between one recovery and the
following crash is long enough, the algorithm stabilizes.
A distributed self-stabilizing Depth First Search
spanning tree algorithm

Use Lexicographic order among paths.

Introduction

Easily extended to obtain other self-stabilizing algorithms for different
types of tree.
Self-stabilizing
distributed
system

We’re
Regular

P1
P3

P2
P4

P5

P6
All of Us are NEIGHBORS
COMMUNICATION GRAPH
SHARED COMMUNICATION REGISTERS

Self-stabilizing
distributed
system
P1
P3

P2

write
REGISTER

P4
P5

read

P6
SCHEDULER
PROCESSOR HAVE MANY ACTIVITIES ?
Each processor orders its edges by some arbitrary ordering α.
Every processor P and any edge e knows the value of α.
Self-stabilizing
distributed
system
P1
P3

P2

 A fair execution is an infinite execution in which every processor
executes atomic steps infinitely often.
 A task is defined by a set of executions which are called legal
execution.
An algorithm is self-stabilizing for a specific task if any fair
execution of the algorithm has a suffix that is within the set of
legal executions of that task.

P4
P5

 An execution of the system is a finite or infinite sequence of
configuration.

P6
I’mI’m The Root
the ANCESTOR
So, I’m The Parent

Self-stabilizing
DFS Spanning
Tree

I’ve
I’m the
become
Child
parents

I’ve
I’m the
become
Child
parents

We’re
the Child

All other are DECENDANTS
 The adjacent edges of every processor P are categorized as
follow:

Self-stabilizing
DFS Spanning
Tree

 Tree-edges , the edges that belongs to DFS spanning tree
 Incoming edge , the edge that connects P to its parent.
 Outgoing edges, the edges that connect P to its children
 The adjacent edges of every processor P are categorized as follow:

Self-stabilizing
DFS Spanning
Tree

 Non Tree-edges, edges that do not belong to the DFS spanning tree
 Backward edges, the edges that connect P with Q, where Q is an
ancestor of P.
 Forward edges, the edges that connect P with R, where R is a
descendant of P.
Self-stabilizing
DFS Spanning
Tree

The output of a distributed algorithm is called a DFS-marked graph.
The output of the paper’s DFS Spanning Tree algorithm, after the
network has converged is a DFS-marked graph maintained in a
distributed fashion.
P1

Q

1

Define a lexicographical order “ ” over the
representation of the above set paths, where
is the minimal character.
e.g. ( , 1) ( , 1 , 1 ) ( , 2) (1)

2

T

T

T

T

DFS
Representation

Outgoing edges defined a path
e.g. ( , 5 , 3 )
Path begin with root
Continue through the edge with index 5 in α1
Reaches a processor Q, through this edge and
Ends in processor R, that is reached through
3rd edge of Q.

Root

T

Self-stabilizing
DFS Spanning
Tree

The first DF tree of a graph is the DFS spanning tree that is
obtained by performing a (centralized) DFS algorithm, visiting
the adjacent edges for every processor Pi in order induced by αi

3
R

α1 = 5
DFS Spanning
Tree Algorithm

Root P1 :
1. do forever
2.
path1 :=
3. Od

T

Self-stabilizing
DFS Spanning
Tree

The graph obtained by marking, for every 1 ‹ i ≤ n , the edge between Pi and Pi’s
father in fi is the first DFS tree.

Non-root Pi :
1. do forever
2.
for j := 1 to δ do
3.
read_pathj := read(pathj) od
4.
write pathi := min {|read_pathj 0 αj(i)|N , such that 1 ≤ j ≤ δ}
5. od
Self-stabilizing
DFS Spanning
Tree

DFS Spanning
Tree Algorithm

 Pathi may describe the longest simple path that possible in the
graph. Assigning a too long sequence to a path field causes an
overflow that results in losing the most significant items of the
sequence.
 Consider the edges of the tree to be directed from parent toward
the child.
 Proved in this algorithm the paths of all the processors eventually
converge to the first paths and hence, define the first DFS tree.
Self-stabilizing
DFS Spanning
Tree

Theorem. Every fair execution has a suffix such that for every
configuration in that suffix and for every processor Pi pathi = fi
Proof. By induction on the depth of the processor in the first DFS
tree.
T

DFS Spanning
Tree Algorithm

Base : d = 0. The root assigns the value to pathi , which is fi by the
definition.
Self-stabilizing
DFS Spanning
Tree

Step :
 Assume there is a suffix of the execution during which the path
fields of all processors whose depth in the first DFS tree is smaller
or equal to d have converged to their first path.
 For a given configuration c, let the minimal read value in subtree Ti
be the minimal value of the read_path variables in Ti

DFS Spanning
Tree Algorithm

 Let Pf be the father of Pi according to fi
 Let c’ be the configuration in which all the above read variables are
grater than ff.
 Let min(c) be the minimal value of a path stored in either the path
field or the read_path variable of a processor of Ti in c.
Self-stabilizing
DFS Spanning
Tree

The output of the algorithm is a DFS-marked graph, Every
processor after reading the stabilized paths of its neighbors, is able
to identify the type of any of its incident edges relative to the first
DFS tree.
The edge e = (Pi, Pj) is :
1.
2.

DFS Spanning
Tree Algorithm

Incoming edge, if pathi = pathj o αj(i)
Outgoing edge, if pathj = pathi o αi(j)

3.

Backward edge, if pathj is a prefix of pathi and edge is not an
incoming edge.

4. Forward edge, if pathi is a prefix of pathj and edge is not an
outgoing edge.
 Present a self-stabilizing algorithm for a basic
distributed task, namely, constructing DFS tree.

Concluding
Remarks

 DFS algorithm uses a lexicographic order relation on
the path representation.
 The scheme is general and could be used to design selfstabilizing algorithms for other graph algorithm tasks
using different order relations.
 The memory requirement for this algorithm is O(n
log ∆) where ∆ is an upper bound on the degree of a
node.
 The time complexity is measured in rounds :

Concluding
Remarks

 Execution is finished immediately after each processor has
executed one atomic step.
 Finished after each processor has executed one atomic step
following the termination of the first round
 So on…

 The time complexity of this algorithm is O(d n ∆)
rounds, where d is the diameter of communication
graph.
Concluding
Remarks
Self-stabilizing leader election protocols can be composed with
this algorithm using the fair protocol composition method.
The resulting composition is a self-stabilizing DFS for a system of
processors with distinct identifiers.
 S. Dolev, A. Israeli and S. Moran, Self-stabilization of dynamic
systems assuming only read/write atomicity, in : Proc. 9th Ann.
ACM Symp. On Principles of Distributed Computation, Montreal
(1990) 103 – 117

References
Thank You

Mais conteúdo relacionado

Mais procurados

Asymptotic Notation and Data Structures
Asymptotic Notation and Data StructuresAsymptotic Notation and Data Structures
Asymptotic Notation and Data StructuresAmrinder Arora
 
Dijkstra’s algorithm
Dijkstra’s algorithmDijkstra’s algorithm
Dijkstra’s algorithmfaisal2204
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of AlgorithmsArvind Krishnaa
 
Dijkstra's algorithm
Dijkstra's algorithmDijkstra's algorithm
Dijkstra's algorithmgsp1294
 
Unit26 shortest pathalgorithm
Unit26 shortest pathalgorithmUnit26 shortest pathalgorithm
Unit26 shortest pathalgorithmmeisamstar
 
Skiena algorithm 2007 lecture12 topological sort connectivity
Skiena algorithm 2007 lecture12 topological sort connectivitySkiena algorithm 2007 lecture12 topological sort connectivity
Skiena algorithm 2007 lecture12 topological sort connectivityzukun
 
Dijkstra's Algorithm
Dijkstra's AlgorithmDijkstra's Algorithm
Dijkstra's AlgorithmArijitDhali
 
Algorithms Lecture 7: Graph Algorithms
Algorithms Lecture 7: Graph AlgorithmsAlgorithms Lecture 7: Graph Algorithms
Algorithms Lecture 7: Graph AlgorithmsMohamed Loey
 
Dynamic Programming - Part II
Dynamic Programming - Part IIDynamic Programming - Part II
Dynamic Programming - Part IIAmrinder Arora
 
Breadth First Search (BFS)
Breadth First Search (BFS)Breadth First Search (BFS)
Breadth First Search (BFS)Dhrumil Panchal
 
Directed Acyclic Graph
Directed Acyclic Graph Directed Acyclic Graph
Directed Acyclic Graph AJAL A J
 
Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound techniqueishmecse13
 
Networks dijkstra's algorithm- pgsr
Networks  dijkstra's algorithm- pgsrNetworks  dijkstra's algorithm- pgsr
Networks dijkstra's algorithm- pgsrLinawati Adiman
 

Mais procurados (20)

18 Basic Graph Algorithms
18 Basic Graph Algorithms18 Basic Graph Algorithms
18 Basic Graph Algorithms
 
Asymptotic Notation and Data Structures
Asymptotic Notation and Data StructuresAsymptotic Notation and Data Structures
Asymptotic Notation and Data Structures
 
Dijkstra’s algorithm
Dijkstra’s algorithmDijkstra’s algorithm
Dijkstra’s algorithm
 
NP-Completeness - II
NP-Completeness - IINP-Completeness - II
NP-Completeness - II
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of Algorithms
 
(floyd's algm)
(floyd's algm)(floyd's algm)
(floyd's algm)
 
Dijkstra's algorithm
Dijkstra's algorithmDijkstra's algorithm
Dijkstra's algorithm
 
Unit26 shortest pathalgorithm
Unit26 shortest pathalgorithmUnit26 shortest pathalgorithm
Unit26 shortest pathalgorithm
 
Dijksatra
DijksatraDijksatra
Dijksatra
 
Unit ii-ppt
Unit ii-pptUnit ii-ppt
Unit ii-ppt
 
Skiena algorithm 2007 lecture12 topological sort connectivity
Skiena algorithm 2007 lecture12 topological sort connectivitySkiena algorithm 2007 lecture12 topological sort connectivity
Skiena algorithm 2007 lecture12 topological sort connectivity
 
Assignment 2 daa
Assignment 2 daaAssignment 2 daa
Assignment 2 daa
 
Dijkstra's Algorithm
Dijkstra's AlgorithmDijkstra's Algorithm
Dijkstra's Algorithm
 
Algorithms Lecture 7: Graph Algorithms
Algorithms Lecture 7: Graph AlgorithmsAlgorithms Lecture 7: Graph Algorithms
Algorithms Lecture 7: Graph Algorithms
 
Dynamic Programming - Part II
Dynamic Programming - Part IIDynamic Programming - Part II
Dynamic Programming - Part II
 
Breadth First Search (BFS)
Breadth First Search (BFS)Breadth First Search (BFS)
Breadth First Search (BFS)
 
Directed Acyclic Graph
Directed Acyclic Graph Directed Acyclic Graph
Directed Acyclic Graph
 
Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound technique
 
Networks dijkstra's algorithm- pgsr
Networks  dijkstra's algorithm- pgsrNetworks  dijkstra's algorithm- pgsr
Networks dijkstra's algorithm- pgsr
 

Semelhante a Self Stabilizing Depth-first Search

Riya Bepari_34700122020_Artificial Intelligence_PEC-IT501B.pptx
Riya Bepari_34700122020_Artificial Intelligence_PEC-IT501B.pptxRiya Bepari_34700122020_Artificial Intelligence_PEC-IT501B.pptx
Riya Bepari_34700122020_Artificial Intelligence_PEC-IT501B.pptxRIYABEPARI
 
AI - Backtracking vs Depth-First Search (DFS)
AI - Backtracking vs Depth-First Search (DFS)AI - Backtracking vs Depth-First Search (DFS)
AI - Backtracking vs Depth-First Search (DFS)Johnnatan Messias
 
distributed depth-first search
distributed depth-first search distributed depth-first search
distributed depth-first search Nidhi Baranwal
 
Data structures assignmentweek4b.pdfCI583 Data Structure
Data structures assignmentweek4b.pdfCI583 Data StructureData structures assignmentweek4b.pdfCI583 Data Structure
Data structures assignmentweek4b.pdfCI583 Data StructureOllieShoresna
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithmsguest084d20
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithmsguest084d20
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithmsguest084d20
 
Algorithm Design and Complexity - Course 7
Algorithm Design and Complexity - Course 7Algorithm Design and Complexity - Course 7
Algorithm Design and Complexity - Course 7Traian Rebedea
 
Validation and Inference of Schema-Level Workflow Data-Dependency Annotations
Validation and Inference of Schema-Level Workflow Data-Dependency AnnotationsValidation and Inference of Schema-Level Workflow Data-Dependency Annotations
Validation and Inference of Schema-Level Workflow Data-Dependency AnnotationsBertram Ludäscher
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite AutomataArchana Gopinath
 
Arabic Phoneme Recognition using Hierarchical Neural Fuzzy Petri Net and LPC ...
Arabic Phoneme Recognition using Hierarchical Neural Fuzzy Petri Net and LPC ...Arabic Phoneme Recognition using Hierarchical Neural Fuzzy Petri Net and LPC ...
Arabic Phoneme Recognition using Hierarchical Neural Fuzzy Petri Net and LPC ...CSCJournals
 
compiler design course focus of chapter 3 and 4 part
compiler design course focus of chapter 3 and 4 partcompiler design course focus of chapter 3 and 4 part
compiler design course focus of chapter 3 and 4 partabel185080
 
Chapter-3 compiler.pptx course materials
Chapter-3 compiler.pptx course materialsChapter-3 compiler.pptx course materials
Chapter-3 compiler.pptx course materialsgadisaAdamu
 
Spark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with SparkSpark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with Sparksamthemonad
 
Master Thesis on the Mathematial Analysis of Neural Networks
Master Thesis on the Mathematial Analysis of Neural NetworksMaster Thesis on the Mathematial Analysis of Neural Networks
Master Thesis on the Mathematial Analysis of Neural NetworksAlina Leidinger
 
Static Analysis of Computer programs
Static Analysis of Computer programs Static Analysis of Computer programs
Static Analysis of Computer programs Arvind Devaraj
 

Semelhante a Self Stabilizing Depth-first Search (20)

Riya Bepari_34700122020_Artificial Intelligence_PEC-IT501B.pptx
Riya Bepari_34700122020_Artificial Intelligence_PEC-IT501B.pptxRiya Bepari_34700122020_Artificial Intelligence_PEC-IT501B.pptx
Riya Bepari_34700122020_Artificial Intelligence_PEC-IT501B.pptx
 
AI - Backtracking vs Depth-First Search (DFS)
AI - Backtracking vs Depth-First Search (DFS)AI - Backtracking vs Depth-First Search (DFS)
AI - Backtracking vs Depth-First Search (DFS)
 
distributed depth-first search
distributed depth-first search distributed depth-first search
distributed depth-first search
 
Bh36352357
Bh36352357Bh36352357
Bh36352357
 
Data structures assignmentweek4b.pdfCI583 Data Structure
Data structures assignmentweek4b.pdfCI583 Data StructureData structures assignmentweek4b.pdfCI583 Data Structure
Data structures assignmentweek4b.pdfCI583 Data Structure
 
dfs.pptx
dfs.pptxdfs.pptx
dfs.pptx
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithms
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithms
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithms
 
RegexCat
RegexCatRegexCat
RegexCat
 
Algorithm Design and Complexity - Course 7
Algorithm Design and Complexity - Course 7Algorithm Design and Complexity - Course 7
Algorithm Design and Complexity - Course 7
 
Validation and Inference of Schema-Level Workflow Data-Dependency Annotations
Validation and Inference of Schema-Level Workflow Data-Dependency AnnotationsValidation and Inference of Schema-Level Workflow Data-Dependency Annotations
Validation and Inference of Schema-Level Workflow Data-Dependency Annotations
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite Automata
 
Arabic Phoneme Recognition using Hierarchical Neural Fuzzy Petri Net and LPC ...
Arabic Phoneme Recognition using Hierarchical Neural Fuzzy Petri Net and LPC ...Arabic Phoneme Recognition using Hierarchical Neural Fuzzy Petri Net and LPC ...
Arabic Phoneme Recognition using Hierarchical Neural Fuzzy Petri Net and LPC ...
 
ECE 565 FInal Project
ECE 565 FInal ProjectECE 565 FInal Project
ECE 565 FInal Project
 
compiler design course focus of chapter 3 and 4 part
compiler design course focus of chapter 3 and 4 partcompiler design course focus of chapter 3 and 4 part
compiler design course focus of chapter 3 and 4 part
 
Chapter-3 compiler.pptx course materials
Chapter-3 compiler.pptx course materialsChapter-3 compiler.pptx course materials
Chapter-3 compiler.pptx course materials
 
Spark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with SparkSpark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with Spark
 
Master Thesis on the Mathematial Analysis of Neural Networks
Master Thesis on the Mathematial Analysis of Neural NetworksMaster Thesis on the Mathematial Analysis of Neural Networks
Master Thesis on the Mathematial Analysis of Neural Networks
 
Static Analysis of Computer programs
Static Analysis of Computer programs Static Analysis of Computer programs
Static Analysis of Computer programs
 

Último

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 

Último (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

Self Stabilizing Depth-first Search

  • 1. Self-stabilizing depthfirst search Zeev Collin, Shlomi Dolev Intan Dzikria / M10109802 Management Information System Lab. Department of Information Management NTUST
  • 3. Distributed Algorithm Self-Stabilizing Can be started from any possible global state and once started, the algorithm regains consistency by itself. Introduction The processors in a system may crash and the spontaneously recover in arbitrary state. X When the intermediate period between one recovery and the following crash is long enough, the algorithm stabilizes.
  • 4. A distributed self-stabilizing Depth First Search spanning tree algorithm Use Lexicographic order among paths. Introduction Easily extended to obtain other self-stabilizing algorithms for different types of tree.
  • 6. COMMUNICATION GRAPH SHARED COMMUNICATION REGISTERS Self-stabilizing distributed system P1 P3 P2 write REGISTER P4 P5 read P6 SCHEDULER PROCESSOR HAVE MANY ACTIVITIES ? Each processor orders its edges by some arbitrary ordering α. Every processor P and any edge e knows the value of α.
  • 7. Self-stabilizing distributed system P1 P3 P2  A fair execution is an infinite execution in which every processor executes atomic steps infinitely often.  A task is defined by a set of executions which are called legal execution. An algorithm is self-stabilizing for a specific task if any fair execution of the algorithm has a suffix that is within the set of legal executions of that task. P4 P5  An execution of the system is a finite or infinite sequence of configuration. P6
  • 8. I’mI’m The Root the ANCESTOR So, I’m The Parent Self-stabilizing DFS Spanning Tree I’ve I’m the become Child parents I’ve I’m the become Child parents We’re the Child All other are DECENDANTS
  • 9.  The adjacent edges of every processor P are categorized as follow: Self-stabilizing DFS Spanning Tree  Tree-edges , the edges that belongs to DFS spanning tree  Incoming edge , the edge that connects P to its parent.  Outgoing edges, the edges that connect P to its children
  • 10.  The adjacent edges of every processor P are categorized as follow: Self-stabilizing DFS Spanning Tree  Non Tree-edges, edges that do not belong to the DFS spanning tree  Backward edges, the edges that connect P with Q, where Q is an ancestor of P.  Forward edges, the edges that connect P with R, where R is a descendant of P.
  • 11. Self-stabilizing DFS Spanning Tree The output of a distributed algorithm is called a DFS-marked graph. The output of the paper’s DFS Spanning Tree algorithm, after the network has converged is a DFS-marked graph maintained in a distributed fashion.
  • 12. P1 Q 1 Define a lexicographical order “ ” over the representation of the above set paths, where is the minimal character. e.g. ( , 1) ( , 1 , 1 ) ( , 2) (1) 2 T T T T DFS Representation Outgoing edges defined a path e.g. ( , 5 , 3 ) Path begin with root Continue through the edge with index 5 in α1 Reaches a processor Q, through this edge and Ends in processor R, that is reached through 3rd edge of Q. Root T Self-stabilizing DFS Spanning Tree The first DF tree of a graph is the DFS spanning tree that is obtained by performing a (centralized) DFS algorithm, visiting the adjacent edges for every processor Pi in order induced by αi 3 R α1 = 5
  • 13. DFS Spanning Tree Algorithm Root P1 : 1. do forever 2. path1 := 3. Od T Self-stabilizing DFS Spanning Tree The graph obtained by marking, for every 1 ‹ i ≤ n , the edge between Pi and Pi’s father in fi is the first DFS tree. Non-root Pi : 1. do forever 2. for j := 1 to δ do 3. read_pathj := read(pathj) od 4. write pathi := min {|read_pathj 0 αj(i)|N , such that 1 ≤ j ≤ δ} 5. od
  • 14. Self-stabilizing DFS Spanning Tree DFS Spanning Tree Algorithm  Pathi may describe the longest simple path that possible in the graph. Assigning a too long sequence to a path field causes an overflow that results in losing the most significant items of the sequence.  Consider the edges of the tree to be directed from parent toward the child.  Proved in this algorithm the paths of all the processors eventually converge to the first paths and hence, define the first DFS tree.
  • 15. Self-stabilizing DFS Spanning Tree Theorem. Every fair execution has a suffix such that for every configuration in that suffix and for every processor Pi pathi = fi Proof. By induction on the depth of the processor in the first DFS tree. T DFS Spanning Tree Algorithm Base : d = 0. The root assigns the value to pathi , which is fi by the definition.
  • 16. Self-stabilizing DFS Spanning Tree Step :  Assume there is a suffix of the execution during which the path fields of all processors whose depth in the first DFS tree is smaller or equal to d have converged to their first path.  For a given configuration c, let the minimal read value in subtree Ti be the minimal value of the read_path variables in Ti DFS Spanning Tree Algorithm  Let Pf be the father of Pi according to fi  Let c’ be the configuration in which all the above read variables are grater than ff.  Let min(c) be the minimal value of a path stored in either the path field or the read_path variable of a processor of Ti in c.
  • 17. Self-stabilizing DFS Spanning Tree The output of the algorithm is a DFS-marked graph, Every processor after reading the stabilized paths of its neighbors, is able to identify the type of any of its incident edges relative to the first DFS tree. The edge e = (Pi, Pj) is : 1. 2. DFS Spanning Tree Algorithm Incoming edge, if pathi = pathj o αj(i) Outgoing edge, if pathj = pathi o αi(j) 3. Backward edge, if pathj is a prefix of pathi and edge is not an incoming edge. 4. Forward edge, if pathi is a prefix of pathj and edge is not an outgoing edge.
  • 18.  Present a self-stabilizing algorithm for a basic distributed task, namely, constructing DFS tree. Concluding Remarks  DFS algorithm uses a lexicographic order relation on the path representation.  The scheme is general and could be used to design selfstabilizing algorithms for other graph algorithm tasks using different order relations.
  • 19.  The memory requirement for this algorithm is O(n log ∆) where ∆ is an upper bound on the degree of a node.  The time complexity is measured in rounds : Concluding Remarks  Execution is finished immediately after each processor has executed one atomic step.  Finished after each processor has executed one atomic step following the termination of the first round  So on…  The time complexity of this algorithm is O(d n ∆) rounds, where d is the diameter of communication graph.
  • 20. Concluding Remarks Self-stabilizing leader election protocols can be composed with this algorithm using the fair protocol composition method. The resulting composition is a self-stabilizing DFS for a system of processors with distinct identifiers.
  • 21.  S. Dolev, A. Israeli and S. Moran, Self-stabilization of dynamic systems assuming only read/write atomicity, in : Proc. 9th Ann. ACM Symp. On Principles of Distributed Computation, Montreal (1990) 103 – 117 References

Notas do Editor

  1. A distributed system consists of n processors denoted by P1, P2,…Pn. P1 is called special and other called regular.Each processor can communicate with some other processors called its neighbors.Each register is serializable with respect to read and write operations.
  2. Communication graph is the graph formed by representing each processor as a node and connecting every pair of neighbors by an edge.Each pair of neighbors connected by an edge that support two-way communication.Communication between neighbors is carried out using sharedcommunication registers.Each register is serializable with respect to read and write operations.Any processor writes in one register , r , and may read from the register from any neighbors.Each processor orders its edges by some arbitrary ordering α.Every processor P and any edge e knows the value of α.A configuration of the system is a vector of states, one for each processor.Processor activity is managed by a scheduler.At any given configuration the scheduler activates a single processor which executes a single atomic step which consist of an internal computation followed by either a read or write action.
  3. δ = amount of the neighbours
  4. C = configuration