# Simple epistemic planning: generalised gossiping

The gossip problem, in which information (known as secrets) must be shared among a certain number of agents using the minimum number of calls, is of interest in the conception of communication networks and protocols. We extend the gossip problem to arbitrary epistemic depths. For example, we may require not only that all agents know all secrets but also that all agents know that all agents know all secrets. We give optimal protocols for various versions of the generalised gossip problem, depending on the graph of communication links, in the case of two-way communications, one-way communications and parallel communication. We also study different variants which allow us to impose negative goals such as that certain agents must not know certain secrets. We show that in the presence of negative goals testing the existence of a successful protocol is NP-complete whereas this is always polynomial-time in the case of purely positive goals.

## Authors

• 13 publications
• 9 publications
• 1 publication
• 1 publication
• 1 publication
07/13/2018

### When Are Two Gossips the Same? Types of Communication in Epistemic Gossip Protocols

We provide an in-depth study of the knowledge-theoretic aspects of commu...
07/29/2019

### Strengthening Gossip Protocols using Protocol-Dependent Knowledge

Distributed dynamic gossip is a generalization of the classic telephone ...
06/24/2016

### Epistemic Protocols for Distributed Gossiping

Gossip protocols aim at arriving, by means of point-to-point or group co...
11/26/2020

### Everyone Knows that Everyone Knows: Gossip Protocols for Super Experts

A gossip protocol is a procedure for sharing secrets in a network. The b...
10/07/2019

### Improving Performance of Multiagent Cooperation Using Epistemic Planning

In most multiagent applications, communication is essential among agents...
08/13/2020

### A diagrammatic approach to information flow in encrypted communication (extended version)

We give diagrammatic tools to reason about information flow within encry...
07/22/2019

### A Conceptually Well-Founded Characterization of Iterated Admissibility Using an "All I Know" Operator

Brandenburger, Friedenberg, and Keisler provide an epistemic characteriz...
##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

We consider communication problems concerning agents. We consider that initially, for , agent has some information , also known as this agent’s secret since, initially, the other agents do not know this information. In many applications, this corresponds to information that agent wishes to share with all other agents, such as agent ’s signature on a contract or the dates when agent is available for a meeting. On the other hand, it may be confidential information which is only to be shared with a subset of the other agents, such as agent ’s telephone number, cryptographic key, password or credit card number. More mundanely, it could simply be some gossip that agent wants to share. Indeed, the simplest version of the problem in which all agents want to communicate their secrets to all other agents (using the minimum number of communications) is traditionally known as the gossip problem. Several variants have been studied in the literature, and a survey of these alternatives and the associated results has been published [Hedetniemi1988].

The gossip problem is a particular case of a multiagent epistemic planning problem. We view it as an epistemic counterpart of blocksworld problems where the complexity of epistemic planning problems can be illustrated in a nice way. We demonstrate this by studying several variants of the classic problem: by supposing that not all pairs of agents can communicate directly, by allowing parallel or one-way communications, and by introducing the notion of confidential information which should not be shared with all other agents. However, our main contribution is to study the gossip problem at different epistemic depths. In the classic gossip problem, the goal is for all agents to know all secrets (which corresponds to epistemic depth 1). The equivalent goal at epistemic depth 2 is that all agents know that all agents know all the secrets; at depth 3, all agents must know that all agents know that all agents know all the secrets. For example, in a commercial setting, if the secrets are the agents’ agreement to the terms of a joint contract, then an agent may not authorize expenditure on the project before knowing that all other agents know that all agents agree to the terms of the contract. We provide algorithms for these variants and establish their optimality in most of the cases.

The paper is organized as follows. In the next section we formally introduce epistemic planning and the epistemic version of the classic gossip problem Gossip(). In Section 3 we study the properties of Gossip(). In Section 4 we turn our attention to the version of this problem in which all communications are one-way (such as e-mails rather than telephone calls). In Section 5 we study a parallel version in which calls between different agents can take place simultaneously. In each of these three cases, we give a protocol which is optimal (given certain conditions on the graph ) assuming we want to attain all positive epistemic goals up to depth . We then consider versions of the gossip problem with some negative goals. This version of the gossip problem has obvious applications concerning confidential information which is only to be broadcast to a subset of the other agents. In Section 6 we show that determining the existence of a plan which attains a mixture of positive and negative goals is NP-complete. In Section 7 we show that allowing agents to change their secrets (when secrets correspond, for example, to passwords or telephone numbers) allows more problems to be solved, but testing the existence of a plan remains NP-complete. We conclude with a discussion in Section 8.

