(y) (a) sup y. inf y. (a) (a) inf x. sup x. (a)

Similar documents
A family of directional relation models for extended objects

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Linear Algebra Introduction

Dorf, R.C., Wan, Z. T- Equivalent Networks The Electrical Engineering Handbook Ed. Richard C. Dorf Boca Raton: CRC Press LLC, 2000

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version

ANALYSIS AND MODELLING OF RAINFALL EVENTS

6.5 Improper integrals

TOPIC: LINEAR ALGEBRA MATRICES

Composing cardinal direction relations

Necessary and sucient conditions for some two. Abstract. Further we show that the necessary conditions for the existence of an OD(44 s 1 s 2 )

Chapter 3. Vector Spaces. 3.1 Images and Image Arithmetic

NON-DETERMINISTIC FSA

Figure 1. The left-handed and right-handed trefoils

Hyers-Ulam stability of Pielou logistic difference equation

Matrices SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics (c) 1. Definition of a Matrix

On Implicative and Strong Implicative Filters of Lattice Wajsberg Algebras

Lecture 6: Coding theory

ILLUSTRATING THE EXTENSION OF A SPECIAL PROPERTY OF CUBIC POLYNOMIALS TO NTH DEGREE POLYNOMIALS

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

Section 4.4. Green s Theorem

Activities. 4.1 Pythagoras' Theorem 4.2 Spirals 4.3 Clinometers 4.4 Radar 4.5 Posting Parcels 4.6 Interlocking Pipes 4.7 Sine Rule Notes and Solutions

THE PYTHAGOREAN THEOREM

Symmetrical Components 1

More Properties of the Riemann Integral

Math 32B Discussion Session Week 8 Notes February 28 and March 2, f(b) f(a) = f (t)dt (1)

This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and

Exercise 3 Logic Control

CHENG Chun Chor Litwin The Hong Kong Institute of Education

Green s Theorem. (2x e y ) da. (2x e y ) dx dy. x 2 xe y. (1 e y ) dy. y=1. = y e y. y=0. = 2 e

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

For a, b, c, d positive if a b and. ac bd. Reciprocal relations for a and b positive. If a > b then a ab > b. then

University of Sioux Falls. MAT204/205 Calculus I/II

CS 491G Combinatorial Optimization Lecture Notes

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

Nondeterministic Automata vs Deterministic Automata

April 8, 2017 Math 9. Geometry. Solving vector problems. Problem. Prove that if vectors and satisfy, then.

Discrete Structures, Test 2 Monday, March 28, 2016 SOLUTIONS, VERSION α

Part 4. Integration (with Proofs)

MAT 403 NOTES 4. f + f =

Introduction to Olympiad Inequalities

CS 573 Automata Theory and Formal Languages

When does a Composition Table Provide a Complete and Tractable. Proof Procedure for a Relational Constraint Language?

for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx

Finite State Automata and Determinisation

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths

Lecture 2: Cayley Graphs

Electromagnetic-Power-based Modal Classification, Modal Expansion, and Modal Decomposition for Perfect Electric Conductors

Lecture Notes No. 10

Learning Objectives of Module 2 (Algebra and Calculus) Notes:

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b

Section 1.3 Triangles

Tutorial Worksheet. 1. Find all solutions to the linear system by following the given steps. x + 2y + 3z = 2 2x + 3y + z = 4.

Exercise sheet 6: Solutions

arxiv: v1 [math.ca] 21 Aug 2018

Bisimulation, Games & Hennessy Milner logic

Propositional models. Historical models of computation. Application: binary addition. Boolean functions. Implementation using switches.

Discrete Structures Lecture 11

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS

Nondeterministic Finite Automata

A Study on the Properties of Rational Triangles

More on automata. Michael George. March 24 April 7, 2014

Lecture 3: Equivalence Relations

System Validation (IN4387) November 2, 2012, 14:00-17:00

Proving the Pythagorean Theorem

18.06 Problem Set 4 Due Wednesday, Oct. 11, 2006 at 4:00 p.m. in 2-106

Pure 2D Context-free Puzzle P system with Conditional Communication

(a) A partition P of [a, b] is a finite subset of [a, b] containing a and b. If Q is another partition and P Q, then Q is a refinement of P.

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

s the set of onsequenes. Skeptil onsequenes re more roust in the sense tht they hold in ll possile relities desried y defult theory. All its desirle p

Arrow s Impossibility Theorem

