Timely Common Knowledge Characterising Asymmetric Distributed Coordination via Vectorial Fixed Points Yoram Moses
Yannai A. Gonczarowski
Einstein Institute of Mathematics and Center for the Study of Rationality Hebrew University of Jerusalem Jerusalem 91904, Israel
Department of Electrical Engineering Technion—Israel Institute of Technology Haifa 32000, Israel
[email protected] [email protected] ABSTRACT
linear temporal order requires the agents to obtain appropriate nested knowledge (knowledge about knowledge) [5], while coordinating simultaneous actions requires attaining common knowledge of particular facts [17]. The latter connection has found uses in the analysis of distributed protocols (see, e.g. [17, 11, 28]). One of the contributions of [17] was in relating approximations of simultaneous coordination to weaker variants of common knowledge, called epsilon-common knowledge and eventual common knowledge. While common knowledge is typically defined and thought of as an infinite conjunction of nested knowledge formulae, it may also be defined as a fixed point [3, 8]. The variants of common knowledge defined by Halpern and Moses in [17] are most naturally obtained by appropriately modifying the fixed-point definition of common knowledge. All of the forms of coordination analyzed in [17] are symmetric in nature, in the sense that they are invariant under renaming of agents. For example, ε-common knowledge arises when the agents are guaranteed to act at most ε time units apart. In many natural situations, however, asymmetric forms of coordination arise. Let us consider an example.
Coordinating activities at different sites of a multi-agent system typically imposes epistemic constraints on the participants. Specifying explicit bounds on the relative times at which actions are performed induces combined temporal and epistemic constraints on when agents can perform their actions. This paper characterises the interactive epistemic state that arises when actions must meet particular temporal constraints. The new state, called timely common knowledge, generalizes common knowledge, as well as other variants of common knowledge. While known variants of common knowledge are defined in terms of a fixed point of an epistemic formula, timely common knowledge is defined in terms of a vectorial fixed point of temporal-epistemic formulae. A general class of coordination tasks with timing constraints is defined, and timely common knowledge is used to characterise both solvability and optimal solutions of such tasks. Moreover, it is shown that under natural conditions, timely common knowledge is equivalent to an infinite conjunction of temporal-epistemic formulae, in analogy to the popular definition of common knowledge.
Example 1.1 (Robotic Car Wash). In an automated robotic car-wash enterprise, there are two washing robots L and R, (with L fitted to soap & rinse the left sides of cars, and R fitted to soap & rinse the right sides), and one drying robot, denoted D. At some point after a car enters, it must be soaped & rinsed from both sides, and then dried. The robot L is a new model, which takes only 4 minutes to perform its duty, while R is an older model, requiring 6 minutes. The drying is applied to the whole car, and it must commence only after washing of both sides is complete. Moreover, drying should not begin more than 5 minutes after the first of the washing robots finishes rinsing the car, as water stains might otherwise incur. It follows that, in particular, no more than 5 minutes may elapse between the time at which the rinsing of the car’s left side ends and the time at which the rinsing of its right side ends. This, in turn, implies that L must start washing the car no later than 7 minutes after — and no more than 3 minutes before — R starts washing it. Finally, it is obviously desirable to minimize the time that the car spends in the Car Wash.
Categories and Subject Descriptors [Artificial intelligence]: Knowledge representation and reasoning — Reasoning about belief and knowledge, Temporal reasoning, Causal reasoning and diagnostics; [Artificial intelligence]: Distributed artificial intelligence — Cooperation and coordination, multi-agent systems; [Real-time systems]: Real-time system specification; [Distributed computing methodologies]
General Terms Theory, Algorithms, Verification
Keywords Common Knowledge, Epistemic Logic, Temporal coordination, Real-time constraints
1.
INTRODUCTION
The temporal constraints in the car wash example make the design of the robots’ control (the protocol that they follow) a delicate matter. With respect to a given car, each of the robots has only one decision to make: when to start treating the car — we shall refer to this as the robot’s action. The times at which the robots act must satisfy the
The fact that knowledge is closely related to coordinated action in distributed and multi-agent systems is well established by now. Ensuring that actions are performed in TARK 2013, Chennai, India. Copyright 2013 by the authors.
1 79
interactive constraints implied by the example. Clearly, the decision to act depends on when each of the other robots can (and will) commence treatment of this car. Before it can act, a robot must know (i.e., be sure) that the others will act in time, which requires, in particular, that the others will in turn know that they can act. More concretely, in our example, when L starts washing a car, it must know that between 7 minutes earlier and 3 minutes later, R will have started washing it, and that between 4 and 4 + 5 = 9 minutes afterward, the drying robot D will have started drying it. Conversely yet asymmetrically, when R starts washing a car, it must know that between 3 minutes earlier and 7 minutes later, L will have started washing it and that between 6 and 6 + 5 = 11 minutes afterward, D will have started drying it. We can similarly calculate D’s required knowledge about L and R. Notice that this dependence is asymmetric — each robot calculates different bounds between its action and those of the two others. The above discussion suggests that the robots in our example must reach some form of “temporal-epistemic equilibrium” in order to act. More generally, analogous situations seem to arise whenever a set of agents must coordinate their actions in a manner satisfying possibly asymmetric timing constraints. Our purpose in this paper is to concisely and usefully capture this form of interdependence in coordinated action. We shall do this by defining a new epistemic condition called timely common knowledge, which is, in a precise sense, necessary and sufficient for coordination as in the above example. Timely common knowledge generalizes and significantly extends common knowledge and its popular variants. Mathematically, the new notion is formally captured by way of a vectorial fixed point. Whereas common knowledge of an event ψ can be defined as the greatest fixed point of the function x → E(ψ ∧ x), mapping events to events, where E is the operator denoting “everyone knows that...”, a vectorial fixed point is the fixed point of a function mapping tuples of events to tuples of events. To our knowledge, such a technique has never before been utilized with regard to epistemic analysis. Roughly speaking, in the case of the car wash example, let ξ¯ = (ξl , ξr , ξd ) be the greatest fixed point of the function ⎞ ⎛ ⎞ ⎛ Kl ( ψc ∧ ⊚≤3 xr ∧ ⊚≤9 xd ) xl ⎝ xr ⎠ → ⎝ Kr ( ψc ∧ ⊚≤7 xl ∧ ⊚≤11 xd ) ⎠ , xd Kd ( ψc ∧ ⊚≤−4 xl ∧ ⊚≤−6 xr )
the different times jointly satisfy the conditions in the fixed point definition. In Section 4, we relate timely common knowledge to coordination. We define a class of timely coordination specifications, in which actions by various agents must satisfy timing conditions as in the Car Wash example. Timely coordination allows both symmetric and asymmetric forms of communication, and it strictly generalizes many symmetric forms of coordination previously studied in the literature. We also show, in a precise sense, that timely common knowledge strictly generalizes standard common knowledge and some of its variants. In Section 6, we show another close connection between timely common knowledge and standard common knowledge. Recall that common knowledge is often described as an infinite conjunction of nested knowledge formulae. A temporal-epistemic variant applies in the case of timely common knowledge. Roughly speaking, consider the point p at which L acts in the above car wash example. Recall that ψc denotes the fact that the car c has arrived, then clearly Kl ψc must hold at p. It is not hard to check that Kl ⊚≤3 Kr ψc should also hold at p, as should Kl ⊚≤3 Kr ⊚≤7 Kl ψc . Indeed, it is possible to generate arbitrarily deeply nested formulae that must hold at p. A different set of formulae must hold when R acts, and yet another set when D does. Thus, timely common knowledge implies an infinite set of nested formulae at each point of action. We show that it is in fact equivalent to a tuple of such sets under natural assumptions. As an example of a natural application of our analysis, in Section 5 we present and mathematically analyze timelycoordinated response — a novel class of multi-agent coordination tasks. Roughly speaking, a timely-coordinated response task involves a prespecified triggering event ψ, such as the activation of a smoke detector or the arrival of a car to the car-wash facility. Should the trigger ψ occur, then each agent i in a set I of agents should perform an action (called its response to ψ) specified by the task, and the timing of the actions must satisfy a constraint of the following form: for all i, j ∈ I, if i acts at time ti and j at tj , then −δ(j, i) ≤ tj − ti ≤ δ(i, j). The trigger ψ, the response actions, and the bounds δ are parameters specified in a given task. E.g. in the car wash example, the trigger is a car’s arrival ψc , responses are robots’ initiating their respective services, while δ(L, R) = 3, δ(L, D) = 9, δ(R, L) = 7, δ(R, D) = 11, δ(D, L) = −4 and δ(D, R) = −6. Timelycoordinated response is inspired by, and strictly generalizes, the response problems presented and studied by Ben-Zvi and Moses [5, 4, 6, 7]. We show that timely common knowledge is, in a precise sense, the epistemic counterpart of timely coordination. We use timely common knowledge to phrase a necessary and sufficient condition characterising protocols solving timelycoordinated response. Moreover, we show how timely common knowledge can be used to give a general technique for deriving a time-optimal solution (i.e. an optimal protocol) for any instance of timely-coordinated response. The main contributions of this paper are:
where ψc is the event “the car is here”, where Ki denotes “i knows that. . . ” and where ⊚≤ε x means that “x holds at some (past, present or future) point in time, no later than ε ¯ robot minutes after the current time”. In the fixed point ξ, L’s coordinate ξl holds iff Kl (ψc ∧ ⊚≤3 ξr ∧ ⊚≤9 ξd ) does, and similarly for the other coordinates. Our results imply that the car-wash problem may be solved by having each robot i perform its task as soon as ξi holds, and that this solution is, in a precise sense, time-optimal. Roughly speaking, the tuple of events ξ¯ will constitute timely common knowledge of ψc (with respect to the timing constraints of Example 1.1).1 Notice that ξ¯ does not correspond to a single fact (or event) that may be true or false at a single point in time. Rather, it represents a tuple of facts, one for each agent of interest. Each of the facts should hold at its own individual time, and
• The theory of coordination in multi-agent systems is extended to treat timely coordination, in which general interdependent constraints are allowed;
1
The definition of timely common knowledge is made in Section 4 with respect to general timing constraints, and is, naturally, more subtle.
• Timely common knowledge is defined as a vectorial fixed point and the mathematical soundness and key 2 80
properties of its definition are established;
relevant constraints on runs (e.g. an agent may not perform two certain given actions at the same time), and a transition function from the global state and all actions performed at any time t, to the global state at t + 1. For a context γ and a protocol P ∈ P, we denote by R(P, γ) the set of runs of P in γ.
• The solvability of, and optimal solutions to, a general class of timely coordination tasks are characterised using timely common knowledge; • Timely common knowledge is shown to generalize common knowledge and many of its variants; and
3.1
• Timely common knowledge is shown to be equivalent to an infinite conjunction under natural assumptions.
2.
There are two equivalent ways of defining knowledge in systems, one in terms of propositions and modal operators in modal logic [12], and the other, proposed by Aumann [2], in terms of events and of functions on events. We follow the latter, since it facilitates the formulation of fixed points, which play a role in our analysis. Informally, however, we use the terms fact and event interchangeably. As in probability theory, we represent events using the set of points at which they hold. A set of runs R gives rise to a (R-)universe ΩR R × T, and a corresponding σ-algebra of events FR 2ΩR . Thus, for example, the event “agent i is performing action α”, is formally associated with all points (r, t) ∈ ΩR at which i performs α. We make use of several temporal operators applied to events. These are very much in the spirit of standard lineartime operators (see Manna and Pnueli [25]), except that in our case two of the operators may refer to the past as well as the future. We thus use slight variations on the standard symbols. A few basic properties of these operators are explored in Appendix C. We define three temporal operators as functions FR → FR as follows;3 fix R ⊆ R and let ψ ∈ FR . • ψ (r, t) ∈ ΩR | ∃ t ∈ T : (r, t ) ∈ ψ ; the event “ψ holds at some past, present or future time (during the current run)”,
RELATED WORK
The notion of common knowledge was defined by the philosopher David Lewis in [24]. Its relevance to game theory was shown by Aumann [2] and to AI by McCarthy [26]. Halpern and Moses [17] introduced it to distributed computing, showed its connection to simultaneity, and defined weaker variants of common knowledge corresponding to “approximations” of simultaneity. Common knowledge and its variants have had various applications in distributed computing [9, 11, 28, 19, 22, 12]. More recently, Ben-Zvi and Moses studied how time bounds on message transmission impact coordination in message-passing systems [5, 6, 4]. Most of their work studied coordination problems that are specified by partial orders. In [7], Ben-Zvi and Moses consider a notion of tightly-timed coordination in which agents act at precise time differences from each other. This gives rise to a generalization of common knowledge in which agents are considered at different prespecified times. All fixed-point epistemic notions (common knowledge and its variants) in the above works are based on a standard (scalar) fixed-point definition. The analysis in this paper significantly extends the connection between coordination and epistemic notions.
3.
Events, Knowledge Operators and Temporal Operators
MODEL AND NOTATION
• ⊚ε ψ (r, t) ∈ ΩR | (r, t + ε) ∈ ψ , for ε ∈ Z; the event “ψ holds at exactly ε time units from now”, and
For ease of exposition, we adopt the multi-agent systems model, based on contexts, runs and systems, of Fagin et al. [12]. The model captures the possible histories, called runs, of a finite set of agents I. We model time as being discrete, ranging over the set T = N ∪ {0} of nonnegative integers.2 Each agent i ∈ I may be thought of as an automaton, existing at any specific time t ∈ T in one of a set of possible states Li . The set of possible global states of the model, describing a snapshot of the system at some given time, is thus Le × i∈I Li , where Le is a set of possible states for the environment. We denote by R the set of possible runs, or possible histories, of the model, where a run r ∈ R is a function r : T → Le × i∈I Li , from times to global states. A point is a run-time pair p = (r, t) ∈ R × T, denoting time t in the run r. The local state of an agent i ∈ I at the point (r, t) is denoted by ri (t). We denote by P the set of protocols, where a protocol P ∈ P is a tuple P = (Pi )i∈I , in which each Pi is a function from the set Li of i’s local states to sets of possible actions (or to a single option, if P is deterministic) for the actions to be performed by i when at that state. Finally, a context γ is a specification of a protocol for the environment, possible initial global states, any
Since Ki ψ is itself an event, nested knowledge facts such as Kj Ki ψ are immediately well defined. This gives rise to a standard S5 notion of knowledge, equivalent to the standard definition in terms of partitions. See Appendix A for a discussion, and for a definition of common knowledge.
2 All results in this paper hold verbatim if we consider infinite sets I of agents, and with only trivial changes if time is continuous, so that T R≥0 . We avoid modifying the model to handle continuous time for ease of exposition.
3 While the following definitions depend on R, we omit R from these notations for readability, as the set of runs will be clear from the discussion. We follow this convention when presenting some other definitions below as well.
t ≤ t + ε & , for (r, t) ∈ ΩR ∃ t ∈ T : (r, t ) ∈ ψ ε ∈ Z∪{∞}; the event “ψ holds at some (past, present, or future) time, no later than ε time units from now”.
• ⊚≤ε ψ
The standard definition of knowledge in this setting is also a function on events. Intuitively, an agent’s information is captured by its local state ri (t). Accordingly, two points (r, t) and (r , t ) are considered indistinguishable in the eyes of i if i’s local state at both points is the same. We use Ki to denote i’s knowledge, and define the event “i knows ψ” by • Ki ψ (r, t) ∈ ΩR | (r , t ) ∈ ψ whenever ri (t) = ri (t) .
×
×
3 81
3.2
Event Ensembles
As mentioned in the introduction, a classic result [17], which stems from Theorem 4.2, is that common knowledge tightly relates to perfect coordination. One manifestation of this is in the fact that if an action α is guaranteed to be performed simultaneously by a set of agents whenever any of them performs it, then these agents must have common knowledge of the occurrence of α when it is performed. (Intuitively, the guaranteed simultaneity of α causes its joint occurrence to be inferred at once by all participants who perform it.) Conversely, whenever common knowledge of a fact arises among a set of agents, it does so simultaneously for all agents. See Appendix B.2 for further details, as well as a review of the analogous analysis for the weaker variants of common knowledge defined in [17]. Our purpose is to similarly relate timely coordination to an epistemic notion. Consider the points at which the robots act in the Car Wash example. In general, the robots may act at different times. Moreover, while the local events that the various robots must respectively know in order for them to act are interdependent, they differ from one another. Therefore, instead of seeking a fixed point of a function on (single events in) FR as done for common knowledge and previous variants, we define a function on FR I — the set of I-tuples of events. Given an event ψ ∈ FR and a timely-coordination spec (I, δ), we define a function fψδ on FR I in which each coordinate i captures the respective constraints of the agent i, based on ψ and δ. The greatest fixed point of fψδ , denoted by by CIδ ψ (this is an I-tuple of events), is shown to capture timely coordination, and is thus the desired ensemble. Since fψδ is a function of several variables, it is a vectorial function, and its fixed point is a vectorial fixed point [1].6
Roughly speaking, it is possible for an agent i to act precisely whenever an event ψ ∈ ΩR occurs, only if at every point at which ψ holds, i knows that it does, i.e. if ψ = Ki ψ. Such an event is said to be i-local. Equivalently, ψ is i-local if its truth is determined by i’s local state, i.e. if there exists S ⊆ Li s.t. for every (r, t) ∈ ΩR , we have (r, t) ∈ ψ iff ri (t) ∈ S. In the study of coordination, we are usually interested in the interaction between the actions of several agents. Consider, for example, a scenario in which two agents, Alice and Bob, must perform two respective actions α and β in some coordinated manner. Then the set eA of points at which Alice performs α is a local event for Alice, and likewise for the corresponding set eB for Bob and β. The pair e¯ (eA , eB ) is called an ensemble for Alice and Bob. More generally, following Fagin et al., given a set of agents I ⊆ I, we define an I-ensemble to be an I-tuple of events e¯ = (ei )i∈I ∈ FR I , in which ei is i-local, for each i ∈ I. Returning to Alice and Bob, consider a deterministic protocol in which whenever Alice performs action α, Bob is guaranteed to simultaneously perform action β and vice versa. Since α and β are guaranteed to be simultaneous actions, we have eA = eB . An ensemble e¯ with this property is thus said to be perfectly coordinated. Fagin et al. [13] have studied the properties of such ensembles, as well as of ensembles satisfying weaker forms of coordination (eventual coordination and ε-coordination) defined in [17]. See Appendix B.1 for more details.
4.
TIMELY COORDINATION & TIMELY COMMON KNOWLEDGE
4.1
Given a set of agents I, we of distinct denote by the set ¯ pairs of agents in I by I 2 (i, j) ∈ I 2 | i = j . We define a timely-coordination spec to be a pair (I, δ), where I ⊆ I ¯ is a set of agents and δ : I 2 → Z ∪ {∞}. Intuitively, δ(i, j) denotes an upper bound on the time from when i performs her action, until when j performs his.4 We can now formally define timely coordination.
Timely Common Knowledge as a Vectorial Fixed Point
We start by defining a lattice structure on FR I . A greatest fixed point of a function f on FR I is a fixed point of f that is greater than any other fixed point thereof, according to the partial order ≤ of the lattice. Recall that a member of FR I is a tuple of events of the form ϕ ¯ (ϕi )i∈I . Definition 4.3 (Lattice Structure on FR I ). Let R ⊆ R and let I ⊆ I. The following partial order relation and binary operations define a lattice structure on FR I . • Order: ϕ ¯ ≤ ξ¯ iff ∀i ∈ I : ϕi ⊆ ξi .
Definition 4.1 (Timely-Coordination). Given a timely-coordination spec (I, δ) and a system R ⊆ R, we say that an I-ensemble e¯ ∈ FR I is δ-coordinated (in R) ¯ if for every (i, j) ∈ I 2 and for every (r, t) ∈ ei , there exists t ≤ t + δ(i, j) s.t. (r, t ) ∈ ej .
• Join: ϕ ¯ ∨ ξ¯ (ϕi ∪ ξi )i∈I . • Meet: ϕ ¯ ∧ ξ¯ (ϕi ∩ ξi )i∈I .
While, as discussed in Appendix A, the popular definition of common knowledge is in terms of an infinite conjunction of nested knowledge formulae, Barwise [3], following Harman [8], has defined common knowledge as a fixed point. Indeed, if we denote EI ψ = i∈I Ki ψ (“everybody in I knows”), then the following is an equivalent way of formulating common knowledge as a fixed point.5
We are now ready to define timely common knowledge. Definition 4.4 (Timely Common Knowledge). Let R ⊆ R and let (I, δ) be a timely-coordination spec. For each ψ ∈ FR , we define δ-common knowledge of ψ by I, denoted by CIδ ψ, to be the greatest fixed point of the function fψδ : FR I → FR I given by ⎞ ⎛
≤δ(i,j) δ fψ : (xi )i∈I → ⎝Ki ψ ∩ ⊚ xj ⎠ .
Theorem 4.2 ([17]). Let R ⊆ R and I ⊆ I. Then CI ψ is the greatest fixed point of the function fψ : FR → FR given by x → EI (ψ ∩ x), for every event ψ ∈ FR .
j∈I\{i} 6
i∈I
While vectorial fixed points may alternatively be captured by nested fixed points [1, Chapter 1], in our case we argue that the vectorial representation better parallels the underlying intuition. We are not aware of either vectorial, or nested fixed points being used in an epistemic setting before.
4
If time were continuous (i.e. T = R≥0 ), then the range of δ would be (T − T) ∪ {∞} = R ∪ {∞} = (−∞, ∞]. 5 The equivalence is in the standard models; see Barwise [3] for a discussion of various accepted definitions for common knowledge and of models in which they do not coincide. 4 82
We justify Definition 4.4 in three steps. First, we show that CIδ ψ is well-defined and satisfies a natural induction rule and a monotonicity property. (For proofs of all propositions given in this paper, see Appendix C.)
counterparts from Theorems B.5 and B.6 regarding eventualand ε-common knowledge, respectively.) Parts 1–3 characterise δ-common knowledge of ψ as the greatest δ-coordinated event ensemble that implies ψ.7 Moreover, Part 3 provides convenient means to prove that timely common knowledge holds. Part 4 says that regardless of the way a δ-coordinated ensemble is formed (be it using δ-common knowledge of some event ψ, or otherwise), the fact that its i’th coordinate holds implies that the i’th coordinate of δ-common knowledge of (the disjunction of) this ensemble holds as well. Finally, part 5 captures the fact that the union of any δ-coordinated ensemble is a fixed point of ∪CIδ , and, together with Part 1, implies the idempotence of ∪CIδ . Our third step is demonstrating the usefulness of timely common knowledge, which we do in the next section.
Lemma 4.5. Let (I, δ) be a timely-coordination spec, let R ⊆ R and let ψ ∈ FR . 1. CIδ ψ is well-defined, i.e. fψδ has a greatest fixed point. ¯ 2. Induction Rule: Every ξ¯ ∈ FR I satisfying ξ¯ ≤ fψδ (ξ) δ ¯ also satisfies ξ ≤ CI ψ. 3. CIδ is monotone: ψ ⊆ φ ⇒ CIδ ψ ≤ CIδ φ, for every ψ, φ ∈ FR . The induction rule is a powerful tool for analyzing situations giving rise to timely common knowledge. It states that if ξi implies the Ki statement in Definition 4.4, with xj substituted by ξj everywhere, then each agent i knows its respective coordinate of CIδ ψ whenever ξi holds. A timely-coordination spec is a fairly general tool for defining relative timing constraints. Particular simple instances can capture previously studied forms of coordination. Namely, if δ ≡ ∞, timely coordination coincides with eventual coordination, and for any ε < ∞, the form of coordination obtained by setting δ ≡ ε closely relates to ε-coordination (and hence to perfect coordination when δ ≡ 0). Indeed, for coordinate-wise stable ensembles (see Appendix C.4) and for ensembles with at most a single point per agent per run (see Section 5 for an example), δ ≡ ε precisely captures ε-coordination and δ ≡ 0 specifies perfect coordination. Furthermore, timely common knowledge is closely related to the corresponding variants of common knowledge, for each of these special cases of constant δ. (See Appendix D.2 for the precise details.) Our second step is to show that timely common knowledge closely corresponds to timely coordination, in the same sense in which common knowledge corresponds to perfect coordination, and variants of common knowledge to their respective forms of coordination. (See, once again, Appendix B.2.) The following theorem establishes this correspondence. (While phrasing this theorem, and henceforth, we use the shorthand notation ∪ξ¯ i∈I ξi , for every ξ¯ = (ξi )i∈I ∈ FR I .)
5.
TIMELY-COORDINATED RESPONSE
We now harness the machinery developed in the previous sections to study a class of coordination problems. In these problems, the occurrence of a particular event φ must trigger responses by a set I ⊆ I of agents, and the responses must be timely coordinated according to a given spec δ.8 The triggering event φ may be the arrival of a car at the Car Wash, the ringing of a smoke alarm, or some other event that requires a response. A run r during which φ occurs (i.e. (r, t) ∈ φ for some t ∈ T) is called φ-triggered. Following in the spirit of [5] and generalizing their definitions (see Appendix D.1), we define this class of coordination problems as follows. Definition 5.1 (Timely-Coordinated Response). A timely-coordinated response problem, or TCR, is a quintuplet τ = (γ, φ, I, δ, α), ¯ where γ is a context, φ ∈ FR is an event, (I, δ) is a timely-coordination spec and α ¯ = (αi )i∈I is a tuple of actions, one for each i ∈ I. A protocol P is said to solve a TCR τ = (γ, φ, I, δ, α) ¯ if for every r ∈ R(P, γ), • If r is φ-triggered and φ first occurs in r at tφ ∈ T, then each agent i ∈ I responds (i.e. performs αi ) in r ¯ exactly once, at a time ti ≥ tφ s.t. for every (i, j) ∈ I 2 , it holds that tj ≤ ti + δ(i, j). • If r is not φ-triggered, then none of the agents in I respond in r.
Theorem 4.6. Let R ⊆ R and let (I, δ) be a timelycoordination spec.
We say that τ is solvable if there exists a protocol P ∈ P that solves it. We now show that attaining timely common knowledge is a necessary condition for action in a protocol solving timely-coordinated response, in the sense that an agent cannot respond unless is has attained its respective coordinate of timely common knowledge.9 Indeed, Theo-
1. CIδ ψ constitutes a δ-coordinated I-ensemble, for every ψ ∈ FR . 2. ∪CIδ ψ ⊆ ψ, for every ψ ∈ FR . 3. If e¯ ∈ FR I is a δ-coordinated I-ensemble satisfying ∪¯ e ⊆ ψ for some ψ ∈ FR , then e¯ ≤ CIδ ψ.
7 Neither eventual- nor ε-common knowledge give way for a clean analogous characterisation. (See Appendix D.2 for more details.) 8 For ease of exposition, we assume that each agent is associated with exactly one action. Essentially the same analysis applies if we allow each agent to be associated with more than one response action. 9 In the following propositions, we work in the universe ΩR(P,γ) defined by the system of runs of the given protocol in question. All knowledge and temporal operators are therefore relative to this universe. Furthermore, we slightly abuse notation by writing φ to refer to φ ∩ ΩR(P,γ) , i.e. the restriction of φ to this universe.
4. If e¯ ∈ FR I is a δ-coordinated I-ensemble, then e¯ ≤ CIδ (∪¯ e). 5. If e¯ ∈ FR I is a δ-coordinated I-ensemble, then ∪¯ e = ∪CIδ (∪¯ e). Theorem 4.6 highlights some key properties of the fundamental connection between δ-coordination and δ-common knowledge: (Parts 1, 4 and 5 are analogues of Theorems B.4, B.5 and B.6, the latter part being stronger in a sense than its 5 83
rem 4.6(3) implies:10
run-equivalent to a solution of τ iff CIδ (⊚≤0 φ) is attained in each of its φ-triggered runs. (See Corollary C.13.) Attaining true (not timely) common knowledge of a fact of interest is often an effective and intuitive way of synchronization, which may also be used to solve TCRs. However, in addition to such a solution being suboptimal in many cases, timely common knowledge is often attainable even when common knowledge is not. In the Car Wash setting, for example, if the arrival of a car is guaranteed to be observed by each robot (privately) within at most 2 time units, then the TCR can be readily solved (and timely common knowledge attained) even though techniques of [17] may be used to show that the arrival of the car might never become common knowledge. We conclude this section by noting that in contexts supporting full-information protocols (see, e.g. [12]), the above tools may be applied to obtain both a globally time-optimal solution to, as well as a solvability criterion for, arbitrary TCRs. We defer the details to the full paper.
Corollary 5.2. Let P ∈ P be a protocol solving a TCR τ = (γ, φ, I, δ, α), ¯ and let r ∈ R(P, γ) be a φ-triggered run. If i ∈ I responds at time ti in r, then (r, ti ) ∈ CIδ (⊚≤0 φ) i . In fact, timely common knowledge is not only necessary for solving a TCR, but also sufficient for doing so. (See below.) Indeed, we now argue that timely common knowledge can be used to design time-optimal solutions for arbitrary TCRs. For the notion of time-optimality to be well defined, we define it with regard to each family of protocols that are the same in all aspects, except for possibly the time at which (and whether) agents respond. To this end, we restrict ourselves to protocols that may be represented as a pair P = (P−α¯ , Pα¯ ), s.t. the output of P is a Cartesian product of the outputs of its two parts, where Pα¯ specifies whether to respond, while P−α¯ specifies everything else. (Natural examples for such protocols are those in which the choice of whether to respond is deterministic.) Furthermore, we restrict ourselves to contexts in which none of α ¯ affect the agents’ transitions in any way (and hence do not affect any future states or actions). Under these conditions, given two protocols P = (P−α¯ , Pα¯ ) and P = (P−α¯ , Pα¯ ) that share same non-response component P−α¯ , there exists a natural ∼ isomorphism σ : R(P, γ) − → R(P , γ), in which corresponding runs agree in all aspects except for possibly the times at which (and whether) responses are performed; we thus say that two such protocols are run-equivalent. Furthermore, we slightly abuse notation by writing R(P−α¯ , γ) to refer to both R(P, γ) and R(P , γ), which coincide using σ. We say that a protocol P = (P−α¯ , Pα¯ ) is a time-optimal solution for a TCR τ if P solves τ and, moreover, responses are never performed in P later than in any solution P of τ that is run-equivalent to P . More formally, we demand that for every φ-triggered r ∈ R(P, γ) and for every i ∈ I, if i responds at time ti in r and at time ti in σ(r) ∈ R(P , γ) (with σ as above), then necessarily ti ≤ ti . It should be noted that it is not a priori clear that TCRs admit time-optimal solutions. We now show not only that all solvable TCRs do, but moreover, that for every solution there exists a runequivalent time-optimal solution and that all time-optimal solutions have each agent responding at the first instant at which it attains its respective coordinate of timely common knowledge.11
6.
A CONSTRUCTIVE DEFINITION FOR TIMELY COMMON KNOWLEDGE
The analysis of Section 5 provides us with time-optimal solutions for timely-coordinated response. The fly in the ointment, though, is how to implement these solutions, i.e. how to check whether a certain coordinate of timely common knowledge holds, given the state of the corresponding agent. We now take a step in this direction, which also sheds some more light on the fixed-point analysis of the previous section, and makes the notion of timely common knowledge more concrete. Under natural assumptions (see Theorem C.20 for details), we obtain, for every i ∈ I:
(CIδ ψ)i = Ki ⊚δ(i,i2 ) Ki2 ⊚δ(i2 ,i3 ) Ki3 · · ·⊚δ(in−1 ,in ) Kin ψ, ¯ (i,i2 ,...,in )∈I ∗
(1) where I ∗¯ (i1 , . . . , in ) ∈ I ∗ | ∀m : im = im+1 denotes the set of all finite non-stuttering sequences of elements of I. Note that for δ ≡ 0 (perfect coordination), (1) yields in each coordinate a familiar definition (see Observation A.4) of common knowledge as an infinite conjunction: (cf. the more popular Definition A.3, which is generalized by eventualand ε-common knowledge, but is symmetric in nature, and therefore less natural for generalization in our setting.)
CI ψ = Ki1 Ki2 Ki3 · · · Kin ψ.
Corollary 5.3. Let τ = (γ, φ, I, δ, α) ¯ be a solvable TCR and let P = (P−α¯ , Pα¯ ) be a protocol solving it. The runequivalent protocol P = (P−α¯ , Pα¯ ) in which every i ∈ I responds at the first instant at which CIδ (⊚≤0 φ) i holds (in ΩR(P−α¯ ,γ) ), is a time-optimal solution for τ .
¯ (i1 ,...,in )∈I ∗
The formulation of timely common knowledge in terms of an infinite conjunction provides a constructive interpretation of the time-optimal solution from Corollary 5.3. Roughly speaking, each agent i ∈ I should respond at the first instant at which all nested-knowledge formulae of the form Ki ⊚δ(i,i2 ) Ki2 ⊚δ(i2 ,i3 ) Ki3 · · · ⊚δ(in−1 ,in ) Kin ⊚≤0 φ hold for all (i, i2 , . . . , in ) ∈ I ∗¯ . (See Corollary C.22 for the precise phrasing.) While this may appear to take us a step closer to implementing time-optimal solutions, a na¨ıve implementation may still require potentially infinitely many tests. In fact, as in the case of common knowledge, in practice timely common knowledge may be established using the induction rule of Theorem 4.6(3). We also refer the reader to [16, Chapters 6 and 9] for a study of the causal structure of these tests, which uses a different set of tools and which is,
Indeed, we may now formalize our previous statement regarding timely common knowledge being necessary and sufficient for solving a TCR τ = (γ, φ, I, δ, α): ¯ a protocol P is 10
Observe that ⊚≤0 stands for the temporal operator “previously”. 11 As noted in Appendix C, in some runs of certain systems R(P−α¯, γ) in a continuous-time model, the set of times at which CIδ (⊚≤0 φ) i holds does not attain its infimum value. It is possible to similarly show that in such pathological cases, no time-optimal protocol that is run-equivalent to P exists. 6 84
therefore, out of the scope of this paper.
7.
CONCLUDING REMARKS [6]
This paper suggests a broader connection between epistemic analysis and distributed coordination than was previously realized. The novel concept of timely common knowledge provides a formal connection between distributed protocols and a new form of equilibria, thus bringing distributed and multi-agent protocols closer to the realm of games, even in the absence of utilities and preferences. It should be noted, however, that the equilibrium in our analysis is not merely among strategies; in the Car Wash scenario, for example, the particular time instants at which the various robots act are at a temporal-epistemic equilibrium. While this paper introduces vectorial fixed-point epistemic analysis as a tool for defining timely common knowledge, we believe that it will prove to be applicable well beyond the scope of problems considered here. We are currently pursuing generalizations and variations on the techniques presented in this paper for varying purposes, from generalizations of timely common knowledge to analyses of significantly different tasks, such as distributed agreement problems, which do not involve any form of timely coordination. Fixed points, be they scalar or vectorial, be they temporalepistemic or of any other kind, provide formal, yet intuitive, means of capturing equilibria in multi-agent systems. Many systems around us, from subatomic physical systems to astrophysical ones, and from animal societies to stock markets, exist in some form of equilibrium, possibly reached as a result of a long-forgotten spontaneous symmetry breaking. It is thus only natural to conjecture that fixed-point analyses of distributed algorithms and multi-agent systems hold the potential to provide significant further insights that are yet to be discovered.
8.
[7]
[8] [9] [10]
[11]
[12]
[13]
[14] [15]
[16]
ACKNOWLEDGMENTS
[17]
This work was supported in part by the Israel Science Foundation (ISF) under Grant 1520/11, and by the European Research Council under the European Community’s Seventh Framework Programme (FP7/2007-2013) / ERC grant agreement no. [249159]. We would like to thank the reviewers for their useful comments. The first author would like to thank Gil Kalai, the co-advisor of his M.Sc. thesis [16]; this paper is based upon Chapters 7, 8 and 10 thereof.
9.
[18]
[19]
REFERENCES
[20]
[1] A. Arnold and D. Niwi´ nski. Rudiments of μ-Calculus, volume 146 of Studies in Logic and the Foundations of Mathematics. North-Holland, Amsterdam, Netherlands, 2001. [2] R. J. Aumann. Interactive epistemology I: Knowledge. International Journal of Game Theory, 28(3):263–300, 1999. [3] J. Barwise. Three views of common knowledge. In Proceedings of the 2nd Conference on Theoretical Aspects of Reasoning about Knowledge (TARK), pages 365–379, 1988. [4] I. Ben-Zvi. Causality, Knowledge and Coordination in Distributed Systems. PhD thesis, Technion, Israel Institute of Technology, Haifa, Israel, 2011. [5] I. Ben-Zvi and Y. Moses. Beyond Lamport’s happened-before: On the role of time bounds in
[21]
[22]
[23]
[24] [25]
7 85
synchronous systems. In Proceedings of the 24th International Symposium on Distributed Computing (DISC), pages 421–436, 2010. I. Ben-Zvi and Y. Moses. On interactive knowledge with bounded communication. Journal of Applied Non-Classical Logics, 21(3-4):323–354, 2011. I. Ben-Zvi and Y. Moses. Agent-time epistemics and coordination. In Proceedings of the 5th Indian Conference on Logic and its Applications (ICLA), 2013. To appear. J. Bennett. Review of linguistic behaviour by Jonathan Bennet. Language, 53(2):417–424, 1977. K. M. Chandy and J. Misra. How processes learn. Distributed Computing, 1(1):40–52, 1986. B. A. Coan, D. Dolev, C. Dwork, and L. Stockmeyer. The distributed firing squad problem. In Proceedings of the 17th Annual ACM Symposium on Theory of Computing (STOC), pages 335–345, 1985. C. Dwork and Y. Moses. Knowledge and common knowledge in a Byzantine environment: crash failures. Information and Computation, 88(2):156–186, 1990. R. Fagin, J. Y. Halpern, Y. Moses, and M. Y. Vardi. Reasoning About Knowledge. The MIT Press, Cambridge, MA, USA, 1995. R. Fagin, J. Y. Halpern, Y. Moses, and M. Y. Vardi. Common knowledge revisited. Annals of Pure and Applied Logic, 96(1–3):89–105, 1999. M. F. Friedell. On the structure of shared awareness. Behavioral Science, 14(1):28–39, 1969. Y. A. Gonczarowski. Satisfiability and canonisation of timely constraints. Manuscript submitted for publication, 2012. Y. A. Gonczarowski. Timely coordination in a multi-agent system. Master’s thesis, Hebrew University of Jerusalem, Jerusalem, Israel, 2012. J. Halpern and Y. Moses. Knowledge and common knowledge in a distributed environment. Journal of the ACM, 37(3):549–587, 1990. J. Y. Halpern, Y. Moses, and O. Waarts. A characterization of eventual byzantine agreement. SIAM Journal on Computing, 31(3):838–865, 2001. J. Y. Halpern and L. D. Zuck. A little knowledge goes a long way: knowledge-based derivations and correctness proofs for a family of protocols. Journal of the ACM, 39(3):449–478, 1992. S. C. Kleene. Introduction to Metamathematics. North-Holland Publishing Company, Amsterdam, Netherlands, 1952. I. I. Kolodner. On completeness of partially ordered sets and fixpoint theorems for isotone mappings. American Mathematical Monthly, 75(1):48–49, 1968. F. Kuhn, Y. Moses, and R. Oshman. Coordinated consensus in dynamic networks. In Proceedings of the 30th Annual ACM Symposium on Principles of Distributed Computing (PODC), pages 1–10, 2011. J. L. Lassez, V. L. Nguyen, and E. A. Sonenberg. Fixed point theorems and semantics: A folk tale. Information Processing Letters, 14(3):112–116, 1982. D. Lewis. Convention, A Philosophical Study. Harvard University Press, Cambridge, MA, USA, 1969. Z. Manna and A. Pnueli. The Temporal Logic of
[26]
[27]
[28]
[29]
B.1
Reactive and Concurrent Systems, volume 1. Springer-Verlag, Berlin, Germany / New York, NY, USA, 1992. J. McCarthy. Formalization of two puzzles involving knowledge. Manuscript, Computer Science Department, Stanford University, 1978. E. F. Moore. The firing squad synchronization problem. In E. F. Moore, editor, Sequential Machines: Selected Papers, pages 213–214. Addison-Wesley, Reading, MA, USA, 1964. Y. Moses and M. R. Tuttle. Programming simultaneous actions using common knowledge. Algorithmica, 3:121–169, 1988. A. Tarski. A lattice-theoretical fixpoint theorem and its applications. Pacific Journal of Mathematics, 5(2):285–309, 1955.
Definition B.1 (Perfect Coordination). Let R ⊆ R and let I ⊆ I. An I-ensemble e¯ ∈ FR I is said to be perfectly coordinated (in R) if ei = ej for every i, j ∈ I. Definition B.2 (Eventual Coordination [17, 12]). Let R ⊆ R and let I ⊆ I. An I-ensemble e¯ ∈ FR I is said to be eventually coordinated (in R) if for every i, j ∈ I and for every (r, t) ∈ ei , there exists t ∈ T s.t. (r, t ) ∈ ej . Definition B.3 (ε-Coordination [17, 12]). Let R ⊆ R, let I ⊆ I and let ε ≥ 0. An I-ensemble e¯ ∈ FR I is said to be ε-coordinated (in R) if for every i ∈ I and for every (r, t) ∈ ei , there exists an interval T ⊆ T of length at most ε, s.t. t ∈ T and s.t. for every j ∈ I there exists t ∈ T s.t. (r, t ) ∈ ej .
APPENDIX A. KNOWLEDGE AND COMMON KNOWLEDGE
B.2
Theorem B.4
Theorem B.5
([17, 12]). Let R ⊆ R and let I ⊆ I.
1. For every ψ ∈ FR , the function fψ : FR → FR given by x → ∩i∈I Ki (ψ ∩x) has a greatest fixed point, denoted by CI ψ — for eventual common knowledge of ψ by I. 2. (Ki CI ψ)i∈I constitutes an eventually-coordinated I-ensemble, for every ψ ∈ FR . 3. If e¯ ∈ FR I is an eventually-coordinated I-ensemble, then ei ⊆ Ki CI (∪¯ e) for every i ∈ I. 4. If e¯ ∈ FR I is an eventually-coordinated I-ensemble, then ∪¯ e ⊆ CI (∪¯ e).
We now build upon the definition of knowledge and define the notions of “everyone knows” and of “common knowledge”. Definition A.2 (Everyone Knows). Let R ⊆ R and let I ⊆ I. For every ψ ∈ FR , denote EI ψ i∈I Ki ψ. One popular, constructive definition of common knowledge [14] is the following, defining that an event is common knowledge to a set of agents when all know it, all know that all know it, etc.
We note that for ε ≡ 0, ε-coordination is the same as perfect coordination, and thus the following theorem also implies Theorem B.4 as a special case thereof.
Definition A.3 (Common Knowledge). Let R ⊆ R n and let I ⊆ I. For every ψ ∈ FR , denote CI ψ ∞ n=1 EI ψ, where EI 0 ψ ψ and EI n ψ EI EI n−1 ψ for every n ∈ N.
Theorem B.6 ([12]). Let R ⊆ R, let I ⊆ I and let ε ≥ 0. For every ψ ∈ FR , denote ⎧ ⎫ ∃T ⊆ T : ⎨ ⎬ EIε (ψ) (r, t) ∈ ΩR t ∈ T & sup{T − T } ≤ ε & . ⎩ ∀i ∈ I ∃ t ∈ T : (r, t ) ∈ Ki ψ ⎭
Observation A.4. Equivalently, by Definition A.2,
CI ψ = Ki1 · · · Kin ψ = Ki1 · · · Kin ψ, ¯ (i1 ,...,in )∈I ∗
where I ∗¯ (i1 , . . . , in ) ∈ I ∗ | ∀m ∈ [n − 1] : im = im+1 denotes the set of all finite non-stuttering sequences of elements of I.
B.
([17, 12]). Let R ⊆ R and let I ⊆ I.
1. (CI ψ)i∈I constitutes a perfectly coordinated I-ensemble, for every ψ ∈ FR . 2. If e¯ ∈ FR I is a perfectly-coordinated I-ensemble, then ei ⊆ CI (∪¯ e) for every i ∈ I. 3. If e¯ ∈ FR I is a perfectly-coordinated I-ensemble, then ∪¯ e = CI (∪¯ e).
Observation A.1. Let R ⊆ R and let i ∈ I. By definition of Ki , we have: • Knowledge Axiom: Ki ψ ⊆ ψ, for every ψ ∈ FR . • Positive Introspection Axiom: Ki Ki ψ = Ki ψ, for every ψ ∈ FR . • Monotonicity: ψ ⊆ φ ⇒ Ki ψ ⊆ Ki φ, for every ψ, φ ∈ FR . • Ki commutes with intersection: Ki (∩Ψ ) = {Ki ψ | ψ ∈ Ψ }, for every set of events Ψ ⊆ FR .
Fixed-Point Analysis
While phrasing the propositions in this section, and hence forth, we use the shorthand notation ∪ξ¯ i∈I ξi , for every I-ensemble ξ¯ = (ξi )i∈I ∈ FR I .
We first survey a few immediate (and well-known) properties of the knowledge operator, which is defined in Section 3.
(i1 ,...,in )∈I ∗
Definitions
1. For every ψ ∈ FR , the function fψε : FR → FR given by x → EIε (ψ ∩ x)) has a greatest fixed point, denoted by CIε ψ — for ε-common knowledge of ψ by I. 2. (Ki CIε ψ)i∈I constitutes an ε-coordinated I-ensemble, for every ψ ∈ FR . 3. If e¯ ∈ FR I is an ε-coordinated I-ensemble, then ei ⊆ Ki CIε (∪¯ e) for every i ∈ I. I 4. If e¯ ∈ FR is an ε-coordinated I-ensemble, then ∪¯ e ⊆ CIε (∪¯ e).
BACKGROUND: SYMMETRIC FORMS OF COORDINATION
In this section, we survey a few forms of coordination previously defined and analyzed by Halpern and Moses [17], as formulated for ensembles in [12, Section 11.6]. We reformulate these using events and adapt them to our notation. 8 86
C. C.1
¯ ¯ . This proves both that CIδ ψ ξ ∈ FR I | ξ¯ ≤ fψδ (ξ) equals is well-defined (part 1 of the lemma) and the induction rule for timely common knowledge (part 2). To prove monotonicity of CIδ (part 3), let ψ, φ ∈ FR s.t. ψ ⊆ φ. Once again, by monotonicity of Ki for every i ∈ I, we obtain that fψδ (ϕ) ¯ ≤ fφδ (ϕ) ¯ for every ϕ ¯ ∈ FR I . By subδ stituting ϕ ¯ CI ψ, and by definition of CIδ ψ, we obtain CIδ ψ = fψδ (CIδ ψ) ≤ fφδ (CIδ ψ). By directly applying the induction rule for timely common knowledge with ξ¯ CIδ ψ, we obtain that CIδ ψ ≤ CIδ φ.
PROOFS Preliminaries
Observation C.1. Let R ⊆ R and i ∈ I. By the positive introspection axiom, the event Ki ψ is i-local for every ψ ∈ FR . Definition C.2. To aid the readability of the proofs below, we define Δ = Z ∪ {∞} — the set of suprema of sets of time differences. (For every timely-coordination spec (I, δ), this is the range of δ. See the definition of a timelycoordination spec in Section 4 for more details.)12
Proof of Theorem 4.6. We begin the proof of part 1 by noting that for every i ∈ I, by definition CIδ ψ = fψδ (CIδ ψ), and therefore (CIδ ψ)i is of the form Ki (· · · ). Hence, by Ob¯ servation C.1, CIδ ψ is an I-ensemble. Let (i, j) ∈ I 2 and δ δ (r, t) ∈ (CI ψ)i . By definition of CI and by the knowledge axiom,
≤δ(i,k) δ (CIδ ψ)i = Ki ψ ∩ ⊚ (CI ψ)k ⊆
Observation C.3. By definition of ⊚≤ε , • ⊚≤∞ = . • ⊚≤0 ψ means “ψ has occurred, either now or in the past”. • Additivity: ⊚≤ε1⊚≤ε2 ψ = ⊚≤ε1 +ε2 ψ for every ε1 , ε2 ∈ Δ and for every ψ ∈ FR .
k∈I\{i}
⊆ ψ ∩
• Monotonicity: (ε1 ≤ ε2 & ψ ⊆ φ) ⇒ ⊚≤ε1ψ ⊆ ⊚≤ε2φ, for every ε1 , ε2 ∈ Δ and for every ψ, φ ∈ FR . • ⊚≤ε (∩Ψ ) ⊆ {⊚≤ε ψ | ψ ∈ Ψ }, for every ε ∈ Δ and for every set of events Ψ ⊆ FR .
⊚≤δ(i,k) (CIδ ψ)k ⊆ ⊚≤δ(i,j) (CIδ ψ)j .
k∈I\{i}
Thus, we obtain that (r, t) ∈ ⊚≤δ(i,j) (CIδ ψ)j . By definition of ⊚≤δ(i,j) , there exists t ∈ T such that t ≤ t + δ(i, j) and (r, t ) ∈ (CIδ ψ)j , and the proof of part 1 is complete. Similarly, we have
≤δ(i,k) δ (CIδ ψ)i = Ki ψ ∩ ⊚ (CI ψ)k ⊆
Observation C.4. By definition of ⊚ε , for every event ψ ∈ FR we have: • ⊚ε1 ⊚≤ε2 ψ = ⊚≤ε1 ⊚ε2 ψ = ⊚≤ε1 +ε2 ψ, for every ε1 , ε2 ∈ Δ \ {∞}.
k∈I\{i}
⊆ ψ ∩
• ⊚ε ψ ⊆ ⊚≤ε ψ, for every ε ∈ Δ \ {∞}.
⊚≤δ(i,k) (CIδ ψ)k ⊆ ψ
k∈I\{i}
• ⊚ε commutes with intersection for every ε ∈ Δ \ {∞}: ⊚ε (∩Ψ ) = {⊚ε ψ | ψ ∈ Ψ } for every set of events Ψ ⊆ FR .
C.2
for every i ∈ I, thus proving part 2 as well. We move on to proving part 3. Let e¯ be a δ-coordinated I-ensemble s.t. ∪¯ e ⊆ ψ. First, we show that e¯ ≤ fψδ (¯ e). Let i ∈ I. Let (r, t) ∈ ei and let j ∈ I \ {i}. Since e¯ is δ-coordinated, there exists t ∈ T s.t. t ≤ t + δ(i, j) and (r, t ) ∈ ej . By definition of ⊚≤δ(i,j) , we therefore obtain e ⊆ ψ, we have (r, t) ∈ ⊚≤δ(i,j) ej . Thus, and since ∪¯
≤δ(i,j) ⊚ ej . ei ⊆ ψ ∩
Proofs of Propositions from Section 4
The soundness of our definition of timely common knowledge is based on the following part of Tarksi’s celebrated theorem. Definition C.5 (Complete Lattice). A lattice L is called complete if each subset S ⊆ L has both a supremum (i.e. least upper bound, denoted S) and an infimum (i.e. greatest lower bound, denoted S).
j∈I\{i}
By definition of an ensemble, ei is i-local, and thus ei = Ki ei . Hence, by monotonicity of Ki ,
≤δ(i,j) e i = Ki e i ⊆ Ki ψ ∩ ⊚ ej = fψδ (¯ e) i .
Theorem C.6 (Tarski [29]). Let L be a complete lattice. Every monotone function f : L → L has a greatest fixed this greatest fixed point is given by point. Furthermore, l ∈ L | l ≤ f (l) .
j∈I\{i}
By the induction rule for timely common knowledge, we thus have e¯ ≤ CIδ ψ, completing the proof of part 3. Part 4 follows from part 3 by setting ψ ∪¯ e. Finally, one direction of part 5 follows from part 4 by taking the union of both sides, while the other follows by setting ψ ∪¯ e in part 2.
Observation C.7. FR I , equipped with the lattice structure from Definition 4.3, constitutes a complete lattice; the supremum of every subset of FR I is given by coordinate-wise union, and its infimum — by coordinate-wise intersection.
C.3
Proof of Lemma 4.5. By monotonicity of Ki for every i ∈ I and of ⊚≤ε for every ε ∈ Δ, we obtain that fψδ is monotone. By Observation C.7, and by Tarski’s Theorem C.6, the set of fixed points of fψδ has a greatest element, which
C.3.1
Proofs of Propositions from Section 5 Preliminaries
In order to harness the tools of Section 4 to analyzing timely-coordinated response, we introduce some machinery relating agent responses in a protocol P ∈ P to an ensemble in the space ΩR(P,γ) defined by the set of runs of P . Recall that as mentioned above, we slightly abuse notation at times
12
As noted above, we more generally define the set of time differences as Δ = (T − T) ∪ {∞}. E.g. if T = R≥0 , then Δ = (−∞, ∞]. 9 87
when working in ΩR(P,γ) for some protocol P , by writing φ to refer to φ ∩ ΩR(P,γ) .
now show that P solves τ by showing that it satisfies all four conditions of Observation C.10. α ¯ ocBy definition of Pα¯ , for each j ∈ I the event eP j ¯ curs at most once during each r ∈ R(P, γ). Let (j, k) ∈ I 2 Pα ¯ and let (r, t) ∈ ej . By definition of Pα¯ , we have that (r, t) ∈ CIδ (⊚≤0 φ) j . By Theorem 4.6(1), CIδ (⊚≤0 φ) is a δ-coordinated ensemble, and thus there exists t ≤ t + δ(j, k) δ ≤0 s.t. (r, t ) ∈ CI (⊚ φ) k . By definition of Pα¯ , there exists α ¯ t ≤ t s.t. (r, t ) ∈ eP k . As t ≤ t ≤ t + δ(j, k), we obtain Pα ¯ that e¯ is δ-coordinated. Let j ∈ I. By Observation C.3 (monotonicity), we conα ¯ clude that eP ⊆ ⊚≤δ(i,j) ePα¯ ⊆ ePα¯ . By definition of i δ ≤0 j ≤0 Pα¯ j Pα¯ , we have CI (⊚ φ) i ⊆ ⊚ ei . By both of these, by the conditions of the lemma, and once again by Observa tion C.3 (monotonicity), we obtain φ ⊆ CIδ (⊚≤0 φ) i ⊆ α ¯ α ¯ α ¯ ⊚≤0 eP ⊆ ⊚≤0 eP = eP i j j . Finally, by definition of Pα¯ and by Theorem 4.6(2), we have ∪¯ ePα¯ ⊆ ∪CIδ (⊚≤0 φ) ⊆ ⊚≤0 φ, thus completing the proof of P solving τ . We move on to show that P constitutes a time-optimal solution to τ . Let P = (P−α¯ , Pα¯ ) be a protocol solving τ that is run-equivalent to P . Let j ∈ I. By Corol P lary 5.2, we have ej α¯ ⊆ CIδ (⊚≤0 φ) j . By definition of Pα¯ , δ ≤0 α ¯ we have CI (⊚ φ) j ⊆ ⊚≤0 eP j . We combine these to ob-
Definition C.8. Let τ = (γ, φ, I, δ, α) ¯ be a TCR and let α ¯ P ∈ P. We denote by ePα¯ ∈ FR(P,γ) I the I-ensemble eP i {(r, t) ∈ ΩR(P,γ) | i performs αi at (r, t) according to P }, for every i ∈ I. Observation C.9. Let τ = (γ, φ, I, δ, α) ¯ be a TCR and let P ∈ P. Since the actions of each agent i ∈ I at each point α ¯ are defined by its state at that point, it follows that eP is i i-local, and thus e¯Pα¯ is indeed an I-ensemble. Observation C.10. Let τ = (γ, φ, I, δ, α) ¯ be a TCR. A protocol P ∈ P solves τ iff all the following hold in ΩR(P,γ) : α ¯ • eP occurs at most once during each run r ∈ R(P, γ), i for every agent i ∈ I.
• e¯Pα¯ is δ-coordinated. • ∪¯ ePα¯ ⊆ ⊚≤0 φ. (I.e. φ must occur before or when any response does.) α ¯ • φ ⊆ eP i , for every i ∈ I. (I.e. all responses must occur at some point along any φ-triggered run.)
Observation C.11. Let τ = (γ, φ, I, δ, α) ¯ be a TCR. A protocol P ∈ P is a time-optimal solution to τ iff it both solves τ and for every protocol P solving τ that is runP α ¯ equivalent to P , we have ei α¯ ⊆ ⊚≤0 eP in ΩR(P−α¯ ,γ) for i every i ∈ I.
C.3.2
P
α ¯ tain ej α¯ ⊆ ⊚≤0 eP j , and thus, by Observation C.11, the proof is complete.
Corollary C.13. Let τ = (γ, φ, I, δ, α) ¯ be a TCR and let P ∈ P. The following are equivalent: 1. P is run-equivalent to a protocol that solves τ . 2. φ ⊆ CIδ (⊚≤0 φ) i in ΩR(P,γ) , for every i ∈ I. 3. φ ⊆ CIδ (⊚≤0 φ) i in ΩR(P,γ) , for some i ∈ I. Proof. 1 ⇒ 2: Let i ∈ I. Let P be a protocol solving τ that is run-equivalent to P . Recall that ΩR(P ,γ) ΩR(P,γ) . By
Proofs
Proof of Corollary 5.2. We must show that under the conditions of the corollary, e¯Pα¯ ≤ CIδ (⊚≤0 φ) holds in ΩR(P,γ) I . Since P solves τ , by Observation C.10 we have both that e¯Pα¯ is δ-coordinated and that ∪¯ ePα¯ ⊆ ⊚≤0 φ. Pα ¯ Thus, by Theorem 4.6(3), we obtain e¯ ≤ CIδ (⊚≤0 φ), as required.
P
Observation C.10, we have φ ⊆ ei α¯ . By Corollary 5.2, we P have ei α¯ ⊆ CIδ (⊚≤0 φ) i . We combine these two with Ob servation C.3 (monotonicity) to obtain φ ⊆ CIδ (⊚≤0 φ) i . 2 ⇒ 3: Immediate. 3 ⇒ 1: Follows immediately from Lemma C.12, since ΩR(P,γ) ΩR(P−α¯ ,γ) . Proof of Corollary 5.3. By Corollary C.13(1 ⇒ 2), we have φ ⊆ CIδ (⊚≤0 φ) i holding in ΩR(P,γ) ΩR(P−α¯ ,γ) . By Lemma C.12, the proof is complete.
The following somewhat technically-phrased lemma lies at the heart of Corollaries C.13 and 5.3, whose proofs follow below. Lemma C.12. Let τ = (γ, φ, I, δ, α) ¯ be a TCR and let P−α¯ be a non-response component of a protocol such that φ ⊆ CIδ (⊚≤0 φ) i holds in ΩR(P−α¯ ,γ) for some i ∈ I. The protocol P = (P−α¯ , Pα¯) s.t. in Pα¯each i ∈ I responds at the first instant at which CIδ (⊚≤0 φ) i holds (in ΩR(P−α¯ ,γ) ), is a time-optimal solution for τ . Proof. We note that by Theorem 4.6(1), CIδ (⊚≤0 φ) j is j-local for every j ∈ I, and thus Pα¯ is well-defined.13 We
C.4 C.4.1
From Fixed-Point Definition to Nested-Knowledge Definition Definitions and Propositions
In order to precisely phrase our nested-knowledge characterisation of timely common knowledge, we first introduce an additional definition.14
13
In some runs of certain contexts under acontinuous-time model, the set of times at which CIδ (⊚≤0 φ) j holds does not attain its infimum value, and thus “ CIδ (⊚≤0 φ) j holds for the first time” is not necessarily a j-local event. To accommodate such cases, we may adapt the response component Pα¯ s.t. each j ∈ I responds exactly 1 time unit after the infimum of times at which CIδ (⊚≤0 φ) j holds. (It is straightforward to show that this is indeed a j-local event). The proof is easily adaptable to both show that this definition yields a solution for τ and to prove that in such pathological cases, no time-optimal solution for τ exists.
14
As our notation P(Gδ ) may suggest, this is in fact the set of paths in a directed graph Gδ having I as vertices and with edges wherever δ < ∞. For an in-depth graphtheoretic study of Gδ and of its elaborate relation to tuples of δ-coordinated timestamps, we refer the reader to [15] or to [16, Chapter 5]. For a study of the connection between the graph-theoretic properties of Gδ and the required delivery guarantees required to solve a TCR, we refer the reader to [16, Chapter 9].
10 88
¯
Definition C.14. Let I be a set and let δ : I 2 → Δ. We define ¯ P(Gδ ) (i1 , . . . , in ) ∈ I ∗ | ∀m ∈ [n−1] : δ(im , im+1 ) < ∞ .
Corollary C.22. The time-optimal solution from Corollary 5.3, under (any of ) the conditions of Theorem C.20 (with regard to R R(P−α¯ , γ) and ψ ⊚≤0 φ), is for each agent i ∈ I to respond at the first instant at which all nestedknowledge formulae of the form
Example C.15. By the above definition, if I = {i, j}, then every element of P(Gδ ) is either (i, j, i, j, i, j, . . .) or
Ki ⊚δ(i,i2 ) Ki2 ⊚δ(i2 ,i3 ) · · · Kin−1 ⊚δ(in−1 ,in ) Kin ⊚≤0 φ
n
(j, i, j, i, j, i, . . .), for some n ∈ N. (If |I| > 2, then P(Gδ ) is
hold (in ΩR(P−α¯ ,γ) ) for all (i, i2 , . . . , in ) ∈ P(Gδ ).
n
C.4.2
much richer.)
Background
In order to prove Theorem C.20, we perform an analysis of timely common knowledge of stable events. For reasons that will soon be apparent, we conduct this analysis under the assumption of perfect recall. To make our analysis somewhat cleaner and more generic, we first aim to distill the property of sets of runs exhibiting perfect recall that is of interest to us, namely that in such sets of runs, knowledge of a stable event is itself stable. The following is given in [12, Exercise 4.18(b)], and its proof follows directly from the definitions of stability and of knowledge.
Second, we present a variation of a definition from [12, Chapter 4], which we utilize in this section. Definition C.16 (Perfect Recall). A system R ⊆ R is said to exhibit perfect recall if for every r ∈ R, for every i ∈ I and for every t ∈ T, the state of i at t in r uniquely determines the set ri (t ) | t ∈ T \ [t, ∞) of states of i in r prior to t. Observation C.17. If Pγfip is a full-information protocol in a context γ, then R(Pγfip , γ) exhibits perfect recall.
Claim C.23. Let R ⊆ R be a system exhibiting perfect recall and let ψ ∈ FR . If ψ is stable, then Ki ψ is stable as well, for every i ∈ I.
Third, we present a definition based upon [12, Chapter 4] and some basic properties thereof. Definition C.18 (Stability). Let R ⊆ R. An event ψ ∈ FR is said to be stable if once ψ holds at some time during a run r ∈ R, it continues to hold for the duration of r. Formally, using our notation, ψ is stable iff ψ = ⊚≤0 ψ.
C.4.3
Proof
Returning to our results and working toward proving Theorem C.20, we first derive a stability property for timely common knowledge (given in Claim C.25.)
Observation C.19. By Definition C.18, • By Observation C.3 (additivity), ⊚≤0 is idempotent. Thus, ⊚≤0 φ is a stable event for every φ ∈ FR . • ψ ∩ φ is a stable event for any two stable events ψ, φ ∈ FR .
Claim C.24. Let R ⊆ R be a system exhibiting perfect recall. For every event ψ ∈ FR and for every agent i ∈ I, it holds that ⊚≤0 Ki ψ ⊆ Ki ⊚≤0 ψ. Proof. By Observation C.3, we have ψ ⊆ ⊚≤0 ψ. Thus, by monotonicity of ⊚≤0 and of Ki , we have ⊚≤0 Ki ψ ⊆ ⊚≤0 Ki ⊚≤0 ψ. By Observation C.19, ⊚≤0 ψ is stable, and therefore, by Claim C.23, Ki ⊚≤0 ψ is stable as well, and thus equals ⊚≤0 Ki ⊚≤0 ψ, by applying Observation C.19 once more. We combine all these to obtain ⊚≤0 Ki ψ ⊆ ⊚≤0 Ki ⊚≤0 ψ = Ki ⊚≤0 ψ, as required.
Indeed, since ⊚≤0 φ is stable for every φ, we do not lose much in the perspective of Section 5 if we restrict our study to timely common knowledge of stable events. We can now precisely phrase our constructive characterisation of timely common knowledge. See the following sections for a proof and a discussion of the various requirements of the following theorem.
Claim C.25. Let (I, δ) be a timely-coordination spec and let R ⊆ R be a set of runs exhibiting perfect recall. For every stable ψ ∈ FR , all coordinates of CIδ ψ are stable.
Theorem C.20. Let (I, δ) be a timely-coordination spec, let R ⊆ R be a system exhibiting perfect recall and let ψ ∈ FR be a stable event. Assume, furthermore, that either of the following holds: 1. δ < ∞. 2. R = R(P, γ), for some protocol P and context γ s.t. P either solves (γ, ψ, I, δ, α) ¯ for some α, ¯ or is runequivalent to a protocol that does. For every i ∈ I,
(CIδ ψ)i = Ki ⊚δ(i,i2 ) Ki2 ⊚δ(i2 ,i3 ) Ki3 · · ·⊚δ(in−1 ,in ) Kin ψ
Proof. Let i ∈ I. By Definition C.18 and by Observation C.3, it is enough to show that ⊚≤0 (CIδ ψ)i ⊆ (CIδ ψ)i . Indeed, we have ⊚≤0 (CIδ ψ)i =
by definition of CIδ
≤δ(i,j) δ = ⊚≤0 Ki ψ ∩ ⊚ (CI ψ)j ⊆ j∈I\{i}
by Claim C.24
(i,i2 ,...,in )∈P(Gδ )
≤δ(i,j) δ ⊆ Ki ⊚≤0 ψ ∩ ⊚ (CI ψ)j ⊆
(2) holds in ΩR .
j∈I\{i}
Observation C.21. By Observation C.17, and since it is straitforward to show that a TCR is solvable iff it is solvable by a full-information protocol, condition 2 of Theorem C.20 is met if R = R(Pγfip , γ), for a context γ admitting a full¯ is solvable (by information protocol Pγfip s.t. (γ, ψ, I, δ, α) some protocol) for some α. ¯
by Observation C.3
⊆ Ki ⊚≤0 ψ ∩
⊚≤0 ⊚≤δ(i,j) (CIδ ψ)j
⊆
j∈I\{i}
by Observation C.3 (additivity) 11 89
δ(i,j) δ ⊚ (CI ψ)j = = Ki ψ ∩
≤δ(i,j) δ ⊚ (CI ψ)j ⊆ ⊆ Ki ⊚≤0 ψ ∩
j∈I\{i} δ(i,j)