<<

Simulation of Simplicity

A Technique to Cop e with Degenerate Cases

1

in Geometric Algorithms

Herb ert Edelsbrunner and Ernst Peter Muc ke

Abstract

This pap er describ es a generalpurp ose programming technique called the Simulation of

Simplicity which can b e used to cop e with degenerate input data for geometric algorithms

It relieves the programmer from the task to provide a consistent treatment for every single

sp ecial case that can o ccur The programs that use the technique tend to b e considerably

smaller and more robust than those that do not use it We b elieve that this technique will

b ecome a standard to ol in writing geometric software

Keywords Computational geometry degenerate data implementation programming

to ol p erturbation determinants symb olic computation

ACM Transactions on Graphics

1

Research of b oth authors was supp orted by Amo co Foundation Faculty Development Grant CS It

was partially carried out while b oth authors were with the Institutes for Information Pro cessing at the Technical

University of Graz Austria The rst author also acknowledges supp ort by the National Science Foundation under

grant CCR

2

Department of Computer Science University of Illinois at UrbanaChampaign West Springeld Avenue Urbana Illinois USA

Simulation of Simplicity

Intro duction

This pap er intro duces a general technique that can b e used to cop e with degenerate cases encoun

tered by computer programs Consider for example a program that sorts an array of integers

using a comparison as a primitive op eration A sp ecial or degenerate case o ccurs when the pro

gram attempts to decide which one of two equal numb ers is smaller than the other A typical

way to resolve this tie is to pretend that the numb er with smaller index is smaller assuming

the integers are indexed eg by their p ositions in an array Or think of Kruskals algorithm

for constructing a minimum spanning tree of a weighted graph see AHU At each step it

cho oses the shortest edge that can b e added to the current collection of edges without creating a

cycle If this edge is not unique then any one of the candidate edges is taken The thus generated

minimum spanning tree is therefore not unique unless we sp ecify deterministic rules to break ties

In b oth problems sorting and constructing minimum spanning trees the sp ecial cases are easily

dealt with partly b ecause the ties can b e broken arbitrarily without creating inconsistencies

The situation is usually far more complicated for geometric problems Consider for example the

following seemingly straightforward algorithm for the p ointinp olygon problem which is sometimes

called the Parity Algorithm

Let r b e the horizontal half whose left endp oint is the test p oint

Count the numb er of intersections b etween r and the edges of the p olygon If that numb er

is o dd then the test p oint lies within the p olygon and if the numb er is even then it lies

outside the p olygon

As p ointed out in Fo it is not a trivial matter to implement this algorithm even if we assume

that the test p oint do es not lie on the b oundary of the p olygon There are only two nondegenerate

cases Either the intersection b etween r and an edge e is empty or r crosses e see Figure I a

and b There are however four degenerate cases as illustrated in Figure I c through f

that have to b e taken into account

a b c d e f

Figure I The dierent cases in the Parity Algorithm

A correct answer is obtained if cases c and e are counted as one crossing and cases d and f

are not counted at all If we write the co de for the ab ove algorithm we realize that a substantial

amount of the eort is required to cover the four degenerated cases Observe also that there are

several seemingly plausible ways to treat the degenerate cases and that some of them lead to

incorrect algorithms We app eal to the imagination of the reader to envision the bizarre structure

of degenerate cases one encounters in generalizing the p ointinp olygon problem to three or higher

Another problem with a set of degenerate cases that is considerably richer than the

Simulation of Simplicity

one of the p ointinp olygon problem is obtained if one intersects a p olygon with a geometric ob ject

that is more complicated than a halfline

When it comes to implementing geometric algorithms degenerate cases are very costly in partic

ular if there are many such cases that have to b e distinguished This is caused by the p ositive

correlation b etween the numb er of degenerate cases and a variety of factors that contribute to the

overall cost of a piece of software These factors include the length of the program which for itself

correlates p ositively with the amount of time required to write it to debug it and to maintain it

Of course the degree of robustness of the program decreases with increasing complication The

correctness of a program relies on the consistent treatment of all dierent cases In this context

it is worthwhile to mention that more ecient algorithms tend to b e more complicated and also

more sensible to slight inconsistencies in treating degenerate cases

This pap er presents a general technique called Simulation of Simplicity SoS that can b e used to

cop e with the problems mentioned ab ove Intuitively it simulates a conceptual p erturbation of the

input data that eliminates all degeneracies We hasten to mention that the p erturbation is never

ever computed it is assumed to b e arbitrarily small although not vanishing which is enough to

simulate the nondegenerate top ology Another interpretation of the technique views it as a general

way to break ties consistently The tiebreaking part of the co de app ears in the lowest level of the

algorithm namely in the pro cedures that implement the needed primitive op erations Dierent

techniques following the same main approach have recently b een suggested in Ya Ya A

large part of this pap er is devoted to demonstrating that the overhead in time caused by the use

of the more elab orate primitive pro cedures required by SoS is negligible

The outline of this pap er is as follows Section presents the general idea of the technique

and works out some guidelines needed to implement it eectively Section considers a class of

problems for nite p oint sets that can b e solved using a common set of geometric primitives It

also discusses how the p erturbation inuences the geometric primitives Section demonstrates

ecient implementations of the primitive op erations In Section we show that the geometric

primitives intro duced for p oint set problems can b e used to solve a variety of other problems dened

for p olygons hyp erplanes and other geometric ob jects Finally in Section we

discuss the p erturbation technique and its limitations

SoS the General Idea

Degeneracies o ccur with probability zero if we draw a nite numb er of geometric ob jects each

represented by a nite set of numb ers from the innite set of all such ob jects provided there is

no b ound on the precision of the numb ers used In reallife computing this is not the case that

is there is only a nite set of available numb ers and thus a b ound on the precision that can b e

achieved As a consequence we are do omed to work with degenerate data On the other hand

even innite precision do es not guarantee the nonexistence of degeneracies This section gives the

general outline of a technique called the Simulation of Simplicity SoS we use simple as a

synonym for nondegenerate which allows us to neglect degeneracies when we write programs

A similar but less elab orate metho d has b een used to solve degenerate linear programs This leads

to the implementation of the simplex algorithm referred to as the lexicographical metho d see

Ch DOW Da or Ch for details In computational geometry this technique has

b een used in a couple of pap ers including Ed and EW to avoid the otherwise necessary

Simulation of Simplicity

discussion of degenerate cases This pap er presents the theoretical foundations of SoS as well as

details of its implementation

The basic idea of SoS is to p erturb the given ob jects slightly which amounts to changing the

numb ers that represent the ob jects these numb ers will b e called the coordinates or the parameters

of the ob jects It is imp ortant that the p erturbation is small enough so that it do es not change

the nondegenerate p osition of ob jects relative to each other Coming up with such a p erturbation

is rather dicult and may require much higher precision than used for the original set of ob jects

For this reason we p erform the p erturbation only symb olically by replacing each co ordinate by a

p olynomial in The p olynomials will b e chosen in such a way that the p erturb ed set go es towards

the original set as go es to zero We will see that it is not imp ortant to know the exact value

of to p erform the simulation rather it is sucient to assume that is p ositive and suciently

small Thus it will b e p ossible to use as an indeterminant and to handle primitive op erations

symb olically

The future user of SoS will neither have to b e concerned with the role that plays in the p erturba

tion nor with the symb olic manipulation of p olynomials We may think of SoS as a package that

provides the primitive op erations needed for a certain computation Ideally the inside of these

op erations is hidden from the user who communicates with them like with an oracle It turns out

that a large numb er of geometric problems can b e solved using a surprisingly small numb er of

primitives Some of these primitives will b e discussed in the following three sections This section

continues to develop the general ideas on which SoS is based

One of the goals of SoS is to p erturb a set of ob jects such that all degeneracies disapp ear A

degeneracy is something that is not dened in general its denition dep ends on the problem at

hand More sp ecically it dep ends on the primitive op erations used to solve the problem For

example a primitive op eration in the p ointinp olygon algorithm describ ed in the intro duction

tests the intersection of a horizontal halfline and a A degeneracy o ccurs if the

halfline contains one or b oth endp oints of the line segment A set of ob jects is now called simple

or nondegenerate or in if it do es not contain any degeneracy We thus dene

simplicity relative to the primitives used to solve a problem

This pap er considers only topological primitives that is op erations that test some given input and

classify it as one of a constant numb er of p ossible cases This is in contrast to op erations that

compute new ob jects such as the intersection of a halfline and a line segment In most programs

such an ob ject serves only as an intermediate result anyway but an intermediate result can as

well b e represented implicitly as a collection of p ointers and a tag that tells us in what sense the

ob jects identied by the p ointers determine the implicit result To simplify our discussion even

further we restrict our attention to primitives with three p ossible outcomes which we represent

by and where indicates a degeneracy and and distinguish b etween the two

nondegenerate cases Tests that distinguish b etween more than two nondegenerate cases can b e

obtained by combining several ternary tests

If we think of a primitive op eration as a function f that maps a highdimensional p oint whose

co ordinates describ e the input ob jects to or then f represents the set of degenerate

inputs One requirement for this set is that its measure in this highdimensional space is zero

otherwise it is unreasonable to call its p oints degenerate A set of n ob jects given by d parameters

each can b e thought of as a p oint in nd dimensions If f takes k n ob jects as input then f

is a surface of measure zero in k ddimensional space This surface denes another zeromeasure

surface in nd dimensions which is obtained by emb edding f in the k ddimensional subspace

Simulation of Simplicity

dened by the k ob jects and extending it orthogonal to this subspace along the other co ordinate