Lesson 2: The Pythagorean Theorem and Similar Triangles. A Brief Review of the Pythagorean Theorem.

#A42 INTEGERS 11 (2011) ON THE CONDITIONED BINOMIAL COEFFICIENTS

Linear choosability of graphs

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point

Chapter 4 State-Space Planning

Logic Synthesis and Verification

The Word Problem in Quandles

Logic, Set Theory and Computability [M. Coppenbarger]

Lecture Summaries for Multivariable Integral Calculus M52B

Solutions to Problem Set #1

Convert the NFA into DFA

Test Generation from Timed Input Output Automata

Outline. Theory-based Bayesian framework for property induction Causal structure induction

T b a(f) [f ] +. P b a(f) = Conclude that if f is in AC then it is the difference of two monotone absolutely continuous functions.

4.4 Areas, Integrals and Antiderivatives

Computing with finite semigroups: part I

2.4 Linear Inequalities and Interval Notation

PYTHAGORAS THEOREM WHAT S IN CHAPTER 1? IN THIS CHAPTER YOU WILL:

SEMI-EXCIRCLE OF QUADRILATERAL

Model Reduction of Finite State Machines by Contraction

The study of dual integral equations with generalized Legendre functions

Polynomials. Polynomials. Curriculum Ready ACMNA:

Arrow s Impossibility Theorem

Reference : Croft & Davison, Chapter 12, Blocks 1,2. A matrix ti is a rectangular array or block of numbers usually enclosed in brackets.

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

INTEGRATION. 1 Integrals of Complex Valued functions of a REAL variable

Coalgebra, Lecture 15: Equations for Deterministic Automata

A Non-parametric Approach in Testing Higher Order Interactions

Descriptional Complexity of Non-Unary Self-Verifying Symmetric Difference Automata

Transcription:

Composition Algorithms for Crdinl Diretion Reltions Spiros Skidopoulos 1 nd Mnolis Kourkis 2 1 Dept. of Eletril nd Computer Engineering Ntionl Tehnil University of Athens Zogrphou 157 73 Athens, Greee spiros@dl.ntu.gr, www.dl.ntu.gr/~spiros 2 Dept. of Eletroni nd Computer Engineering Tehnil University of Crete Chni 73100 Crete, Greee mnolis@ed.tu.gr, www.ed.tu.gr/~mnolis Astrt. We present forml model for qulittive sptil resoning with rdinl diretions tht is sed on reent proposl in the literture. We use our forml frmework to study the omposition opertion for the rdinl diretion reltions of this model. We onsider progressively more expressive lsses of rdinl diretion reltions nd give omposition lgorithms for these lsses. Finlly, when we onsider the prolem in its generlity, we show tht the inry reltion resulting from the omposition of some rdinl diretion reltions nnot even e expressed using the reltions whih re urrently employed y the relted proposl. 1 Introdution The omposition opertor hs reeived lot of ttention in the re of qulittive sptil resoning [7, 15, 5]. nd hs een studied for severl kinds of useful sptil reltions like topologil reltions [2, 3, 15], diretion reltions [6, 10] nd qulittive distne reltions [5, 4]. Typilly, the omposition opertor is used s mehnism for inferring new reltions from existing ones. Suh inferene mehnisms re very importnt s they re in the hert of ny system tht retrieves olletions of ojets similrly relted to eh other using sptil reltions [13]. Moreover, omposition is used to identify lsses of reltions tht hve trtle onsisteny prolem [7, 15, 12]. This work onentrtes on qulittive sptil resoning with rdinl diretion reltions [6, 10]. Crdinl diretion reltions desrie how regions of spe re pled reltive to one nother (e.g., region is north of region ). We study the reent model of Goyl nd Egenhofer [6]. This model is urrently one of the most expressive models for qulittive resoning with rdinl diretions. It works with extended regions nd hs potentil in Multimedi nd Geogrphi Informtion Systems pplitions [3, 4].