## 2 Epistemic planning and the gossip problem

Dynamic Epistemic Logic DEL [VanDitmarsch2007] provides a formal framework for the representation of knowledge and update of knowledge, and several recent approaches to multi-agent planning are based on it, starting with [Bolander2011, Lowe2011]. While DEL provides a very expressive framework, it was unfortunately proven to be undecidable even for rather simple fragments of the language [AucherB13, Charrier2016a]. Some decidable fragments were studied, most of which focused on public events [Lowe2011, yu2015dynamic]. However, the gossip problem requires private communication. We here consider a simple fragment of the language of DEL where the knowledge operator can only be applied to literals. Similar approaches to epistemic planning can be found in [Kominis2015, Muise2015].

Here we propose a more direct model. We use the notation to represent the fact that agent knows the secret of , the notation to represent the fact that agent knows that agent knows the secret of , etc. We use the term positive fluent for any epistemic proposition of the form . If we consider the secrets as constants and that agents never forget, then positive fluents, once true, can never become false. A negative fluent can, of course, become false. Note that these fluents are not modal formulas of epistemic logic; is not a modal operator. They should simply be viewed as independent propositional variables.

A planning problem consists of an initial state (a set of fluents ), a set of actions and a set of goals (another set of fluents ). Each action has a (possibly empty) set of preconditions (fluents that must be true before the action can be executed) and a set of effects (positive or negative fluents that will be true after the execution of the action). A solution plan (or protocol) is a sequence of actions which when applied in this order to the initial state produces a state in which all goals in are true. We use the term epistemic planning problem when we need to emphasize that fluents may include the operators (). A simple epistemic goal is that all agents know all the secrets, i.e. , . A higher-level epistemic goal is , , i.e. that all agents know that all agents know all the secrets.

The gossip problem on agents and a graph is the epistemic planning problem in which the actions are CALL for (i.e. there is an edge between and in if and only if they can call each other) and the initial state contains for (and implicitly all fluents of the form with , together with all fluents of the form with ). The action CALL has no preconditions and its effect is that agents and share all their knowledge. We go further and assume that the two agents know that they have shared all their knowledge, so that, if we had or before the execution of CALL, for any fluent , then we have just afterwards, for any and for any sequence . The assumption that two agents share all their knowledge when they communicate may appear unrealistic, but, if the aim is to broadcast information using the minimum number of calls, this is clearly the best strategy. Furthermore, in applications in which some secrets must not be divulged to all agents, it is important to study the worst-case scenario in which all information is exchanged whenever a communication occurs.

Let Gossip-pos() be the gossip problem on a graph in which the goal is a conjunction of positive fluents of the form (). Thus, the parameter specifies the maximum epistemic depth of goals. We use Gossip() to denote the specific problem in which all such goals must be attained. For any fixed , Gossip-pos() can be solved in polynomial time since it can be coded as a classic STRIPS planning problem in which actions have no preconditions, and all effects of actions and all goals are positive [Bylander94]. Indeed, a necessary and sufficient condition for a solution plan to exist is that, for all goals , there is a path in from to passing through (in this order). Let Gossip-neg() be the gossip problem in which the goal is a conjunction of goals of the form () or (). We write Gossip-pos(), Gossip() and Gossip-neg() to denote the corresponding problems in which the graph is part of the input. Versions with one-way and parallel communication will be defined in sections 4 and 5. In Section 7 we will define a version where secrets can change truth value.

## 3 Minimising the number of calls for positive goals

In this section we consider the gossip problem with only positive goals. The minimal number of calls to obtain the solution of Gossip(1) is either if the graph contains a quadrilateral (a cycle of length 4) as a subgraph, or in the general case [Harary1974]. We first give a simple protocol for any connected graph before giving protocols requiring many less calls for special cases of .