axes Other combinations of k ob jects provide additional zeromeasure surfaces that altogether

decomp ose the nddimensional space into faces of various dimensions A cel l is an nddimensional

face of this decomp osition and all p oints of a cell corresp ond to nondegenerate sets of ob jects

A degenerate set corresp onds to a p oint x in the union of the surfaces denoted by S Since S

has measure zero every nonempty op en ball around this p oint contains a p oint y of some cell

Moving x to y corresp onds now to p erturbing the set of ob jects that x corresp onds to such that all

degeneracies disapp ear This shows that a p erturbation to a nondegenerate set is always p ossible

even if the amount of p erturbation is severely limited Recall that another requirement for the

p erturbation is that it do es not change any nondegenerate sub conguration This means that we

should not move x across a surface it did not b elong to initially This can always b e guaranteed if

we cho ose the op en ball small enough that it do es not intersect any surface that do es not contain

the initial p osition of x

To follow the forthcoming reasoning it is not necessary for the reader to understand the top ology

of the nddimensional space as indicated in the ab ove paragraph Nevertheless this view of the

problem sheds some light on the nature of degeneracy It also explains why there is always a small

enough p erturbation that removes all degeneracies Below we discuss such p erturbations more

sp ecically and address a few questions concerning the ecient implementation of SoS

Simplicity is simulated by applying a particular p erturbation to a set P fp p p g of n

n

geometric ob jects

p i n

i i i id

each sp ecied by d parameters It will b e imp ortant that each ob ject has a unique index b etween

and n The ob jects are in arbitrary and therefore not necessarily in simple p osition The

p erturbation of P is realized by replacing each parameter by a p olynomial in We dene

P fp j i n g

i i i id

where

i j for i n j d

ij ij

and i j a p olynomial in that go es to zero when go es to zero We will refer to the new

parameters the new ob jects p and the new set P as the expansions of the original

ij i

parameters the original ob jects p and the original set P resp ectively The choice of the

ij i

p olynomials i j will b e guided by three requirements SoS has to meet

a P must b e simple if is suciently small

b P must retain all nondegenerate prop erties of the original set P

c The computational overhead caused by simulating P should b e negligible

As mentioned b efore condition b is automatically met if is small enough To satisfy a it is

sucient to cho ose the i j such that there is no nonempty op en interval I with the prop erty

that P is not simple if I Think of P as a p oint x in nd dimensions and let x b e the

p oint that corresp onds to P The p oints x form a onedimensional curve C in nd

dimensions Thus a is satised if C S is a discrete set of p oints Recall that S represents

all p oints in nd dimensions that corresp ond to degenerate sets P In this top ological setting the

phrase suciently small gets a sp ecic meaning If is the smallest value of such that

x S then is suciently small if and only if It is less clear how condition c

inuences the choice of the i j Below we formulate a criterion for the p olynomials i j that

Simulation of Simplicity

leads to an ecient implementation of SoS However we do not claim that other choices of the

i j cannot lead to ecient implementations to o

Recall that a primitive op eration is a function f that maps a set Q of k ob jects to or

If the expansion is dened prop erly then f Q f g provided is small enough

In general f Q will b e the sign of a fairly complicated function in Since f is now a binary

function we can identify f g with ftrue falseg and express it as a predicate We will follow

this practice in the following sections of this pap er One way to allow for an ecient evaluation

of f Q is to cho ose the i j in dierent orders of magnitude such that two expressions each

consisting of several factors of the form i j can b e compared solely on the basis of the index

pairs i j involved When we evaluate f Q we can sort its terms in order of decreasing

signicance which can b e done by comparing sets of index pairs The most signicant term will

b e a term without any factor it will b e equal to f Q The rst term with a nonzero co ecient

decides the sign of the function If Q is nondegenerate to b egin with then f Q f Q and

no other term has to b e determined In Sections and we will see that such a choice of the

i j allows us to determine the sign of a fairly complicated p olynomial in only a few steps

Note that SoS requires us to tell when Q is degenerate which means that we need to b e able to

decide whether or not f Q This is not p ossible with the kind of oatingp oint arithmetic

that it is usually provided by current computers Instead we need to use exact arithmetic and

thus o ccasionally long integers These admittedly somewhat exp ensive op erations o ccur only

inside the primitives and do not concern the user of SoS Furthermore the length of such long

integers is b ounded by a constant if k d the numb er of input parameters of f is b ounded by a

constant In most geometric algorithms this constant is reasonably small In Section we rep ort

on our exp erience in implementing SoS and give an indication to what extent the use of long

integer arithmetic slows down the computation This p oint cannot b e taken lightly b ecause the

long integer arithmetic is likely to o ccur in the innermost lo op of any program that uses SoS and

thus dictates the constant in front of the asymptotic running time However it is worthwhile to

mention that the need for exact arithmetic is not a p eculiar feature of SoS itself but is necessary

whenever we do exact computation rather than push our luck and hop e for the cancellation of

roundo errors

Finite Sets a Case Study

For a further discussion of SoS it is advantageous to apply it to certain geometric ob jects and

certain primitive op erations dened for these ob jects We cho ose p oints in the ddimensional

d

Euclidean space E as the ob jects for the case study Notice that this is actually no loss of

d

generality since every ob ject sp ecied by d parameters can b e interpreted as a p oint in E The

primitive op eration that we will consider takes d p oints as input and decides on which side of

the hyp erplane spanned by the last d p oints the rst p oint lies As we will see in Section this

primitive op eration has a wide range of applications

If a given nite p oint set is p erturb ed as explained in Section one can ignore all degeneracies

and sp ecial cases The price for this simulated simplicity is that the co ordinates of the p oints are

now symb olic expressions in Even for a simple task such as the comparison of two co ordinates

we need a custommade pro cedure that handles the expansions of the co ordinates Let b e

ij

the j th co ordinate of p oint p and let b e the l th co ordinate of p i k n and

i k l k

Simulation of Simplicity

j l d To decide which one of the two corresp onding p erturb ed co ordinates is smaller we

dene a predicate Smal ler as follows

Smal ler true i

ij k l ij k l

Due to SoS we can neglect degeneracies ie we have and for this reason the pred

ij k l

icate Smal ler false if and only if The implementation of this predicate

ij k l ij k l

is fairly straightforward since we can compare the terms i j and k l by comparing the

dening index pairs see Section Lemma

Predicate Smal ler Assume the expansion i j dened as in Section With this for

indices i k n and j l d which satisfy i j k l the predicate Smal ler

ij k l

can b e implemented as follows

function Smal ler returns Bo olean

ij k l

b egin

if then

ij k l

return

ij k l

else if i k then

return i k

else

return j l

end

Notice that in this case the co ordinates and as well as their index pairs i j and k l

ij k l

have to b e passed as arguments whenever predicate Smal ler is called This means that in p opular

programming languages such as Pascal the function heading would b e something like

FUNCTION smaller i j k l Pij Pkl Boolean

but implementation details like this will b e ignored in the remainder of the pap er Furthermore

notice that we have

ij

Smal ler tr ue i det

ij k l

k l

In Section we will express more complicated predicates than just comparisons of co ordinates

by similar determinants For matrices not exceeding a given size it is not dicult to sp ecify the

expansion i j such that all requirements discussed in Section are satised This will b e

done in Section Finally Section extends the results to homogeneous co ordinates The

pro cedures that implement the predicates will b e develop ed in Section

Predicates Expressed by Determinants

d

This section intro duces the notion of orientation of a sequence of d p oints in E With this

concept we will b e able to give an implementation of the primitive op eration for d p oints

mentioned ab ove

Simulation of Simplicity

d

The orientation of a sequence of p oints p p p in E is either negative or positive

i i i

0 1

d

unless the d p oints lie in a common hyp erplane in which case the orientation is undened

The exceptional case is a degeneracy that can b e ignored if the p oints are p erturb ed We dene

the orientation of a sequence recursively It will b e imp ortant that the orientation of a sequence

dep ends only on the relative p osition of the p oints to each other and not on their absolute p ositions

If the d then the orientation of p p is p ositive if p p and it is negative if

i i i i

0 1 0 1

p p compare with Figure I a and b If d then p p p has p ositive orientation

i i i i i

0 1 0 1 2

if the three p oints dene a leftturn in the that is p lies to the left of the directed line that

i

2

passes through p and p in this order If p p p denes a rightturn then its orientation

i i i i i

0 1 0 1 2

is negative Note that the orientation of p p p is the same as the orientation of p p

i i i i i

0 1 2 1 2

as seen from p Indeed the line through p and p can b e identied with E as so on as we

i i i

0 1 2

cho ose a direction of the line This direction is provided by the lo cation of p It go es from left

i

0

to right as seen from p see Figure I c and d

i

0

p

i

1

p

p

i

i 2

2

p

i

1

p p p p p

p

i i i i i

1 0 0 1 i 0

0

a p ositive b negative c p ositive d negative

Figure I The orientation of d p oints in dimension d for d

If d then the orientation of p p p is the same as the orientation of p p

i i i i i

0 1 1

d d

as seen from p For example p p p p in E has p ositive orientation if p observes

i i i i i i

0 0 1 2 3 0

p p p making a leftturn In most situations where the concept of orientation is used the

i i i

1 2 3

We thus say p p relative to d other p oints p interest is in the p osition of one p oint p

i i i i

2 1 0

d

has p ositive orientation and p p p if p p lies on the positive side of p that p

i i i i i i i

0 1 0 1 0

d d

p has negative orientation p p if p lies on the negative side of p

i i i i i

1 0 1

d d

d

To decide up on the orientation of a sequence of d p oints in E we use the matrix