In this pper, we give forml definitions for the rdinl diretion reltions tht n e expressed in the model of Goyl nd Egenhofer [6]. Then, we use our forml frmework to study the omposition opertion for rdinl diretion reltions in the model of [6]. Goyl nd Egenhofer first studied this opertion in [6] ut their method does not lwys work orretly. The previous oservtion leves us with the tsk of finding orret method for omputing the omposition. To do this, we onsider progressively more expressive lsses of rdinl diretion reltions nd give omposition lgorithms for these lsses. Finlly, when we onsider the prolem in its generlity, we show tht the inry reltion resulting from the omposition of some rdinl diretion reltions nnot even e expressed using the reltions defined in [6]. A more detiled disussion s well s the proofs of the ove results pper in [16]. The rest of the pper is orgnized s follows. Setion 2 presents the forml model. In Setions 3 nd 4 we onsider two sulsses of rdinl diretion reltions nd give omposition lgorithms for these lsses. In Setion 5 we show tht the result of the omposition of some rdinl diretion reltions nnot e expressed using the reltions defined in [6]. Our onlusions re presented in Setion 6. 2 A Forml Model for Crdinl Diretion Informtion We onsider the Euliden spe < 2. Regions re defined s non-empty nd ounded sets of points in < 2. Let e region. The gretest lower ound or the infimum [11] of the projetion of region on the x-xis (respetively y- xis) is denoted y inf x () (respetively inf y ()). The lest upper ound or the supremum of the projetion of region on the x-xis (respetively y-xis) is denoted y sup x () (respetively sup y ()). We will often refer to sup nd inf s endpoints. (y) sup y () inf y () inf x () sup x () (x) Fig. 1. A region nd its ounding ox The minimum ounding ox of region, denoted y m(), is the ox formed y the stright lines x = inf x (), x = sup x (), y = inf y () nd y =

