On Topological Consistency and Realization - Semantic Scholar

Report 7 Downloads 193 Views
Submission to Constraints

1

On Topological Consistency and Realization Sanjiang Li State Key Laboratory of Intelligent Technology and Systems Department of Computer Science and Technology Tsinghua University, Beijing 100084, China Email: [email protected]

Abstract Topological relations are important in various tasks of spatial reasoning, scene description and object recognition. The RCC8 spatial constraint language developed by Randell, Cui and Cohn is widely recognized as of particular importance in both the research fields of qualitative spatial reasoning (QSR) and geographical information science. Given a network of RCC8 relations, naturally we ask when it is consistent, and if this is the case, can we have a realization in a certain spatial model? This paper gives a direct and simple algorithm for generating realizations of path-consistent networks of RCC8 base relations. As a result, we also show that each consistent network of RCC8 relations has a realization in the digital plane (with either 4- or 8-connections) and in any RCC model.

Keywords Qualitative spatial reasoning; Region Connection Calculus; RCC8 constraint language; realization; consistency; path-consistency.

1

Introduction

Topological relations such as “disconnected”, “externally connected”, “tangential proper part”, “non-tangential proper part”, “partially overlap” and “equal” are important in various tasks of spatial reasoning, scene description and object recognition. To incorporate topological information into AI systems, Randell, Cui and Cohn [18, 19] developed a formalism for qualitative spatial reasoning (QSR). This spatial theory, known as Region Connection Calculus (RCC), has now been widely recognized as the primary formalism for QSR.

RCC is a first order theory based on one primitive connectedness relation. Using this connectedness relation, one can define topological relations listed above. These topological relations, together with the converse of tangential and nontangential proper part, known as RCC8 base relations, form a jointly exhaustive and pairwise disjoint (JEPD) set of relations. This set of topological relations is identified as of particular importance for a number of reasons. For example, it is the smallest set of base relations which allows topological distinctions rather than purely mereological; it is the spatial counterpart of Allen’s 11 temporal relations [1]; the cognitive adequacy of RCC8 base relations has been justified by empirical investigations [11]. Moreover, the same set of relations has been identified in the field of geographical information science [8]. All the above merits make RCC8 a very nice constraint language for spatial representation and reasoning. But to justify the usefulness of this constraint language, we should consider the computational complexities of reasoning with RCC8. One important reasoning problem is to determine whether a network of RCC8 relations is consistent (w.r.t. the RCC theory), namely, is there an RCC model in which this network has a realization? To answer questions like this one need to have a good understanding of models of the RCC theory. Although it has been known for some while [9] that regular connected topological spaces provide models of RCC, it is only very recently, by the work of D¨ untsch, Wang and McCloskey [6] and Stell [25], that we know an RCC model is simply a Boolean algebra with a connectedness relation. Due to a lack of good understanding of RCC models, early work on computational aspects of RCC, e.g. [17, 23, 24, 21, 20], adopted a different semantics. In these work, the RCC8 relations were interpreted over topological spaces in a standard way. For this semantics, regions are regular closed subsets and two regions are said to be connected if they have nonempty intersection. Correspondingly, a network of RCC8 relations is said to be consistent if the network has a realization in a certain topological space. We refer to this version of consistency the one w.r.t. topology. Then it is an important question whether consistency w.r.t. RCC is equivalent to consistency w.r.t. topology. In order to answer this question, we now summarize some fundamental results concerning the computational aspects of RCC obtained so far. Based on Bennett’s encoding of RCC8 relations in propositional intuitionistic logic [2], Nebel [17] found that reasoning over RCC8 base relations is tractable and path-consistency is sufficient for determining consistency (w.r.t. topology). Later, Renz and Nebel [23, 24] extended Bennett’s encoding of RCC8 relations in modal logic [3]. Based on this encoding, they showed that reasoning with RCC8 is NP-hard in general 2

and obtained a maximum tractable subsets of RCC8 relations. Another two maximum tractable subsets of RCC8 relations were further obtained in [21]. Renz also proved the sufficiency of path-consistency for these tractable subsets. The realization problem was also considered by Renz [20], where he showed that any network of RCC8 relations which is consistent (w.r.t. topology) has a realization in the n-dimensional Euclidean space Rn for each n ≥ 1. An O(n4 ) algorithm for determining such a realization is also given. The proof is based on 0-order (propositional) encoding of RCC8 relations and is rather complicated. Now we can show that consistency w.r.t. the RCC theory is equivalent to consistency w.r.t. topology. Note that if a network of RCC8 relations Θ is consistent w.r.t. the RCC theory, then there is a path-consistent refinement Θ0 of all relations to base relations. (This is indeed what Grigni et al. [10] called relational consistency.) Now since each path-consistent network of RCC8 base relations is consistent w.r.t. topology, by Renz’s realization theorem, we know that Θ0 , hence Θ, can be realized in Rn for any n ≥ 1. On the contrary, if Θ is consistent w.r.t. topology, then by Renz’s realization theorem again, Θ has a realization in Rn for any n ≥ 1. Now recall that Rn (with the standard interpretation of the connectedness relation) gives an RCC model, we obtain that Θ is also consistent w.r.t. the RCC theory. In the rest of this paper, if not otherwise stated, our definition of consistency can be w.r.t. either RCC or topology. We now invite the reader’s attention to the slightly ‘paradoxical’ success of the propositional (intutionistic and modal) encoding of the RCC8 relations. On one hand, compared with the original first order RCC theory, these 0-order encodings seem to provide more efficient reasoning mechanisms. But on the other hand, by the computational complexity results obtained by Nebel and Renz, determining consistency of RCC8 networks is to a certain extent either NP-hard or equivalent to determining path-consistency of RCC8 networks. In this paper we shall do without 0-order encodings, and give a direct and simple algorithm for generating realization of path-consistent networks of RCC8 base relations. Section 2 recalls several basic concepts concerning RCC8 consistent network. Section 3 describes a class of topological spaces in which any consistent RCC8 network can be realized. We call these canonical connection structures. Then in Section 4 we give an O(n3 ) algorithm for generating a realization of path-consistent RCC8 base network in canonical connection structures. Next in Section 5 we show how to obtain a realization in an arbitrary RCC model. Recall that each consistent network has a path-consistent refinement to base relations, this further suggests that each consistent network of RCC8 relations has 3

a realization in any RCC model. Section 6 gives a detailed comparison between our realization approach and the one given by Renz in [20].

2

The RCC8 relations

2.1

RCC models and connection structures

There are several equivalent formulations of the RCC theory, we here adopt the one using Boolean connection algebras given by Stell. Definition 2.1 ([25]). An RCC model is a Boolean algebra A containing more than two elements, together with a binary connection relation C on A\{⊥} which satisfies the following conditions: A1. C is reflexive and symmetric; A2. (∀x ∈ A \ {⊥, >})C(x, −x); A3. (∀xyz ∈ A \ {⊥})C(x, y + z) ↔ C(x, y) or C(x, z); A4. (∀x ∈ A \ {⊥, >})(∃z ∈ A \ {⊥, >})¬C(x, z). where ⊥ and > are, respectively, the bottom and the top element of A, −x is the the complement of x in A, x + z is the least upper bound (lub) of x and z in A. Note that, due to Condition A4, each RCC model is an atomless Boolean algebra. In fact, RCC models are often addressed as ‘continuous’ since each region is divisible. Noticing that discrete spaces are often assumed in practical applications, Li and Ying [14] introduce a more general construction called GRCC models, which satisfy only Conditions A1, A2 and A3 given in Definition 2.1. In what follows we, for convenience, call any 2-tuple hA, Ci a connection structure provided that A is a Boolean algebra and C is a binary relation on A \ {⊥} that satisfies Conditions A1 and A3 in Definition 2.1. For a connection structure hA, Ci, we call a non-zero element in A simply a region. For a region a ∈ A, we say a is connected if a cannot be divided into two disconnected parts, i.e., a is connected iff ∀ b, c ∈ A \ {⊥}, b + c = a → C(b, c). Example 2.1. Given a topological space X, set RC(X) as the regular closed algebra of X. Suppose X contains more than two nonempty regular closed subsets. Define a binary relation CX on RC(X) as follows: for any two nonempty regular closed subsets A, B, CX (A, B) if and only if A ∩ B 6= ∅. It is clear that 4

a

a a

b

b

DC(a, b) EC(a, b)

b

a

b

a b

a

b

a

b

a b

PO(a, b) TPP(a, b) TPPi(a, b) NTPP(a, b) NTPPi(a, b) EQ(a, b)