###### Proposition

If the graph is connected, then for and , any instance of Gossip-pos() has a solution of length no greater than calls.

Proof:  Since is connected, it has a spanning tree . Let the root of be . Since , there is a node that is connected to . Let be the subtree rooted in and let be the rest of , i.e., together with all its subtrees except . Let be the number of edges in tree .

Consider the following protocol, composed of a total of passes. Each pass either consists in calls that go upwards in followed by a call between and , or consists in calls that go downward. odd passes: calls upwards in , starting with the leaves; calls upwards in , starting with the leaves; CALL even passes: calls downwards in , starting with ; calls downwards in , starting with

After passes:

• if then and are true for all ;

• if then is true for all ;

So the goal is attained after passes. Since the odd passes have calls and the even passes have calls, this gives us a total of calls.

In fact, for , we require considerably less than calls if has a Hamiltonian path.

###### Proposition

If the graph has a Hamiltonian path, then any instance of Gossip-pos() has a solution of length no greater than .

Proof:  Let be the Hamiltonian path in . Number the vertices of from 1 to in the order they are visited in .

Consider the following protocol: first pass: CALL (for ),     then  CALL (for ) second pass: CALL (for ) third pass: CALL (for )  ⋮ even passes: CALL (for ) odd passes: CALL (for )  ⋮ It is not difficult to see that the first pass establishes for all , and indeed it establishes both and for all since CALL is the last communication in this pass. By a straightforward induction argument, we can show that the th pass, for even, establishes for all , and indeed that the th pass establishes both and for all since CALL is the last communication in this pass. Similarly, when is odd, the th pass establishes for all , and indeed both and for all . The above plan then establishes, after passes, all possible depth- epistemic goals. The number of CALL actions in this plan is in the first pass and in each subsequent pass, which makes in total after passes.

The first pass of the protocol given in the proof of Proposition 3 scans agents from to and then from to , whereas each subsequent pass consists of a single scan. We can explain this by the fact that the purpose of the first scan is to group secrets together; the purpose of the second scan is then to broadcast this grouped information to all agents. What is surprising is that we only require one scan for each subsequent increment in the epistemic depth .

Determining the existence of a Hamiltonian path is known to be NP-complete [GareyJ79]. However, this does not necessarily imply that finding an optimal solution for Gossip-pos() (the problem in which the graph is part of the input) is NP-hard. One reason is that we do not actually need a Hamiltonian path to obtain a plan of length . In fact, in the protocol given in the proof of Proposition 3 we can replace the actions CALL () by any sequence CALL () such that and , . Another reason why the existence of a Hamiltonian path is not necessarily critical is that we can often actually do better. Indeed, the value is not necessarily optimal, since for certain graphs we can achieve , i.e. one call less.

The graph shown in Figure 1 is the complete bipartite graph with parts , , and is denoted in graph theory by . We now show that there is a protocol which achieves calls provided contains as a subgraph. This subsumes a previous result which was given only for the case of a complete graph  [He2015.6].

###### Proposition

For , if the -vertex graph has as a subgraph, then any instance of Gossip-pos() has a solution of length no greater than .

Proof:  Suppose that the two parts of are , . We choose an arbitrary partition of the vertices into two non-empty sets , . We can number the vertices so that and . Denote by and by (as shown in Figure 1).

Consider the following protocol: odd passes: CALL    CALL CALL    CALL even passes: CALL    CALL CALL    CALL In other words: the odd passes are composed of CALL for each in increasing order of , followed by CALL for each in increasing order of ; and the even passes are composed of CALL for each in decreasing order of , followed by CALL for each in decreasing order of . The length of this plan after passes is . It therefore only remains to show that passes are sufficient to establish all possible depth- epistemic goals. A positive epistemic fluent of the form , for agents , has depth . In particular, has depth 0.

For , let be the hypothesis that after passes, for all depth positive epistemic fluents , we have

 (K1f∨Kqf) ∧ (K2f∨Kpf)    if m is odd (K1f∨K3f) ∧ (K2f∨K4f)    if m is even