2 3 1 Fig. 2. Regions sup y () (see Figure 1). Oviously, the projetions on the x-xis (respetively y-xis) of region nd its minimum ounding ox hve the sme endpoints. We will onsider throughout the pper the following types of regions: Regions tht re homeomorphi to the unit disk [11]. The set of these regions will e denoted y REG. Regions in REG re losed, onneted nd hve onneted oundries (for definitions see [1, 11]) Regions tht re formed y finite unions of regions in REG. The set of these regions will e denoted y REG Λ. Notie tht regions in REG Λ n e disonneted nd n hve holes. In Figure 2, regions, 1, 2 nd 3 re in REG (lso in REG Λ ) nd region = 1 [ 2 [ 3 is in REG Λ. Regions in REG hve een previously studied in [6, 14]. They n e used to model res in vrious interesting pplitions, e.g., lnd prels in Geogrphi Informtion Systems [3, 4]. In the sequel we will formlly define rdinl diretion reltions for regions in REG. To this end, we will need regions in REG Λ. Let us now onsider two ritrry regions nd in REG. Let region e relted to region through rdinl diretion reltion (e.g., is north of ). Region will e lled the referene region (i.e., the region to whih the reltion is desried) while region will e lled the primry region (i.e., the region from whih the reltion is desried) [6]. The xes forming the minimum ounding ox of the referene region divide the spe into 9 tiles (Figure 3). The peripherl tiles orrespond to the eight rdinl diretion reltions south, southwest, west, northwest, north, northest, est nd southest. These tiles will e denoted y S(), SW(), W (), NW(), N(), NE(), E() nd SE() respetively. The entrl re orresponds to the region's minimum ounding ox nd is denoted y B(). By definition eh one of these tiles inludes the prts of the xes forming it. The union of ll 9 tiles is < 2. If primry region is inluded (in the set-theoreti sense) in tile S() of some referene region (Figure 3) then wesy tht is south of nd we write S. Similrly, we n define southwest (SW), west (W ), northwest (NW), north (N), northest (NE), est (E), southest (SE) nd ounding ox (B) reltions. If primry region lies prtly in the re NE() nd prtly in the re E() of some referene region (Figure 3) then we sy tht is prtly northest nd prtly est of nd we write NE:E.

NW() N() NE W() B() E() SW() SE() S() () () () (d) Fig. 3. Referene tiles nd reltions The generl definition of rdinl diretion reltion is s follows. Definition 1. An tomi rdinl diretion reltion is n element of the set fb, S, SW, W, NW, N, NE, E, SEg. A si rdinl diretion reltion is n tomi rdinl diretion reltion or n expression R 1 : :R k where 2» k» 9, R 1 ;:::;R k 2fB, S, SW, W, NW, N, NE, E, SEg, R i 6= R j for every i, j suh tht 1» i; j» k nd i 6= j, nd the tiles R 1 ();:::;R k () form region of REG for ny referene region. Exmple 1. The following re si rdinl diretion reltions: S; N E:E nd B:S:SW:W :N W:N:E:SE: Regions involved in these reltions re shown in Figures 3, 3 nd 3d respetively. In order to void onfusion we will write the tomi elements of rdinl diretion reltion ording to the following order: B, S, SW, W, NW, N, NE, E nd SE. Thus, we lwys write B:S:W insted of W :B:S or S:B:W. The reders should lso e wre tht for si reltion suh s B:S:W we will often refer to B, S nd W s its tiles. 2.1 Defining Bsi Crdinl Diretion Reltions Formlly Now we n formlly define the tomi rdinl diretion reltions B, S, SW, W, NW, N, NE, E nd SE of the model s follows: B iff inf x ()» inf x (), sup x ()» sup x (), inf y ()» inf y () nd sup y ()» sup y (). S iff sup y ()» inf y (), inf x ()» inf x () nd sup x ()» sup x (). SW iff sup x ()» inf x () nd sup y ()» inf y (). W iff sup x ()» inf x (), inf y ()» inf y () nd sup y ()» sup y (). NW iff sup x ()» inf x () nd sup y ()» inf y (). N iff sup y ()» inf y (), inf x ()» inf x () nd sup x ()» sup x (). NE iff sup x ()» inf x () nd sup y ()» inf y (). E iff sup x ()» inf x (), inf y ()» inf y () nd sup y ()» sup y (). SE iff sup x ()» inf x () nd sup y ()» inf y ().

1 5 6 4 7 2 1 3 2 8 () () Fig. 4. Reltions nd omponent vriles Using the ove tomi reltions we n define ll non-tomi ones. For instne reltion N E:E (Figure 4) nd reltion B:S:SW:W :N W:N:E:SE (Figure 4) re defined s follows: NE:E iff there exist regions 1 nd 2 in REG Λ suh tht = 1 [ 2, 1 NE nd 2 E. B:S:SW:W :NW:N:SE:E iff there exist regions 1 ;:::; 8 in REG Λ suh tht = 1 [ 2 [ 3 [ 4 [ 5 [ 6 [ 7 [ 8, 1 B, 2 S, 3 SW, 4 W, 5 NW, 6 N, 7 SE nd 8 E. In generl eh non-tomi rdinl diretion reltion is defined s follows. If 2» k» 9 then R 1 : :R k iff there exist regions 1 ;:::; k 2 REG Λ suh tht = 1 [ [ k ; 1 R 1 ; 2 R 2 ; :::; nd k R k. The vriles 1 ;:::; k in ny equivlene suh s the ove re in generl in REG Λ.For instne let us onsider Figure 4. The lines forming the ounding ox of the referene region divide region 2 REG into two omponents 1 nd 2. Clerly 2 is in REG Λ ut not in REG. Notie lso tht for every i, j suh tht 1» i; j» k nd i 6= j, i nd j hve disjoint interiors ut my shre points in their oundries. Eh of the ove rdinl diretion reltions n lso e defined using settheoreti nottion s inry reltions onsisting of ll pirs of regions stisfying the right-hnd sides of the iff" definitions. The reder should keep this in mind throughout the pper; this equivlentwy of defining rdinl diretion reltions will e very useful in Setion 5. The set of si rdinl diretion reltions in this model ontins 218 elements. We will use D to denote this set. Reltions in D re jointly exlusive nd pirwise disjoint. Elements of D n e used to represent definite informtion out rdinl diretions, e.g., N. An enumertion nd pitoril representtion for ll reltions in D n e found in [6]. Using the 218 reltions of D s our sis, we n define the powerset 2 D of D whih ontins 2 218 reltions. Elements of 2 D re lled rdinl diretion

reltions nd n e used to represent not only definite ut lso indefinite informtion out rdinl diretions e.g., fn; Wg denotes tht region is north or west of region. [6] onsiders only smll suset of the disjuntive reltions of 2 D through nie pitoril representtion lled the diretion-reltion mtrix. In the following setions we will study the opertion of omposition for rdinl diretion reltions. Let us first define the omposition opertion for ritrry inry reltions [11]. Definition 2. Let R 1 nd R 2 e inry reltions. The omposition of reltions R 1 nd R 2, denoted y R 1 ffi R 2, is nother inry reltion whih stisfies the following. For ritrry regions nd, R 1 ffi R 2 holds if nd only if there exists region suh tht R 1 nd R 2 hold. A omposition tle stores the result of the omposition R 1 ffi R 2 for every pir of reltions R 1 nd R 2.For the se of rdinl diretion reltions, the omposition tle hs 218 2 = 47524 entries. Therefore, sine it is rther pinful to mnully lulte eh entry, one hs to develop pproprite lgorithms to for the lultion of omposition. Goyl nd Egenhofer hve proposed method for omposing rdinl diretion reltions in [6]. Unfortuntely, the method presented in [6] does not lulte the orret omposition for severl ses (see [16] for detils). To remedy this our pproh ddresses the omposition prolem one step t time. In the next setion we will onsider the simplest se, i.e., the omposition of n tomi with si (tomi or non-tomi) rdinl diretion reltion. 3 Composing n Atomi with Bsi Crdinl Diretion Reltion In Figure 5 we show the omposition tle for tomi rdinl diretion reltions [6]. The tle uses the funtion symol ffi s shortut. For ritrry tomi rdinl diretion reltions R 1 ;:::;R k, the nottion ffi(r 1 ;:::;R k ) is shortut for the disjuntion of ll vlid si rdinl diretion reltions tht n e onstruted y omining tomi reltions R 1 ;:::;R k.for instne, ffi(sw;w;nw) stnds for the disjuntive reltion: Moreover, we define: fsw; W; NW; SW:W; W :NW; SW:W :NWg: ffi( ffi(r 11 ;:::;R 1k1 );ffi(r 21 ;:::;R 2k2 );:::;ffi(r m1 ;:::;R mkm ))= ffi(r 11 ;:::;R 1k1 ;R 21 ;:::;R 2k2 ;:::;R m1 ;:::;R mkm ): Applition of the opertor ffi s it hs een defined, suffies for our needs in this pper. As usul U dir stnds for the universl rdinl diretion reltion. The orretness of the trnsitivity tle n esily e verified using the definitions of Setion 2 nd the definition of omposition (Definition 2).

R 1 nr 2 N NE E SE N N NE ffi(ne;e) ffi(ne;e;se) NE ffi(n; NE) NE ffi(ne;e) ffi(ne;e;se) E ffi(n; NE) NE E SE SE ffi(n;ne;e;se;s;b) ffi(ne;e;se) ffi(e;se) SE S ffi(n; S;B) ffi(ne;e;se) ffi(e;se) SE SW ffi(s;sw;w;nw;n;b) U dir ffi(e;se;s;sw;w;b) ffi(se;s;sw) W ffi(nw;n) ffi(nw;n;ne) ffi(e;w;b) ffi(se;s;sw) NW ffi(nw;n) ffi(nw;n;ne) ffi(w;nw; N; NE;E;B) U dir B N NE E SE R 1 nr 2 S SW W NW B N ffi(s;n;b) ffi(sw;w;nw) ffi(w;nw) NW ffi(n; B) NE ffi(n; NE; E;SE;S;B) U dir ffi(w;nw;n;ne;e;b) ffi(nw;n;ne) ffi(b; N; NE; E) E ffi(se;s) ffi(se;s;sw) ffi(w;e;b) ffi(nw;n;ne) ffi(e;b) SE ffi(se;s) ffi(se;s;sw) ffi(e;se;s;sw;w;b) U dir ffi(b; S;E;SE) S S SW ffi(sw;w) ffi(sw;w;nw) ffi(s;b) SW ffi(s;sw) SW ffi(sw;w) ffi(sw;w;nw) ffi(b; S;SW;W) W ffi(s;sw) SW W NW ffi(w;b) NW ffi(s;sw;w;nw;n;b) ffi(sw;w;nw) ffi(w;nw) NW ffi(b; W;NW;N) B S SW W NW B Fig. 5. The omposition R 1 ffi R 2 of tomi reltions R 1 nd R 2 We now turn our ttention to the omposition of n tomi with si rdinl diretion reltion. We will first need few definitions nd lemms efore we present the min theorem (Theorem 1). Definition 3. A si rdinl diretion reltion R is lled retngulr iff there exist two retngles (with sides prllel to the x- nd y-xes) nd suh tht Ris stisfied; otherwise it is lled non-retngulr. Exmple 2. All tomi reltions re retngulr. Reltions B:N nd B:S:SW:W re retngulr while reltions B:S:SW nd B:S:N:SE re non-retngulr. The set of retngulr rdinl diretion reltions ontins the following 36 reltions: fb; S; SW; W; NW; N; NE; E; SE; S:SW; B:W; NW:N; N:NE; B:E; S:SE; SW:W; B:S; E:SE; W:NW; B:N; NE:E; S:SW:SE; NW:N:NE; B:W :E; B:S:N; SW:W :NW; NE:E:SE; B:S:SW:W; B:W :NW:N; B:S:E:SE; B:N:NE:E; B:S:SW:W :NW:N; B:S:N:NE:E:SE; B:S:SW:W :E:SE; B:W :NW:N:NE:E; B:S:SW:W :NW:N:NE:E:SEg: Definition 4. Let R 1 = R 11 : :R 1k nd R 2 = R 21 : :R 2l e two rdinl diretion reltions. R 1 inludes R 2 iff fr 21 ;:::;R 2l g fr 11 ;:::;R 1k g holds. Exmple 3. The si rdinl diretion reltion B:S:SW:W inludes reltion B:S:SW. Definition 5. Let R e si rdinl diretion reltion. The ounding reltion of R, denoted y Br(R) is the smllest retngulr reltion (with respet to the numer of tiles) tht inludes R.

Exmple 4. The ounding reltion of the si rdinl diretion reltion B:S:SW is reltion B:S:SW:W. Definition 6. Let R e retngulr rdinl diretion reltion. We will denote the retngulr reltion formed y the westernmost tiles of reltion R y Most(W; R). Similrly, we n define the retngulr reltions Most(S; R), Most(N;R) nd Most(E;R). Moreover, we will denote the tomi reltion formed y the southwesternmost tiles of reltion R y Most(SW;R). Similrly, we n define the tomi reltions Most(SE;R), Most(NW;R) nd Most(NE;R). Finlly, s speil se, we define Most(B;R) =R. Exmple 5. Let us onsider the retngulr reltion B:S:SW:W. Then ording to Definition 6 we hve: Most(W; B:S:SW:W )=SW:W; Most(SE; B:S:SW:W )=S; Most(S; B:S:SW:W )=S:SW; Most(SW; B:S:SW:W )=SW; Most(E;B:S:SW:W )=B:S; Most(NW;B:S:SW:W )=W; Most(N;B:S:SW:W )=B:W; Most(NE;B:S:SW:W )=B; Most(B;B:S:SW:W )=B:S:SW:W: The following lemm expresses n importnt property of opertor Most. Lemm 1. Let R 1 e n tomi nd R 2 eretngulr rdinl diretion reltion. Assume tht reltion Most(R 1 ;R 2 ) is Q 1 : :Q t. Then, the omposition of R 1 with Most(R 1 ;R 2 ) n e omputed using formul R 1 ffimost(r 1 ;R 2 )= ffi(r 1 ffi Q 1 ;:::;R 1 ffi Q t ). Now, fter ll the neessry definitions nd lemms, we n present our result. Theorem 1. Let R 1 e n tomi rdinl diretion reltion nd R 2 esi rdinl diretion reltion. Then R 1 ffi R 2 = R 1 ffimost(r 1 ; Br(R 2 )): The ove theorem give us method to ompute the omposition R 1 ffi R 2 of n tomi rdinl diretion reltion R 1 with si rdinl diretion reltion R 2. First we hve to lulte the reltion Most(R 1 ; Br(R 2 )). Then we use Lemm 1 nd the tle of Figure 5 to ompute R 1 ffi R 2. We illustrte the ove proedure in the following exmple. Exmple 6. Let R 1 = W e n tomi nd R 2 = B:S:SW e si rdinl diretion reltion. Then Most(W; Br(B:S:SW)) = SW:W. Thus using Theorem 1, we hve W ffi B:S:SW:W = W ffi SW:W. Using Lemm 1, we lso hve W ffi B:S:SW = ffi(w ffi SW;W ffi W ). Moreover, using the tle of Figure 5 we equivlently hve: W ffi B:S:SW = ffi(sw;w). Finlly, expnding opertor ffi we hve: W ffi B:S:SW = fsw; W; SW:Wg: The ove eqution n e esily verified (see lso Figure 6).

Fig. 6. Composing n tomi with si rdinl diretion reltion 4 Composing Retngulr with Bsi Crdinl Diretion Reltion In this setion we will study the omposition of retngulr with si rdinl diretion reltion. We will need the following definition. Definition 7. Let R 1 nd R 2 e two si rdinl diretion reltions. The tileunion of R 1 nd R 2, denoted y tile-union(r 1 ;R 2 ), is reltion formed from the union of tiles of R 1 nd R 2. For instne, if R 1 = B:S:SW nd R 2 = S:SW:W then tile-union(r 1 ;R 2 )= B:S:SW:W. Note tht the result of tile-union is not lwys vlid rdinl diretion reltion. For instne, if R 1 = W nd R 2 = E then tile-union(r 1 ;R 2 )= W :E =2D. Theorem 2. Let R 1 = R 11 : :R 1k eretngulr nd R 2 esi rdinl diretion reltion, where R 11 ;:::;R 1k re tomi rdinl diretion reltions. Then R 1 ffi R 2 = fq 2D: Q = tile-union(s 1 ;:::;s k )^ s 1 2 R 11 ffi R 2 ^ ^s k 2 R 1k ffi R 2 g: Using Theorem 2 we n esily derive Algorithm Compose-Ret-Bsi tht omputes the omposition R 3 of retngulr rdinl diretion reltion R 1 with si rdinl diretion reltion R 2. Assume tht R 1 is R 11 : :R 1k, where R 11 ;:::;R 1k re tomi rdinl diretion reltions. Algorithm Compose- Ret-Bsi proeed s follows. Initilly the lgorithm lultes reltions S i, 1» i» k s the omposition of the tomi reltion R 1i with the si rdinl diretion reltion R 2 (s in Setion 2). Susequently, Algorithm Compose-Ret- Bsi forms reltions y tking the tile-union of n tomi rdinl diretion reltion s i, from every rdinl diretion reltion S i (1» i» k). Finlly, the lgorithm heks whether the result of the union orresponds to vlid rdinl diretion reltion. If it does then this reltion is dded to the result R 3 ; otherwise it is disrded. We hve implemented Algorithm Compose-Ret-Bsi nd generted the ompositions R 1 ffi R 2 for every retngulr rdinl diretion reltion R 1 nd si rdinl diretion reltion R 2. The results nd the ode re ville from the uthors.

Fig. 7. Composing retngulr with si rdinl diretion reltion The following is n exmple of Algorithm Compose-Ret-Bsi in opertion. Exmple 7. Assume tht we wnt to lulte the omposition of the retngulr reltion W :NW with the si reltion B:S:SW (Figure 7). We hve: S 1 = W ffi B:S:SW = ffi(w ffi SW;W ffi SW)=ffi(W;SW)=fSW;W;SW:Wg S 2 = NW ffi B:S:SW = NW ffi W = fw;nw;w:nwg: Now we onstrut ll reltions formed y the union of one reltion from S 1 nd one reltion from S 2. These reltions re: SW:W; SW:NW, SW:W :NW, W, W :NW, W :NW, SW:W, SW:W :NW nd SW:W :NW. From the ove reltions only SW:W, SW:W :NW, W, W :NW re vlid rdinl diretion reltions. Therefore, we hve: W :NW ffi B:S:SW = fw; SW:W; W :NW; SW:W :NWg: The ove eqution n e esily verified (see lso Figure 7). 5 Composing Bsi Crdinl Diretion Reltions Let us now onsider the generl question of omposing two non-retngulr si rdinl diretion reltions. For this se we hve very interesting result: the lnguge of rdinl diretion onstrints (s defined in Setion 2) is not expressive enough to pture the inry reltion whih is the result of the omposition of non-retngulr si rdinl diretion reltions. This is illustrted y the following exmple. Exmple 8. Let us onsider region vriles ; ; nd rdinl diretion onstrints S:SW:W nd SW (see Figure 8). The only rdinl diretion onstrint implied y these two onstrints is SW. Thus, someone would e tempted to onlude tht (S:SW:W ffi SW) =SW. If this equlity ws orret then for eh pir of regions 0 ; 0 suh tht 0 SW 0, there exists region 0 suh tht 0 S:SW:W 0 nd 0 SW 0.However Figure 8 shows two suh regions 0 nd 0 suh tht 0 SW 0 nd it is impossile to find region 0 suh tht 0 S:SW:W 0.

0 0 () () Fig. 8. Illustrtion of Exmple 8 If we onsider this exmple refully, we will notie tht the given onstrint on nd implies the following onstrint on: the re overed y eh region sustituted for nnot e retngulr; it should extend so tht it overs tiles S();SW() nd W () for ny region. Oviously this onstrint is not expressile in the lnguge of rdinl diretion reltions presented in Setion 2. It is n open question to define n pproprite set of predites tht ould e used to ugment the onstrint lnguge of Setion 2 so tht the onstrints needed to define the result of omposition opertion re expressile in ll ses. It is importnt to point out tht the ove non-expressiility result should not deter sptil dtse prtitioners who would like to onsider dding the rdinl diretion reltions desried in this pper to their system. The disussion of the introdution (i.e., using the inferenes of omposition tle for sptil reltions in order to prune the serh spe during optimistion of ertin queries) still pplies ut now one hs to e reful to sy tht she is using onstrint propgtion mehnism nd not omposition tle! Unfortuntely, we nnot e s positive out using the rdinl diretion reltions defined in this pper in the onstrint dtses frmeworks of [8] or [9]. In these frmeworks, the lss of onstrints involved must e losed under the opertion of vrile elimintion. Exmple 8 ove demonstrtes tht this is not true for the lss of rdinl diretion onstrints exmined in this pper. For exmple, if we hve onstrints S:SW:W ; SW nd we eliminte vrile, the result of the elimintion is not expressile in the onstrint lnguge we strted with! So the lnguge of Setion 2 needs to e modified in order to e used in onstrint dtse model. We re urrently working on extending this lnguge to remove this limittion. 6 Conlusions In this pper we gve forml presenttion of the rdinl diretion model of Goyl nd Egenhofer [6]. We used our forml frmework to study the omposition opertion for rdinl diretion reltions in this model. We onsidered

progressively more expressive lsses of rdinl diretion reltions nd gve omposition lgorithms for these lsses. Finlly, we hve demonstrted tht in some ses, the inry reltion resulting from the omposition of two rdinl diretion reltions nnot even e expressed using the voulry defined in [6]. Referenes 1. W.G. Chinn nd N.E. Steenrod. First Conepts of Topology. The Mthemtil Assoition of Ameri, 1966. 2. Z. Cui, A.G. Cohn, nd D.A. Rndell. Qulittive nd Topologil Reltionships in Sptil Dtses. In Proeedings of SSD-93, pges 296 315, 1993. 3. M.J. Egenhofer. Resoning out Binry Topologil Reltionships. In Proeedings of SSD-91, pges 143 160, 1991. 4. A.U. Frnk. Qulittive Sptil Resoning out Distnes nd Diretions in Geogrphi Spe. Journl of Visul Lnguges nd Computing, 3:343 371, 1992. 5. C. Freks. Using Orienttion Informtion for Qulittive Sptil Resoning. In Proeedings of COSIT-92, volume 639 of LNCS, pges 162 178, 1992. 6. R. Goyl nd M.J. Egenhofer. Crdinl Diretions Between Extended Sptil Ojets. IEEE Trnstions on Dt nd Knowledge Engineering, (in press), 2000. Aville t http://www.sptil.mine.edu/~mx/rj36.html. 7. M. Grigni, D. Ppdis, nd C. Ppdimitriou. Topologil Inferene. In Proeedings of IJCAI-95, 1995. 8. P.C. Knellkis, G.M. Kuper, nd P.Z. Revesz. Constrint Query Lnguges. Journl of Computer nd System Sienes, 51:26 52, 1995. 9. M. Kourkis. The Complexity of Query Evlution in Indefinite Temporl Constrint Dtses. Theoretil Computer Siene, 171:25 60, Jnury 1997. Speil Issue on Unertinty in Dtses nd Dedutive Systems, Editor: L.V.S. Lkshmnn. 10. G. Ligozt. Resoning out Crdinl Diretions. Journl of Visul Lnguges nd Computing, 9:23 44, 1998. 11. S. Lipshutz. Set Theory nd Relted Topis. MGrw Hill, 1998. 12. B. Neel nd H.-J. Bürkert. Resoning out Temporl Reltions: A Mximl Trtle Sulss of Allen's Intervl Alger. Journl of the ACM, 42(1):43 66, Jnury 1995. 13. D. Ppdis, N. Arkoumnis, nd N. Krpilidis. On The Retrievl of Similr Configurtions. In Proeedings of 8th Interntionl Symposium on Sptil Dt Hndling (SDH), 1998. 14. C.H. Ppdimitriou, D. Suiu, nd V. Vinu. Topologil Queries in Sptil Dtses. Journl of Computer nd System Sienes, 58(1):29 53, 1999. 15. J. Renz nd B. Neel. On the Complexity of Qulittive Sptil Resoning: A Mximl Trtle Frgment of the Region Connetion Clulus. Artifiil Intelligene, 1-2:95 149, 1999. 16. S. Skidopoulos nd M. Kourkis. Composing Crdinl Diretions Reltions. In C. Jensen nd B. Seeger, editors, Proeedings of the 7th Interntionl Symposium on Sptil nd Temporl Dtses (SSTD-01), volume 2121 of LNCS, pges 299 317, July 2001.