Figure 1: Illustration of RCC8 base relations. hRC(X), CX i is a connection structure. Moreover, [9, 25] showed that for any connected regular X, hRC(X), CX i is an RCC model. Necessary and sufficient conditions for hRC(X), CX i to be an RCC model have been identified in [13, 7]. More important, D¨ untsch and Winter showed [7] that each RCC model is isomorphic to a substructure of some hRC(X), CX i for a connected weakly regular T1 space X. In the rest of this paper, for a topological space X, we shall often write RC(X) for this connection structure.

2.2

RCC8 relations

Given a connection structure hA, Ci, using C and ≤, the less-than relation on A, a set of binary relations is defined. Definitions and intended meanings of those used here are given in Table 1. The converse of P, PP, TPP and NTPP are denoted by Pi, PPi, TPPi and NTPPi respectively. The eight relations DC, EC, PO, EQ, TPP, NTPP, TPPi and NTPPi (illustrated in Figure 1) are provably JEPD (Jointly Exhaustive and Pairwise Disjoint). This set of relations, known as RCC8 base relations, is of significant importance (see [22] for a detailed investigation). To represent indefinite knowledge, unions of possible base relations are used. Since the base relations are pairwise disjoint, this results in 256 different RCC8 relations altogether (including the empty relation and the universal relation). We here, following Renz [22], use RCC8 to refer to the set of all possible disjunctions of the base relations and B to refer to the set of base relations. In the rest of this paper, we shall make no distinction between a base relation and the corresponding singleton containing the base relation. Note that if hA, Ci is an RCC model, the “part of” relation P, i.e., the lessthan relation ≤ on A, can be defined by C [19]. This means all relations given in Table 1 can be defined through C alone. Given a topological space X and two regions A and B in RC(X), namely two nonempty regular closed sets, we have the following topological characterizations

5

Table 1: Some relations definable in a connection structure hA, Ci Relation DC(x, y) P(x, y) PP(x, y) EQ(x, y) O(x, y) PO(x, y) EC(x, y) DR(x, y) TPP(x, y) NTPP(x, y)

interpretation x is disconnected from y x is a part of y x is a proper part of y x is identical with y x overlaps y x partially overlaps y x is externally connected to y x is discrete from y x is a tangential proper part of y x is a non-tangential proper part of y

Definition of R(x, y) ¬C(x, y) x≤y x⊥ x · y > ⊥ & x 6≤ y & y 6≤ x C(x, y) & x · y = ⊥ x·y =⊥ x < y & C(x, −y) ¬C(x, −y)

of RCC8 base relations in X: EQ(A, B) DC(A, B) EC(A, B) PO(A, B) TPP(A, B) TPPi(A, B) NTPP(A, B) NTPPi(A, B)

2.3

iff iff iff iff iff iff iff iff

A=B A∩B =∅ A◦ ∩ B ◦ = ∅, A ∩ B 6= ∅ A◦ ∩ B ◦ 6= ∅, A * B, A + B A ⊂ B, A * B ◦ B ⊂ A, B * A◦ A ⊂ B◦ B ⊂ A◦

RCC8 composition table

Given three regions a, b, c, suppose that you know TPP(a, b) and EC(b, c) hold. Then what can you infer about the relation between a and c? Could they partially overlap? Such questions are of great importance for various spatial reasoning tasks. One prominent technique for answering questions like this is the composition based reasoning originated in Allen’s work [1] on temporal reasoning. Formally speaking, given two RCC8 base relations, R and S, their composition, written CT (R, S), is defined to be the RCC8 relation which contains all RCC8 base relation T such that R(x, y)∧S(y, z)∧T(x, z) is consistent, namely, there exists a connection structure (or an RCC model) hA, Ci and three regions a, b, c ∈ A such that R(a, b) ∧ S(b, c) ∧ T(a, c) holds. All composition results for base relations are summarized in the RCC8 composition table (Table 2). This table first appeared in [5] and coincides with the one given in [8] in the context of GIS. Properties of this composition table has been investigated thoroughly in [4, 6, 13, 12]. In particular, Li and Ying have shown [13] that the weak composition table [6] of each RCC model coincides with the RCC8 composition table and such a weak composition table cannot be extensionally interpreted.

6

Table 2: RCC8 composition table ◦

DC

EC

PO

TPP

NTPP

DC,EC,PO TPP,NTPP TPPi,EQ NTPPi DC,EC,PO TPPi NTPPi DC,EC,PO TPPi NTPPi

DC,EC PO TPP NTPP DC,EC,PO TPP NTPP DC,EC,PO TPP,TPPi,EQ NTPP,NTPPi DC,EC PO,TPP NTPP DC,EC PO TPP NTPP PO TPPi NTPPi PO TPPi NTPPi PO

DC,EC PO TPP NTPP EC,PO TPP NTPP PO TPP NTPP TPP NTPP

DC,EC PO TPP NTPP PO TPP NTPP PO TPP NTPP

NTPP

NTPP

PO,EQ TPP TPPi PO TPPi NTPPi TPP

PO TPP NTPP PO,TPP,EQ NTPP,TPPi NTPPi NTPP

TPP

DC

DC,EC PO TPP NTPP DC,EC,PO EQ,TPP TPPi DC,EC,PO TPPi NTPPi DC EC

NTPP

DC

DC

DC,EC,PO TPPi NTPPi DC,EC,PO TPPi NTPPi DC

EC,PO TPPi NTPPi PO TPPi NTPPi EC

DC

EC

PO

TPPi

NTPPi EQ

2.4

NTPP

TPPi

NTPPi

EQ

DC

DC

DC

DC

EC

DC EC DC,EC,PO TPPi NTPPi DC,EC,PO EQ,TPP TPPi DC,EC PO TPP NTPP TPPi

DC,EC,PO TPPi NTPPi DC,EC,PO TPPi NTPPi DC,EC,PO TPP,TPPi NTPP,EQ NTPPi

PO

TPP

NTPP

NTPPi

TPPi

NTPPi

NTPPi

NTPPi

TPPi

NTPPi

EQ

NTPPi

Consistency and path-consistency

An RCC8 formula xRy is an RCC8 relation between two spatial variables, an RCC8 network is a set of spatial formulas. An RCC8 network Θ = {xi Rij xj : 1 ≤ i, j ≤ n} is said to be consistent if there exists a connection structure hA, Ci and n regions a1 , · · · , an ∈ A such that ai Rij aj for any 1 ≤ i, j ≤ n. Note that if this is the case, each Rij can be refined to an RCC8 base relation R∗ij , and the resulting network Θ∗ = {xi R∗ij xj : 1 ≤ i, j ≤ n} is also consistent. We call Θ∗ an RCC8 scenario refining Θ. Then it is clear that an RCC8 network is consistent if and only if it has a refinement that is an RCC8 scenario. Determining consistency of RCC8 networks is NP-hard in general, but there are also subsets of RCC8 for which the consistency problem is tractable. Indeed three maximal tractable subsets of RCC8 have been identified by Renz and Nebel [23, 21]. An RCC8 network Θ = {xi Rij xj : 1 ≤ i, j ≤ n} is said to be path-consistent [15, 16] if for any 1 ≤ i, j, k ≤ n, Rii = EQ and Rik ⊆ CT (Rij , Rjk ), where CT (R, S) is the composition of R and S as specified in Table 2. Interestingly, for the three maximal tractable subsets of RCC8, path-consistency implies consistency [23, 21].

3

Canonical connection structures

We in this section introduce a class of connection structures that can be used to model any consistent RCC8 network. Models with this property are termed canonical models of RCC8 by Renz [20]. The connection structures proposed here are structurally identical to the so called reduced RCC8 models given in [20]. They differ only in semantics, while Renz’s canonical models are Kripke

7

P1 t1

t2

t2

t1

NTPP EC P

P

f

f

f

i W

NTPP P2

P1

P2