It is not difficult to see that is true after the first pass. For , suppose is even. By , after pass , we have for all positive fluents of depth . Thus the first call of pass , CALL, makes and know all fluents of depth . After CALL, and know that , , , know all fluents of depth . The same goes for : since we have by , after CALL, and know all fluents of depth . At the end of pass (after CALL), and know that , , , know all fluents of depth . Thus for any fluent of depth , either knows or knows , and either knows or knows , that is, . The reasoning is similar for odd. The above plan therefore establishes, after passes, all possible depth- epistemic goals.

Observe that the complete graph on vertices has as a subgraph. Furthermore, detecting whether an arbitrary graph has as a subgraph can clearly be achieved in polynomial time, since it suffices to test for each pair of vertices whether or not contains all edges of the form (, ).

Recall that Gossip() denotes the version of Gossip-pos() in which the goal consists of all depth- positive epistemic fluents. We can, in fact, show that the solution plan given in the proof of Proposition 3 is optimal for Gossip().

The number of calls required to solve Gossip() (for any graph ) is at least .

Proof:  Consider any solution plan for Gossip(). The goal of Gossip() is to establish (where is the conjunction of for all ).

We give a proof by induction. Suppose that at least calls are required to establish . This is true for because it takes at least a sequence of calls to establish (each agent knows the secret of each other agent) [Baker1972, Hajnal1972, Tijdeman1971]. For general and without loss of generality, suppose that before the last call to establish it, was false because of lack of knowledge of agent (i.e. was false). By induction hypothesis this is at least the -th call. This call involves and another agent, say , and establishes not only , but also and . However, holds both before and after this call, for the agents distinct from and . To establish , it is necessary to distribute from and to other agents and this takes at least calls. Hence, at least calls are required in total to establish . By induction on , it takes at least a sequence of calls to establish .

## 4 One-way communications

We can consider a different version of the gossip problem, which we denote by Directional-gossip, in which communications are one-way. Whereas a telephone call is essentially a two-way communication, e-mails and letters are essentially one-way. We now consider the case in which the result of CALL is that agent shares all his knowledge with agent but agent receives no information from agent . Indeed, to be consistent with communication by e-mail, in which the sender cannot be certain when (or even if) an e-mail will be read by the receiver, we assume that after CALL, agent does not even gain the knowledge that agent knows the information that agent has just sent in this call.

Clearly, Directional-gossip-pos() can be solved in polynomial time, since any solution plan for Gossip-pos() can be converted into a solution plan for Directional-gossip-pos() by replacing each two-way call by two one-way calls. What is surprising is that the exact minimum number of calls to solve Directional-gossip-pos() is often much smaller than this and indeed often very close to the minimum number of calls required to solve Gossip-pos(). We consider, in particular, the hardest version of Directional-gossip-pos(), in which the aim is to establish all epistemic goals of depth . Let be the conjunction of for all , and let Directional-gossip() denote the directional gossip problem whose goal is to establish .

In the directional version, the graph of possible communications is now a directed graph . Let be the graph with the same vertices as the directed graph but with an edge between and if and only if contains the two directed edges and . It is known that if the directed graph is strongly connected, the minimal number of calls for Directional-gossip-pos(1) is [Harary1974]. We now generalise this to arbitrary under an assumption about the graph .

###### Proposition

For all , if contains a Hamiltonian path, then any instance of Directional-gossip-pos() has a solution of length no greater than .

Proof:  We give a protocol which establishes all positive goals of epistemic depth up to . Without loss of generality, suppose that the Hamiltonian path in is . Consider the plan consisting of passes according to the following protocol: odd passes CALL (for ) even passes CALL (for ) We show by a simple inductive proof that this protocol is correct for any . Recall that is the conjunction of for all . Consider the hypothesis  H(): at the end of pass , if is odd we have and if is even we have . Clearly, H(1) is true since at the end of the first pass agent knows all the secrets (). If is odd and H() holds, then at the end of pass , all agents know and furthermore agent 1 knows this (i.e. ). A similar argument shows that when is even. By induction, H() holds for all . For or to hold, we must have . Thus after passes, and calls, we have the goal .

However, as pointed out in Section 3, determining the existence of a Hamiltonian path in a graph is NP-complete [GareyJ79].

We now show that the solution plan given in the proof of Proposition 4 is optimal even for a complete digraph .

