Epistemic Gossip Protocols Krzysztof R. Apt CWI Based on joint - - PowerPoint PPT Presentation

epistemic gossip protocols
SMART_READER_LITE
LIVE PREVIEW

Epistemic Gossip Protocols Krzysztof R. Apt CWI Based on joint - - PowerPoint PPT Presentation

Epistemic Gossip Protocols Krzysztof R. Apt CWI Based on joint work with Wiebe van der Hoek and Davide Grossi Anyone who has obeyed nature by transmitting a piece of gossip experiences the explosive relief that accompanies the satisfying of


slide-1
SLIDE 1

Epistemic Gossip Protocols

Krzysztof R. Apt

CWI

Based on joint work with Wiebe van der Hoek

and

Davide Grossi

slide-2
SLIDE 2

Anyone who has obeyed nature by transmitting a piece of gossip experiences the explosive relief that accompanies the satisfying of a primary need. Primo Levi

Krzysztof R. Apt Epistemic Gossip Protocols

slide-3
SLIDE 3

Pope Francis has sharply criticised the Vatican bureaucracy in a pre-Christmas address to cardinals, complaining of “spiritual Alzheimer’s” and “the terrorism of gossip”. BBC News, 22 December 2014

Krzysztof R. Apt Epistemic Gossip Protocols

slide-4
SLIDE 4

Gossip Protocols

Example n people, each knows a secret. How many phone calls are necessary before everybody knows every secret? In each call all secrets are exchanged. Theorem (many authors, early seventies) At least 2n − 4 calls are needed.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-5
SLIDE 5

A solution with 4 calls for n = 4

A call: (a, b). A = {a, b, c, d}. Take the sequence (a, b), (c, d), (a, d), (b, c). After it a, b, c, d know all the secrets.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-6
SLIDE 6

A solution with 4 calls for n = 4

A call: (a, b). A = {a, b, c, d}. Take the sequence (a, b), (c, d), (a, d), (b, c). After it a, b, c, d know all the secrets. Note that the sequence (a, b), (b, c), (c, d), (d, a) does not do the job.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-7
SLIDE 7

A solution with 2n − 4 calls for n ≥ 4

Let A = {a, b, c, d, i1, . . ., in−4}. Take the sequence (a, i1), (a, i2), . . ., (a, in−4). After it a knows all the secrets of i1, . . ., in−4. Follow it by the sequence (a, b), (c, d), (a, d), (b, c). After it a, b, c, d know all the secrets. Follow it by the sequence (a, i1), (a, i2), . . ., (a, in−4). After it all the agents know all the secrets. Note This is a centralized algorithm.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-8
SLIDE 8

Gossip Algorithms

A vast area.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-9
SLIDE 9

Gossip Algorithms

A vast area. (Hedetniemi, Hedetniemi and Liestman, ’88) A survey of gossiping and broadcasting in communication networks. It has 135 references.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-10
SLIDE 10

Gossip Algorithms

A vast area. (Hedetniemi, Hedetniemi and Liestman, ’88) A survey of gossiping and broadcasting in communication networks. It has 135 references. Distributed gossip protocols: each agent acts autonomously, by passing on the gossips it knows and/or by soliciting gossips it does not know.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-11
SLIDE 11

Distributed Gossip Protocols based on Epistemic Logic

Assumptions (Attamah, Van Ditmarsch, Grossi and Van der Hoek, ’14). Agents and secrets.

◮ A finite set A of at least two agents. ◮ Each agent holds a secret. ◮ Each secret is viewed a distinct propositional variable.

Types of calls.

◮ ab−: every agent c = a, b noted that a called b, ◮ ab0: every agent c = a, b noted that some call took place,

though not between whom,

◮ ab+: every agent c = a, b noted that possibly some call took place,

though not between whom.

In all three cases no agent c = a, b learns the contents of the call.

  • Intuition. The superscript indicates the degree of privacy of the call:

− < 0 < +.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-12
SLIDE 12

Our Setup

