Population Protocols and Predicates Pierre Ganty IMDEA Software - - PowerPoint PPT Presentation
Population Protocols and Predicates Pierre Ganty IMDEA Software - - PowerPoint PPT Presentation
Population Protocols and Predicates Pierre Ganty IMDEA Software Institute The computer science debate: Journals vs Conferences Tired Rested Journals Conferences The computer science debate: Journals vs Conferences Tired Rested Journals
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences
- If two thinking the same debate then they remain the same
- Rested scientists convince tired ones of anything
- If two feeling the same debate then the one for conferences
convince the one for journals, and both feel tired afterwards
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences
- If two thinking the same debate then they remain the same
- Rested scientists convince tired ones of anything
- If two feeling the same debate then the one for conferences
convince the one for journals, and both feel tired afterwards
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences
- (
, ) → ( , )
- (
, ) → ( , )
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences
- If two thinking the same debate then they remain the same
- Rested scientists convince tired ones of anything
- If two feeling the same debate then the one for conferences
convince the one for journals, and both feel tired afterwards
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences
- (
, ) → ( , )
- (
, ) → ( , )
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences What is the result of endless debates?
The computer science debate: Journals vs Conferences
Tired Rested Journals Conferences What is the result of endless debates? ¿initial distribution? ¿scheduler policy?
Initial distribution
Tired Rested Journals Conferences
Initial distributions & reachability graphs
Take a population of 3 rested computer scientists 3 T R J C
Initial distributions & reachability graphs
Take a population of 3 rested computer scientists 3 T R J C 3 T R J C 1 2 2 1 3
Initial distributions & reachability graphs
Take a population of 3 rested computer scientists 3 T R J C 3 T R J C 1 2 2 1 3
PP define infinitely many graphs
x y T R J C x + y = 3 x + y = 4 x + y = 5
Tired Rested Journals Conferences What is the result of endless debates? initial distributions ¿scheduler policy?
- (
, ) → ( , )
- (
, ) → ( , )
. . .
Scheduler policy: fair
“if C appears infinitely often in a fair execution, then every step enabled at C is taken infinitely often in the execution”
Scheduler policy: fair
T R J C 1 2 2 1 1 1 1 1 2 1 1 1 “if C appears infinitely often in a fair execution, then every step enabled at C is taken infinitely often in the execution”
Scheduler policy: fair
T R J C 1 2 2 1 1 1 1 1 2 1 1 1 “if C appears infinitely often in a fair execution, then every step enabled at C is taken infinitely often in the execution”
Scheduler policy: fair
T R J C 1 2 2 1 1 1 1 1 2 1 1 1 “if C appears infinitely often in a fair execution, then every step enabled at C is taken infinitely often in the execution”
Scheduler policy: fair
T R J C 1 2 2 1 1 1 1 1 2 1 1 1 “if C appears infinitely often in a fair execution, then every step enabled at C is taken infinitely often in the execution”
- infinite executions end up in Strongly Connected Components
- fair executions end up in a bottom SCC visiting every state
If for each initial distribution
- 1. the agents reach a stable consensus
- 2. the outcome only depends on the initial distribution
then PP maps initial distributions onto consensus values Under a fair scheduler
If for each initial distribution
- 1. the agents reach a stable consensus
- 2. the outcome only depends on the initial distribution
then PP maps initial distributions onto consensus values J or C Under a fair scheduler
If for each initial distribution
- 1. the agents reach a stable consensus
- 2. the outcome only depends on the initial distribution
then PP maps initial distributions onto consensus values True or False ϕ(x, y) → {True, False} Under a fair scheduler
Does my PP compute a predicate? Does my PP compute this predicate? What predicate does my PP compute? ( , ) → ( , )
. . .
( , ) → ( , ) False True x y
Does my PP compute a predicate?
- 1. the agents reach a stable consensus under a fair scheduler
- broken when, in a reachable bottom SCC ,
- broken when, in a reachable bottom SCC ,
- 2. the outcome only depends on the initial distribution
- broken when, two bottom SCC are such that
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . c0 is initial c1, c2 belongs to bottom SCC ∧ c1( ) > 0∧ c2( ) > 0 c1, c2 are reachable from c0 1.a 2. 1.b Equivalently, there exist configurations c0, c1, c2 such that PP does not compute a predicate iff either condition holds: . . .
Decision procedure
c0 is initial c1, c2 belongs to bottom SCC∧ c1( ) > 0∧ c2( ) > 0 c1, c2 are reachable from c0
Decision procedure
c0 is initial c1, c2 belongs to bottom SCC∧ c1( ) > 0∧ c2( ) > 0 c1, c2 are reachable from c0
Decision procedure
c0 is initial c1, c2 belongs to bottom SCC∧ c1( ) > 0∧ c2( ) > 0 c1, c2 are reachable from c0
Decision procedure
c0 is initial c1, c2 belongs to bottom SCC∧ c1( ) > 0∧ c2( ) > 0 c1, c2 are reachable from c0
Population Protocols Petri nets State Place Configuration Marking ( , ) → ( , ) PP PN with infinitely many initial markings
Petrification of the debating scientists
RJ RC TJ TC 2 2
c0 is initial c1, c2 belongs to bottom SCC∧ c1( ) > 0∧ c2( ) > 0 c1, c2 are reachable from c0 in N, the Petrified PP
c0 is initial c1, c2 belongs to bottom SCC∧ c1( ) > 0∧ c2( ) > 0 c1, c2 are reachable from c0 in N, the Petrified PP ⇒ = = ⇒ c0 c1 c2 N N
c0 is initial c1, c2 belongs to bottom SCC∧ c1( ) > 0∧ c2( ) > 0 c1, c2 are reachable from c0 in N, the Petrified PP A(C0, C′
0)
def
= InitN(C0) ∧ InitN(C′
0) ∧ C0 = C′
B(C1, C2)
def
= ΩN(C1) ∧ ΩN(C2) ∧ C1( ) > 0 ∧ C2( ) > 0 Check reachability from A to B in N N ⇒ = = ⇒ c0 c1 c2 N N
How to compute Ω?
m m′ The reachability relation is not Presburger definable
How to compute Ω?
But, the mutual reachability relation is effectively Presburger m m′ The reachability relation is not Presburger definable that is, a Presburger formula MR(m, m′) is computable
Finally
ΩN(C)
def
= ∀C′, C′′ : (MRN(C, C′) ∧ C′→C′′) ⇒ MRN(C, C′′) A(C0, C′
0)
def
= InitN(C0) ∧ InitN(C′
0) ∧ C0 = C′
B(C1, C2)
def
= ΩN(C1) ∧ ΩN(C2) ∧ C1( ) > 0 ∧ C2( ) > 0 Check reachability from A to B in N N
Finally
ΩN(C)
def
= ∀C′, C′′ : (MRN(C, C′) ∧ C′→C′′) ⇒ MRN(C, C′′) A(C0, C′
0)
def
= InitN(C0) ∧ InitN(C′
0) ∧ C0 = C′
B(C1, C2)
def
= ΩN(C1) ∧ ΩN(C2) ∧ C1( ) > 0 ∧ C2( ) > 0 Check reachability from A to B in N N C C′
Finally
ΩN(C)
def
= ∀C′, C′′ : (MRN(C, C′) ∧ C′→C′′) ⇒ MRN(C, C′′) A(C0, C′
0)
def
= InitN(C0) ∧ InitN(C′
0) ∧ C0 = C′
B(C1, C2)
def
= ΩN(C1) ∧ ΩN(C2) ∧ C1( ) > 0 ∧ C2( ) > 0 Check reachability from A to B in N N C C′ C′′
Finally
ΩN(C)
def
= ∀C′, C′′ : (MRN(C, C′) ∧ C′→C′′) ⇒ MRN(C, C′′) A(C0, C′
0)
def
= InitN(C0) ∧ InitN(C′
0) ∧ C0 = C′
B(C1, C2)
def
= ΩN(C1) ∧ ΩN(C2) ∧ C1( ) > 0 ∧ C2( ) > 0 Check reachability from A to B in N N C C′ C′′
Does my PP compute this predicate? What predicate does my PP compute?
What predicate can PPs compute?
PP compute exactly the Presburger predicates [Angluin et al.,’04]
What predicate can PPs compute?
PP compute exactly the Presburger predicates [Angluin et al.,’04] Not less than Presburger is “easy”: treshold, ≡m, ∧, ∨, ¬ Not more Presburger is “involved”
Does my PP compute this (Presburger) predicate? What (Presburger) predicate does my PP compute?
Does my PP compute this (Presburger) predicate? What (Presburger) predicate does my PP compute? effectively computable decidable
Does my PP compute (Presburger) predicate Π?
Does my PP compute (Presburger) predicate Π?
It does not compute Π when:
- for a valuation v1, . . . , vn such that Π(v1, . . . , vn) =
InitN(C0) reaches C1( ) > 0 ∧ ΩN(C1) where C0(xi) =
- vi
if 1 ≤ i ≤ n elsewhere
Does my PP compute (Presburger) predicate Π?
It does not compute Π when:
- for a valuation v1, . . . , vn such that Π(v1, . . . , vn) =
InitN(C0) reaches C1( ) > 0 ∧ ΩN(C1) where C0(xi) =
- vi
if 1 ≤ i ≤ n elsewhere OR
- for a valuation v1, . . . , vn such that Π(v1, . . . , vn) =
InitN(C0) reaches C1( ) > 0 ∧ ΩN(C1) where C0(xi) =
- vi
if 1 ≤ i ≤ n elsewhere
“Does my PP compute a predicate?” is PN-reachability hard
“Does my PP compute a predicate?” is PN-reachability hard
Does p0 ∈ Reach(N, M) for some M s.t. M(p0 ∪ P) = 0? p0 ∈ P / ∈ P / ∈ P ∈ P ∈ P / ∈ P N “looks like” a PP: transitions have 1 or 2 input/output arcs p0 is “write only”: no transition consumes from p0
PN-reachability hardness (con’td)
PP states = {places of N} ∪ {Budget} ∪ {zombie}
PN-reachability hardness (con’td)
PP states = {places of N} ∪ {Budget} ∪ {zombie} (p1, p2) − → (p′
1, p′ 2)
(p, Budget) − → (p′
1, p′ 2)
(p1, p2) − → (p′, Budget) (p, Budget) − → (p′, Budget) p1 p2 p′
2
p′
1
p1 p2 p′
2
p′
1
p p′ p′ p PP transitions:
From PN reachability to “does my PP compute a predicate?”
p0 Budget
- p0 ∈ Reach(N, M) for some marking M
. . .
zombie
places of N
From PN reachability to “does my PP compute a predicate?”
p0 Budget
- p0 ∈ Reach(N, M) for some marking M
. . .
zombie
places of N
From PN reachability to “does my PP compute a predicate?”
p0 Budget
- p0 ∈ Reach(N, M) for some marking M
. . .
zombie
places of N
From PN reachability to “does my PP compute a predicate?”
p0 Budget
- p0 ∈ Reach(N, M) for some marking M
. . .
- p0 ∈ Reach(N, M) for no marking M
p0
. . .
zombie zombie Budget
places of N
From PN reachability to “does my PP compute a predicate?”
p0 Budget
- p0 ∈ Reach(N, M) for some marking M
. . .
p0
. . . . . .
- p0 ∈ Reach(N, M) for no marking M
p0
. . .
zombie zombie zombie Budget Budget
places of N
From PN reachability to “does my PP compute a predicate?”
p0 Budget
- p0 ∈ Reach(N, M) for some marking M
. . .
p0
. . . . . .
(p0, X) − → (p0, zombie) ∀X ∈ places of N (zombie, Y ) − → (zombie, zombie) ∀Y
- p0 ∈ Reach(N, M) for no marking M
p0
. . .
zombie zombie zombie Budget Budget
places of N
From general PN-reachability to ”our” PN-reachability
Does M ∈ Reach(N, M0)?
From general PN-reachability to ”our” PN-reachability
Does M ∈ Reach(N, M0)? Does M ∈ Reach(N0, M0) from some M with M(ˆ p) = 0?
From general PN-reachability to ”our” PN-reachability
Does M ∈ Reach(N, M0)? Does M ∈ Reach(N0, M0) from some M with M(ˆ p) = 0? Does M ∈ Reach(N1, M0 + ℓ) for some M s.t. M(ˆ p) = 0 and M(Paux) = 0 and where N1 is PP like?
p1 p2 p3 p4 p5 t 2 p1 p2 ℓ p3 p4 p5
From general PN-reachability to ”our” PN-reachability
Does M ∈ Reach(N, M0)? Does M ∈ Reach(N0, M0) from some M with M(ˆ p) = 0? Does M ∈ Reach(N1, M0 + ℓ) for some M s.t. M(ˆ p) = 0 and M(Paux) = 0 and where N1 is PP like?
From general PN-reachability to ”our” PN-reachability
Does M ∈ Reach(N, M0)? Does M ∈ Reach(N0, M0) from some M with M(ˆ p) = 0? Does M ∈ Reach(N1, M0 + ℓ) for some M s.t. M(ˆ p) = 0 and M(Paux) = 0 and where N1 is PP like? Does M ∈ Reach(N2, p0) for a M s.t. M({ˆ p, p0} ∪ Paux)=0?
From general PN-reachability to ”our” PN-reachability
Does M ∈ Reach(N, M0)? Does M ∈ Reach(N0, M0) from some M with M(ˆ p) = 0? Does M ∈ Reach(N1, M0 + ℓ) for some M s.t. M(ˆ p) = 0 and M(Paux) = 0 and where N1 is PP like? Does M ∈ Reach(N2, p0) for a M s.t. M({ˆ p, p0} ∪ Paux)=0? Does p0 ∈ Reach(N3, M) for a M s.t. M({ˆ p, p0} ∪ Paux)=0?
Population Protocols
Theoretical model with reasonable motivations Does my PP compute a predicate? Does my PP compute this predicate? What predicate does my PP compute?
Credits: Javier Esparza , Rupak Majumdar , Jerome Leroux
- distributed computations among sensor nodes
- “soups” of chemical molecules
- people in social networks
- . . .