The number of calls required to solve Directional-gossip() (for any digraph ) is at least .

Proof:  Consider any solution plan for Directional-gossip(). The goal of Directional-gossip() is to establish (the conjunction of for all ). Consider the following claims (for ):

C1()

after calls no agent knows

C2()

after calls at most one agent knows .

C3()

at least calls are required to establish

C1() is true because is the conjunction of all the secrets and no agent can know all the secrets after only calls since after calls, there is necessarily some agent who has not communicated his secret to anyone. Let . We will show C1() C2() C3() C1().

### C1(r) ⇒ C2(r):

Straightforward, since during one call only one agent gains knowledge.

### C2(r) ⇒ C3(r):

Suppose that C2() holds, i.e. after calls at most one agent knows . This means that the other agents require some information in order to know . Hence we require at least other calls, i.e. calls in total, to establish .

### C3(r) ⇒ C1(r+1):

Suppose C3() is true and C1() is false. Then we require at least calls to establish but after calls some agent knows . There is clearly a contradiction since agent cannot know something which is false.

This completes the proof by induction that at least calls are required to establish , since this corresponds exactly to C3().

It is worth pointing out that, by Theorem 3, the optimal number of 2-way calls is only less than the optimal number of one-way calls and is hence independent of , the number of agents.

## 5 Parallel communications

An interesting variant, which we call Parallel-gossip-pos(), is to consider time steps instead of calls, and thus suppose that in each time step several calls are executed in parallel. However, each agent can only make one call in any given time step. We denote by Parallel-gossip() the problem of establishing all depth- positive epistemic fluents. For Parallel-gossip(1) on a complete graph , if the number of agents is even, the time taken (in number of steps) is , and if is odd, it is [Bavelas1950, Landau1954, Knodel1975]. We now generalise this to the case of arbitrary epistemic depth .

###### Proposition

For , if the -vertex graph has the complete bipartite graph as a subgraph, then any instance of Parallel-gossip-pos() has a solution with time steps if is even, or time steps if is odd.

Proof:  Suppose that has as a subgraph. So we can partition the vertex set of into two subsets and of size and , respectively, such that has an edge for each and . We can number agents by elements of the ring so that for all , and , where denotes the corresponding element of for all . We consider separately the cases even and odd.

For even , consider the following protocol: first pass: For each step from 1 to : , CALL subsequent passes: Reorder even agents according to the permutation     given by ; Proceed as in the first pass but only for steps from 2 to The first pass of this protocol is illustrated in Figure 2 for . Calls are represented by a line joining two agents.

In the first pass, because of the calls CALL, the first step establishes for all , and . Suppose that after step , for all , we have the conjunction of and for all . We have just seen that this is true for (given that each agent knows his own secret). In particular, if we replace by we have and for all . At step , we make the calls CALL for all , and this establishes and for all . By induction on , it is easily seen that after steps, for all , we have and for all . This means that at the end of the first pass , .

Let be the conjunction of for all . We have just seen that after the first pass is true. Suppose that at the end of pass , is true. For the next pass , CALL are the calls in last step of the previous pass . Hence, after reordering even agents so that replaces , we already have for all , and . We then proceed as for the first pass replacing by to establish in more steps.

It therefore takes passes to establish all possible depth- epistemic goals . The first pass takes steps and the next passes steps, making a total of steps.

For odd , one can place the first agents in a subset , the others being in a subset (see the example in Figure 3 for ). Consider the following protocol: preliminary step: Each agent in calls one agent in , and each agent in calls one agent in subsequent passes: Proceed in as for the first pass of even case in ; Each agent in calls one agent in , and each agent in calls one agent in A typical pass of this protocol is illustrated in Figure 3. The preliminary step is the step on the right of this figure.

In the preliminary step, all agents distribute their knowledge to some agents . Hence, after this step we have for all . For each subsequent pass , it takes steps to distribute knowledge from all agents in (hence, in too because of the previous step) and establish for all . Then agents respectively call the agents in one more step to establish . These last calls also establish for all if necessary for the next pass .

It takes one preliminary step and passes of steps to establish all possible depth- epistemic goals , which makes a total of steps.