Type of calls. ab: no agent c = a, b noted that the call between a and b took place. Modes of Communication

◮ push, ⊲, ◮ pull, ⊳, ◮ push-pull, ab or (a, b).

In [ADGH14] only push-pull was considered.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-13
SLIDE 13

Syntax

Epistemic formulas φ ::= Fap | ¬φ | φ ∧ φ | Kaφ, where a is an agent and p a secret. Intuition. Fap is a primitive formula: agent a is familiar with (knows) secret p.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-14
SLIDE 14

Syntax, ctd (modelled after CSP [Hoare ’78])

Component program for an agent a: ∗[[]m

j=1 φj → Sj],

where each φj is an epistemic formula, each Sj is a call in which agent a is the caller. Distributed protocol: a parallel composition of component programs.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-15
SLIDE 15

Example Protocol

Consider the agents 1, 2, . . ., n arranged in a ring, where n ≥ 3. Program for agent i: ∗[¬KiFi⊕1I ⊖ 1 → (i, i ⊕ 1)]. Agent i calls his successor, i ⊕ 1, if i does not know whether his successor is familiar with the secret of i’s predecessor, i ⊖ 1.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-16
SLIDE 16

Example Protocol, ctd

Program for agent i: ∗[¬KiFi⊕1I ⊖ 1 → (i, i ⊕ 1)].

Krzysztof R. Apt Epistemic Gossip Protocols

slide-17
SLIDE 17

Example Protocol, ctd

Program for agent i: ∗[¬KiFi⊕1I ⊖ 1 → (i, i ⊕ 1)]. This protocol is not correct.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-18
SLIDE 18

Example Protocol, ctd

Program for agent i: ∗[¬KiFi⊕1I ⊖ 1 → (i, i ⊕ 1)]. This protocol is not correct. The sequence of calls ab, bc, cd, de, ea, ab results in a termination.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-19
SLIDE 19

Example Protocol, ctd

Program for agent i: ∗[¬KiFi⊕1I ⊖ 1 → (i, i ⊕ 1)]. This protocol is not correct. The sequence of calls ab, bc, cd, de, ea, ab results in a termination. However, at this point agent c does not know the secret of agent e.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-20
SLIDE 20

Semantics (modification of [ADGH14])

Gossip situation: (Qa)a∈A, where ∀a Qa ⊆ P.

  • Intuition. Qa is the set of secrets a knows.

Initial gossip situation (root): each Qa equals {A}.

  • Intuition. Initially each agent knows only his own secret.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-21
SLIDE 21

Transformation of the Gossip Situations

Each call transforms the current gossip situation by adjusting the relevant Qi relations.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-22
SLIDE 22

Transformation of the Gossip Situations

Each call transforms the current gossip situation by adjusting the relevant Qi relations. ab(G) = G ′, where Q′

a = Q′ b = Qa ∪ Qb,

Q′

c = Qc for c = a, b,

Krzysztof R. Apt Epistemic Gossip Protocols

slide-23
SLIDE 23

Transformation of the Gossip Situations

Each call transforms the current gossip situation by adjusting the relevant Qi relations. ab(G) = G ′, where Q′

a = Q′ b = Qa ∪ Qb,

Q′

c = Qc for c = a, b,

(a ⊲ b)(G) = G ′, where Q′

b = Qa ∪ Qb,

Q′

a = Qa,

Q′

c = Qc for c = a, b,

Krzysztof R. Apt Epistemic Gossip Protocols

slide-24
SLIDE 24

Transformation of the Gossip Situations

Each call transforms the current gossip situation by adjusting the relevant Qi relations. ab(G) = G ′, where Q′

a = Q′ b = Qa ∪ Qb,

Q′

c = Qc for c = a, b,

(a ⊲ b)(G) = G ′, where Q′

b = Qa ∪ Qb,

Q′

a = Qa,

Q′

c = Qc for c = a, b,

(a ⊳ b)(G) = G ′, where Q′

a = Qa ∪ Qb,

Q′

b = Qb,

Q′