i i i d

0 0 0

B C

B C

i i i d

1 1 1

B C

a

B C

A

i i i d

d d d

Lemma The orientation of p p p is p ositive if and only if sign det and it

i i i

0 1

d

is negative if and only if signdet

Notice that det vanishes if and only if the d p oints are degenerate that is they lie in a

common hyp erplane a case that can b e neglected within the p erturb ed p oint set P Recall

from linear algebra that the determinant of a matrix is multiplied by if we exchange two rows

Thus the orientation of a p ermutation of p p p is the same as the orientation of the

i i i

0 1

d

sequence itself if the numb er of transp ositions is even otherwise its orientation is the opp osite of

the orientation of p p p

i i i

0 1 d

Simulation of Simplicity

There are plenty of algorithms for p oint set problems which are based on computing the orientation

of a sequence of p oints Prime examples are the construction of convex hulls see PH PS

Se Se or Ed computing matrices as discussed in GP and Ed and nding

convex subsets see CK EG and Ed The remainder of this section considers the

primitive op erations required by the threedimensional convex hull algorithm of Preparata and

Hong which is describ ed in PH PS and Ed

The rst step of the algorithm sorts the p oints in x direction To p erform this step it needs to

compare the x co ordinates of two p oints which can b e done by computing the orientation of their

orthogonal pro jections onto the x axis Second it constructs the twodimensional convex hull of

the p oints pro jected onto the x x plane Here the primitive op eration is to decide whether three

p oints in the x x plane dene a leftturn or a rightturn Third the algorithm constructs the

threedimensional convex hull by rep eating the following op eration

Given a plane pivoting ab out two extreme p oints p and p nd the p oint hit rst

i i

3 2

by this plane

and This op eration can b e reduced to a numb er of comparisons of the form Given two p oints p

i

1

which one is hit earlier by the pivoting plane To p erform such a comparison is equivalent p

i

0

lies This is the same p oint p and p p to deciding on which side of the plane through p

i i i i

0 1 2 3

Thus we see that the convex hull algorithm of p p p as computing the orientation of p

i i i i

3 2 1 0

Preparata and Hong requires three primitive op erations all of which determine the orientation of

p oint sequences

Cho osing the Form of the Perturbation

As explained in Section the primitive op eration that determines the orientation of a sequence

of d p oints in d dimensions computes the sign of a determinant of a d byd matrix

SoS replaces the co ordinates in this matrix by entries of the form i j The determinant

ij ij

itself is then the sum of a nite numb er of terms where each term is the pro duct of d items and an

item is either an original co ordinate or an i j Thus each term consists of a co ecient which

is the pro duct of original co ordinates and a socalled product a pro duct of factors of the form

i j The numb er of factors i j can b e zero in which case the pro duct is dened to b e equal

to As mentioned in Section it is irrelevant what exactly the denition of the expansion

is as long as it satises certain requirements The computational simulation is uneected if we

change the denition of the expansion within allowed limits Even so it is imp ortant to show

that there is at least one expansion that satises the requirements The existence of such an

expansion implies the physical existence of an appropriately p erturb ed p oint set which is the only

guarantee for the consistency of our metho d we have

We dene

i j

i j b

for i n j d and d and show that this choice satises all the requirements

of SoS Notice that the amount of p erturbation exp erienced by co ordinate is larger than the

ij

p erturbation of if and only if i j k l that is i k or i k and j l Furthermore we

k l

have

Y Y

i j k  l

i j k l c

ij k l ij k l

Simulation of Simplicity

k l

if This is equivalent to stating that the exp onent of k l is larger than the

sum of the exp onents of all i j with i j k l It follows that it is sucient to consider the

sets of index pairs when we compare two pro ducts Let e and e b e two dierent pro ducts

and let I e and I e b e the two asso ciated sets of index pairs We call I e smal ler than I e

if the set I e I e is empty or if i j k l for i j the largest index pair in I e I e

and k l the largest index pair in I e I e

Lemma Let c and c b e two p ositive constants and let e and e b e two dierent pro ducts

Then c e c e for a small enough if I e is smaller than I e

Lemma is an immediate consequence of c and the fact that a small enough can comp ensate

the inuence of the constants c and c Notice that it is actually irrelevant which index pairs I e

and I e contain The only thing of imp ortance is the relative p osition of I e and I e in the

ordering of all sets of index pairs where large index pairs are more signicant in the comparison

of sets than small index pairs Observe also that Lemma holds if we increase the value of in

the denition of the expansion It turns out that this lemma is the crucial prop erty that allows

us to prove that P the p erturb ed p oint set is simple and that the orientation of d p oints

in P can b e computed eciently

Lemma The set P is nondegenerate if is suciently small

Pro of To prove the assertion we show that for no choice of d mutually distinct indices

i i i the determinant of the matrix

d

i  d i  2 i  1

0 0 0

i d i i

0 0 0

C B

i  d i  2 i  1

1 1 1

C B

i d i i

1 1 1

C B

C B d

C B

A

i  d i  2 i  1

d d d

i d i i

d d d

is equal to zero To see this we assume wlog that i i i n and sort the

d

terms of det in order of increasing exp onents of Sp ecically

det

is the rst term and

i  d i  (d1) i  1

1 2

d

dde

c

the last one Each term is of the form b for some constants b and c Because we can assume that

is arbitrarily small the absolute value of the rst term with nonzero co ecient b is bigger

than the sum of all other terms Furthermore such a term always exists since c guarantees

that no two terms of the determinant have the same exp onent of and thus such a term cannot

dde

cancel For example the co ecient of the last term is and cannot b e canceled by

any other term Consequently det do es not vanish 2

As p ointed out in the pro of of Lemma the most signicant term of the p olynomial det

is the determinant det of the original co ordinates If the orientation of the original sequence

p p p is dened then this term is nonzero which implies that the orientation of the

i i i

0 1

d

p erturb ed sequence is the same This is reassuring since it shows that the p erturbation do es not

change nondegenerate relations of the original p oint set

Simulation of Simplicity

The curious reader might wonder why the p erturbation is dened in the p eculiar form given by

the expansion b As mentioned b efore there are many other choices that could b e used for

example

i +j

i j

is such a p ossibility This expansion would also work but its implementation is slightly more

dicult than that of b compare with Section On the other hand many less exotic

choices do not work The remainder of this section illustrates this by considering two choices of

i j which app ear simpler than b The two choices are

i j

i j and i j i j

In b oth cases Lemma do es not hold The reason for the failure is that b oth expansions do

not satisfy c and thus p ossibly lead to cancellations of terms in det Such cancellations

o ccur for example if all d p oints of the sequence coincide with the origin In this case the

matrix equals

i i i d

C B

i i i d

C B

C B

C B

A

i i i d

d d d

i j

If we dene i j then the second column is equal to times the rst column which

implies that det if d If i j i j then the sum of the rst and the third

columns equals twice the second column hence det if d

Homogeneous Co ordinates

When we develop the primitive pro cedures for computing the orientation of d p oints in Section

we represent a p oint by its homogeneous co ordinates This representation is slightly more general

than ordinary Cartesian co ordinates it can also represent p oints at innity and leads to a slightly

more uniform pro cedural treatment

d C C C

Let p b e a p oint in E and let b e its sequence of Cartesian co ordinates Point p

d

has d homogeneous coordinates

H H H H

d d

such that

H

i

C

for i d

i

H

d

H

Thus p is times the p oint whose Cartesian co ordinates are equal to the rst d homogeneous

d

co ordinates of p Notice that the homogeneous co ordinates of p are not unique we still represent

the same p oint p if we multiply each co ordinate by the same nonzero scalar If we decrease the

H

absolute value of without changing the other homogeneous co ordinates then p moves away

d

H

from the origin on a straight line and it reaches innity when b ecomes Indeed p is at

d

H

innity if and only if Using homogeneous co ordinates it is not allowed to have all d

d

co ordinates are equal to in this event p is not dened

Simulation of Simplicity

We next extend Lemma to homogeneous co ordinates that is we characterize the orientation

of a sequence of d p oints p p p

i i i

0 1

d

H H H H

p

i

i i i d i d

in terms of their homogeneous co ordinates The orientation of a sequence of d p oints is not

dened if any of the p oints lies at innity In fact it is not p ossible to generalize the notion of

orientation to p oints at innity without changing our interpretation of a p oint at innity For

H H H

example consider a sequence S of d nite p oints and one p oint p at innity

d

We can think of p as the limit of p oints

H H H

p

d

when go es to zero but as well we can think of p as the limit of these p oints if is negative

and approaches zero If we replace p by p with small enough then and lead to

dierent orientations We thus restrict our discussion of orientation to nite p oints Dene

H H H

i d i i

0 0 0

B C

H H H

B C

i d i i

1 1 1

B C

e

B C

A

H H H

i i i d

d d d

H

for d then is the same as the matrix used in Lemma Otherwise If

i d

H

The sign of det changes if we multiply a row we can multiply the rows such that

i d

with a negative numb er which implies the following result

H H H H

p b e a sequence of p oints with p p Lemma Let p

i i i i

1 0 i d i d i i

d

Q

d

H H

and Their orientation is p ositive if signdet sign negative if

i d i d

Q

d

H

and undened if det sign signdet

i d

In contrast to Cartesian co ordinates a p oint is now represented by d co ordinates which makes

it necessary to cho ose d when dening the expansion i j in b With this it is

easy to prove that determinants cannot vanish which implies that Lemma holds also for the

new setting using homogeneous co ordinates

Implementing a Predicate

This section presents the actual implementation of a geometric predicate using SoS The chosen

