determining consistency of topological relations

13
Constraints: An International Journal, 2, 213–225 (1998) c 1998 Kluwer Academic Publishers, Boston. Manufactured in The Netherlands. Determining Consistency of Topological Relations BRANDON BENNETT [email protected] School of Computer Studies, The University of Leeds, LS2 9JT, UK Abstract. This paper examines the problem of testing consistency of sets of topological relations which are instances of the RCC-8 relation set [18]. Representations of these relations as constraints within a number of logical frameworks are considered. It is shown that, if the arguments of the relations are interpreted as non-empty open sets within an arbitrary topological space, a complete consistency checking procedure can be provided by means of a composition table. This result is contrasted with the case where regions are required to be planar and bounded by Jordan curves, for which the consistency problem is known to be NP-hard. In order to investigate the completeness of compositional reasoning, the notion of k-compactness of a set of relations w.r.t. a theory is introduced. This enables certain consistency properties of relational networks to be examined independently of any specific interpretation of the domain of entities constrained by the relations. Keywords: topological relations, consistency, composition tables 1. Introduction In representing and reasoning about many domains it is often the case that a large amount of useful information can be stated in terms of a limited vocabulary of binary relations. Typically such families of relations will be logically constrained so that certain combinations of relations are possible whilst others are impossible. For many applications it is useful to be able to determine when a set of relational facts is consistent. A traditional approach to this problem is to formulate dependencies between relations as a formal theory stated in some general-purpose logical language (e.g. 1st-order logic). If such a theory is conjoined with a set of relational facts, consequences of these facts can be determined using any proof procedure which is complete for that language. From a computational point of view, this method is unsatisfactory for all but the simplest sets of relations. Reasoning with a sufficiently expressive general-purpose logic is in most cases undecidable and at best NP-complete. Another method which has been widely used by computer scientists is to formulate the task as a constraint satisfaction problem (CSP) [13]: each relation is interpreted as a constraint restricting possible values of its arguments. For many classes of CSP effective decision procedures have been found. Early study of CSPs (e.g. [13]) was concerned only with finite domain CSPs (FDCSPs), in which possible values of the constrained variables are limited to a fixed finite set. Such problems can always be solved by a backtracking search and are thus always decidable. Research on FDCSPs is primarily concerned with search space pruning and identifying tractable sets of constraints. If, however, the domain of variable values is not finite, the na¨ ıve backtracking approach is not available, so to solve such a CSP one must first establish a decision procedure which can detect consistency in accordance with some theory of the relations involved. Reasoning about spatial relations is currently far less understood than the (at least superfi-

Upload: brandon-bennett

Post on 03-Aug-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Determining Consistency of Topological Relations

Constraints: An International Journal, 2, 213–225 (1998)c© 1998 Kluwer Academic Publishers, Boston. Manufactured in The Netherlands.

Determining Consistency of Topological Relations

BRANDON BENNETT [email protected] of Computer Studies, The University of Leeds, LS2 9JT, UK

Abstract. This paper examines the problem of testing consistency of sets of topological relations which areinstances of the RCC-8 relation set [18]. Representations of these relations as constraints within a number oflogical frameworks are considered. It is shown that, if the arguments of the relations are interpreted as non-emptyopen sets within an arbitrary topological space, a complete consistency checking procedure can be provided bymeans of acomposition table. This result is contrasted with the case where regions are required to be planar andbounded by Jordan curves, for which the consistency problem is known to be NP-hard.

In order to investigate the completeness of compositional reasoning, the notion ofk-compactnessof a set ofrelations w.r.t. a theory is introduced. This enables certain consistency properties of relational networks to beexamined independently of any specific interpretation of the domain of entities constrained by the relations.

Keywords: topological relations, consistency, composition tables

1. Introduction

In representing and reasoning about many domains it is often the case that a large amountof useful information can be stated in terms of a limited vocabulary of binary relations.Typically such families of relations will be logically constrained so that certain combinationsof relations are possible whilst others are impossible. For many applications it is useful tobe able to determine when a set of relational facts is consistent. A traditional approach tothis problem is to formulate dependencies between relations as a formal theory stated insome general-purpose logical language (e.g. 1st-order logic). If such a theory is conjoinedwith a set of relational facts, consequences of these facts can be determined using anyproof procedure which is complete for that language. From a computational point ofview, this method is unsatisfactory for all but the simplest sets of relations. Reasoningwith a sufficiently expressive general-purpose logic is in most cases undecidable and atbest NP-complete. Another method which has been widely used by computer scientistsis to formulate the task as aconstraint satisfaction problem(CSP) [13]: each relation isinterpreted as a constraint restricting possible values of its arguments. For many classes ofCSP effective decision procedures have been found.

Early study of CSPs (e.g. [13]) was concerned only withfinite domainCSPs (FDCSPs),in which possible values of the constrained variables are limited to a fixed finite set. Suchproblems can always be solved by a backtracking search and are thus always decidable.Research on FDCSPs is primarily concerned with search space pruning and identifyingtractable sets of constraints. If, however, the domain of variable values is not finite, thenaı̈ve backtracking approach is not available, so to solve such a CSP one must first establisha decision procedure which can detect consistency in accordance with some theory of therelations involved.

Reasoning about spatial relations is currently far less understood than the (at least superfi-

Page 2: Determining Consistency of Topological Relations

214 B. BENNETT

cially) similar domain of temporal relations; so, in order to appreciate the issues involved inrepresenting topological relations as constraints, it will be useful to make some observationsabout the analysis of temporal relations. Allen’s set of thirteen qualitative relations betweentemporal intervals [1], [2] and the complexity of reasoning with these relations have beenquite extensively explored [21], [12], [16]. The arguments of Allen’s temporal relations aretemporal intervalswhich can be interpreted as arbitrary closed convex intervals taken froma dense totally ordered set of elements. Hence the domain of variables in an Allen CSP isinfinite. However, any interval can be represented by a pair of (real or rational) numbers〈s, f 〉, wheres is the starting point andf the finishing point of the interval. Under thisinterpretation the Allen relations are easily described byorder constraintsinvolving theend-points of intervals. Because the theory of an order relation is decidable this yields adecision procedure for Allen CSPs (see the analysis given in [16]).

2. Formulating Topological Relations as Constraints

Although the systems of temporal and topological relations are in some respects similar,formulating the consistency problem for topological relations as a CSP is considerablymore complex. In this paper I consider only binary relations holding betweenregions—e.g.‘region x is a non-tangential proper part of regiony’. The obvious mathematical model ofsuch relations is to interpret them as set-theoretic relations between point-sets within sometopological space. We may allow arbitrary point-sets to be regions or restrict them to (say)regular closed sets. We may also place restrictions on the nature of the topological space(e.g. we may specify that it is the usual topology over<3).

For any interesting choice of topological space(s) and class of point-sets correspondingto regions, the domain of possible regions will (as with the temporal case) be infinite.Moreover, in general, a spatial region may be arbitrarily complex and may not even befinitely representable. We might restrict the domain, say to regions that are bounded bya finite set of line segments whose endpoints have rational coordinates. This would givea denumerable set of regions but their representation would be quite complex. Thus thedomain of spatial regions (in spaces of dimension greater than 1) is much harder to representthan the domain of temporal intervals.

Whilst in the temporal case a mathematical model of intervals in terms of endpoints leadsto a simple decidable theory, similar analysis of topological regions does not so easily leadto a decision procedure. Because of this difficulty, an alternative approach to topologicalconsistency may be more fruitful. This is to directly axiomatise the logical propertiesof topological relations independently of any specific mathematical interpretation of thedomain of regions.

2.1. The RCC Theory of Spatial Regions

Randall et al. [18] have presented an axiomatic theory of spatial relations, known as RCC(Region Connection Calculus), which is intended to provide a logical framework for incor-porating spatial reasoning into AI systems. This 1st-order theory is based on a primitive

Page 3: Determining Consistency of Topological Relations

CONSISTENCY OF TOPOLOGICAL RELATIONS 215

Figure 1. Eight JEPD topological relations that can hold between two regions.

connectednessrelation, C(x, y), axiomatised to be reflexive and symmetric. The eighttopological relations shown in figure 1 can all be defined in this theory. The same set ofrelations has independently been identified as significant in the context of GeographicalInformation Systems [7]. In English the relations can be described as: Dis-Connection,External Connection, Partial Overlap, Tangential Proper Part, Non-Tangential Proper Partand Equality. Formal notations for these relations are given under the diagrams. The partrelations are asymmetric, so each has an inverse denoted,Ri.

This set, which will be referred to as RCC-8, is jointly exhaustive and pairwise disjoint(JEPD), which means that any two regions stand in exactly one of the eight relations. A moregeneral class of relations consists of the 28 arbitrary disjunctions of the RCC-8 relations.In specifying spatial information some of these disjunctions seem to be far more significantthan others. Amongst these are:

DiscRete DR(x, y) ≡ DC(x, y) ∨ EC(x, y)Proper Part PP(x, y) ≡ TPP(x, y) ∨ NTPP(x, y)Tangential Part TP(x, y) ≡ TPP(x, y) ∨ EQ(x, y)Part P(x, y) ≡ PP(x, y) ∨ EQ(x, y)Overlap O(x, y) ≡ P(x, y) ∨ Pi(x, y) ∨ PO(x, y) ∨ EQ(x, y)

andPPi, TPi andPi, the inverses ofPP, TP andP.A 1st-order theory such as RCC does provide a means of characterising consistency of

sets of relations whose domain is infinite but it has serious drawbacks. One is that it isdifficult to tell whether the theory completely characterises the required properties of therelations involved—i.e. whether it is complete (see [4]). Another is that 1st-order logic isin general intractable and thus cannot provide an effective consistency checking procedure.However, 1st-order reasoning is much more general than what is required to solve CSPs.What is needed is a special purpose inference procedure which can be shown to be completefor checking consistency of certain sets of ground facts w.r.t. an appropriate theory of therelations involved. In other words, although the complete theory of some set of relationsmay be 1st (or higher) order, to solve CSPs we only need an inference mechanism that isrefutation-complete for ground instances of these relations.

2.2. Composition Tables

One approach to consistency checking of sets of binary relations in any domain is to specifya composition table. Given a set of relationsRels and two relationsR1, R2 ∈ Rels,

Page 4: Determining Consistency of Topological Relations

216 B. BENNETT

Table 1.Composition table for the RCC-8 relations.

R2(b, c)R1(a, b) DC EC PO TPP NTPP TPPi NTPPi EQDC > DR,PO,PP DR,PO,PP DR,PO,PP DR,PO,PP DC DC DC

EC DR,PO,PPiDR,POTPP,TPi

DRPO,PP EC,PO,PP PO,PP DR DC EC

PO DR,PO,PPi DR,PO,PPi > PO,PP PO,PP DR,PO,PPiDR,POPPi

PO

TPP DC DR DR,PO,PP PP NTPPDR,POTPP,TPi

DR,POPPi

TPP

NTPP DC DC DR,PO,PP NTPP NTPP DR,PO,PP > NTPP

TPPi DR,PO,PPi EC,PO,PPi PO,PPi PO,TPP,TPi PO,PP PPi NTPPi TPPi

NTPPi DR,PO,PPi PO,PPi PO,PPi PO,PPi O NTPPi NTPPi NTPPi

EQ DC EC PO TPP NTPP TPPi NTPPi EQ

the composition,comp(R1, R2) can be defined as the relationR3 which is the strongestdisjunction of relations inRels, such that for any three objects,a, b, c, if R1(a, b) andR2(b, c) hold, thenR3(a, c) must hold.1 If we have a complete theory describing therelations inRels, then the compositions of these relations will be completely determinedas consequences of the theory. Although the compositions may be hard to derive, onceestablished they may be stored once and for all in a composition table. The compositiontable for the RCC-8 relations is given in Table 1. Here, multiple relation entries referto disjunctions and> is the universal relation (i.e. the disjunction of all eight possiblerelations).

2.3. k-Compactness

In the context of constraint satisfaction, a composition table forRels provides a means oftesting consistency of anytriple of relational facts that are instances of relations inRels.The method can be applied to larger networks of relation instances only insofar as it can beused to check consistency of every triangle within the network. However, for certain relationsets, consistency of each triple is sufficient to guarantee overall consistency of the wholenetwork [6]. These observations motivate the introduction of a concept ofcompactnessapplicable to a relation set (relative to some theory). I say that a network of relations istotal if every pair of nodes is constrained by some relation. I then stipulate that:

A relation setRels is k-compactw.r.t. a theory2 iff: for any total network ofinstances ofRels, the network is inconsistent with2 iff it includes a sub-networkof sizek or less, which is inconsistent with2.

Page 5: Determining Consistency of Topological Relations

CONSISTENCY OF TOPOLOGICAL RELATIONS 217

For some sets of relations we may find that there can be arbitrarily large inconsistent(total) networks all of whose sub-networks are consistent. We say that these are not finitelycompact. If there can be an infinite inconsistent network with no finite inconsistent sub-network the relation set is not compact at all.2 A composition table provides a completeconsistency checking procedure for any set of ground instances ofRels, if and only ifRelsis 3-compact w.r.t.2. We can say that a composition table for such a set of relations iscomplete (w.r.t.2).

The notion ofk-compactness of relation sets is related to so-called ‘k-consistency’ 3 ofa CSP, but the relationship is subtle because the notion of ‘k-consistency’ assumes thatrelations are constraints on some specific domain of values, whereask-compactness isa property of a set of relations w.r.t. a theory which does not necessarily determine anyunique domain. However, ifRels is a set of relations satisfying a theory2 and the domainof possible values of the arguments of these relations is well-defined by2, then the relationscan be identified with binary constraints over this domain. In fact2 need not categoricallyfix the domain as long as there is some canonical domain,D, such that any set of instances ofRels is consistent just in case it has a model overD. If 2 has either a unique or a canonicaldomain then the notion of ‘k-consistency’ can be applied to a network of instances ofRels. Under these conditions, I conjecture that:Rels is k-compact w.r.t.2 just in caseany ‘stronglyk-consistent’ (not necessarily total) network of relations is consistent with2.Verifying this is the subject of ongoing work.

Since compositional consistency checking involves testing all triples of variables in aproblem it can be computed inn3 time for a problem withn variables.4 More generally, ifa theory isk-compact for some finitek, a complete consistency checking procedure can beprovided by ak− 1 dimensional analogue of a composition table and computed inO(nk)

time for a CSP involvingn variables. If a composition table is complete for CSPs overRelsit is also complete for CSPs over disjunctions of the relations inRels, since all possiblealternatives can be checked (in exponential time) by a backtracking algorithm. For certainclasses of disjunctive relations a polynomial algorithm may also exist [16], [19].

The 3-compactness of the Allen relations can be demonstrated by application of Helly’stheorem5 to canonical models whose domain is pairs of real numbers (or rationals). Thus, theAllen composition table provides a complete consistency checking procedure for instancesof the Allen relations, which runs inO(n3) time for n intervals. By contrast, consistencychecking of the RCC-8 relations over a domain of planar regions bounded by Jordan curvesis known to be NP-hard [8], so no composition table for these relations and this domain canbe complete. Conversely if5 is a complete theory of planar Jordan curve regions withinwhich the RCC-8 relations are defined then the RCC-8 relation set is not finitely compactw.r.t. 5. Indeed the NP-hardness result is based on a proof that there can be arbitrarilylarge inconsistent networks of RCC-8 relations (among planar Jordan curve regions) thathave no inconsistent sub-network.6 Nevertheless, as we shall see in the sequel, RCC-8 canbe shown to be 3-compact w.r.t. a much more general theory of topological relations.

Page 6: Determining Consistency of Topological Relations

218 B. BENNETT

Table 2.Some constraints expressible as interior algebra equations.

X = i (X) X is open

X = i ( X ) X is closed

X = i ( i ( X ) ) X is regular openX ∪ Y = Y X is part ofYX ∪ i (Y) = i (Y) X is part of the interior ofYX ∩ Y = ∅ X andY are disjointi (X) ∩ i (Y) The interiors ofX andY are disjointX = Y ∪ Z X is the union ofY andZ

2.4. Equational Constraints in Interior Algebra

A large set of topological relations including all the RCC-8 relations can be formulatedas constraints operating on aninterior algebra. These algebras were first studied in detailby McKinsey and Tarski [14].7 An interior algebra is a structure,〈U ,∪,∩, , i 〉, where〈U ,∪,∩, 〉 is a Boolean algebra andi is an interior operator obeying the following equa-tions:

X ∩ i (X) = i (X)

i (i (X)) = i (X)

i (U) = Ui (X ∩ Y) = i (X) ∩ i (Y)

Elements of the algebra can be interpreted as sets of points, and these can be identifiedwith spatial regions. The unit element,U , is then the universe of all points. Under thisinterpretation the symbols ‘∪’, ‘∩’ and ‘ ’ have their usual meaning as operators on sets.X is the complement ofX w.r.t.U (i.e. X = U − X).

Interior algebraic equations provide a constraint language for describing topological re-lationships between sets of points in a topological space. Some of the more significantconstraints which can be expressed are given in Table 2. Reasoning with such equationsis far more practicable than reasoning in a set-theoretic language based on the ‘∈’ relation.The problem of testing whether a set of ground equations in interior algebra is consistentis decidable [14] but clearly not tractable (because it contains all Boolean equations as asub-language). However, as we shall see, a certain quite expressive sub-language is trac-table.

Many relations which are definable in the 1st-order RCC theory are also easily definableas interior algebraic equations. Table 3 gives definitions of the set{DC, DR, P, Pi, NTPP,NTPPi, EQ}, which is of particular significance and will be called RCC-7. These defi-nitions assume that the domain of regions is the set of non-empty regular open regions insome topological space and that two regions are connected if their closures share a point.8

Allowing regions to be null (corresponding to the∅ element of the interior algebra) wouldallow counter-intuitive situations to be possible (e.g.∅ would be both part of and discon-nected from any other region). The regularity condition is needed to ensure that if two

Page 7: Determining Consistency of Topological Relations

CONSISTENCY OF TOPOLOGICAL RELATIONS 219

Table 3.Seven RCC relations (RCC-7) representedas constraints in interior algebra.

RCC Relation Algebraic Equation

DC(x, y) i (x) ∪ i (y) = UDR(x, y) x ∩ y = UP(x, y) x ∪ y = UPi(x, y) x ∪ y = UNTPP(x, y) i (x) ∪ y = UNTPPi(x, y) x ∪ i (y) = UEQ(x, y) x = y

Table 4.The RCC-8 relations represented as interior algebra constraints.

RCC Rel. Equivalent Algebraic Constraint(s)

DC(x, y) — (i (x) ∪ i (y) = U)EC(x, y) DR(x, y) ∧ ¬DC(x, y) (x ∩ y = U) ∧ (i (x) ∪ i (y) 6= U)PO(x, y) ¬DR(x, y) ∧ ¬P(x, y) ∧ ¬Pi(x, y) (x ∩ y 6= U) ∧ (x ∪ y 6= U) ∧ (x ∪ y 6= U)TPP(x, y) P(x, y) ∧ ¬EQ(x, y) ∧ ¬NTPP(x, y) (x ∪ y = U) ∧ (x 6= y) ∧ (i (x) ∪ y 6= U)TPPi(x, y) Pi(x, y) ∧ ¬EQ(x, y) ∧ ¬NTPPi(x, y) (x ∪ y = U) ∧ (x 6= y) ∧ (x ∪ i (y) 6= U)NTPP(x, y) — (i (x) ∪ y = U)NTPPi(x, y) — (x ∪ i (y) = U)EQ(x, y) — (x = y)

regions are connected to exactly the same set of regions then these regions are identical. Tomake the non-null and regularity conditions explicit one should assert the constraintsa 6= ∅anda = i ( i (a) ) for each region constant,a, occurring in a topological description.

Not every RCC-8 relation corresponds to an interior algebra equation. However, eachRCC-8 relation is equivalent to a conjunction consisting of RCC-7 relations and negationsof RCC-7 relations. Hence each RCC-8 relation can be specified by a conjunction of interioralgebraic equalities and disequalities. These are given in Table 4. Note that the theory ofinterior algebras and the constraints corresponding to the RCC-8 relations can be representedsimply as a set of equational literals (those stemming from the theory contain variables whichare implicitly universally quantified, whereas those associated with the RCC-8 relations areground literals). Such a set is inconsistent if and only if the positive literals entail the contraryof (at least) one of the negative literals.9 Consequently, to determine the consistency of setsof positive and negative interior algebra constraints, one only needs to be able to determineentailments among positive interior algebraic equations. One could do this directly usingsome equational reasoning system and this may well prove effective. As far as I know thismethod has not yet been investigated. However in the next section I present a transformationof these constraints into another formalism for which an effective decision procedure isknown.

Page 8: Determining Consistency of Topological Relations

220 B. BENNETT

Table 5.Topological interpretation ofI.

p ∧ q P∩ Qp ∨ q P∪ Q∼ p i( P )p⇒ q i( P ∪ Q )

Table 6.Representation of the RCC-7 relations inI.

RCC Algebraic Constraint I formula

DC(x, y) i (x) ∪ i (y) = U ∼ x ∨ ∼ yDR(x, y) x ∩ y = U ∼(x ∧ y)P(x, y) x ∪ y = U x⇒ yPi(x, y) x ∪ y = U y⇒ xNTPP(x, y) i (x) ∪ y = U ∼ x ∨ yNTPPi(x, y) x ∪ i (y) = U x ∨ ∼ yEQ(x, y) x = y x⇔ y

2.5. Intuitionistic Encoding of Topological Constraints

Tarski [20] showed that theintuitionistic propositional calculus10 (henceforthI) can begiven an interpretation in which each propositional letter,p, corresponds to anopenset,P,within a topological space and the connectives are associated with Boolean and topologicaloperations as given in Table 5. Thus, each formulaφ ofI corresponds to an interior algebraicterm, τ(φ). Tarski showed thatφ is a theorem ofI just in case it corresponds to a termwhich denotes the universal set,U , in every topological model (i.e. for every assignment ofopen sets in a topological space to the constants occurring inτ(φ), we find thatτ(φ) = U ).More generallyφ0 can be intuitionistically deduced from a set of formulae{φi } iff everytopological model satisfying the equationsτ(φi ) = U also satisfiesτ(φ0) = U (see [3]).

Bennett [3] used this correspondence to construct a topological reasoning algorithm basedupon an intuitionistic theorem prover. Although not every interior algebraic equation cor-responds to anI formula, Table 6 shows how each of the RCC-7 relations can be encodedin I.11 The regularity of a regionx can also be encoded by∼∼ x⇒ x. Constraints corre-sponding to negated equations cannot be represented directly asI formulae. But, in virtueof the observation made at the end of section 2.4, a set of constraints is inconsistent iff thepositive constraints entail the contrary of one of the negative constraints. Thus negativeliterals in the constraint representation of RCC relations are encoded inI asentailmentconstraints—i.e. as formulae which must not be derivable from the set of formulae cor-responding to positive constraints. Amongst the entailment constraints will be a formulaof the form∼ x for each regionx involved in any RCC relation. These correspond to thealgebraic conditionsx 6= ∅ ensuring that the regions are non-null. Furthermore, becausethe negations of all the RCC-7 relations can be represented as entailment constraints, allthe RCC-8 relations can be encoded inI.

Page 9: Determining Consistency of Topological Relations

CONSISTENCY OF TOPOLOGICAL RELATIONS 221

Consider, for example, the configurationP(a, b) ∧ DC(b, c) ∧ PO(a, c). P and DCcorrespond directly toI formulae as given in Table 6.PO must first be analysed as¬DR ∧ ¬P ∧ ¬Pi as shown in Table 4. The (positive) model constraints correspond to theformula set{a⇒ b, ∼ b ∨ ∼ c} and the (negative) entailment constraints (including thenon-null constraints) to{a⇒ c, c⇒ a, ∼(a ∧ c), ∼a, ∼ b, ∼ c}. These constraints areinconsistent becausea⇒b, ∼ b ∨ ∼ c `I ∼(a ∧ c)—i.e. one of the entailment constraintsin entailed by the model constraints.

What does theI encoding tell us about the 3-compactness of the RCC-8 relations? If arelation set is 3-compact then any inconsistent network contains an inconsistent triangle andthis can be detected by testing whether the composition of every pair of relationsR1(a, b),R2(b, c) is consistent withR3(a, c). In theI encoding, an inconsistent triangle correspondsto two model constraint formulaeφ1(a, b)andφ2(b, c) that entail some entailment constraintψ(a, c). φ1(a, b) andφ2(b, c) can each take one of seven possible forms. If for eachcombination of these forms one considers which formulae involving onlya and c arederivable, one finds that in some casesa andc are not logically constrained (the only suchformulae are theorems ofI), while in all other cases the strongest derivable formula isitself of the form of one of the seven model constraints. So, binary composition of modelconstraint formulae just produces more model constraint formulae.

If one then considers the model and entailment constraints associated with each of theRCC-8 relations one finds that each relation is ‘saturated’ w.r.t. to model constraint formulae,in the sense that each of the seven possible model constraints is either entailed by themodel constraint associated with the relation or entails one of the entailment constraintsassociated with that relation. This means that if we add a new model constraint formula totheI representation of a total RCC-8 network it is either redundant or makes the networkinconsistent.

From the observations of the last two paragraph it follows that whenever a total RCC-8network can be shown to be inconsistent by binary composition ofI model constraints, thiscan be shown by a single application of this type of inference. This result is not in itselfsufficient to show that the RCC-8 relations are 3-compact, since we do not know whether thebinary composition ofI formula provides a complete procedure for computing inferencesamong the relevant class of formulae occurring in theI encoding. However, this will beshown at the end of the next section.

2.6. Nebel’s Models Demonstrate Tractability and 3-Compactness

The Prolog implementation of the spatial reasoning algorithm described in [3], was basedon a sequent calculus proof system forI, with certain optimisations derived from thework of [9]. This enabled the sequents required by the topological reasoning algorithm tobe tested in reasonable time (albeit exponential in the number of relations being tested).By investigating tableau proofs of such sequents, Nebel [15] showed that the consistencyproblem could be encoded classically. This is because, for any invalid sequent involvingonly the formulae required to represent the RCC-8 relations, it is always possible to constructa Kripke model [11] containing exactly three worlds (which will be calledv, w1 andw2)that provides a counterexample to the entailment. Nebel’s encoding simply describes these

Page 10: Determining Consistency of Topological Relations

222 B. BENNETT

Table 7.Classical description of intuitionistic binary clause entailment.

Formula Forcing constraint

∼ x ¬F(w1, x) ∧ ¬F(w2, x)∼ x ∨ ∼ y (¬F(w1, x) ∧ ¬F(w2, x)) ∨ (¬F(w1, y) ∧ ¬F(w2, y))∼(x ∧ y) ¬(F(w1, x) ∧ F(w1, y)) ∧ ¬(F(w2, x) ∧ F(w2, y))∼ x ∨ y (¬F(w1, x) ∧ ¬F(w2, x)) ∨ (F(v, y)x⇒ y (F(v, x)→ F(v, y)) ∧ (F(w1, x)→ F(w1, y)) ∧ (F(w2, x)→ F(w2, y))∼∼ x⇒ x (F(w1, x) ∧ F(w2, x))→ F(v, x)

models in classical predicate logic, by means of a binary relationF(w,a), which assertsthat the (atomic) formulaa is ‘forced’ (i.e. true) at the worldw.

More, specifically, each world of the Kripke model is identified with a set of constantswhich are forced at that world. The worlds are (partially) ordered by the subset orderingon these sets. Whether a complex formula is forced at a worldw depends on whether itsconstituents are forced atw and (in the case of negation and implication) also whether theyare forced at any ‘larger’ world:α ∧ β is forced if bothα andβ are forced atw; α ∨ β isforced if eitherα or β is forced atw; ∼α is forced ifα is not forced atw nor at any worldlarger thanw; α⇒ β is forced if atw and at any larger world, whereverα is forced so isβ.

The counter-models identified by Nebel always satisfy the ordering conditionsv ⊆ w1

andv ⊆ w2—so every formula forced byv is forced byw1 andw2. In these counter-modelsthe worldv is constrained so as to demonstrate the invalidity of a sequent:v forces all thepremiss formulae of the sequent but not its conclusion. The conditions under which a binaryformula ofI is forced atv in Nebel’s counter-models can be specified classically as givenin Table 7. To test if a sequent is valid we consider a set of constraints consisting of theforcing constraint for each premiss formula, the negation of the forcing constraint of theconclusion formula and also all instances ofF(v, x)→ (F(w1, x) ∧ F(w2, x)) (wherex isa any constant occurring in the sequent), which arise from the ordering conditions on theworlds. This set of classical formulae is consistent iff the original intuitionistic sequent isinvalid.

Apart from the regularity formula∼∼ x⇒x, all theI formulae used to represent RCC-8relations correspond to classical constraints which are reducible to 2CNF form. Hence,if we do not require regularity, the problem can be reduced to a 2-SAT problem, so theconsistency of instances of the RCC-8 relations can be computed in polynomial time.12 Theregularity condition was not considered by Nebel. However, it is possible that regularitycan also be enforced within a tractable language. A more expressive model encoding givenin [19] appears to enforce regularity, while maintaining tractability, but further investigationwill be required to clarify this.

Nebel’s analysis also provides the basis for a proof that the RCC-8 relation set (interpretedin accordance with Table 4) is 3-compact w.r.t. the theory of interior algebras. Under theforcing constraint interpretation, each constant/regiona is identified with three classicalliterals: F(v,a), F(w1,a) andF(w2,a); and each RCC-8 relationR(a, b) is specified by aset of binary clauses involving the literals associated witha andb (amongst these clausesI include those arising from the ordering condition on worlds as well as directly from the

Page 11: Determining Consistency of Topological Relations

CONSISTENCY OF TOPOLOGICAL RELATIONS 223

model and entailment constraints). The forcing constraint clauses are consistent iff theIconstraints from which they are derived are consistent; and these in turn are consistent iffthe corresponding interior algebraic constraints are satisfiable in some topological space.13

Thus inferences among RCC-8 relations are mirrored by logical derivations among thecorresponding classical forcing constraints. Specifically, the forcing constraint clausescorresponding to the composition of two RCC-8 relationsR1(a, b) and R2(b, c) are allthose resolvents involving onlya andc literals generated by applying binary resolutionto the combined sets of forcing constraint clauses associated with the two relations. Thisset contains all derivable forcing constraints ona andc. Thus, an RCC-8 composition isassociated with a set of binary resolutions among 2CNF clauses. Conversely, every binaryresolution among forcing constraint clauses is correlated with the composition of a pair ofRCC-8 relations. Because binary resolution is refutation-complete for classical clauses, itfollows that if an RCC-8 network is consistent w.r.t. composition, it is consistent w.r.t. thetheory of interior algebras.

Combining the refutation completeness of binary composition of the RCC-8 relationswith the observation, made at the end of the previous section (that, if a total RCC-8 networkcan be shown to be inconsistent by compositional inference, this can always be shown bya single compositional inference) we see that the RCC-8 relations are 3-compact w.r.t. theinterior algebra semantics.

The forcing constraint analysis can also be used to identify classes of disjunctive relationsover RCC-8 for which consistency checking of constraint networks is tractable. Clearlythe completeness of compositional inference applies to any conjunction of RCC-7 relationsand their negations and many disjunctions of RCC-8 relations are expressible in this way.In a network containing disjunctive relations it is possible to derive new information bycomposition without immediately getting a contradiction; so showing inconsistency mayrequire repeated application of composition. Nevertheless, this procedure still leads to analgorithm which is polynomial in the number of nodes of the network [15].14

3. Conclusion and Further Work

I have examined various aspects of the consistency problem for the RCC-8 topologicalrelations. I have shown that, if the relations are interpreted as holding among non-emptypoint-sets in an arbitrary topological space, RCC-8 is 3-compact w.r.t. an appropriate equa-tional theory (interior algebra) and hence consistency can be effectively determined by acomposition table. However, for most real applications, it is likely that we will want tocheck consistency under conditions where the nature of the regions and the space is muchmore restricted. If we want to test consistency w.r.t. a stronger theory, the tractability resultmay not hold. Indeed for planar Jordan curve bounded regions it is known that the problemis NP-hard.

If topological consistency checking is to be really useful one must either: 1) find anapplication for reasoning about arbitrary topological spaces; 2) find a stronger topologicaltheory which is both useful and tractable; or 3) show how abstract topological reasoning canbe incorporated as a component of larger system capable of reasoning about more specificdomains.

Page 12: Determining Consistency of Topological Relations

224 B. BENNETT

Acknowledgments

This work was supported by the EPSRC under grant GR/K65041.Thanks to Drs A.G. Cohn, B.M. Smith and A. Isli for helpful comments.

Notes

1. It is possible to give a variety of stronger and weaker definitions of relation composition. I give the one mostsuitable for the consistency checking problem under consideration.

2. My notion of compactness is directly analogous to that which is applied to logical languages: such a languageis compact if every inconsistent set of formulae has a finite inconsistent subset.

3. The terms ‘k-consistency’, ‘path-consistency’ etc. found in the CSP literature are somewhat misleading, sincethese concepts are neither generalisations nor refinements of logical consistency in its established sense. Isuggest that new terminology should be introduced to describe these properties of constraint networks—e.g.‘k-coherence’ seems more apt.

4. Here we assume thatRels is finite so that there is a maximum number of distinct relations which can beasserted between each triple of variables.

5. A set of convex regions inn-dimensional space has a common intersection iff every subset ofn+ 2 regionshas a common intersection.

6. This follows from a result of [10] that there are arbitrarily largestring graphswhich cannot be realised on aplane although all their subgraphs can be realised.

7. In fact McKinsey and Tarski [14] presented their analysis in terms ofclosurealgebras, in which the closureoperation is taken as primitive. Closure and interior algebras are essentially the same, since the two primitivesare inter-definable.

8. A dual interpretation is that regions correspond to regular closed sets, which are connected if they share a pointand overlap if they share an interior point.

9. This can be shown by considering resolution proofs using binary resolution and paramodulation.

10. For an introduction to intuitionistic logic see e.g. [17].

11. Note that inI the formula∼a ∨ ∼ b is strictly stronger than the (classically equivalent) formula∼(a ∧ b).Similarly,∼a ∨ b is strictly stronger thana⇒ b.

12. More precisely the problem is in the class NC, which means that it can be computed in polylogarithmic timeon polynomially many processors, so parallel processing can be effectively exploited. This complexity resultapplies also to the larger class of relations expressible in terms of conjunctions of the RCC-7 relations andtheir negations, which includes over half those relations that are disjunctions over the RCC-8 relations.

13. An intriguing question regarding this correspondence is whether there is an intuitive topological interpretationof the forcing constraints and the three ‘worlds’ associated with each region.

14. In [19] an analysis very similar to the forcing constraint interpretation ofI is applied to a modal logic encodingof RCC relations given in [5]. This enables a maximal tractable class of 148 disjunctive RCC-8 relations tobe identified.

References

1. J. F. Allen. (1981). An interval-based representation of temporal knowledge.Proceedings 7th IJCAI,pages 221–226.

2. J. F. Allen. (1983). Maintaining knowledge about temporal intervals.Communications of the ACM26:832–843.

3. B. Bennett. (1994). Spatial reasoning with propositional logics. In J. Doyle, E. Sandewall and P. Torasso (eds),Principles of Knowledge Representation and Reasoning: Proceedings of the 4th International Conference(KR94), Morgan Kaufmann, San Francisco, CA.

Page 13: Determining Consistency of Topological Relations

CONSISTENCY OF TOPOLOGICAL RELATIONS 225

4. B. Bennett. (1996a). Carving-up space: steps towards construction of an absolutely complete theory ofspatial regions.Proceedings of JELIA’96.

5. B. Bennett. (1996b). Modal logics for qualitative spatial reasoning.Bulletin of the Interest Group in Pureand Applied Logic (IGPL).

6. B. Bennett, A. Isli, & A. G. Cohn. (1997). When does a composition table provide a complete and tractableproof procedure for a relational constraint language?Proceedings of the IJCAI-97 workshop on Spatial andTemporal Reasoning, Nagoya, Japan.

7. M. Egenhofer & R. Franzosa. (1991). Point-set topological spatial relations.International Journal of Geo-graphical Information Systems5(2): 161–174.

8. M. Grigni, D. Papadias, & C. Papadimitriou. (1995). Topological inference. In C. Mellish (ed.),Proceed-ings of the Fourteenth International Joint Conference on Artificial Intelligence (IJCAI-95), Vol. I, MorganKaufmann, pages 901–906.

9. J. Hudelmaier. (1993). AnO(n logn)-space decision procedure for intuitionistic propositional logic.Journalof Logic and Computation3: 63–75.

10. J. Kratochv´ıl. (1991). String graphs ii: recognizing string graphs is np-hard.Journal of CombinatorialTheory, Series B52: 67–78.

11. S. Kripke. (1965). Semantical analysis of intuitionistic logic i. In J. Crossley and M. Dummett (eds),FormalSystems and Recursive Functions, North-Holland, pages 92–130.

12. P. Ladkin & R. Maddux, (1994), On binary constraint problems.Journal of the ACM41: 435–469.

13. A. Mackworth. (1977). Consistency in networks of relations.Artificial Intellegence8: 99–118.

14. J. McKinsey & A. Tarski. (1944). The algebra of topology.Annals of Methematics45: 141–191.

15. B. Nebel. (1995a). Computational properties of qualitative spatial reasoning: First results.Procedings ofthe 19th German AI Conference.

16. B. Nebel. (1995b). Reasoning about temporal relations: a maximal tractable subset of Allen’s intervalalgebra.Journal of the Association for Computing Machinery42: 43–66.

17. A. Nerode. (1990). Some letcures on intuitionistic logic. In S. Homer, A. Nerode, R. Platek, G. Sacks, andA. Scedrov (eds),Logic and Computer Science, Vol. 1429 ofLecture Notes in Mathematics, Springer-Verlag,pages 12–59.

18. D. A. Randell, Z. Cui, & A. G. Cohn. (1992). A spatial logic based on regions and connection.Proc. 3rdInt. Conf. on Knowledge Representation and Reasoning, Morgan Kaufmann, San Mateo, pages 165–176.

19. J. Renz & B. Nebel. (1997). On the complexity of qualitative spatial reasoning: a maximal tractable fragmentof the Region Connection Calculus.Proceedings of IJCAI-97.

20. A. Tarski. (1938). Der Aussagenkalk¨ul und die Topologie [sentential calculus and topology].FundamentaMathematicae31: 103–134. English translation in A. Tarski,Logic, Semantics, Metamathematics. OxfordClarendon Press, 1956.

21. M. Vilain & H. Kautz. (1986). Constraint propagation algorithms for temporal reasoning.Proceedings ofthe 5th AAAI conference, Philadelphia, pages 377–382.