c = Qc for c = a, b.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-25
SLIDE 25

Example

Consider three agents, a, b, c and the sequence of three calls bc, ac, bc. In the initial gossip situation root Qa = {A}, Qb = {B}, Qc = {C}.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-26
SLIDE 26

Example

Consider three agents, a, b, c and the sequence of three calls bc, ac, bc. In the initial gossip situation root Qa = {A}, Qb = {B}, Qc = {C}. The first call transforms it into G1 in which Qa = {A}, Qb = {B, C}, Qc = {B, C}.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-27
SLIDE 27

Example

Consider three agents, a, b, c and the sequence of three calls bc, ac, bc. In the initial gossip situation root Qa = {A}, Qb = {B}, Qc = {C}. The first call transforms it into G1 in which Qa = {A}, Qb = {B, C}, Qc = {B, C}. The second call transforms it into G2 in which Qa = {A, B, C}, Qb = {B, C}, Qc = {A, B, C}.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-28
SLIDE 28

Example

Consider three agents, a, b, c and the sequence of three calls bc, ac, bc. In the initial gossip situation root Qa = {A}, Qb = {B}, Qc = {C}. The first call transforms it into G1 in which Qa = {A}, Qb = {B, C}, Qc = {B, C}. The second call transforms it into G2 in which Qa = {A, B, C}, Qb = {B, C}, Qc = {A, B, C}. The third call transforms it into G3 in which Qa = {A, B, C}, Qb = {A, B, C}, Qc = {A, B, C}.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-29
SLIDE 29

Call Sequences

  • C : the set of all finite call sequences.
  • c(root): the result of iteratively applying the calls in

c to root. In the previous example:

  • c = (bc, ac, bc),
  • c(root) = ({A, B, C}, {A, B, C}, {A, B, C}).

Krzysztof R. Apt Epistemic Gossip Protocols

slide-30
SLIDE 30

Gossip models

The gossip model captures the idea that agents are uncertain which call sequence took place. The gossip model: ( C, (∼a)a∈A), where

◮ for each a ∈ A

  • c ∼a

c′ iff agent a cannot distinguish between c and c′.

A consequence of c ∼a c′:

  • c(root)a =

c′(root)a.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-31
SLIDE 31

Semantics

Consider the gossip model M := ( C, (∼a)a∈A) and c ∈ C. Let c(root) = (Qa)a∈A. (M, c) | = Fap iff p ∈ Qa, (M, c) | = Kaφ iff (M, c′) | = φ for every c′ ∼a c.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-32
SLIDE 32

Computations (1)

Semantics of a gossip protocol: a computation tree. The nodes are call sequences. Each call extends the current call sequence.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-33
SLIDE 33

Computations (2)

Assume a gossip protocol that is a parallel composition of ∗[[]ma

j=1 φa j → Sa j ], where a ∈ A.

Then (c0, . . ., ci) → (c0, . . ., ci, ci+1) if for some a and j ∈ {1, . . ., ma} (M, (c0, . . ., ci)) | = φa

j and Sa j = ci+1.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-34
SLIDE 34

Computations (2)

Assume a gossip protocol that is a parallel composition of ∗[[]ma

j=1 φa j → Sa j ], where a ∈ A.

Then (c0, . . ., ci) → (c0, . . ., ci, ci+1) if for some a and j ∈ {1, . . ., ma} (M, (c0, . . ., ci)) | = φa

j and Sa j = ci+1.

So (c0, . . ., ck) is a leaf of the computation tree iff (M, (c0, . . ., ck)) | =

  • a∈A

ma

  • j=1

¬φa

j .

Krzysztof R. Apt Epistemic Gossip Protocols

slide-35
SLIDE 35

Computations (3)

Assume ∗[[]ma

j=1 φa j → Sa j ], where a ∈ A.

A computation of a gossip protocol: a maximal rooted path in its computation tree. An agent a is enabled in c from ξ if (M, c) | = ma

j=1 φa j .

  • Intuition. An agent is enabled if it can perform a call.