predicate determines the orientation of a sequence of p oints as dened in Section Its imple

mentation will b e based on the expansion sp ecied in Section b and on the fact that the

orientation can b e found by evaluating the sign of a determinant as stated in Sections and

The crux of the implementation is that this determinant is a p olynomial in The computation

of the sign of such a p olynomial is discussed in Section The co ecients of the p olynomial

turn out to b e sub determinants of the original matrix Based on this observation Section

gives an algorithm that generates these sub determinants in sequence of decreasing signicance by

employing a sp ecial enco ding scheme Finally in Section we will briey address the problem

of sign computation of integer determinants in general

Simulation of Simplicity

In Sections and we dened the orientation of a sequence of p oints in ddimensional

Euclidean space given by Cartesian and homogeneous co ordinates We now formally develop the

corresp onding predicate that uses p erturbation in the sense of SoS In the Cartesian case each

p oint p is given by its d co ordinates

p

d

whereas in the case of homogeneous co ordinates a p oint is represented by a d tup el

p

d d

Let

P fp p g

n

d

b e a set of n p oints in E and denote by

P fp p g

n

its p erturb ed version using the expansion of Section b assuming large enough such

that Lemma is valid Now dene for d p oints with distinct indices i i i all in the

d

range from through n

p is p ositive p true i the orientation of p Positive p

i i i d i

0 0

d d

Degenerate cases can b e neglected b ecause we simulate simplicity From Lemma it follows that

Positive is equivalent to the test whether or not

d

signdet

with denoting the the corresp onding matrix of the p erturb ed Cartesian co ordinates as in

d In the homogeneous case see Lemma we have to check whether or not

d

Y

sign signdet

i d

Here denotes the p erturb ed version of matrix in e whose rows are formed by the

homogeneous co ordinates of the p oints involved that is

i i i d

i i i d

0 0 0

C B

i i i d

C B

i i i d

1 1 1

C B

C B

A

i i i d

i d i d i d d

d d d

At rst sight the development of such an determinant seems to b e a painful exercise Yet it will

turn out that it is not that hard and can b e achieved in an algorithmically clean way Anyway to

b egin with something easy consider

i i

i i

det det

j j

j j

Simulation of Simplicity

Q

k

i j and call it a k fold product is called the fold Let i j i j

k k

product Furthermore assume i j When we now develop the determinant we get

i i

det

j j

a

i i

j j

j j i

i

j j i

i

where the terms are already sorted by increasing p owers of Note again that the rst co ecient

corresp onds to the unp erturb ed determinant ie whose evaluation would b e part of any

implementation of the predicate of course followed by the more or less awkward handling of

all p ossible degeneracies Observe also that the co ecient of the fth term is a constant namely

Thus the last two terms have no inuence on the sign of det Therefore the numb er

of relevant terms of the p olynomial det is only rather than which is the total numb er

of terms

It is convenient to assume i i compare with a This assumption together with

d

Lemma implies that the sign of det and det can b e computed without any further

knowledge of the values of the indices Clearly this is not the case in general but can always

b e achieved by appropriate row exchanges in or recall that each exchange changes

s that i the sign of the determinant For this assume a pro cedure Sort i i i

d d

d

Addition i returns for a given sequence of d indices i i the sorted sequence i

d

d

ally Sort returns s which is set to the numb er of exchanges used We can now implement

d

predicate Positive using two op erations SignDet and SignDet that compute the sign of the

d

p olynomials det and det assuming i i Both functions will b e discussed in

d

Section

d

Predicate Positive Let p p b e d p oints in E given in Cartesian or homogeneous

i i

0

d

co ordinates with distinct indices all b etween and n Then the following pseudo co de is an

implementation of the predicate Positive d

Simulation of Simplicity

function Positive p p returns Bo olean

d i i

0

d

lo cal i i d s

d

b egin

Sort i i i i s

d d

d

if Cartesian co ordinates then

0 0

i i d

0 0

C B

C B

d SignDet

d

A

0 0

i i d

d d

else

0 0 0

d d i i i

0 0 0

C B

C B

d SignDet

d

A

0 0 0

i i d i d

d d d

if o dds then d d

if Cartesian co ordinates then

return d

else

Q

d

sign return d

i d

end

The problem is now to give ecient implementations for the two functions SignDet and

d

SignDet We feel that it is imp ortant to stress that eciency is meant in a practical sense

d

in theory it can b e done in constant time anyway assuming d is a constant

The Sign of a Perturb ed Determinant

We now illustrate the implementation of SoS on the b ottommost programming level by imple

menting function SignDet which returns the sign of a D byD determinant det for

D D

any given D primitive SignDet can b e treated in the same way To appreciate the signicance

D

of a practically ecient implementation of SignDet we p oint out that this is in fact the ma jor

D

part of SoS at least when applied to the predicate describ ed ab ove Provided that i i

D

we will show that it is p ossible without great eort to generate the sequence of the co ecients of

det in decreasing order of signicance Since can b e assumed to b e suciently small but

D

p ositive the sign of the p olynomial is therefore equivalent to the sign of the rst nonvanishing

co ecient

Using simple rules for evaluating a determinant as exemplied for det in a the co ecient

of every term in det is a sub determinant of the unp erturb ed matrix Here a single

D D

entry is called a by sub determinant and by denition the by sub determinant is equal to

To tell the whole truth we must mention that each co ecient in eect is a sub determinant

together with a certain sign that is multiplied by either or We will see in Section

how to decide whether or applies To continue our discussion we need a few notations

D

We say that the t st co ecient in order of decreasing signicance denoted by det M is

t

the cofactor of depth t of matrix Note that this co ecient already includes its prop er sign

D

D

Thus det M det The size of the corresp onding matrix ie the numb er of rows or

D

D

columns is denoted by k k M These denitions are illustrated in Table which shows all

t

t

signicant terms of det In the column with heading we display the pro duct asso ciated

t

with the cofactor of depth t The column v will b e explained later t

Simulation of Simplicity

2

t k k v det M

t t t t

t

i i

det

j j

det i

j j

det i

j j

det j

i i

det j i

Table i The relevant terms of det

This leads to the pseudo co de implementation of SignDet shown b elow It assumes that i

D

i and that the sequence of sub determinants sorted by increasing depth is known The

D

co de also requires a function SignDet that calculates the sign of det for a k byk matrix

k

The authors have not b een able to nd an alternative way to determine the sign but to compute

the actual determinant Unfortunately computing the exact determinant of a matrix of integers

demands the use of long integer arithmetic More ab out that in Section

function SignDet returns or

D D

lo cal k t

t

b egin

t

rep eat

t t

D

k k M

t

t

D

M SignDet

t k

t

until

return

end

Function SignDet scans through the table of relevant sub determinants Two lines of the

D

D D

indicate table lo okups In Pascal this M and SignDet pseudo co de k k M

t

k

t t

t

could b e implemented as a CASEstatement For D it would consist of dierent cases as

shown b elow

CASE t OF

s SignDet PiPiPjPj

s Sign Pj

s Sign Pj

s Sign Pi

s

END

If the depth counter is of no interest one can even unwind the lo op and come up with the following co de

Simulation of Simplicity

FUNCTION SignDetDelta Pi Pi Pj Pj Integer

BEGIN

SignDetDelta SignDet Pi Pi Pj Pj

IF SignDetDelta THEN goto

SignDetDelta Sign Pj

IF SignDetDelta THEN goto

SignDetDelta

exit

END

To give more insight into the computation of the terms of det in the order of decreasing

D

signicance we now consider the threedimensional case that is

i i i

i i i

C B

j j j

det det

A

j j j

k k k

k k k

This p olynomial has a total of terms However only of them are relevant and those are

listened in Table There are two reasons why we only need to test co ecients out of a total

of One is that the co ecient of k j i is equal to which is nonzero we can

therefore stop there and consider no further terms The other reason is that certain co ecients

o ccur more than once that is with dierent pro ducts For example

det j i j i b

k k

Clearly there is no need to test since at this depth is already known

k k

otherwise the sign determination would have stopp ed immediately after testing the co ecient of

j i

Generating the Sequence of Signicant Co ecients

The prop erly sorted sequences of terms of the p olynomials det and det are apparently

very regular In the following this regularity will b e worked out and exploited by an algorithm

that automatically generates the correct sequence of terms This pro cedure can b e emb edded

in an implementation of the function SignDet that computes the sign of det We agree

D D

that a pro cedure that generates each term of det by collecting the prop er rows and columns

D

of the original matrix is in a practical sense much slower than a straightline program that scans

through a xed sequence of submatrices However in higher dimensions the former might b e the

D

b etter strategy since the likeliho o d of det M for all with t decreases very fast

as t increases Let alone the fact that the tables of relevant terms for det b ecomes rather

D

long for large D The algorithm to b e describ ed can also b e used for automatic generation of such

tables and even for the automatic generation of co des implementing them

We now discuss in detail how we can extract the individual terms of the p olynomial det

D

c c

Recall that a term is of the form b where b is called the co ecient and is the pro duct of

c

i j i j so it is a k fold pro duct then we call i j active the term If

k k

for k Given the pro duct of a term we can extract the co ecient b from the given

Simulation of Simplicity

3

t k k v det M

t t t t

t

i i i

C B

det

A

j j j

k k k

j j

det i

k k

j j

det i

k k

j j

det i

k k

i i

det j

k k

det j i

k k

det j i

k k

i i

det j

k k

det j i

k k

i i

det j

k k

i i

det k

j j

det k i

j j

det k i

j j

det k j

i i

det k j i

Table ii The relevant terms of det

