Towards Efficient Verification of Population Protocols Javier Esparza Technical University of Munich Joint work with Michael Blondin, Stefan Jaax, and Philipp Meyer
Deaf Black Ninjas in the Dark • Deaf Black Ninjas meet at a Zen garden in the dark
Deaf Black Ninjas in the Dark • Deaf Black Ninjas meet at a Zen garden in the dark • They must decide by majority to attack or not (“don’t attack” if tie)
Deaf Black Ninjas in the Dark • Deaf Black Ninjas meet at a Zen garden in the dark • They must decide by majority to attack or not (“don’t attack” if tie)
Deaf Black Ninjas in the Dark • Deaf Black Ninjas meet at a Zen garden in the dark • They must decide by majority to attack or not (“don’t attack” if tie) • How can they conduct the vote?
Deaf Black Ninjas in the Dark • Ninjas randomly wander around the garden, interacting when they bump into each other
Deaf Black Ninjas in the Dark • Ninjas randomly wander around the garden, interacting when they bump into each other • Each ninja stores his current estimation of the final outcome of the vote (Yes or No). Additionally, he is Active or Passive.
Deaf Black Ninjas in the Dark • Ninjas randomly wander around the garden, interacting when they bump into each other • Each ninja stores his current estimation of the final outcome of the vote (Yes or No). Additionally, he is Active or Passive. • Initially all ninjas are Active, and their initial estimation is their own vote
Deaf Black Ninjas in the Dark • Ninjas randomly wander around the garden, interacting when they bump into each other • Each ninja stores his current estimation of the final outcome of the vote (Yes or No). Additionally, he is Active or Passive. • Initially all ninjas are Active, and their initial estimation is their own vote • Goal: eventually all ninjas reach the same estimation, and this estimation is the one corresponding to the majority vote
Deaf Black Ninjas in the Dark • Ninjas randomly wander around the garden, interacting when they bump into each other • Each ninja stores his current estimation of the final outcome of the vote (Yes or No). Additionally, he is Active or Passive. • Initially all ninjas are Active, and their initial estimation is their own vote • Goal: eventually all ninjas reach the same estimation, and this estimation is the one corresponding to the majority vote • Ninjas follow this protocol: ( YA , NA ) → ( NP , NP ) (opposite votes “cancel”) ( YA , NP ) → ( YA , YP ) (active “survivors” tell ( NA , YP ) → ( NA , NP ) outcome to passive Ninjas)
Deaf Black Ninjas in the Dark
Deaf Black Ninjas in the Dark: Corrected The new Big Ninja added a rule in case there is a tie: ( YA , NA ) → ( NP , NP ) (opposite votes “cancel”) ( YA , NP ) → ( YA , YP ) (active “survivors” tell ( NA , YP ) → ( NA , NP ) outcome to passive Ninjas) ( NP , YP ) → ( NP , NP ) (to deal with ties)
Deaf Black Ninjas in the Dark: Corrected The new Big Ninja added a rule in case there is a tie: ( YA , NA ) → ( NP , NP ) (opposite votes “cancel”) ( YA , NP ) → ( YA , YP ) (active “survivors” tell ( NA , YP ) → ( NA , NP ) outcome to passive Ninjas) ( NP , YP ) → ( NP , NP ) (to deal with ties) Big Ninja’s three questions: • What is a protocol?
Deaf Black Ninjas in the Dark: Corrected The new Big Ninja added a rule in case there is a tie: ( YA , NA ) → ( NP , NP ) (opposite votes “cancel”) ( YA , NP ) → ( YA , YP ) (active “survivors” tell ( NA , YP ) → ( NA , NP ) outcome to passive Ninjas) ( NP , YP ) → ( NP , NP ) (to deal with ties) Big Ninja’s three questions: • What is a protocol? • When is a protocol correct?
Deaf Black Ninjas in the Dark: Corrected The new Big Ninja added a rule in case there is a tie: ( YA , NA ) → ( NP , NP ) (opposite votes “cancel”) ( YA , NP ) → ( YA , YP ) (active “survivors” tell ( NA , YP ) → ( NA , NP ) outcome to passive Ninjas) ( NP , YP ) → ( NP , NP ) (to deal with ties) Big Ninja’s three questions: • What is a protocol? • When is a protocol correct? • How can I decide if a protocol is correct?
Big Ninja’s first question: What is a protocol? Population protocols: Theoretical model for distributed computation proposed in 2004 by Yale group (Angluin, Fischer, Aspnes ...) Designed to model collections of identical, finite-state, and mobile agents like • ad-hoc networks of mobile sensors • “soups” of interacting molecules (Chemical Reaction Networks) • people in social networks
Syntax PP-scheme: pair ( Q, ∆) , where Q is a finite set of states, and ∆ is a set of interactions of the form ( q 1 , q 2 ) �→ ( q 3 , q 4 ) .
Syntax PP-scheme: pair ( Q, ∆) , where Q is a finite set of states, and ∆ is a set of interactions of the form ( q 1 , q 2 ) �→ ( q 3 , q 4 ) . Configuration: mapping C : Q → N , where C ( q ) is the current number of agents in q . q 1 q 2 q 3 q 4 2 1 0 3
Syntax PP-scheme: pair ( Q, ∆) , where Q is a finite set of states, and ∆ is a set of interactions of the form ( q 1 , q 2 ) �→ ( q 3 , q 4 ) . Configuration: mapping C : Q → N , where C ( q ) is the current number of agents in q . q 1 q 2 q 3 q 4 2 1 0 3 ( q 1 , q 2 ) �→ ( q 3 , q 4 )
Syntax PP-scheme: pair ( Q, ∆) , where Q is a finite set of states, and ∆ is a set of interactions of the form ( q 1 , q 2 ) �→ ( q 3 , q 4 ) . Configuration: mapping C : Q → N , where C ( q ) is the current number of agents in q . q 1 q 2 q 3 q 4 q 1 q 2 q 3 q 4 − → 2 1 0 3 1 0 1 4 ( q 1 , q 2 ) �→ ( q 3 , q 4 )
Syntax PP-scheme: pair ( Q, ∆) , where Q is a finite set of states, and ∆ is a set of interactions of the form ( q 1 , q 2 ) �→ ( q 3 , q 4 ) . Configuration: mapping C : Q → N , where C ( q ) is the current number of agents in q . q 1 q 2 q 3 q 4 q 1 q 2 q 3 q 4 − → 2 1 0 3 1 0 1 4 ( q 1 , q 2 ) �→ ( q 3 , q 4 ) If several steps are possible, a random scheduler chooses one uniformly at random.
Syntax PP-scheme: pair ( Q, ∆) , where Q is a finite set of states, and ∆ is a set of interactions of the form ( q 1 , q 2 ) �→ ( q 3 , q 4 ) . Configuration: mapping C : Q → N , where C ( q ) is the current number of agents in q . q 1 q 2 q 3 q 4 q 1 q 2 q 3 q 4 − → 2 1 0 3 1 0 1 4 ( q 1 , q 2 ) �→ ( q 3 , q 4 ) If several steps are possible, a random scheduler chooses one uniformly at random. Execution: infinite sequence C 0 → C 1 → C 2 → · · · of steps.
Semantics A population protocol (PP) consists of • A PP-scheme ( Q, ∆)
Semantics A population protocol (PP) consists of • A PP-scheme ( Q, ∆) • An ordered subset ( i 1 , . . . , i k ) of input states
Semantics A population protocol (PP) consists of • A PP-scheme ( Q, ∆) • An ordered subset ( i 1 , . . . , i k ) of input states • A partition of Q into 1 -states (green) and 0 -states (pink)
Semantics A population protocol (PP) consists of • A PP-scheme ( Q, ∆) • An ordered subset ( i 1 , . . . , i k ) of input states • A partition of Q into 1 -states (green) and 0 -states (pink) An execution reaches consensus b ∈ { 0 , 1 } if from some point on every agent stays within the b -states.
Semantics A population protocol (PP) consists of • A PP-scheme ( Q, ∆) • An ordered subset ( i 1 , . . . , i k ) of input states • A partition of Q into 1 -states (green) and 0 -states (pink) An execution reaches consensus b ∈ { 0 , 1 } if from some point on every agent stays within the b -states. A PP computes the value b for input ( n 1 , n 2 , . . . , n k ) if the executions starting at the configuration with n j agents in state i j reach consensus b with probability 1.
Semantics A population protocol (PP) consists of • A PP-scheme ( Q, ∆) • An ordered subset ( i 1 , . . . , i k ) of input states • A partition of Q into 1 -states (green) and 0 -states (pink) An execution reaches consensus b ∈ { 0 , 1 } if from some point on every agent stays within the b -states. A PP computes the value b for input ( n 1 , n 2 , . . . , n k ) if the executions starting at the configuration with n j agents in state i j reach consensus b with probability 1. A PP computes P ( x 1 , . . . , x n ): N n → { 0 , 1 } if it computes P ( n 1 , . . . , n k ) for every input ( n 1 , . . . , n k )
What predicates can PPs compute? Theorem (Angluin et al. 2007): PPs compute exactly the Presburger predicates.
What predicates can PPs compute? Theorem (Angluin et al. 2007): PPs compute exactly the Presburger predicates. Presburger predicates: quantifier-free boolean combinations of � • Threshold predicates: α i x i > c i � • Modulo predicates: α i x i mod m = c i
What predicates can PPs compute? Theorem (Angluin et al. 2007): PPs compute exactly the Presburger predicates. Presburger predicates: quantifier-free boolean combinations of � • Threshold predicates: α i x i > c i � • Modulo predicates: α i x i mod m = c i To show that PPs compute all Presburger predicates: • Give protocols for the threshold and remainder predicates. • Show that computable predicates are closed under negation and conjunction.
Recommend
More recommend