An agent a is selected in c from ξ if it is the caller in the call that caused the transition c → c′ in ξ. A computation ξ is fair if it is finite or each agent enabled in infinitely many situation sequences in ξ is selected in infinitely many situation sequences in ξ.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-36
SLIDE 36

Correctness

Assume a gossip protocol P that is a parallel composition of ∗[[]ma

j=1 φa j → Sa j ], where a ∈ A.

P is partially correct if

  • a,b∈A

FaB is true in all leaves of the computation tree of P. P terminates if all its computations are finite. P fairly terminates if all its fair computations are finite.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-37
SLIDE 37

Some Implications

T: termination. FT: fair termination. Note T = ⇒ FT. T for ⊲ = ⇒ FT for ⊲. T for ⊳ = ⇒ FT for ⊳. No other implications hold.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-38
SLIDE 38

Example: T for ⊲ does not imply T

Consider three agents, a, b, c. FjAll stands for

i∈{a,b,c} FjI.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-39
SLIDE 39

Example: T for ⊲ does not imply T

Consider three agents, a, b, c. FjAll stands for

i∈{a,b,c} FjI.

Let A ⊂ C stand for

  • i∈{a,b,c}

(FaI → FcI) ∧

  • i∈{a,b,c}

(FcI ∧ ¬FaI)

  • Intuition. c is familiar with more secrets than a.

Consider the following component programs:

◮ for agent a: ∗[¬(A ⊂ C) ∧ ¬FaAll → a ⊲ c], ◮ for agent b: ∗[¬(B ⊂ C) ∧ ¬FbAll → b ⊲ c], ◮ for agent c: ∗[[]i∈{a,b}FcAll ∧ ¬KcFiC → c ⊲ i]. Krzysztof R. Apt Epistemic Gossip Protocols

slide-40
SLIDE 40

Example: T for ⊲ does not imply T

Consider three agents, a, b, c. FjAll stands for

i∈{a,b,c} FjI.

Let A ⊂ C stand for

  • i∈{a,b,c}

(FaI → FcI) ∧

  • i∈{a,b,c}

(FcI ∧ ¬FaI)

  • Intuition. c is familiar with more secrets than a.

Consider the following component programs:

◮ for agent a: ∗[¬(A ⊂ C) ∧ ¬FaAll → a ⊲ c], ◮ for agent b: ∗[¬(B ⊂ C) ∧ ¬FbAll → b ⊲ c], ◮ for agent c: ∗[[]i∈{a,b}FcAll ∧ ¬KcFiC → c ⊲ i].

This protocol is correct, terminates for ⊲ and does not always terminate for the push-pull mode. The only computations: [a ⊲ c||b ⊲ c], [c ⊲ a||c ⊲ b]. For the push-pull mode ac, ac, ac, . . . is a possible computation.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-41
SLIDE 41

Another Ring Protocol

Program for agent i: ∗[

n

  • j=1

(FiJ ∧ Ki¬Fi⊕1J) → i♦i ⊕ 1], where ♦ is ⊲, ⊳ or push-pull. Agent i calls his successor, i ⊕ 1, if i is familiar with some secret and he knows that his successor is not familiar with it. Properties of this protocol:

◮ ♦ = ⊲.

It is correct and it terminates.

◮ ♦ = ⊳.

It does not always terminate.

◮ ♦ = push-pull.

It is not correct.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-42
SLIDE 42

Yet Another Ring Protocol

Program for agent i: ∗[(¬

n

  • j=1

FiJ) ∨ ¬KiFi⊕1I ⊖ 1 → (i, i ⊕ 1)]. Agent i calls his successor, i ⊕ 1, if it is not familiar with all the secrets or it does not know whether his successor is familiar with the secret of i’s predecessor, i ⊖ 1. Properties of this protocol: T FT T for ⊲ FT for ⊲ T for ⊳ FT for ⊳ no yes no yes no yes

Krzysztof R. Apt Epistemic Gossip Protocols

slide-43
SLIDE 43