matrix by crossing out all rows and columns that contain an active i j In order to avoid

extensive double indexing and index inversions we assume that the p oints whose co ordinates are

the entries in the D rows of the matrix have indices through D This allows us to ignore

D

the dierence b etween a p oint index and the corresp onding row index Indeed this assumption

is no loss of generality since the only prop erty used in computing the sign of det is that

D

the p oint indices are sorted and therefore the actual values are irrelevant With this assumption

i j is in the i th row and the j th column and we cross out rows i i i and columns

k

j j j This leaves a D k byD k submatrix Table illustrates these denitions for

k

c

D

D If b is the term of depth t then the notation in Table is such that b det M

t

c

D

and k is the numb er of rows or columns of M

t t

t

Note that we did not yet sp ecify how we can decide whether b is or times the determinant

of the submatrix We now describ e a rule that is based on the numb er of transp ositions needed to

sort a certain p ermutation For row D let j b e the column such that j is active

in the term that we currently consider By denition of a determinant there can b e at most one

Simulation of Simplicity

such column but it could very well b e that there is no such column In this case we cho ose j such

that b elongs to the main diagonal of the submatrix that was obtained after crossing out rows

j

and columns as describ ed ab ove If the numb er of exchanges needed to sort j j j is o dd

D

D

then b det M is times the determinant of the submatrix otherwise it is times this

t

determinant

Interestingly the numb er of exchanges needed to sort the sequence j j j is even if and

D

only if i j is o dd for an even numb er of pairs i j k To see this notice that the

i i

total numb er of pairs j with j o dd is even since

D D

X X

j

Now observe that j j j can b e sorted using only exchanges of adjacent columns that is

D

of integers j that dier by one Note also that we can disp ense with all exchanges b etween two

columns where b oth contain an active i j or b oth do not Thus every exchange of two columns

increases or decreases the numb er of pairs i j with i j o dd by one which implies the claim

i i

This prop erty will b e used in the algorithm that computes the prop er sign

The key observation that allows us to automatically generate the relevant terms of det

D

is that i j i j is the pro duct of a relevant term if and only if i i and

k k k

j j In other words the i j go monotonically from the left top to the right b ottom

k

of the matrix To see this take an pro duct that do es not satisfy this condition and consider

the pro duct dened by the same k indices that is obtained by matching the smallest i with

the smallest j the two second smallest indices etc This new pro duct is more signicant than

the old one since the exp onent of it denes is smaller than the exp onent of the old pro duct

Furthermore the co ecients that corresp ond to the two pro ducts have the same absolute value

namely the determinant of the submatrix obtained by crossing out rows i and columns j for

k

The algorithm that generates the pro ducts and their corresp onding co ecients uses a vector

v v v v

D D

where each v is an integer b etween and D and v corresp onds to the ith row of det

i i D

v is set equal to D and is used only for convenience The interpretation of v is as follows

D

To enco de the pro duct i j i j we set v j for k For every i such that

k k i

the ith row do es not contain an active i j we dene v v with i the smallest integer in

i i

fi i D g that is larger than i Thus v in v implies that v is active if and only if

k

v v For example v implies that the pro duct of the enco ded term is

Other examples can b e found in Table which gives the vectors of all relevant terms in det

The next problem that we face is how to generate the terms of det in the correct order that

D

is in the order of decreasing signicance Here we use the fact that v v v v enco des

d D

a more signicant term than v v v v if and only if v v for j the largest index

j

d D j

such that v v This implies that v D D D enco des the most signicant

j

j

term and indeed it enco des whose co ecient is the determinant of the entire original

matrix It is now easy to write a function that computes for a given vector its successor

Simulation of Simplicity

function Next v v returns Vector

lo cal

b egin

while v do

v v

for down to do v v

return v

end

The alert reader will have noticed that the ab ove function returns an illegal vector if the input

vector is D which is not a problem b ecause the determinant evaluation is such that

already D D enco des a nonzero co ecient thus there is no reason to call Next v

again

After initializing v to D D D successive calls to Next v give the desired sequence

of vectors It remains to b e shown how the co ecient of the enco ded term can b e computed The

pro cedure b elow deco des v and returns the submatrix M obtained after deleting the prop er rows

and columns from It also returns s equal to or dep ending on whether the co ecient

D

equals det M or det M and returns k which is equal to the numb er of rows or columns for

that matter of M

pro cedure Matrix v s k M

global D

D

lo cal

b egin

M

D

k D

s

for to d do

if v v then

fin this case v is activeg

if o dd v then s s

delete row from M

delete column v from M

k k

end

We can now mo dify the co de of SignDet by replacing the table lo okup by appropriate calls to

D

v and Matrix With additional mo dications the same algorithm can b e used to generate the Next

table of relevant terms in det or even to generate the corresp onding co de for SignDet for

D D

any D Note that in the latter case the lo op in SignDet is to b e rep eated only until k

D t

since in generating mo de the values of the determinants are not computed and thus there is no

natural ab ortion of the cycle of calls The result for D can b e seen in Table in the App endix

A nice feature of the ab ove algorithms is that we only need to change the initialization of v

to D D D to get an implementation for S ig nD et which computes the sign of the

D

p olynomial det For this case the lo op over all relevant terms has to b e rep eated until

either the corresp onding cofactor is nonzero or if we are in generating mo de until k

t

See Tables and in the App endix for the relevant terms of det for D It D

Simulation of Simplicity

seems worthwhile to mention that Cartesian co ordinates should b e used whenever p ossible This

reduces the problem roughly by one dimension compared to the homogeneous case compare

eg Tables and

The presented p olynomials det and det illustrate that the computational overhead

D D

caused by SoS is acceptably small One has to keep in mind that the most signicant term of these

determinants corresp onds to the original determinant which expresses the primitive So there is

no way around the evaluation of the sign of this determinant for any implementation If the input

data is nondegenerated the cost of SoS is obviously zero and in general it is rather unlikely that

the p olynomials have to b e evaluated down to large depths Indeed the largest depth or the sum

of all depths that o ccurs in a computation can b e used as a measure for the degree of degeneracy

of the input data

By evaluating the sub determinants we systematically take care of all p ossible degenerate cases

Take for example the evaluation of det Dierent cases can b e distinguished by lo oking at

the largest depth t reached during the computations This t can b e or and the

max max

corresp onding degeneracy is as follows compare with Table in the App endix

t The three p oints p p and p are in general p osition

max i j k

t The three p oints are collinear but p p and the line containing the three

max j k

p oints is not vertical

t The three p oints lie on a common vertical line but p p

max j k

t Point p coincides with p but not with p and the line through p and p is

max j k i i j

not vertical

t All three p oints lie on a common vertical line and p p

max j k

It would b e interesting to see this somewhat unnatural case analysis in greater detail since it gives

a nonobvious breakdown into degenerate cases that has curious prop erties

This discussion completes the implementation of SoS with resp ect to the predicate Positive for

d

d

p oint sets in E We considered b oth the Cartesian and the homogeneous case The key was to

nd a metho d that generates the prop er sequence of relevant terms of det and det

D D

ordered by decreasing signicance With this the implementation of the functions SignDet and

D

SignDet was easy We will see in Section that b oth functions can also b e used to implement

D

other predicates

Remarks on the Sign Computation of Determinants

In the previous sections we reduced all computations to a sequence of sign evaluations of determi

nants In the primitives discussed in this pap er the matrices are at most of size d byd

d the dimension of the space and all elements are assumed to b e integers Theoretically the sign

of such a determinant can b e determined in constant time if we assume that d is a constant This

assumption is indeed fair since SoS is intended primarily for lowdimensional geometric computa

tions In practice however it is imp ortant to optimize the sign computation since it will b e in

the innermost lo op of every program that uses SoS which do es not mean that this issue is less

imp ortant for programs not employing SoS We remark on a few metho ds that can b e used to get

sp eed in these computations

One imp ortant condition that we have to meet is that the sign of the determinant has to b e

Simulation of Simplicity

computed exactly we cannot tolerate a for a etc Assuming that the co ordinates or

parameters are integers we can either use long integer arithmetic or mo dular arithmetic based

on the Chinese remainder theorem For details on b oth metho ds refer to Kn If we actually

compute the determinant in order to nd its sign and no metho d is known to the authors

that avoids the actual computation of the determinant we have to b e prepared to deal with

D

numb ers of absolute size at least where denotes maximum absolute value of any data item

and D denotes the largest size of matrices we work with To see this just take the D byD matrix

whose entries are all zero except for the ones in the main diagonal where they are equal to the

D

determinant of this matrix is An upp er b ound on the absolute value of the determinants is

given by a well known theorem of Hadamard that states that

v

u

D D

u

Y X

D

u

D

2

t

jdet j D

D D

ij

i j

Among other things this upp er b ound on the absolute value of a determinant gives us an upp er

b ound on the numb er of computer words needed for the computation if we use long integer

arithmetic

Without any hardware supp ort long integer arithmetic is very time consuming which might moti

vate us to resort to the use of approximation metho ds Any computation of the determinant using

oatingp oint arithmetic of b ounded length is such an approximation Floatingp oint arithmetic

is usually rather fast since it enjoys the needed hardware supp ort on most of to days computers

If the value that we get is suciently far from zero we can b e sure that the correct value is dif

ferent from zero and lies on the same side of zero But how can we quantify suciently far from

zero In any case we could now use Gaussian elimination see eg GVL which takes O D

time or asymptotically faster metho ds based on matrix multiplication as describ ed for instance

in AHU We do not b elieve that the latter metho ds could b e of any practical use though

However if the value that we get is suspiciously close to zero we have to use some other metho d

