Allen’s temporal algebra

This page defines Allen’s temporal algebra as a logic conforming to the general definitions on logics. In this page, I define the logic Allen as a tuple (SymAllen, ForAllen, IntAllen, ⊨Allen) that we define piece by piece in later sections.

Syntax

Symbols

We define an infinite set E whose members are called events and the set R = {b, bi, m, mi, o, oi, s, si, d, di, f, fi, eq} disjoint from E whose members are called temporal relations.

Symbols of Allen
The symbols of Allen are SymAllen = ER.

As with propositions in propositional logic, we will write distinct events with distinct sequences of latin characters like so: WorldWarTwo, MacronPresidency, etc.

Each temporal relation has a name that helps understanding its meaning. The table below informally explains the symbols:

Temporal relations
SymbolNameNote
bbeforea first event happens completely before a second one starts
biafterthe inverse of before (i.e., a first event happens entirely after a second one ends)
mmeetsa first event stops exactly when a second one starts
mimet bythe inverse of meets (a first event starts exactly when a second one ends)
ooverlapsa first event occurs before and after a second one starts, and ends before the second one ends
oioverlapped bythe inverse of overlaps (i.e., a first event occurs before and after a second one ends, and starts after the second one starts)
sstartsa first event starts at the same time as a second one but ends before the second one
sistarted bythe inverse of starts (i.e., a first event starts at the same time as a second one but ends after the second one)
dduringa first event occurs entirely while a second event is occurring
dicontainsthe inverse of during (i.e., a first event occurs before a second one starts and ends after the second ends
ffinishesa first event stops at the same time as a second event, but starts after the second
fifinished bythe inverse of finishes (i.e., a first event stops at the same time as a second one, but starts before the second)
eqequalstwo events have the same temporal coverage

Formulas

formulas of Allen

The set ForAllen of Allen formulas is defined as follows: for all events e1, e2 ∈ E, and all a temporal relation r ∈ R, e1 r e2.

Note that we use a light shading on formulas in order to clearly distinguish them from other syntactic constructs.

WorldWarII b BushJrPresidency

WorldWarI o SpanishFluOutbreak

Semantics

Interpretations

Interpretations in Allen

An interpretation in Allen is a pair (Δ, 𝓘s, 𝓘e) such that:

  • Δ is a totally ordered set with a strict order relation <, whose elements are called instants;
  • 𝓘s : E ⟶ Δ;
  • 𝓘e : E ⟶ Δ;
  • for all e ∈ E, 𝓘s(e) < 𝓘e(e).

Satisfaction relation

Satisfaction relation in Allen

For e1, e2 ∈ E, an interpretation (Δ, 𝓘) in Allen satisfies:

  • e1 b e2 if and only if 𝓘e(e1) < 𝓘s(e2);
  • e1 bi e2 if and only if 𝓘e(e2) < 𝓘s(e1);
  • e1 m e2 if and only if 𝓘e(e1) = 𝓘s(e2);
  • e1 mi e2 if and only if 𝓘e(e2) = 𝓘s(e1);
  • e1 o e2 if and only if 𝓘s(e1) < 𝓘s(e2) and 𝓘e(e1) < 𝓘e(e2);
  • e1 oi e2 if and only if 𝓘s(e2) < 𝓘s(e1) and 𝓘e(e2) < 𝓘e(e1);
  • e1 s e2 if and only if 𝓘s(e1) = 𝓘s(e2) and 𝓘e(e1) < 𝓘e(e2);
  • e1 si e2 if and only if 𝓘s(e2) = 𝓘s(e1) and 𝓘e(e2) < 𝓘e(e1);
  • e1 d e2 if and only if 𝓘s(e2) < 𝓘s(e1) and 𝓘e(e1) < 𝓘e(e2);
  • e1 di e2 if and only if 𝓘s(e1) < 𝓘s(e2) and 𝓘e(e2) < 𝓘e(e1);
  • e1 f e2 if and only if 𝓘s(e2) < 𝓘s(e1) and 𝓘e(e1) = 𝓘e(e2);
  • e1 fi e2 if and only if 𝓘s(e1) < 𝓘s(e2) and 𝓘e(e2) = 𝓘e(e1);
  • e1 eq e2 if and only if 𝓘s(e1) = 𝓘s(e2) and 𝓘e(e1) = 𝓘e(e2).

Table 2 presents a graphical view of the relations between events, presented as intervals on a timeline.

Allen’s interval relations depicted geometrically as relations between parallel line segments
RelationInverse relationGraphical representation
X b Y Y bi X before / after
X m Y Y mi X
X o Y Y oi X
X s Y Y si X
X d Y Y di X
X f Y Y fi X
X eq Y Y eq X

Extensions to sets of relations

Instead of defining temporal relations as a single possible relation (strictly defining how the starts and ends of the events relate relative to the other), we can extend Allen to express a set of alternative temporal relations between pairs of events. We define the extension Allen+ = (SymAllen+, ForAllen+, IntAllen+, ⊨Allen+) as follows:

Properties of Allen’s algebra

The entailment problem for Allen+ is NP-complete with respect to the size of the input theory.

allen.html: last modified 2020/05/06 19:44:42 by Antoine Zimmermann.