Yet Another Ring Protocol

Program for agent i: ∗[(¬

n

  • j=1

FiJ) ∨ ¬KiFi⊕1I ⊖ 1 → (i, i ⊕ 1)]. Agent i calls his successor, i ⊕ 1, if it is not familiar with all the secrets or it does not know whether his successor is familiar with the secret of i’s predecessor, i ⊖ 1. Properties of this protocol: T FT T for ⊲ FT for ⊲ T for ⊳ FT for ⊳ no yes no yes no yes Non-termination: (i, i ⊕ 1), (i, i ⊕ 1), . . .

Krzysztof R. Apt Epistemic Gossip Protocols

slide-44
SLIDE 44

A Terminating Ring Protocol

Program for agent i: ∗[

n

  • j=1

(FiJ ∧ ¬KiFi⊕1J) → (i, i ⊕ 1)]. Agent i calls his successor, i ⊕ 1, if i is familiar with some secret and he does not know whether his successor is familiar with it. Properties of this protocol: T FT T for ⊲ FT for ⊲ T for ⊳ FT for ⊳ yes yes yes yes no yes

Krzysztof R. Apt Epistemic Gossip Protocols

slide-45
SLIDE 45

A Terminating Ring Protocol, ctd

Program for agent i: ∗[

n

  • j=1

(FiJ ∧ ¬KiFi⊕1J) → (i, i ⊕ 1)]. Non-termination for ⊳. i ⊳ i ⊕ 1, i ⊳ i ⊕ 1, . . . Termination for push-pull. After each call (i, i ⊕ 1) the set Inf := {(i, j) | ¬KiFi⊕1J}. decreases.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-46
SLIDE 46

Protocols for Complete Graphs

Learn New Secrets Protocol ([ADGH14]) Program for agent i: ∗[[]j∈A¬FiJ → (i, j)]. Agent i calls agent j if agent i is not familiar with his secret. Properties of this protocol: T FT T for ⊲ FT for ⊲ T for ⊳ FT for ⊳ yes yes no no yes yes

Krzysztof R. Apt Epistemic Gossip Protocols

slide-47
SLIDE 47

Learn New Secrets Protocol for push-pull

Program for agent i: ∗[[]j∈A¬FiJ → (i, j)]. It can generate the shortest sequences of 2n − 4 calls. Indeed, let A = {a, b, c, d, i1, . . ., in−4}. Then (a, i1), (a, i2), . . ., (a, in−4), (a, b), (c, d), (a, d), (b, c), (i1, b), (i2, b), . . ., (in−4, b) corresponds to a terminating computation. It can also generate the longest sequences of n(n−1)

2

calls. Indeed, take [2], [3], [4], . . ., [n], where [k] stands for (1, k), (2, k), . . ., (k − 1, k).

Krzysztof R. Apt Epistemic Gossip Protocols

slide-48
SLIDE 48

Hear My Secret Protocol

Program for agent i: ∗[[]j∈A¬KiFjI → (i, j)]. Agent i calls agent j if agent i does not know whether j is familiar with his secret. Properties of this protocol: T FT T for ⊲ FT for ⊲ T for ⊳ FT for ⊳ yes yes yes yes no no It can generate the shortest and the longest sequences of calls. Argument the same as for the LNS protocol.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-49
SLIDE 49

Future Work

Analyze the protocols for other types of calls, so

◮ ab−: every agent c = a, b noted that a called b, ◮ ab0: every agent c = a, b noted that some call took place,

though not between whom.

◮ ab+: every agent c = a, b noted that possibly some call took place,

though not between whom.

Introduce a logic in which the correctness proofs can be formally written out. Prove (im)possibility results for various protocols concerning generation of (not only) the shortest sequences and for various modes

  • f communication.

Consider initial situations in which the agents have some partial knowledge of the secrets.

Krzysztof R. Apt Epistemic Gossip Protocols

slide-50
SLIDE 50

Thank you

Krzysztof R. Apt Epistemic Gossip Protocols