to determine the sign of the determinant

Finally we would like to mention that the determinant of a D byD matrix can b e expressed

in terms of sub determinants and that some of these sub determinants might later app ear again

when the evaluation of det or det pro ceeds It is conceivable that the values of such

D D

sub determinants are saved and used again when needed Even so we do not b elieve that such a

metho d could lead to signicant savings since we exp ect that on the average only very few terms

of the determinants are needed

Further Applications of SoS for Determinants

In this section we demonstrate that the algorithmic solution to many geometric problems can b e

based on primitive op erations that compute the sign of determinants Those include problems

that deal with ob jects dierent from p oints There are two ma jor reasons why determinants are

useful b eyond problems for p oints One is that more complicated geometric ob jects are often

given by a nite set or sequence of p oints Examples are line segments given by two p oints and

sp ecied by three p oints This will b e illustrated in Section which revisits the Parity

Algorithm discussed in the Intro duction The other reason and this is the more profound although

Simulation of Simplicity

less obvious of the two is that other ob jects can b e thought of as p oints in a dierent space Take

for example a hyp erplane in d dimensions It can b e sp ecied by a linear relation of the form

x x x

d d d

Multiplying the ab ove relation with a nonzero constant do es not change the hyp erplane This

suggests that we think of the hyp erplane as the p oint with homogeneous co ordinates

d d

in d dimensions This view of hyp erplanes will b e discussed in more detail in Sections and

Of course an ngon sp ecied by a sequence of n p oints in the plane can b e interpreted as a p oint

to o in this case it is a p oint in n dimensions However in contrast to the former case this

view is not likely to lead to any useful application of determinants since it b ecomes increasingly

exp ensive to compute them as the size of the matrix increases Finally Section shows that

even nonlinear geometric ob jects such as circles and spheres can protably b e interpreted as p oints

in low dimensions as well

By no means do we b elieve that the list of applications for primitives concerning the sign of

determinants as presented in this pap er is exhaustive In fact b ecause of the versatility of

determinants an enumeration of their applications in geometric computation is far b eyond the

scop e of this pap er We agree though that such an enumeration is a challenging task

Pointin Test

Recall the Parity Algorithm for the p ointinp olygon problem sketched in the Intro duction In

order to test whether a given p oint p lies inside a simple p olygon P the algorithm intersects the

horizontal halfline r whose left endp oint is p with all edges of p olygon P If the numb er of edges

intersecting r is o dd then p lies inside P and if this numb er is even p lies outside The subtlety

of this algorithm lies in the treatment of sp ecial cases since the ab ove characterization holds in

general only if we intro duce certain articial counting mechanisms whenever r contains a

or even an entire edge of P In this section we show that the test whether or not an edge intersects

the horizontal halfline r can b e reduced to computing the signs of certain determinants SoS is

then used to simulate a p erturbation of the p oint and the p olygon which removes all degeneracies

The algorithm assumes that P is given by a sequences of vertices v v v and that all

n

co ordinates including those of p are integers

We consider now the problem to test whether r intersects an edge e of P given by its two endp oints

Let u and w b e the two endp oints and recall that p is the left

endp oint of r Because of SoS we can assume that u w p are not collinear and that no two of

the three p oints lie on a common horizontal line Note rst that r and e intersect only if the

second co ordinate of p lies b etween the second co ordinates of u and w Assume If indeed

then r e if and only if u w p denes a leftturn see Figure I

It is now not very dicult to develop this case analysis into a predicate that tests for intersection

To p erturb the p oints we use the same expansion as describ ed in Section that is we replace

v by v where i j with i j as in b For a

i i i i i i ij ij

uniform treatment we dene p v and write the predicate for arbitrary three vertices

rather than for v and two successive vertices of P

Simulation of Simplicity

w w

w

u

p p p

u u

a b c

Figure I The three cases to consider for r e using SoS

In a r and e do not intersect since the second co ordinate of p do es not lie b etween

those of u and w In c they do not intersect since u w p is a rightturn

Predicate IntersectHalfLine Let v v and v b e three vertices with pairwise dierent indices

i j k

i j k n The following pseudo co de returns true if the edge from v to v intersects

j k

the horizontal halfline whose left endp oint is given by v and false otherwise

i

function IntersectHalfLine v v v returns Bo olean

i j k

lo cal i j k s d

b egin

Wlog assume Smal ler

j k

if Smal ler Smal ler then

j i i k

Sort i j k i j k s

0 0

i i

C B

0 0

d SignDet

A

j j

0 0

k k

if o dds then d d

return d

else

return false

end

A few remarks are in order When the ab ove function is applied to the p ointinp olygon problem

i always holds Thus the sorting of i j k can b e reduced to a single comparison b etween

j and k Furthermore to avoid all degeneracies for the p ointinp olygon test it is sucient to

p erturb only the p oint p v Indeed if

i i

C B

det

A

j j

k k

then we necessarily have and therefore the determinant do es not even get

j k i

evaluated The savings that one gets this way are only nominal which we interpret as an argument

for the eciency of our general metho d

The remainder of this section is used to comment on what happ ens if the test p oint p lies on the

b oundary of the p olygon P If we use the ab ove primitive as is SoS will neglect this sp ecial case

and nd that p lies on either side of P s b oundary The decision dep ends on the relative p ositions

of p and the vertices of P and we might as well assume that it is arbitrary although consistent

Simulation of Simplicity

Such a decision may or may not b e desirable If it is not acceptable one could test whether or

not p lies on the b oundary of P b efore running the Parity Algorithm with SoS Once more this

test can b e reduced to computing signs of determinants

Hyp erplanes in Euclidean Space

Algorithms for hyp erplanes play a central role in computational geometry This b ecomes obvi

ous when one thinks of the imp ortance of problems such as linear programming computing the

intersection of halfspaces and constructing arrangements of hyp erplanes see PS and Ed

for further details and references The goal of this section is to demonstrate how the techniques

of Section can b e used to implement a typical primitive op eration needed in those algorithms

This will op en up an entire class of problems to the use of SoS The main to ol that lets us exploit

the techniques of Section when we handle hyp erplanes is a duality transformation that maps

hyp erplanes to p oints and vice versa In essence this transform is nothing but a reinterpretation

of what hyp erplanes and p oints are

d

In this section we assume that a hyp erplane h in E is sp ecied by its nonzero normal vector

a and a numb er called the oset Now a hyp erplane h consists of all

d d

d

p oints x E such that

hx ai a

d

that is the scalar pro duct of x and a equals the oset Notice that the hyp erplane do es not

change if we multiply the normal vector and the oset by some nonzero numb er We dene h as

the p oint whose homogeneous co ordinates are Geometrically sp eaking h lies

d d

on the line through the origin dened by a and the distance of h from the origin is the inverse

of the distance b etween h and the origin This can easily veried after observing that j j is

d

the distance b etween h and the origin provided a has unit length Note also that the origin

lies b etween h and h see Figure I I Conversely for a p oint p with homogeneous co ordinates

we let p b e the hyp erplane with normal vector and oset

d d d

d

x

x

h

h x x

Figure I I Mapping a line to a p oint and vice versa

It is straightforward to show that this transformation preserves incidences that is p h if and

only if h p Indeed it is a triviality when one rememb ers what p h means algebraically

namely that

d d d d

It is equally easy to prove that this mapping preserves the relative order b etween a p oint and a

hyp erplane To describ e what exactly we mean by this dene

h fxjhx ai g and h fxjhx ai g

d d

Simulation of Simplicity

and call those the positive and negative sides or halfspaces of h By order preservation we mean

that p h if and only if h p Here a warning is appropriate to avoid future confusion

If we multiply the normal vector and the oset of a hyp erplane h by we do not change the

hyp erplane but we do change the sides of h what was previously its p ositive side is now its negative

one and the other way round We will take advantage of this curiosity by enco ding the p ositive

and negative sides into the hyp erplanes sp ecication Note that geometrically the normal vector

of a hyp erplane h p oints to its p ositive side

The primitive op eration that we wish to tackle in this section is to decide on which side of a

hyp erplane h the intersection of d other hyp erplanes h h lies By the use of SoS the

i i i

0

d d1

absence of any kind of degeneracies can b e assumed so h through h intersect in a unique

i i

0

d1

p oint which do es not lie on h By Cramers rule the intersection p oint p of

i d

d

d hyp erplanes is given by the co ordinates

det

di

i

det

d

where is the matrix

d

i i i d

0 0 0

B C

B C

i i i d

1 1 1

B C

B C

A

i i i d

d1 d1 d1

and is the same matrix after replacing the ith column from the left by the vector

di

i d

0

B C

B C

i d

1

B C

B C

A

i d

d1

Point p lies in the p ositive halfspace of h if and only if

d

i i d i d i d

d d d d

Provided that det is p ositive this is equivalent to

d

det det det det

d i d i dd i d d i d

d d d d

In case of a negative det the ab ove statement is valid after reversing the direction of the

d

inequality Consequently p h if and only if

d

det det

d d

This can b e seen by developing

i i i d i d

0 0 0 0

B C

B C

i i i d i d

1 1 1 1

B C

B C

B C det det

d

B C

B C

i i i d i d A

d1 d1 d1 d1

i i i d i d

d d d d

using the last row Now we can use this to write a pro cedure that decides on which side of a

hyp erplane d other hyp erplanes intersect It uses SoS as describ ed in Section

Simulation of Simplicity

Predicate OnPositiveSide Let h h h b e d hyp erplanes in d dimensions given

i i i

0 1

d

as in a and with distinct indices i i i n The following function written in

d

T

d