Figure 2: A component of the canonical RCC8 models. models, ours are a class of topological spaces, which can be easily embedded in any RCC model. These canonical models consist of a collection of atomic units. We first give a description of the atomic unit. Let P = {f, t1 , t2 } be a partially ordered set with f < t1 , t2 and t1 and t2 are incomparable. We refer to these points in order: the false point (f ), the left true point (t1 ), and the right true point (t2 ). Consider the lower topology T of (P, ≤), it has five open sets, namely, ∅, P , {t1 }, {t2 } and {t1 , t2 }. Clearly, RC(P ), the regular closed algebra of P , contains four elements, namely ∅, P = {f, t1 , t2 }, P 1 = {f, t1 } and P 2 = {f, t2 }. Then by definition we have P 1 ECP 2 , P 1 NTPPP and P 2 NTPPP . (See Figure 2.) Now for each n ≥ 1, we construct a topological space Pn . This space contains for each pair (i, j) (1 ≤ i, j ≤ n) a copy of P , written Pij = {fij , t1ij , t2ij }. We S require all copies are disjoint. In other words, Pn = {Pij : 1 ≤ i, j ≤ n} and Pij ∩ Pmk 6= ∅ if and only if i = m and j = k. Consider the connection structure RC(Pn ), it’s clear that RC(Pn ) has 2 × n2 atoms that are of form Pijk , where 1 ≤ i, j ≤ n and k = 1, 2. Note that in this connection structure, two atomic regions are connected if and only if they are subregions of the same unit. Moreover, we have the following characterization of RCC8 base relations in this connection structure. Proposition 3.1. Given two regions A, B in Pn , we have 1. DC(A, B) iff A ∩ B = ∅; 2. EC(A, B) iff A ∩ B is nonempty and contains no atomic regions; 3. PO(A, B) iff A 6⊆ B and B 6⊆ A, and A ∩ B contains some atomic region, say Pijk ; 4. TPP(A, B) iff A ⊂ B, and there exist i, j such that Pij ∩ A 6= ∅ and Pij 6⊆ B; 5. NTPP(A, B) iff A ⊂ B, and Pij ∩ A 6= ∅ only if Pij ⊆ B.

8

By the above proposition, we have the following corollary. Corollary 3.1. Given a region A in Pn , and 1 ≤ m, k ≤ n, we have 1. if Pmk ⊂ A, then NTPP(Pmk , A); 1 2 1 2. if Pmk ∩ A = Pmk ⊂ A, then EC(Pm,k , A) and TPP(Pmk , A); 2 1 2 3. if Pmk ∩ A = Pmk ⊂ A, then EC(Pm,k , A) and TPP(Pmk , A).

4

Realization in canonical connection structures

In this section we show that any consistent RCC8 network with n spatial variables has a realization in the canonical connection structure Pn . Since an RCC8 network is consistent if and only if it has a consistent refinement of all relations to base relations (see Section 2.4), we need only to consider network of RCC8 base relations. In this section, we assume that Θ = {xi Rij xj : 1 ≤ i, j ≤ n} is a pathconsistent RCC8 base network with n different spatial variables. Recall that Θ is path-consistent if for any 1 ≤ i, j, k ≤ n, Rii = EQ and Rik ⊆ CT (Rij , Rjk ), where CT (R, S) is the composition of R and S as specified in Table 2. Note that by Rii = EQ, Rji must be identical with R∼ ij , the converse of Rij , for any j. This is because, by Table 2, EQ ∈ CT (Rij , Rji ) if and only if Rji = R∼ ij .

4.1

The algorithm

Given Θ = {xi Rij xj : 1 ≤ i, j ≤ n} a path-consistent RCC8 base network with n different spatial variables, without loss of generality, we assume that Rij 6= EQ for any i 6= j. Now we show that Θ has a realization in RC(Pn ), namely there exist regions Xi∗ ∈ RC(Pn ) (1 ≤ i ≤ n) such that Xi∗ Rij Xj∗ holds for any 1 ≤ i, j ≤ n. Table 3 describes an algorithm for constructing these Xi∗ , where Pij = {fij , t1ij , t2ij } is a homeomorphic copy of P , and for (i, j) 6= (m, k), Pij and Pmk are disjoint. Recall also that Pij1 = {fij , t1ij } and Pij2 = {fij , t2ij }. In what follows we give a simple description of the algorithm. S To begin with, we set Xi = {Pij : 1 ≤ j ≤ n} in Step 1. Clearly all Xi are pairwise disjoint. Our strategy is then to modify the spatial scenario step by step. We consider in Step 2 how to combine the EC or PO relations in this spatial scenario. Intuitively, if i < j and Rij is either EC or PO, we replace Pij contained in Xi with Pji . Then in the present case we have Xi0 ∩ Xj0 = Pji 6= ∅. Moreover, it can be proved that, for i 6= j, Xi0 ∩ Xj0 6= ∅ if and only if Rij is either EC or PO (see Fact 1 in Page 11). 9

Step 1. Step 2.

Step 3. Step 4.

Step 5.

Table 3: The algorithm for constructing regions Xi∗ S Set Xi = {Pij : 1 ≤ j ≤ n}. Set Xi0 = (Xi − Ui )S∪ Vi where Ui = S {Pij : i < j, Rij ∈ {EC, PO}}; Vi S = {Pji : i < j, Rij ∈ {EC, PO}}. 00 0 Set Xi = Xi ∪ {Xj0 : Rji ∈ {TPP, NTPP}}. Set Xi000 = Xi00 − Yi1 − Yi2 where Yi1 = {t1mk : m > k, Rik = Rmk = EC and Rmi ∈ {EQ, TPP}}; Yi2 = {t2mk : m > k, Rim = Rmk = EC and Rki ∈ {EQ, TPP}}. Set Xi∗ = Xi000 − Zi where Zi = {t2mk : Rmk = TPP, Rmi , Rik ∈ {EQ, TPP}}.