pseudo co de returns true if the intersection h lies in the p ositive halfspace of h and

i i

d

false if it lies in the negative one

function OnPositiveSide h h h returns Bo olean

d i i i

0

d1 d

lo cal i i s d i i i s d

d d d

b egin

Sort i i i i s

d d

d

Sort i i i i i i s

d d d

d d

0 0 0

d i i i

0 0 0

C B

0 0 0

C B

i i i d

1 1 1

C B

d SignDet

d

C B

A

0 0 0

i i i d

d1 d1 d1

if o dd s then d d

00 00 00 00

i i i d i d

0 0 0 0

C B

00 00 00 00

C B

i i i d i d

1 1 1 1

C B

C B

d SignDet

C B

d

C B

C B

00 00 00 00

i i i d i d

A

d1 d1 d1 d1

00 00 00 00

i i i d i d

d d d d

if o dd s then d d

return d d

end

Nonvertical Hyp erplanes

In many applications we know that all hyp erplanes we have to deal with are nonvertical that

is they intersect the dth co ordinate axis in a unique p oint Examples are Voronoi diagrams

or more generally p ower diagrams for arbitrary order and weighted Voronoi diagrams see for

instance Ed and AI It is b eyond the scop e of this pap er to describ e how the data for those

problems are used to generate hyp erplanes it will b e enough to know that they are obtained

via geometric transforms which do not create vertical hyp erplanes

A nonvertical hyp erplane h in ddimensions can b e sp ecied by a relation of the form

x x x x b

d d d d

The advantage of describing a hyp erplane using this form rather than the one in Section is

that it takes only d parameters rather than d This will lead to some savings when it comes to

computing signs of determinants compare for instance det in Table and det in Table

Since every hyp erplane h is now nonvertical we can uniquely dene what we mean when we say

that a p oint lies vertically ab ove or b elow h Dene

h fx x x j x x g

d d d d

d

E h h A p oint p is said to lie above h if p h and below h if p h and let h

Simulation of Simplicity

The primitive op eration that we consider in this section decides whether the intersection of d

hyp erplanes h h lies ab ove or b elow hyp erplane h The use of SoS as in Section

i i i

0

d1 d

allows us to assume that indeed h through h intersect in a unique p oint that do es not lie on

i i

0

d1

h A decision pro cedure based on comparing the signs of the two determinants can b e derived

i

d

from the pro cedure given in Section We just replace all by and exchange the last two

id

columns of the second matrix in function OnPositiveSide This leads to the following predicate

d

d

Predicate Above Let h h h b e d nonvertical hyp erplanes in E sp ecied as in

i i i

0 1

d

b and with pairwise dierent indices i i i n The following predicate returns

d

T

d

true if the p oint of intersection h lies ab ove h and false if it lies b elow h

i i i

d d

function Above h h h returns Bo olean

d i i i

0

d1 d

lo cal i i s d i i i s d

d d d

b egin

Sort i i i i s

d d

d

Sort i i i i i i s

d d d

d d

0 0

i i d

0 0

C B

C B

d SignDet

d

A

0 0

d i i

d1 d1

if o dd s then d d

00 00 00

i i d i d

0 0 0

C B

C B

C B

d SignDet

d

C B

00 00 00

A

d d i i i

d1 d1 d1

00 00 00

d d i i i

d d d

if o dd s then d d

return d d

end

In Test

In d dimensions any d anely indep endent p oints ie p oints that do not lie in a common

hyp erplane dene a unique sphere that go es through the d p oints For example in two

dimensions there is a unique through any three noncollinear p oints Given d p oints

p p p the problem we address in this section is how we can determine whether p lies

d d

inside or outside the sphere sp ecied by the rst d p oints assuming this sphere is unique

Such a test is useful for constructing Voronoi diagrams as shown in GS for d and other

problems where circles and spheres play a role

An elegant solution to this problem can b e given using a transform that lifts a sphere in d di

mensions to d dimensions where it is represented by a hyp erplane This transformation can

b e traced back in the literature to Se and has since b een used throughout the computational

geometry literature see GS PS and Ed For the case of circles in the plane we explain

this transformation in detail and nally phrase the predicate for general dimensions

Let U x x x b e the parab oloid of revolution whose axis is the x axis and let

c x x

Simulation of Simplicity

b e a circle in the x x plane Note that is the center of the circle and is its radius The

lifting map transforms c to the plane c in three dimensions given by the equation

c x x x

The quick reader will already have veried that the vertical pro jection of U c which is an

in three dimensions onto the x x plane is equal to the original circle c A p oint p lies

inside c if and only if its vertical pro jection onto U lies b elow c This insight gives us some hop e

that in fact the problem can b e b ent such that Predicate from the previous section is applicable

Before we continue our exploration in this direction let us understand how the original statement

of the problem and the lifting map are connected Recall that there are four original p oints

which we call p p p and p The rst three determine the circle c and therefore the plane

c Moreover if we pro ject them vertically onto U then c is the plane through these p oints on

the parab oloid U The question is now whether p which is the vertical

pro jection of p onto U lies b elow c in which case p lies inside c or ab ove c then p lies

outside c By the use of SoS we can assume that the four p oints are in general p osition

This problem can b e mapp ed to the plane problem of the previous section if we use a dual

transform This transform replaces each p oint on U by the unique plane whose intersection with

then the formula for this dual plane is U is this p oint If p

p x x x

We see that this is indeed the lifting map applied to p oint p in the x x plane This

duality transform preserves incidences and ab oveb elow order in a way similar to the duality

transform describ ed in Section This leaves us with the following corresp ondence b etween the

original p ointcircle problem and the derived planep oint problem Point p lies inside c the circle

through p oints p p and p if and only if the intersection p oint of the planes p p and p lies

by The statement is also valid if we replace inside c by outside c and b elow p b elow p

ab ove p

We leave the generalization of this twodimensional exercise to three and higher dimensions to

the curious reader In any case Predicate can now b e used to implement Predicate which

formalizes the insphere test in d dimensions If we apply Predicate directly we will nd ourselves

computing the sign of determinants of the form

i i d

0 0

i i d

0 0

C B

C B

det

A

i i d

d+1 d+1 i i d

d+1 d+1

The sign do es not change if we divide the entries in the left d columns by Similarly we can

remove the minus signs in the last two columns without changing the sign of the determinant

However there remains one problem with determinants of the ab ove typ e and this is that the

values in the d st column from the left dep end on the values in the left d columns In

particular with SoS the expressions of the p oint co ordinates app ear in mixed pro ducts in the

d st column This turns out to b e a real pain when we implement SoS for this typ e of

determinants A cheap trick that handles this problem is not to p erturb the original p oints but

rather to p erturb the vertical pro jections onto the parab oloid in d dimensions In eect this

means that we intro duce

d

X

for d c

i d

i

Simulation of Simplicity

and then p erturb the p oints Because the p erturbation of the d st

i i d i d

co ecient do es not dep end on the rst d co ecients this implies that the p oints are p erturb ed

away from the parab oloid U On the other hand if the p erturbation is small enough we are still

close enough to the original situation

Predicate InSphere Let p p p b e d p oints in d dimensions with pairwise dif

i i i

0 1

d+1

ferent indices in the range from through n The program b elow returns true if the p erturb ed

image of p lies inside the sphere through the p erturb ed images of the rst d p oints and

i

d+1

returns false if it lies outside

function InSphere p p p returns Bo olean

i i i

d

0

d d+1

lo cal i i s d i i i s d

d d d

b egin

Sort i i i i s

d d

d

Sort i i i i i i s

d d d

d d

0 0

i i d

0 0

C B

C B

d SignDet

d

A

0 0

d i i

d d

if o dd s then d d

Set as in c

i d

00 00 00

i i d i d

0 0 0

C B

C B

C B

d SignDet

d

C B

00 00 00

A

i i d i d

d d d

00 00 00

d d i i i

d+1 d+1 d+1

if o dd s then d d

return d d

end

Note that the rightmost column of the rst matrix in the ab ove program should really consist of

s To stress the similarity with predicate Above in the previous section we replaced the s

d

by s and thus changed the sign of d This eect is comp ensated by the fact that we want to

return true where function Above returns false

d

Remarks and Discussion

The main contribution of this pap er is the intro duction of a general technique that can b e used

to deal with degenerate input for geometric programs The main purp ose of this pap er is to

demonstrate that this technique which we call SoS the Simulation of Simplicity is immanently

practical despite its highp owered app earance Indeed the authors b elieve that SoS will b ecome a

standard to ol for implementing geometric algorithms A pragmatic consequence of this technique

is that authors of geometric algorithms can now b e more condent ab out the implementability of

their algorithms even in the presence of any conceivable degeneracies provided SoS is applicable

to their algorithms

Simulation of Simplicity

This raises the question of determining the limitations of SoS what are the prop erties of an

algorithm that allows us to use SoS when we implement it One imp ortant feature of algorithms

that are amenable to SoS is that their algebraic computations are of constant depth The deep er

the algebraic computation the more complicated is the p olynomial or in general the function

in generated by SoS and the less tractable is its evaluation Another limitation of SoS is the

necessity of absolute precision in the evaluation of algebraic formulas As long as square ro ots

can b e eliminated by squaring the equation and similar techniques can b e used to remove other

irrational functions this is not a problem but there are cases where it is not that easy Typical

examples for such problem cases are algorithms for shortest path problems in a geometric setting

Take for instance two piecewise linear paths in the Euclidean plane The length of each path is

the sum of square ro ots of integers assuming the endp oint co ordinates are integers Deciding

which one of the two paths is shorter is a dicult question unless the numb er of square ro ots is

very small On the other hand deciding which one of two paths is shorter is not exactly the kind

of problems that SoS was invented for

Another problem is that algorithms employing SoS pro duce results for the p erturb ed set of ob jects

rather than for the original ones In certain settings such as in computer graphics this fact can

often b e ignored However when unp erturb ed results are needed some p ostpro cessing has to b e

p erformed This pap er do es not deal with this issue and further work has to b e done Nevertheless

in most of the applications mentioned in this pap er the p ostpro cessing step is more or less trivial

In the p ointinp olygon problem one can simply add a test whether or not the query

p oint lies on a b oundary edge

In the case of Voronoi diagrams or arrangements of hyp erplanes we identify and elim

inate zerolength edges or higherdimensional faces of zero measure

In the convexhull setting it is p ossible to undo the p erturbation simply by merging

adjacent faces if necessary for example in two dimensions adjacent edges that lie on

a common line and in three dimensions adjacent triangles contained in a common

plane

It is rather dicult however to use SoS or any other p erturbation scheme for nding all data

p oints on the b oundary of the convex hull This is b ecause the p erturbation may decide that

a p oint is inside the hull if it lies on a b oundary edge or face In this case the p oint would b e

prematurely discarded We refer to Ya for a more extensive discussion of the limitations of

symb olic metho ds aimed at resolving robustness problems in geometric algorithms

In order to increase the credibility of our claim that SoS is indeed a practical programming to ol the

second author compiled a prototyp e version of a SoS library Mu and implemented the three

dimensional edgeskeleton algorithm of Ed We b elieve it is fair to say that this algorithm is

an extraordinary challenge for someone who wants to do it without SoS From runtime proles of

this program we learned that most of the computing time was sp ent on multiplying long integers

in order to compute signs of determinants The sp eedup that we got in our implementation

from replacing longinteger by normal builtin integer arithmetic was a factor somewhere around

Of course for the normal integer arithmetic to work we severely restricted the range of the

co ordinates that were used In any case this makes it clear where future work has to go if we

want to pro duce programs that are reliable and which are as fast as software that uses oating

p oint arithmetic and is therefore inherently unreliable The most promising way to eliminate this

overhead factor seems to b e the design of a sp ecial piece of hardware that computes the sign of

determinants for integer matrices Such eort seems justied by the versatility of determinants

Simulation of Simplicity

demonstrated in Section We would like to mention though that even without the availability

of such sp ecialized hardware we b elieve that SoS is of practical value in implementing geometric

algorithms Aside from the obvious savings in time and eort for the programmer it seems to us

that the use of SoS is currently the only hop e to pro duce geometric software that is in any sense

reliable

We end this section by p ointing out a new direction for further research it is the systematic

study of primitive op erations used and needed for geometric algorithms If one underto ok the

venture of building a library of primitives for geometric algorithms b esides computing signs of

determinants what other op erations would have to b e in the collection Is it even clear that

computing the sign of a determinant is such an indisp ensable op eration or are there less exp ensive

ways to determine the orientation of d p oints in d dimensions

References

AHU A V Aho J E Hop croft and J D Ullman The Design and Analysis of Computer

Algorithms AddisonWesley Reading Massachusetts

AI F Aurenhammer and H Imai Geometric relations among Voronoi diagrams Tech

nical Rep ort Institute fur Informationsverarb eitung Technische Universitat Graz

Austria

Ch A Charnes Optimality and Degeneracy in Linear Programming Econometrica

April

Ch V Chvatal Linear Programming W H Freeman and Company New York

CK V Chvatal and G Klincsek Finding Largest Convex Subsets In Proceedings of

the th Southeastern Conference on Combinatorics Graph Theory and Computing

pages

Da G B Dantzig Linear Programming and Extensions Princeton University Press

Princeton New Jersey

DOW G B Dantzig A Orden and P Wolfe The Generalized Simplex Metho d for Minimiz

ing a Linear Form Under Linear inequality Restrictions Pacic Journal of Mathematics

June

Ed H Edelsbrunner EdgeSkeletons in Arrangements with Applications Algorithmica

Ed H Edelsbrunner Algorithms in Combinatorial Geometry SpringerVerlag Heidelb erg

West Germany

EG H Edelsbrunner and L J Guibas Top ologically Sweeping an Arrangement Journal

of Computer and System Sciences February

EW H Edelsbrunner and R Waup otitsch Computing a HamSandwich Cut in Two Di

mensions Journal of Symbolic Computation June

Simulation of Simplicity

Fo A R Forrest Computational Geometry in Practice In E A Earnshaw editor Fun

damental Algorithms for Computer Graphics pages SpringerVerlag Berlin

Heidelb erg West Germany

GP J E Go o dman and R Pollack Multidimensional Sorting SIAM Journal on Comput

ing August

GS L J Guibas and J Stol Primitives for manipulation of general sub divisions and the

computation of Voronoi diagrams ACM Transactions on Graphics April

GVL G H Golub and Ch F Van Loan Matrix Computations John Hopkins University

Press Baltimore Maryland

Kn D E Knuth The Art of Computer Programming Volume Seminumerical Algo

rithms AddisonWesley Reading Massachusetts

Mu E P Muc ke SoS A First Implementation Masters thesis University of Illinois

at UrbanaChampaign Department of Computer Science Urbana Illinois Septemb er

PH F P Preparata and S J Hong Convex Hulls of Finite Sets of Points in Two and Three

Dimensions Communications of the ACM February

PS F P Preparata and M I Shamos Computational Geometry An Introduction

SpringerVerlag New York

Se R Seidel A convex hull algorithm optimal for p oint sets in even dimensions Tech

nical Rep ort Department of Computer Science University of British Columbia

Vancouver British Columbia

Se R Seidel On the size of closestp oint Voronoi diagrams Technical Rep ort F Insti

tute fur Informationsverarb eitung Technische Universitat Graz Austria

Se R Seidel Constructing HigherDimensional Convex Hul ls in Logarithmic Cost per

Face In Proceedings of the th Annual ACM Symposium on Theory of Computing

pages Berkeley California May

Ya C K Yap Symbolic Treatment of Geometric Degeneracies In Proceedings of the th

IFIP Conference on System Modeling and Optimization Chuo University Tokyo

Ya C K Yap A Geometric Consistency Theorem for a Symbolic Perturbation Scheme

In Proceedings of the th Annual ACM Symposium on Computational Geometry

pages Urbana Illinois June

Simulation of Simplicity

App endix

In this app endix we give the relevant sub determinants sorted in sequence of decreasing signif

icance needed for computing the signs of det det det and det Each

sequence is given in a table that also shows the corresp onding pro duct and the size k of the

t t

d d

matrix M M asso ciated with the t st signicant term in the p olynomial det

D

t t

det The third column of each table shows v the vector that enco des the sub determinant

D t

of depth t Recall that this vector was used to pro duce the prop er sequences of sub determinants

v by successive calls of pro cedure Next

2

t k k v det M

t t t t

t

i

det

j

det i

Table i The relevant terms of det

3

t k k v det M

t t t t

t

i i

C B

det

A

j j

k k

j

det i

k

j

det i

k

i

det j

k

det j i

Table ii The relevant terms of det

Simulation of Simplicity

4

t k k v det M

t t t t

t

i i i

C B

C B

j j j

det

C B

A

k k k

l l l

j j

C B

det i

A

k k

l l

j j

C B

det i

A

k k

l l

j j

C B

det i

A

k k

l l

i i

C B

det j

A

k k

l l

k

det j i

l

k

det j i

l

i i

C B

det j

A

k k

l l

k

det j i

l

i i

C B

det j

A

k k

l l

i i

C B

det k

A

j j

l l

j

det k i

l

j

det k i

l

i

det k j

l

det k j i

Table iii The relevant terms of det

Simulation of Simplicity

4

t k k v det M

t

t t t

t

i i i i

B C

B C

j j j j

det

B C

A

k k k k

l l l l

j j j

B C

det i

A

k k k

l l l

j j j

B C

det i

A

k k k

l l l

j j j

B C

det i

A

k k k

l l l

j j j

B C

det i

A

k k k

l l l

i i i

C B

det j

A

k k k

l l l

k k

det j i

l l

k k

det j i

l l

k k

det j i

l l

i i i

B C

det j

A

k k k

l l l

k k

det j i

l l

k k

det j i

l l

Table iv The relevant terms of det to b e continued

Simulation of Simplicity

4

t k k v det M

t t t t

t

i i i

B C

det j

A

k k k

l l l

k k

det j i

l l

i i i

B C

det j

A

k k k

l l l

i i i

C B

det k

A

j j j

l l l

j j

det k i

l l

j j

det k i

l l

j j

det k i

l l

i i

det k j

l l

det k j i

l l

det k j i

l l

i i

det k j

l l

det k j i

l l

i i

det k j

l l

i i i

B C

det k

A

j j j

l l l

j j

det k i

l l

j j

det k i

l l

i i

det k j

l l

det k j i

l l

Table continued

Simulation of Simplicity

4

t k k v det M

t t t t

t

i i

det k j

l l

i i i

C B

det k

A

j j j

l l l

j j

det k i

l l

i i

det k j

l l

i i i

C B

det k

A

j j j

l l l

i i i

B C

det l

A

j j j

k k k

j j

det l i

k k

j j

det l i

k k

j j

det l i

k k

i i

det l j

k k

det l j i

k k

det l j i

k k

i i

det l j

k k

det l j i

k k

i i

det l j

k k

i i

det l k

j j

det l k i

j j

det l k i

j j

det l k j

i i

det l k j i

Table continued