Then in Step 3, we consider how to combine the PP relations in the spatial scenario obtained after Step 2. Our intuition is rather simple: when Rji is either TPP or NTPP, we merge Xj0 in Xi0 . This results in [ Xi00 = {Xj0 : Rji ∈ {EQ, TPP, NTPP}}. After Step 3 we have, for i 6= j, Xi00 ⊂ Xj00 if and only if Rij is either TPP or NTPP; and Xi00 ∩ Xj00 = ∅ if and only if Rij is DC (see Proposition 4.1). The fourth step distinguishes between EC and PO. Intuitively, if Rij is EC and i > j, then Pij ⊆ Xi00 ∩ Xj00 . We should prune Pij such that Xi00 and Xj00 contain a different branch of Pij respectively — in this case we choose to remove t1ij from Xi00 and remove t2ij from Xj00 . In general, if Rmk = EC and m > k, and 00 and Xk00 is a subset of Xi00 , while the other one is externally suppose one of Xm

connected to Xi00 . Then we should also prune Pmk contained in Xi00 . Note that 00 ∩ Xk00 ⊆ Xi00 , and one of the following situations in this case we have Pmk ⊂ Xm

holds: (i) Rik = EC and Rmi is either TPP or EQ (see Figure 3 A); (ii) Rim = EC and Rki is either TPP or EQ (see Figure 3 B). In the first situation we remove t1mk from Xi00 ; in the second, we remove t2mk from Xi00 . The last step distinguishes between TPP and NTPP. The intuition here is removing one top element, here t2ij , from both Xi000 and Xj000 if Rij is TPP. In 000 ⊆ Xi000 , Xi000 ⊆ Xk000 , then both Rmi and Rik are general, if Rmk = TPP and Xm

either EQ or TPP. In this case we also remove t2mk from Xi000 . In the rest of this section we show that these X1∗ , · · · , Xn∗ indeed satisfy the constraints specified in Θ, namely the RCC8 relation between Xi∗ and Xj∗ is precisely Rij for each pair (i, j). 10

m

EC

m

k



EQ TPP

-

···

EC

w

···

EC

k



EC

···

EQ

w

Pmk

-

TPP

··· Pmk

i

i Xi000

Xi000 B

A

Figure 3: Illustration of Step 4.

4.2

An instantiation of Θ

Note first that we associate n disjoint copies of P to each spatial variable Xi in Step 1. Clearly all Xi are pairwise disjoint and for any two pairs (i, j) and (m, k), Pij = Pmk if and only if i = j and m = k. We next show that Xi0 , the revised region of Xi after Step 2, has the following property: Fact 1. For i 6= j, Xi0 ∩ Xj0 6= ∅ if and only if Rij is either EC or PO. Proof. Note that Xi0 = {Pir0 : 1 ≤ r ≤ n} with Pir0 ∈ {Pir , Pri } for r > i and Pir0 = Pir for r ≤ i. Suppose i 6= j and Xi0 ∩ Xj0 6= ∅. Then there are 1 ≤ r, s ≤ n 0 0 with Pir0 = Pjs . By Pir0 ∈ {Pir , Pri } and Pjs ∈ {Pjs , Psj }, we must have Pir = Psj

or Pri = Pjs since i 6= j. But this holds only if r = j and s = i. In a word, if i 6= j and Xi0 ∩ Xj0 6= ∅, then we have Pij0 = Pji0 . Note that if i < j, then by Pji0 = Pji , we also have Pij0 = Pji . By the construction specified in Step 2, this holds if and only if Rij is either EC or PO. The case of i > j is similar. By the proof given above, we have the following facts: Fact 2. For i 6= j, if Xi0 ∩ Xj0 6= ∅, then Xi0 ∩ Xj0 is either Pji (if i < j) or Pij (if i > j). Fact 3.

(1) For 1 ≤ m, k, i ≤ n, Pmk ∩ Xi0 6= ∅ if and only if Pmk ⊂ Xi0 .

(2) For m ≤ k and 1 ≤ i ≤ n, Pmk ⊂ Xi0 if and only if m = i and Rmk 6∈ {EC, PO}; in particular, Pmm ⊂ Xi0 if and only if m = i. (3) For m > k and 1 ≤ i ≤ n, Pmk ⊂ Xi0 if and only if either m = i or (k = i 0 and Rmi ∈ {EC, PO}), or but equivalently, if and only if Xm = Xi0 or

(Xk0 = Xi0 and Rmk ∈ {EC, PO}). Next we consider the properties of Xi00 , the revision of Xi0 after Step 3. By S Xi00 = {Xj0 : Rji ∈ {EQ, TPP, NTPP}}, we have the following results: 11

Fact 4. Given 1 ≤ m, k, i ≤ n, we have (1) Pmk ⊂ Xi00 if and only if Pmk ⊂ Xj0 for some j with Rji ∈ {EQ, TPP, NTPP}; (2) if m ≤ k, then Pmk ⊂ Xi00 if and only if Rmi ∈ {EQ, TPP, NTPP} and Rmk 6∈ {EC, PO}; (3) if m > k, then Pmk ⊂ Xi00 if and only if Rmi ∈ {EQ, TPP, NTPP} or (Rki ∈ {EQ, TPP, NTPP} and Rmk ∈ {EC, PO}). Proof. (1) follows from the definition of Xi00 and Fact 3 (1). The rest two statements follow from (1) and Fact 3. As a corollary of Fact 4, we have Fact 5. Suppose 1 ≤ m, k, i ≤ n and Pmk ⊂ Xi00 . Then we have either Rmi or Rki is in {EQ, TPP, NTPP}. We now show that these Xi00 are already useful for determining mereological relations. Proposition 4.1. For i 6= j, 1. Xi00 ⊂ Xj00 if and only if Rij is either TPP or NTPP; and 2. Xi00 ⊃ Xj00 if and only if Rij is either TPPi or NTPPi; and 3. Xi00 * Xj00 , Xi00 + Xj00 and Xi00 ∩ Xj00 6= ∅ if and only if Rij is either EC or PO; and 4. Xi00 ∩ Xj00 = ∅ if and only if Rij is DC. Proof. We first show Item 1. Suppose Xi00 ⊂ Xj00 . By definition we have Xi0 ⊂ Xj00 =

S

{Xs0 : Rsj ∈

{EQ, TPP, NTPP}}. Suppose Rij is neither TPP nor NTPP. Note that there exist at most n − 1 many different s such that Rsj ∈ {EQ, TPP, NTPP}. For these s, by Fact 2 and s 6= i, we know Xi0 ∩ Xs0 contains at most one copy of P . Therefore Xi0 ∩ Xj00 contains at most n − 1 different copies of P . This contradicts the fact that Xi0 contains n different copies of P and that Xi0 ⊂ Xj00 . As a result, we should have Rij is either TPP or NTPP. On the other hand, suppose that Rij is either TPP or NTPP. Then we have Xi0 ∩ Xj0

= ∅ by Fact 1 and Xi0 ⊂ Xj00 by definition. Note that if Xs0 satisfies Rsi ∈

{TPP, NTPP}, we also have Rsj ∈ {TPP, NTPP} since Θ is path-consistent and CT (NTPP, TPP) = CT (TPP, NTPP) = CT (NTPP, NTPP) = NTPP 12

and CT (TPP, TPP) = {TPP, NTPP}. By Fact 1, this shows Xs0 ∩ Xj0 = ∅ and Xs0 ⊂ Xj00 . As a result we have Xi00 ⊂ Xj00 . Item 2 then follows from 1 directly. We next show Item 3. Suppose Xi00 * Xj00 , Xi00 + Xj00 and Xi00 ∩ Xj00 6= ∅. Then by Items 1 and 2, we have Rij is either EC or PO or DC. Suppose Rij = DC holds. Then by Fact 1 we have Xi0 ∩ Xj0 = ∅. Moreover, for any s and any t with Rsi , Rtj ∈ {TPP, NTPP}, we have Rit , Rst , Rsj are all DC since Θ is path-consistent and CT (TPP, DC) = CT (NTPP, DC) = CT (DC, TPPi) = CT (DC, NTPPi) = DC. By Fact 1 again, we have Xi0 ∩ Xt0 = Xs0 ∩ Xt0 = Xs0 ∩ Xj0 = Xi0 ∩ Xj0 = ∅ for any s, t specified as above. By the definition of Xi00 and Xj00 , we have Xi00 ∩Xj00 = ∅, a contradiction. This shows that Rij is either EC or PO. On the other hand, suppose Rij is either EC or PO. By Items 1 and 2, we have Xi00 * Xj00 and Xi00 + Xj00 . But by Fact 1, we also have Xi0 ∩ Xj0 6= ∅. Thereby we have Xi00 ∩ Xj00 6= ∅ since Xi0 ⊂ Xi00 and Xj0 ⊂ Xj00 . Item 4 then follows directly from the above conclusions. Remark 4.1. Given a path-consistent network of RCC5 (or mereological) base relations Θ = {xi Rij xj : 1 ≤ i, j ≤ n} with n spatial variable, we can adapt Steps 1-3 given in Table 3 to construct a realization of Θ. Indeed, set (i) Xi = {fij : 1 ≤ j ≤ n}; and (ii) Xi0 = (Xi \ {fij : i < j, Rij = PO}) ∪ {fji : i < j : Rij = PO}; and (iii) Xi00 =

S

{Xj0 : Rji ∈ {EQ, PP}}.

Then these Xi00 satisfies Xi00 Rij Xj00 for any pair (i, j) with 1 ≤ i, j ≤ n. The proof is similar to that given in the above proposition. We next prove some basic facts about Xi000 . The following fact suggests in particular that Step 4 preserves the mereological relations. Fact 6. For i 6= j, (1) Xi000 ⊂ Xj000 if and only if Xi00 ⊂ Xj00 ; and (2) Xi000 ∩ Xj000 = ∅ if and only if Xi00 ∩ Xj00 = ∅. Proof. We first show (1). Note that for each Pst , Pst ⊂ Xk00 if and only if fst ∈ Xk00 . Suppose Xi000 ⊂ Xj000 . If Pst is contained in Xi00 , we have fst ∈ Xi000 = Xi00 − Yi1 − Yi2 since fst 6∈ Yi1 ∪ Yi2 . But by Xi000 ⊂ Xj000 , we also have fst ∈ Xj000 . This show fst ∈ Xj00 and, consequently,

13

Pst ⊂ Xj00 . Note that by Proposition 4.1 and i 6= j, Xi00 = Xj00 cannot hold. As a result, we have Xi00 ⊂ Xj00 . On the other hand, suppose Xi00 ⊂ Xj00 , we show Xi000 ⊂ Xj000 . To this aim, note that Xi00 − Yj1 − Yj2 ⊆ Xj00 − Yj1 − Yj2 = Xj000 , we now show Xi000 = Xi00 − Yi1 − Yi2 ⊆ Xi00 − Yj1 − Yj2 , that is, Xi00 ∩ (Yj1 ∪ Yj2 ) ⊆ Yi1 ∪ Yi2 . Suppose t1mk ∈ Xi00 ∩ Yj1 . Note that by t1mk ∈ Yj1 , we have Rmj ∈ {EQ, TPP} and Rmk = Rkj = EC (see Figure 4 (a)). Moreover, by t1mk ∈ Xi00 , we have Pmk ⊂ Xi00 . By Fact 5 we have either Rmi or Rki is in {EQ, TPP, NTPP}. Note that by Xi00 ⊂ Xj00 and Proposition 4.1 we have Rij ∈ {TPP, NTPP}. This suggests Rki ∈ {EQ, TPP, NTPP} cannot hold: for otherwise, we shall have Rkj ∈ {TPP, NTPP} by a simple composition, this contradicts the fact that Rkj = EC (see Figure 4 (b)). Hence we must have Rmi ∈ {EQ, TPP, NTPP} (Figure 4 (c)). By Rij ∈ {TPP, NTPP} and Rmj ∈ {EQ, TPP}, we have Rmj = TPP by applying the path-consistency algorithm (Figure 4 (d)). This suggests in turn that Rij = TPP and Rmi ∈ {EQ, TPP} (Figure 4 (e)). Note that on one hand, by Rkm = EC and Rmi ∈ {EQ, TPP}, we have Rki 6= DC; and on the other hand, by Rjk = EC and Rij = TPP, we have Rki ∈ {DC, EC}. Combining these two observations, we have Rik = EC (see Figure 4 (f)). Now t1mk ∈ Yi1 is clear by the definition of Yi1 . Consequently we have Xi00 ∩ Yj1 ⊆ Yi1 . Similarly, we can show Xi00 ∩ Yj2 ⊆ Yi2 . As a result, if Xi00 ⊂ Xj00 holds, we have Xi000 ⊂ Xj000 also holds. We next show (2). Note that if Xi00 ∩ Xj00 = ∅, then Xi000 ∩ Xj000 = ∅. On the other hand, if Xi00 ∩ Xj00 6= ∅, there exists some fmk ∈ Xi00 ∩ Xj00 . Clearly this fmk is also in Xi000 ∩ Xj000 . This ends the proof. The following fact shows that if Rij = EC, then Xi000 ∩ Xj000 contains no true point, namely Xi000 ECXj000 holds. Fact 7. Suppose Rij = EC and fmk ∈ Xi000 ∩ Xj000 . Then t1mk , t2mk 6∈ Xi000 ∩ Xj000 . Proof. Suppose Rij = EC and t1mk ∈ Xi000 ∩Xj000 . There are two cases which should be discussed. Case 1. If m ≤ k, then by t1mk ∈ Xi000 ∩Xj000 , we have Pmk ⊆ Xi00 ∩Xj00 . Moreover, by Fact 4, we have Rmi , Rmj ∈ {EQ, TPP, NTPP}. Since Θ is path-consistent, we have Rij ⊆ CT (Rim , Rmj ) ⊆ CT ({EQ, TPPi, NTPPi}, {EQ, TPP, NTPP}) = {EQ, TPP, TPPi, NTPP, NTPPi, PO}. 14

m

k

EC EQ TPP

EQ,TPP NTPP

EC

?

?

+ ?

s? s -?

TPP, NTPP

i

EQ TPP NTPP

×

j

i

EC

EC

?

j

-? TPP, NTPP

i

(b) EC

m

k -

s? TPP, NTPP

j

(c) m

k -

EC

k

-

TPP EC

?

EC

k -

EQ TPP NTPP

-? TPP, NTPP

TPP

i

EC

+

(a) m

m

k

-

j

EC

EQ TPP

(d)

EC

+ ?

s -?

?

i

EC

EQ TPP

TPP

j

i

(e)

-? TPP

j

(f)

Figure 4: Illustration of consistency. This contradicts the assumption that Rij = EC. Case 2. If m > k, then by t1mk ∈ Xi000 ∩ Xj000 , we have Pmk ⊆ Xi00 ∩ Xj00 . By Fact 4 again, we have (i) Rmi ∈ {EQ, TPP, NTPP} or (Rki ∈ {EQ, TPP, NTPP} and Rmk ∈ {EC, PO}); and (ii) Rmj ∈ {EQ, TPP, NTPP} or (Rkj ∈ {EQ, TPP, NTPP} and Rmk ∈ {EC, PO}). Similar to the proof given for Case 1, by Rij = EC, the two subcases (1) Rmi , Rmj ∈ {EQ, TPP, NTPP}; and (2) Rki , Rkj ∈ {EQ, TPP, NTPP} and Rmk ∈ {EC, PO} cannot hold. There are still two subcases to be settled: (3) Rmi , Rkj ∈ {EQ, TPP, NTPP} and Rmk ∈ {EC, PO}; and (4) Rki , Rmj ∈ {EQ, TPP, NTPP} and Rmk ∈ {EC, PO}. Since the proof of these two subcases are similar, we only prove subcase (3). Note that by Rmi , Rkj ∈ {EQ, TPP, NTPP} and Rij = EC and Rmk ∈ {EC, PO}, we must have Rmk = EC. This further reduces Rik to EC and reduces Rmi to be either EQ or TPP. But by the definition of Yi1 , we have t1mk ∈ Yi1 , namely t1mk 6∈ Xi000 . This contradicts the assumption. 15

So, we must have t1mk 6∈ Xi000 ∩ Xj000 . That t2mk 6∈ Xi000 ∩ Xj000 can be similarly proved. The following proposition characterizes the partially overlap relation: Proposition 4.2. Suppose i > j. Then Rij = PO if and only if Pij ⊆ Xi000 ∩ Xj000 and Pii ⊂ Xi000 − Xj000 , Pjj ⊂ Xj000 − Xi000 . Proof. Suppose Rij = PO and i > j. We have Pij ⊂ Xi0 ⊆ Xi00 and Pij ⊂ Xj0 ⊆ Xj00 . Moreover, by the definition of Xi000 and Xj000 , clearly we have Pij ∩ (Yi1 ∪ Yi2 ) = ∅ and Pij ∩ (Yj1 ∪ Yj2 ) = ∅. This shows Pij ⊆ Xi000 ∩ Xj000 . Note that for any k we have Pkk ⊂ Xk0 ⊆ Xk00 . By the definition of Xk000 we also have Pkk ⊂ Xk000 . Moreover, 00 if and only if Rkm ∈ {EQ, TPP, NTPP}. Now by Fact 4 we have Pkk ⊂ Xm

recall that Rij = PO, we must have Pii 6⊂ Xj00 and Pjj 6⊂ Xi00 . This is equivalent to say that Pii ∩ Xj00 = Pjj ∩ Xi00 = ∅. Recall that Xk000 ⊆ Xk00 holds for any k, we have Pii ∩ Xj000 = Pjj ∩ Xi000 = ∅. Thereby we have Pii ⊂ Xi000 − Xj000 and Pjj ⊂ Xj000 − Xi000 . On the other hand, suppose Pij ⊆ Xi000 ∩ Xj000 and Pii ⊂ Xi000 − Xj000 , Pjj ⊂ Xj000 − Xi000 . By Proposition 4.1 and Fact 6, we have Rij can only be either PO or EC. But by Fact 7, Rij cannot be EC since Pij ⊆ Xi000 ∩ Xj000 . Therefore, Rij = PO. By Proposition 4.2 and Facts 6 and 7, we have the following Proposition 4.3. Suppose i > j. Then Rij = EC if and only if fij ∈ Xi000 ∩ Xj000 , t1ij ∈ Xj000 − Xi000 and t2ij ∈ Xi000 − Xj000 . Proof. Suppose i > j and Rij = EC. By the definition of Xi000 and Xj000 , we have t1ij ∈ Yi1 and t2ij ∈ Yj2 . It is also clear that t1ij 6∈ Yj1 ∪ Yj2 and t2ij 6∈ Yi1 ∪ Yi2 . Recall that Pij is contained in both Xi00 and Xj00 , We have therefore fij ∈ Xi000 ∩Xj000 , t1ij ∈ Xj000 − Xi000 and t2ij ∈ Xi000 − Xj000 . On the other hand, suppose fij ∈ Xi000 ∩Xj000 , t1ij ∈ Xj000 −Xi000 and t2ij ∈ Xi000 −Xj000 . Then by Fact 6 and Proposition 4.1, we have Rij is either EC or PO. But since Pij 6⊆ Xi000 ∩ Xj000 , we have by Proposition 4.2 Rij = EC. We now summarize the above results in the following proposition: Proposition 4.4. For 1 ≤ i, j ≤ n, we have 1. Rij ∈ {TPP, NTPP} if and only if Xi000 ⊂ Xj000 ; 2. Rij ∈ {TPPi, NTPPi} if and only if Xi000 ⊃ Xj000 ; 16

3. Rij = EQ if and only if Xi000 = Xj000 if and only if i = j; 4. Rij = DC if and only if Xi000 ∩ Xj000 = ∅; 5. Rij = EC if and only if fmk ∈ Xi000 ∩ Xj000 , t1mk ∈ Xj000 − Xi000 and t2mk ∈ Xi000 − Xj000 , where m = max{i, j} and k = min{i, j}; 6. Rij = PO if and only if Pmk ⊆ Xi000 ∩ Xj000 and Pii ⊂ Xi000 − Xj000 , Pjj ⊂ Xj000 − Xi000 , where m = max{i, j} and k = min{i, j}. Note that the above interpretation of spatial variable xi as Xi000 cannot distinguish between tangential and non-tangential proper part. To this aim we should further apply Step 5 and prune Xi000 to Xi∗ . We first show that Step 5 preserves the mereological relations. Fact 8. For i 6= j, (1) Xi∗ ⊂ Xj∗ if and only if Xi00 ⊂ Xj00 ; and (2) Xi∗ ∩ Xj∗ = ∅ if and only if Xi00 ∩ Xi00 = ∅. Proof. We first prove (1). Recall that by Fact 6, Xi00 ⊂ Xj00 if and only if Xi000 ⊂ Xj000 . Now suppose Xi00 ⊂ Xj00 . Note first that Xi∗ 6= Xj∗ since Pjj ⊂ Xj∗ and Pjj ∩ Xi00 = ∅. To show Xi∗ ⊂ Xj∗ = Xj000 − Zj , by Xi∗ ⊆ Xi000 and Xi000 ⊂ Xj000 , we need only to show Xi∗ ∩ Zj = (Xi000 − Zi ) ∩ Zj = ∅, or but equivalently, to show Xi000 ∩ Zj ⊆ Zi . Suppose t2mk ∈ Xi000 ∩ Zj . By t2mk ∈ Xi000 , we have Pmk ⊂ Xi00 . Then by Fact 5 we have either Rmi or Rki is in {EQ, TPP, NTPP}. Moreover, by t2mk ∈ Zj , we have Rmk = TPP and Rmj , Rjk ∈ {EQ, TPP}. Note that by Xi00 ⊂ Xj00 and Proposition 4.1, we have Rij ∈ {TPP, NTPP}. This suggests that Rik ∈ {TPP, NTPP}, and hence Rki is not in {EQ, TPP, NTPP}. Therefore we have Rmi ∈ {EQ, TPP, NTPP}. Now, since Θ is path-consistent, we can reduce Rmi to either EQ or TPP, and reduce Rik to TPP. But by the definition of Zi , we have t2mk ∈ Zi . Thereby we have shown Xi000 ∩Zj ⊆ Zi and, consequently, Xi∗ ⊂ Xj∗ . On the other hand, suppose Xi∗ ⊂ Xj∗ . For any fmk ∈ Xi∗ , we have fmk ∈ Xj∗ . This is equivalent to say that, given Pmk ⊂ Xi00 , we have Pmk ⊂ Xj00 . So we must have Xi00 ⊆ Xj00 . Now since i 6= j, we have Xi00 ⊂ Xj00 . For (2), note that fmk ∈ Xi00 ∩ Xj00 if and only if fmk ∈ Xi∗ ∩ Xj∗ . Now if Xi00 ∩ Xj00 6= ∅, we have some fmk ∈ Xi00 ∩ Xj00 . So Xi∗ ∩ Xj∗ is nonempty. The other hand is also clear since Xi∗ ⊆ Xi00 and Xj∗ ⊆ Xi00 . Next we show that Steps 5 preserves EC and PO. 17

Proposition 4.5. For 1 ≤ i, j ≤ n, 1. If Rij = DC, then Xi∗ ∩ Xj∗ = ∅; 2. If Rij = EC, then Xi∗ ∩ Xj∗ = Xi000 ∩ Xj000 is nonempty and contains only false elements like fmk ; 3. If Rij = PO, then Pij ⊆ Xi∗ ∩ Xj∗ and Pii ⊂ Xi∗ − Xj∗ , Pjj ⊂ Xj∗ − Xi∗ ; 4. If Rij is not DC, EC, PO, then we have either Pii ⊆ Xi∗ ∩ Xj∗ or Pjj ⊆ Xi∗ ∩ Xj∗ . Proof. Note that Xk∗ ⊆ Xk000 holds for any k. Moreover, by Proposition 4.4, Rij = DC if and only if Xi000 ∩ Xj000 = ∅. Then Item 1 holds. As for Item 2, note that fst ∈ Xk000 if and only if fst ∈ Xk∗ since fst 6∈ Zk . Moreover, by Fact 7 and Rij = EC, we know Xi000 ∩ Xj000 contains only false elements like fmk . Consequently Xi∗ ∩ Xj∗ = Xi000 ∩ Xj000 is nonempty and contains only false elements. As for Item 3, since Rij = PO, we have Pij ⊆ Xi000 ∩ Xj000 , Pii ⊂ Xi000 − Xj000 and Pjj ⊂ Xj000 − Xi000 by Proposition 4.2. Note that by definition we also have Pij ∩ Zi = Pij ∩ Zj = ∅ and Pii ∩ Zi = Pjj ∩ Zj = ∅. This suggests that Pij ⊆ Xi∗ ∩ Xj∗ , Pii ⊂ Xi∗ − Xj∗ and Pjj ⊂ Xj∗ − Xi∗ . As for Item 4, suppose Rij is not DC, EC, PO. Then by Proposition 4.4 we have either Xi000 ⊆ Xj000 or Xi000 ⊇ Xj000 . Note that Pii ∩ Zi = Pjj ∩ Zj = ∅ and Pii ⊂ Xi000 , Pjj ⊆ Xj000 . Clearly we have Pii ⊂ Xi∗ and Pjj ⊂ Xj∗ . Moreover, if Xi000 ⊆ Xj000 , we have Pii ⊂ Xj000 , hence Pii ⊂ Xj∗ since Pii ∩ Zj = ∅; and if Xj000 ⊆ Xi000 , similarly we have Pjj ⊂ Xi∗ . Consequently we have either Pii ⊆ Xi∗ ∩ Xj∗ or Pjj ⊆ Xi∗ ∩ Xj∗ . The next proposition then shows that the tangential and non-tangential proper part relations can be distinguished after Step 5. Proposition 4.6. For i 6= j, Rij = NTPP if and only if Pmk ⊂ Xj∗ for all fmk ∈ Xi∗ . Proof. Note that Xk∗ = Xk00 − Yk1 − Yk2 − Zk and Yk1 , Yk2 , Zk are disjoint subsets of Xk00 for any k. Set Wk = Yk1 ∪ Yk2 ∪ Zk for each k. Suppose Rij = NTPP. We now show that, for all fmk ∈ Xi∗ , we have Pmk ⊂ Xj∗ = Xj00 − Wj . Note that by fmk ∈ Xi∗ we have Pmk ⊂ Xi00 . Recall that by Fact 5 Pmk ⊂ Xi00 holds only if either Rmi or Rki is in {EQ, TPP, NTPP}. By Rij = NTPP, we have Xi00 ⊂ Xj00 , hence Pmk ⊂ Xj00 . Therefore we need only to show Pmk ∩ Wj = ∅. Suppose not so. Then we have either t1mk ∈ Yj1 or 18

t2mk ∈ Yj2 or t2mk ∈ Zj . In what follows we show that all these situations cannot hold. Case 1. By t1mk ∈ Yj1 , we have m > k and Rmk = Rkj = EC and Rmj ∈ {TPP, EQ}. By Rij = NTPP, we have Rki 6∈ {EQ, TPP, NTPP}. This is because otherwise Rkj would be NTPP. Therefore by Pmk ⊂ Xi00 and Fact 5, we have Rmi ∈ {EQ, TPP, NTPP}. But by Rij = NTPP again, we have Rmj = NTPP. This is a contradiction. Case 2. By t2mk ∈ Yj2 , we have m > k and Rkm = Rmj = EC and Rkj ∈ {TPP, EQ}. By Rij = NTPP, we have Rmi 6∈ {EQ, TPP, NTPP}, hence Rki ∈ {EQ, TPP, NTPP} by Pmk ⊂ Xi00 and Fact 5. But by Rij = NTPP again, we have Rkj = NTPP, a contradiction. Case 3. By t2mk ∈ Zj , we have Rmk = TPP and Rmj , Rjk ∈ {EQ, TPP}. Since Rij = NTPP, we have Rik = NTPP and, therefore Rmi ∈ {EQ, TPP, NTPP} by Fact 5. Now by Rij = NTPP, we should have Rmj = NTPP. This is a contradiction. So if i 6= j and Rij = NTPP, then Pmk ⊂ Xj∗ holds for all fmk ∈ Xi∗ . On the other hand, suppose Pmk ⊂ Xj∗ holds for all fmk ∈ Xi∗ . Recall that fmk ∈ Xi∗ if and only if fmk ∈ Xi00 if and only if Pmk ⊂ Xi00 . Clearly we have Xi00 ⊆ Xj∗ . Moreover, by Xj∗ ⊆ Xj00 and i 6= j, we have Xi00 ⊂ Xj00 . By Proposition 4.1, this suggests Rij is either TPP or NTPP. But if Rij = TPP, then t2ij ∈ Zj , hence Pij 6⊆ Xj∗ . This contradicts the assumption, so we have Rij = NTPP. Note that by this proposition, we have Rij = NTPP if and only if Xi∗ NTPPXj∗ . Combining this result with Proposition 4.5, we have the following theorem: Theorem 4.1. For any i, j with 1 ≤ i ≤ j, we have Xi∗ Rij Xj∗ . Above we have shown that any path-consistent network of RCC8 base relations with n spatial variables has a realization in the canonical connection structure Pn . This is equivalent to say that any consistent RCC8 network with n spatial variables has a realization in Pn . In the following section we show that such a conclusion can be transferred to any RCC model.

5

Realization in RCC model

Given an arbitrary RCC model R, we in this section show that any consistent RCC8 base network Θ has a realization in R. Suppose {Xi∗ : 1 ≤ i ≤ n} is a realization of Θ obtained by applying the algorithm described in Table 3. We next develop an O(n3 ) algorithm for transferring such a realization to R. A very 19

similar algorithm has been described in [20] (see Section 6 for a comparison), we include it here for completeness. Given Θ = {xi Rij xj : 1 ≤ i, j ≤ n} a path-consistent RCC8 base network with n different spatial variables, without loss of generality, we assume that Rij 6= EQ for any i 6= j. Now we show that Θ has a realization in R. Recall that by Section 4 we know that Θ has a realization in RC(Pn ), namely there exist regions Xi∗ ∈ RC(Pn ) (1 ≤ i ≤ n) such that Xi∗ Rij Xj∗ holds for any 1 ≤ i, j ≤ n. We now show how to transfer this realization in R without changing the RCC relation between any two regions. In other words, we will construct for each 1 ≤ i ≤ n a region Yi in R such that {Yi : 1 ≤ i ≤ n} is a realization of Θ in R. One naive idea is to embed the canonical connection structure Pn in R and then apply the algorithm described in Table 3. That is, we choose n2 disconnected regions, say ymk (1 ≤ m, k ≤ n), in R, and then decompose each ymk as two 1 2 externally connected subregions, say ymk and ymk . These three regions correspond 1 2 to Pmk , Pmk and Pmk respectively. Next we tend to construct Yi from Ymk ’s

the same way we construct Xi∗ from Pmk ’s. These regions do very well for all RCC8 base relations except NTPP. As a matter of fact, if Rij = NTPP, Yi is a tangential, instead of non-tangential, proper part of Yj in R. Recall that if Rij = NTPP, then Xi∗ and Xj∗ contain a common proper part Pii . This atomic unit is a non-tangential proper part of both Xi∗ and Xj∗ in Pn (see Corollary 3.1). But its counterpart in R, namely yii , is a tangential proper part of Yj . This is because −Yj , the complement of Yj in R, is externally connected to both yii and Yj . As a result of TPP(yii , Yj ) and yii < Yi < Yj , we know TPP(Yi , Yj ). So we should modify these regions further to construct a realization of Θ in R. To begin with, for each 1 ≤ i ≤ n, we inductively define the level of i, written l(i), as follows: (1) l(i) = 1 if there is no j such that Rji = NTPP; (2) l(i) = k + 1 if (a) for any j, if Rji = NTPP then l(j) ≤ k; and (b) there exists some j with l(j) = k such that Rji = NTPP. Now since R is an RCC model, we can find n2 pairwise disconnected regions, say zij (1 ≤ i, j ≤ n). For each zij , we choose a chain of small regions zij0 , zij1 , · · · , zijn−1 , zijn such that zij0 NTPPzij1 NTPP · · · NTPPzijn−1 NTPPzijn = zij . 20

(1)

For each i, we construct Yi as a part of Σ1≤m,k≤n zmk as Yi = Σ1≤m,k≤n (Yi · zmk ) where Yi · zmk

 0 zmk ,    z1 − z0 , mk mk = l(i)  z ,   mk ⊥,

if if if if

(2)

1 Pmk ∩ Xi∗ = Pm,k ; ∗ 2 Pmk ∩ Xi = Pm,k ; Pmk ∩ Xi∗ = Pm,k ; Pm,k ∩ Xi∗ = ∅.

0 1 0 0 1 Note that zmk and zmk − zmk are externally connected since NTPP(zmk , zmk ). 1 2 These two regions are counterparts of Pmk and Pmk respectively. The reader

now can convince himself that these Yi is indeed a realization of Θ in R. As an illustration, suppose Rij = NTPP, we show Yi NTPPYj . By Theorem 4.1, we know Xi∗ NTPPXj∗ . This is equivalent to say that Xi∗ ⊂ Xj∗ and for any 1 ≤ m, k ≤ n, Pmk ∩Xi∗ 6= ∅ only if Pmk ⊆ Xj∗ . That Yi ⊂ Yj is clear by definition. l(i)

l(j)

By Rij = NTPP, we have l(i) < l(j), hence by Equation 1, zmk NTPPzmk for any m, k. Note that if Pmk ∩ Xi∗ is nonempty, then Pmk is a subset of Xj∗ , hence l(j)

l(i)

Yj ∩ zmk = zmk contains Yi ∩ zmk ⊆ zmk as a non-tangential proper part. Recall that all zmk are pairwise disconnected regions in R, we have Yi NTPPYj . We now have the following realization theorem: Theorem 5.1. Suppose R is an RCC model. Then any consistent RCC8 network has a realization in R. In particular any consistent RCC8 network has a realization in RC(Rn ) for any n ≥ 1. Note that we only need the assumption that R contains sufficient (but finite) many disconnected regions which can be somewhat further divided. There are many connected structures that are not RCC models that satisfy this condition. In particular, the digital plane (with either 4-connections or 8-connections) (see [14] for example) has this property. So the above realization theorem can also be applied to the digital plane.

6

Discussion and related work

Our work is closely related to that of Renz [20]. In his paper, Renz proposed a canonical RCC8 model (called reduced RCC8 model there) based on Kripke semantics, and sketched an O(n4 ) algorithm for finding a valuation that satisfies the modal encoding of a consistent RCC8 base network. To find a realization in Euclidean spaces, Renz first gave a topological interpretation of the Kripke

21

models, and then gave algorithms for generating realizations using either disconnected regions (in any dimension) or internally connected regions (in three- and higher dimensional spaces). In above we have given a simple and direct algorithm for generating realizations of path-consistent RCC8 base networks. Checking up on Table 3 and Equation 2, a realization (in any RCC model) can always be generated in time O(n3 ). Our approach adopts in principle the same route as that of Renz: first, we identify a simple canonical model, then embed the model in Euclidean spaces or RCC models, and last, complete the realization by modifying some constraints involving proper part (PP) relations. We next make a detailed comparison between the two approaches.

6.1

Canonical models

Our canonical connection structures given in Section 3 correspond exactly to what Renz calls reduced RCC8 structures. They differ only in semantics: while Renz’s model is based on Kripke semantics, ours are topological spaces. Using our topological models, a direct topological interpretation of Renz’s model can also be obtained. Definition 6.1 (reduced RCC8 structure). A reduced RCC8 structure S = hW, {R¤ , RI }, πi is a Kripke model that satisfies the following conditions, where we set maxI W (minI W ) to be the set of worlds that are maximal (minimal, resp.) w.r.t. RI : 1. For all worlds w, v ∈ W , wRI w and wR¤ v; 2. maxI W ∩ minI W = ∅, maxI W ∪ minI W = W , i.e. a world is either I-maximal or I-minimal but not both. 3. For any I-minimal world w ∈ maxI W , there exist exactly two I-maximal worlds w1 , w2 ∈ W such that wRI w1 and wRI w2 ; 4. For any I-maximal world v ∈ minI W , there exists exactly one I-minimal world w such that wRI v. Clearly a reduced RCC8 structure consists of a collection of clusters {w, w1 , w2 } with wRI w1 and wRI w2 . Such a cluster is called a reduced RCC8 cluster in [20], which is identical to the atomic unit P = {f, t1 , t2 } (see Figure 2) of our canonical connection structure. To obtain a topological interpretation of a reduced RCC8 structure, Renz then mapped these clusters to pieces of regions of a topological space by interpreting 22

w as a possible boundary point of regions and w1 and w2 as interior points on different sides of the boundary. Using our canonical connection structure, a direct topological interpretation can be obtained (see also Section 3). Consider the lower topology of a canonical connection structure Pn , which is partially ordered by ≤. Each point in Pn has a smallest neighborhood: Pij , {t1ij } and {t2ij } are respectively the smallest neighborhood of fij , t1ij , and t2ij . Now Theorem 4.2 of [20] follows directly if we associate the lower topology (w.r.t. RI ) with the reduced RCC8 model M = hW, {R¤ , RI }, πi. In particular, we have (i) a function p from the set of worlds W to the topological space W that maps a world to itself; and (ii) a function N : W → 2W that assigns to each world its smallest neighborhood. Moreover, as regions are regular closed, the regular closed neighborhoods of these points should be considered. The smallest regular closed neighborhood of fij , t1ij , and t2ij are respectively Pij , Pij1 = {fij , t1ij }, and Pij2 = {fij , t2ij }. Note that tlij is an interior point of Pijl (l = 1, 2) and fij is a boundary point of both Pij1 and Pij2 . Our construction of realizations using regions composed of these basic regions Pijl . It is also worth noting that our canonical model can also be interpreted in a pointless (or region-based ) way. Consider the smallest GRCC model [14] Bs that contains three nonempty regions P1 , P2 and the universe P = P1 +P2 such that P1 is externally connected with P2 . A collection of these Bs provides a region-based canonical RCC8 model. In fact, the algorithm given in Table 3 can be adapted to this region-based model.

6.2

Find a realization in a canonical model

Once we have identified canonical RCC8 models, we need to find a realization of an RCC8 base network in a canonical model. Renz [20] gave an O(n4 ) algorithm for finding a reduced RCC8 model M for the modal encoding, m(Θ) of Θ. Given a consistent RCC8 base network Θ, note that the number of worlds and their accessibility are determined by the entailment constraints. To find a valuation for each world and each region, Renz used the propositional encoding of RCC8 explicitly described in [24, Proposition 19]. The valuation can then be obtained from the satisfying assignment of the propositional formula. Since there are O(n2 ) worlds and n regions, there are O(n4 ) clauses. A reduced RCC8 model can therefore be determined in time O(n4 ). In this paper, instead of the world-based approach used in [20], we adopt a region-based approach for finding such a canonical model. We first assign to each

23

spatial variable a collection of basic regions Pijl , and then modify the scenario step by step depending on the constraints between spatial variables. The O(n3 ) algorithm given in Table 3 is quite simple. As our canonical connection structure is identical to the reduced RCC8 model, we in essence have proposed a simple method for computing a reduced RCC8 model.

6.3

Find a realization in Euclidean spaces

Now we have a realization of Θ in a canonical model. To find a realization in Euclidean spaces, we should first embed the canonical model into Euclidean spaces, and then modify the spatial scenario according to those constraints involving the TPP and/or NTPP relations. The realization algorithm proposed in Section 5 of this paper is very similar to that given in [20]. There are only some minor differences. First, since all TPP constraints are already fulfilled after the embedding, we need only to modify those constraints involving NTPP relation (see also Section 5), so we use the NTPPhierarchy l(i) instead of the PP-hierarchy HΘ (i). Second, if either Pmk ∩ Xi∗ = 2 1 , or in terms of [20], if fmk is a boundary world of the Pmk or Pmk ∩ Xi∗ = Pmk

i-th region, then we needn’t modify the component of the i-th region containing fmk (see Equation 2). Third, we take again a region-based view instead of a world-based view.

7

Conclusions

In this paper, we first showed (Section 1) that consistency w.r.t. the RCC theory is equivalent to consistency w.r.t. topology and then, doing without 0-encodings as adopted in [20], proposed an O(n3 ) algorithm for generating realization of path-consistent network of RCC8 base relations. This shows that any consistent RCC8 network has a realization in the digital plane (with either 4-connection or 8-connection) and in any RCC model.

Acknowledgements This work was partly supported by the National Foundation of Natural Science of China (60305005, 60321002, 60496321, 60496327). The author thanks the two anonymous reviewers for their valuable suggestions.

24

References [1] J.F. Allen. Maintaining knowledge about temporal intervals. Communications of the ACM, 26:832–843, 1983. [2] B. Bennett.

Spatial reasoning with propositional logics.

In J. Doyle,

E. Sandewall, and P. Torasso, editors, Principles of Knowledge Representation and Reasoning: Proceedings of the 4th International Conference (KR94), San Francisco, CA., 1994. Morgan Kaufmann. [3] B. Bennett. Modal logics for qualitative spatial reasoning. Bulletin of the Interest Group in Pure and Applied Logic (IGPL), 4(1):23–45, 1996. [4] B. Bennett. Logical Representations for Automated Reasoning about Spatial Relationships. PhD thesis, School of Computer Studies, University of Leeds, 1997. [5] Z. Cui, A.G. Cohn, and D.A. Randell. Qualitative and topological relationships in spatial databases. In D. Abel and B.C. Ooi, editors, Advances in Spatial Databases, Lecture Notes in Computer Sciences 692, pages 293–315. Springer Verlag, Berlin, 1993. [6] I. D¨ untsch, H. Wang, and S. McCloskey. A relation-algebraic approach to the Region Connection Calculus. Theoretical Computer Scinece, 255:63–83, 2001. [7] I. D¨ untsch and M. Winter. A representation theorem for Boolean contact algebras. Preprint, 2003. [8] M.J. Egenhofer. Reasoning about binary topological relations. In O. G¨ unther and H.J. Schek, editors, Advances in Spatial Databases, pages 143–160, New York, 1991. Springer. [9] N.M. Gotts. An axiomatic approach to spatial information systems. Research Report 96.25, School of Computer Studies, University of Leeds, 1996. [10] M. Grigni, D. Papadias, and C. Papadimitriou. Topological inference. In C. Mellish, editor, Proceedings of the 14th International Joint Conference on Artificial Intelligence, pages 901–906, 1995. [11] M. Knauff, R. Rauh, and J. Renz. A cognitive assessment of topological spatial relations: results from an empirical investigation. In Spatial Information

25

Theory, A Theoretical Basis for GIS, International Conference COSIT ’97 Proceedings, pages 193–206, Berlin, Germany, 1997. Springer-Verlag. [12] S. Li and M. Ying. Extensionality of the RCC8 composition table. Fundamenta Informaticae, 55(3-4):363–385, 2003. [13] S. Li and M. Ying. Region Connection Calculus: Its models and composition table. Artificial Intelligence, 145(1-2):121–146, 2003. [14] S. Li and M. Ying. Generalized Region Connection Calculus. Artificial Intelligence, 160(1-2):1–34, 2004. [15] A.K. Mackworth. Consistency in networks of relations. Artificial Intelligence, 8:99–118, 1977. [16] U. Montanari. Networks of constraints: fundamental properties and applications to picture processing. Information Science, 7:95–132, 1974. [17] B. Nebel. Computational properties of qualitative spatial reasoning: First results. In KI-95: Advances in Artificial Intelligence, Proceedings of the 19th Annual German Conference on Artificial Intelligence, pages 233–244, Berlin, Germany, 1995. Springer-Verlag. [18] D.A. Randell and A.G. Cohn. Modelling topological and metrical properties of physical processes. In R.J. Brachman, H.J. Levesque, and R. Reiter, editors, First International Conference on the Principles of Knowledge Representation and Reasoning, pages 55–66, Los Altos, 1989. Morgan Kaufmann. [19] D.A. Randell, Z. Cui, and A.G. Cohn. A spatial logic based on regions and connection. In B. Nebel, W. Swartout, and C. Rich, editors, Proceedings of the 3rd International Conference on Knowledge Representation and Reasoning, pages 165–176, Los Allos, 1992. Morgan Kaufmann. [20] J. Renz. A canonical model of the Region Connection Calculus. In Proceedings of the 6th International Conference on Knowledge Representation and Reasoning, pages 330–341. Morgan Kaufmann, 1998. [21] J. Renz. Maximal tractable fragments of the Region Connection Calculus. In Proceedings of the 16th International Joint Conference on Artificial Intelligence, pages 448–454, 1999. [22] J. Renz. Qualitative spatial reasoning with topological information, volume 2293 of Lecture Notes in Artificial Intelligence. Springer-Verlag, Berlin, Germany, 2002. 26

[23] J. Renz and B. Nebel. On the complexity of qualitative spatial reasoning: A maximal tractable fragment of the Region Connection Calculus. In Proceedings of the 15th International Joint Conference on Artificial Intelligence, pages 522–527, 1997. [24] J. Renz and B. Nebel. On the complexity of qualitative spatial reasoning: A maximal tractable fragment of the Region Connection Calculus. Artificial Intelligence, 108:69–123, 1999. [25] J.G. Stell. Boolean connection algebras: A new approach to the RegionConnection Calculus. Artificial Intelligence, 122:111–136, 2000.

27