Simulation

of

Simplicity

A

Technique

to

Cope

with

Degenerate

Cases

in

Geometric

Herbert

and

Ernst

Peter

Abstract

This

paper

describes

a

general-purpose

programming

technique

called

the

Simulation

of

Simplicity

which

can

be

used

to

cope

with

degenerate

input

data

for

geometric

algorithms

It

relieves

the

programmer

from

the

task

to

provide

a

consistent

treatment

for

every

single

special

case

that

can

occur

The

programs

that

use

the

technique

tend

to

be

considerably

smaller

and

more

robust

than

those

that

do

not

use

it

We

believe

that

this

technique

will

become

a

standard

tool

in

writing

geometric

software

ACM

Transactions

on

Graphics

-LRB-

-RRB-

-LCB-

of

both

authors

was

supported

by

Amoco

Foundation

Faculty

Development

Grant

CS

-LCB-

-LCB-

It

was

partially

carried

out

while

both

authors

were

with

the

Institutes

for

Information

Processing

at

the

Technical

University

of

Graz

Austria

The

first

author

also

acknowledges

support

by

the

National

Science

Foundation

under

grant

CCR

-LCB-

of

Computer

Science

University

of

Illinois

at

Urbana-Champaign

West

Springfield

Avenue

Urbana

Illinois

USA

Simulation

of

Simplicity

Introduction

This

paper

introduces

a

general

technique

that

can

be

used

to

cope

with

degenerate

cases

encountered

by

computer

programs

Consider

for

example

a

program

that

sorts

an

array

of

integers

using

a

comparison

as

a

primitive

operation

A

special

or

degenerate

case

occurs

when

the

program

attempts

to

decide

which

one

of

two

equal

numbers

is

smaller

than

the

other

A

typical

way

to

resolve

this

tie

is

to

pretend

that

the

number

with

smaller

index

is

smaller

-LRB-

assuming

the

integers

are

indexed

e.g.

by

their

positions

in

an

array

-RRB-

Or

think

of

Kruskal

's

algorithm

for

constructing

a

minimum

spanning

tree

of

a

weighted

graph

-LRB-

see

-LSB-

-RSB-

-RRB-

At

each

step

it

chooses

the

shortest

edge

that

can

be

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

specify

deterministic

rules

to

break

ties

In

both

problems

sorting

and

constructing

minimum

spanning

trees

the

special

cases

are

easily

dealt

with

partly

because

the

ties

can

be

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

point-in-polygon

problem

which

is

sometimes

called

the

Parity

Algorithm

ffl

Let

r

be

the

horizontal

half-line

whose

left

endpoint

is

the

test

point

ffl

Count

the

number

of

intersections

between

r

and

the

edges

of

the

polygon

If

that

number

is

odd

then

the

test

point

lies

within

the

polygon

and

if

the

number

is

even

then

it

lies

outside

the

polygon

As

pointed

out

in

-LSB-

-RSB-

it

is

not

a

trivial

matter

to

implement

this

algorithm

even

if

we

assume

that

the

test

point

does

not

lie

on

the

boundary

of

the

polygon

There

are

only

two

nondegenerate

cases

Either

the

intersection

between

r

and

an

edge

e

is

empty

or

r

crosses

e

-LRB-

see

Figure

-LRB-

a

-RRB-

and

-LRB-

b

-RRB-

-RRB-

There

are

however

four

degenerate

cases

-LRB-

as

illustrated

in

Figure

-LRB-

c

-RRB-

through

-LRB-

f

-RRB-

-RRB-

that

have

to

be

taken

into

account

-LRB-

a

-RRB-

-LRB-

b

-RRB-

-LRB-

c

-RRB-

-LRB-

d

-RRB-

-LRB-

e

-RRB-

-LRB-

f

-RRB-

Figure

The

different

cases

in

the

Parity

Algorithm

A

correct

answer

is

obtained

if

cases

-LRB-

c

-RRB-

and

-LRB-

e

-RRB-

are

counted

as

one

crossing

and

cases

-LRB-

d

-RRB-

and

-LRB-

f

-RRB-

are

not

counted

at

all

If

we

write

the

code

for

the

above

algorithm

we

realize

that

a

substantial

amount

of

the

effort

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

appeal

to

the

imagination

of

the

reader

to

envision

the

bizarre

structure

of

degenerate

cases

one

encounters

in

generalizing

the

point-in-polygon

problem

to

three

or

higher

dimensions

Another

problem

with

a

set

of

degenerate

cases

that

is

considerably

richer

than

the

Simulation

of

Simplicity

one

of

the

point-in-polygon

problem

is

obtained

if

one

intersects

a

polygon

with

a

geometric

object

that

is

more

complicated

than

a

half-line

When

it

comes

to

implementing

geometric

algorithms

degenerate

cases

are

very

costly

in

particular

if

there

are

many

such

cases

that

have

to

be

distinguished

This

is

caused

by

the

positive

correlation

between

the

number

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

positively

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

different

cases

In

this

context

it

is

worthwhile

to

mention

that

more

efficient

algorithms

tend

to

be

more

complicated

and

also

more

sensible

to

slight

inconsistencies

in

treating

degenerate

cases

This

paper

presents

a

general

technique

called

Simulation

of

Simplicity

-LRB-

SoS

-RRB-

that

can

be

used

to

cope

with

the

problems

mentioned

above

Intuitively

it

simulates

a

conceptual

perturbation

of

the

input

data

that

eliminates

all

degeneracies

We

hasten

to

mention

that

the

perturbation

is

never

ever

computed

it

is

assumed

to

be

arbitrarily

small

although

not

vanishing

which

is

enough

to

simulate

the

nondegenerate

topology

Another

interpretation

of

the

technique

views

it

as

a

general

way

to

break

ties

consistently

The

tie-breaking

part

of

the

code

appears

in

the

lowest

level

of

the

algorithm

namely

in

the

procedures

that

implement

the

needed

primitive

operations

Different

techniques

following

the

same

main

approach

have

recently

been

suggested

in

-LSB-

-RSB-

A

large

part

of

this

paper

is

devoted

to

demonstrating

that

the

overhead

in

time

caused

by

the

use

of

the

more

elaborate

primitive

procedures

required

by

SoS

is

negligible

The

outline

of

this

paper

is

as

follows

Section

presents

the

general

idea

of

the

technique

and

works

out

some

guidelines

needed

to

implement

it

effectively

Section

considers

a

class

of

problems

for

finite

point

sets

that

can

be

solved

using

a

common

set

of

geometric

primitives

It

also

discusses

how

the

perturbation

influences

the

geometric

primitives

Section

demonstrates

efficient

implementations

of

the

primitive

operations

In

Section

we

show

that

the

geometric

primitives

introduced

for

point

set

problems

can

be

used

to

solve

a

variety

of

other

problems

defined

for

polygons

hyperplanes

circles

spheres

and

other

geometric

objects

Finally

in

Section

we

discuss

the

perturbation

technique

and

its

limitations

SoS

the

General

Idea

Degeneracies

occur

with

probability

zero

if

we

draw

a

finite

number

of

geometric

objects

each

represented

by

a

finite

set

of

numbers

from

the

-LRB-

infinite

-RRB-

set

of

all

such

objects

provided

there

is

no

bound

on

the

precision

of

the

numbers

used

In

real-life

computing

this

is

not

the

case

that

is

there

is

only

a

finite

set

of

available

numbers

and

thus

a

bound

on

the

precision

that

can

be

achieved

As

a

consequence

we

are

doomed

to

work

with

degenerate

data

On

the

other

hand

even

infinite

precision

does

not

guarantee

the

nonexistence

of

degeneracies

This

section

gives

the

general

outline

of

a

technique

called

the

Simulation

of

Simplicity

-LRB-

SoS

-RRB-

we

use

simple

as

a

synonym

for

nondegenerate

which

allows

us

to

neglect

degeneracies

when

we

write

programs

A

similar

but

less

elaborate

method

has

been

used

to

solve

degenerate

linear

programs

This

leads

to

the

implementation

of

the

simplex

algorithm

referred

to

as

the

lexicographical

method

-LRB-

see

-LSB-

-RSB-

-LSB-

-RSB-

-LSB-

-RSB-

or

-LSB-

-RSB-

for

details

-RRB-

In

computational

geometry

this

technique

has

been

used

in

a

couple

of

papers

including

-LSB-

-RSB-

and

-LSB-

-RSB-

to

avoid

the

otherwise

necessary

Simulation

of

Simplicity

discussion

of

degenerate

cases

This

paper

presents

the

theoretical

foundations

of

SoS

as

well

as

details

of

its

implementation

The

basic

idea

of

SoS

is

to

perturb

the

given

objects

slightly

which

amounts

to

changing

the

numbers

that

represent

the

objects

these

numbers

will

be

called

the

coordinates

or

the

parameters

of

the

objects

It

is

important

that

the

perturbation

is

small

enough

so

that

it

does

not

change

the

nondegenerate

position

of

objects

relative

to

each

other

Coming

up

with

such

a

perturbation

is

rather

difficult

and

may

require

much

higher

precision

than

used

for

the

original

set

of

objects

For

this

reason

we

perform

the

perturbation

only

symbolically

by

replacing

each

coordinate

by

a

polynomial

in

The

polynomials

will

be

chosen

in

such

a

way

that

the

perturbed

set

goes

towards

the

original

set

as

goes

to

zero

We

will

see

that

it

is

not

important

to

know

the

exact

value

of

to

perform

the

simulation

rather

it

is

sufficient

to

assume

that

is

positive

and

sufficiently

small

Thus

it

will

be

possible

to

use

as

an

indeterminant

and

to

handle

primitive

operations

symbolically

The

future

user

of

SoS

will

neither

have

to

be

concerned

with

the

role

that

plays

in

the

perturbation

nor

with

the

symbolic

manipulation

of

polynomials

We

may

think

of

SoS

as

a

package

that

provides

the

primitive

operations

needed

for

a

certain

computation

Ideally

the

inside

of

these

operations

is

hidden

from

the

user

who

communicates

with

them

like

with

an

oracle

It

turns

out

that

a

large

number

of

geometric

problems

can

be

solved

using

a

surprisingly

small

number

of

primitives

Some

of

these

primitives

will

be

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

perturb

a

set

of

objects

such

that

all

degeneracies

disappear

A

degeneracy

is

something

that

is

not

defined

in

general

its

definition

depends

on

the

problem

at

hand

More

specifically

it

depends

on

the

primitive

operations

used

to

solve

the

problem

For

example

a

primitive

operation

in

the

point-in-polygon

algorithm

described

in

the

introduction

tests

the

intersection

of

a

horizontal

half-line

and

a

line

segment

A

degeneracy

occurs

if

the

half-line

contains

one

or

both

endpoints

of

the

line

segment

A

set

of

objects

is

now

called

simple

or

nondegenerate

or

in

general

position

if

it

does

not

contain

any

degeneracy

We

thus

define

simplicity

relative

to

the

primitives

used

to

solve

a

problem

This

paper

considers

only

topological

primitives

that

is

operations

that

test

some

given

input

and

classify

it

as

one

of

a

constant

number

of

possible

cases

This

is

in

contrast

to

operations

that

compute

new

objects

such

as

the

intersection

of

a

half-line

and

a

line

segment

In

most

programs

such

an

object

serves

only

as

an

intermediate

result

anyway

but

an

intermediate

result

can

as

well

be

represented

implicitly

as

a

collection

of

pointers

and

a

tag

that

tells

us

in

what

sense

the

objects

identified

by

the

pointers

determine

the

-LRB-

implicit

-RRB-

result

To

simplify

our

discussion

even

further

we

restrict

our

attention

to

primitives

with

three

possible

outcomes

which

we

represent

by

and

where

indicates

a

degeneracy

and

and

distinguish

between

the

two

nondegenerate

cases

Tests

that

distinguish

between

more

than

two

nondegenerate

cases

can

be

obtained

by

combining

several

ternary

tests

If

we

think

of

a

primitive

operation

as

a

function

f

that

maps

a

high-dimensional

point

-LRB-

whose

coordinates

describe

the

input

objects

-RRB-

to

or

then

f

-LRB-

-RRB-

represents

the

set

of

degenerate

inputs

One

requirement

for

this

set

is

that

its

measure

in

this

high-dimensional

space

is

zero

otherwise

it

is

unreasonable

to

call

its

points

degenerate

A

set

of

n

objects

given

by

d

parameters

each

can

be

thought

of

as

a

point

in

nd

dimensions

If

f

takes

k

n

objects

as

input

then

f

-LRB-

-RRB-

is

a

surface

of

measure

zero

in

kd-dimensional

space

This

surface

defines

another

zero-measure

surface

in

nd

dimensions

which

is

obtained

by

embedding

f

-LRB-

-RRB-

in

the

kd-dimensional

subspace

Simulation

of

Simplicity

defined

by

the

k

objects

and

extending

it

orthogonal

to

this

subspace

along

the

other

coordinate

axes

Other

combinations

of

k

objects

provide

additional

zero-measure

surfaces

that

altogether

decompose

the

nd-dimensional

space

into

faces

of

various

dimensions

A

cell

is

an

nd-dimensional

face

of

this

decomposition

and

all

points

of

a

cell

correspond

to

nondegenerate

sets

of

objects

A

degenerate

set

corresponds

to

a

point

x

in

the

union

of

the

surfaces

denoted

by

S

Since

S

has

measure

zero

every

nonempty

open

ball

around

this

point

contains

a

point

y

of

some

cell

Moving

x

to

y

corresponds

now

to

perturbing

the

set

of

objects

that

x

corresponds

to

such

that

all

degeneracies

disappear

This

shows

that

a

perturbation

to

a

nondegenerate

set

is

always

possible

even

if

the

amount

of

perturbation

is

severely

limited

Recall

that

another

requirement

for

the

perturbation

is

that

it

does

not

change

any

nondegenerate

subconfiguration

This

means

that

we

should

not

move

x

across

a

surface

it

did

not

belong

to

initially

This

can

always

be

guaranteed

if

we

choose

the

open

ball

small

enough

that

it

does

not

intersect

any

surface

that

does

not

contain

the

initial

position

of

x.

To

follow

the

forthcoming

reasoning

it

is

not

necessary

for

the

reader

to

understand

the

topology

of

the

nd-dimensional

space

as

indicated

in

the

above

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

perturbation

that

removes

all

degeneracies

Below

we

discuss

such

perturbations

more

specifically

and

address

a

few

questions

concerning

the

efficient

implementation

of

SoS

Simplicity

is

simulated

by

applying

a

particular

perturbation

to

a

set

P

pn

of

n

geometric

objects

pi

-LRB-

ssi

ssi

ssi

;d

-RRB-

i

n

each

specified

by

d

parameters

It

will

be

important

that

each

object

has

a

unique

index

between

and

n

The

objects

are

in

arbitrary

and

therefore

not

necessarily

in

simple

position

The

perturbation

of

P

is

realized

by

replacing

each

parameter

by

a

polynomial

in

We

define

P

-LRB-

-RRB-

fpi

-LRB-

-RRB-

-LRB-

ssi

-LRB-

-RRB-

ssi

-LRB-

-RRB-

ssi

;d

-LRB-

-RRB-

-RRB-

j

i

n

where

ssi

j

-LRB-

-RRB-

ssi

j

-LRB-

i

j

-RRB-

for

i

n

j

d

and

-LRB-

i

j

-RRB-

a

polynomial

in

that

goes

to

zero

when

goes

to

zero

We

will

refer

to

the

new

parameters

ssi

j

-LRB-

-RRB-

the

new

objects

pi

-LRB-

-RRB-

and

the

new

set

P

-LRB-

-RRB-

as

the

expansions

of

the

original

parameters

ssi

j

the

original

objects

pi

and

the

original

set

P

respectively

The

choice

of

the

polynomials

-LRB-

i

j

-RRB-

will

be

guided

by

three

requirements

SoS

has

to

meet

-LRB-

a

-RRB-

P

-LRB-

-RRB-

must

be

simple

if

is

sufficiently

small

-LRB-

b

-RRB-

P

-LRB-

-RRB-

must

retain

all

nondegenerate

properties

of

the

original

set

P

-LRB-

c

-RRB-

The

computational

overhead

caused

by

simulating

P

-LRB-

-RRB-

should

be

negligible

As

mentioned

before

condition

-LRB-

b

-RRB-

is

automatically

met

if

is

small

enough

To

satisfy

-LRB-

a

-RRB-

it

is

sufficient

to

choose

the

-LRB-

i

j

-RRB-

such

that

there

is

no

nonempty

open

interval

I

with

the

property

that

P

-LRB-

-RRB-

is

not

simple

if

I.

Think

of

P

as

a

point

x

in

nd

dimensions

and

let

x

-LRB-

-RRB-

be

the

point

that

corresponds

to

P

-LRB-

-RRB-

The

points

x

-LRB-

-RRB-

form

a

one-dimensional

curve

C

in

nd

dimensions

Thus

-LRB-

a

-RRB-

is

satisfied

if

C

S

is

a

discrete

set

of

points

-LRB-

Recall

that

S

represents

all

points

in

nd

dimensions

that

correspond

to

degenerate

sets

P

-RRB-

In

this

topological

setting

the

phrase

sufficiently

small

gets

a

specific

meaning

If

is

the

smallest

value

of

such

that

x

-LRB-

-RRB-

S

then

is

sufficiently

small

if

and

only

if

It

is

less

clear

how

condition

-LRB-

c

-RRB-

influences

the

choice

of

the

-LRB-

i

j

-RRB-

Below

we

formulate

a

criterion

for

the

polynomials

-LRB-

i

j

-RRB-

that

Simulation

of

Simplicity

leads

to

an

efficient

implementation

of

SoS

However

we

do

not

claim

that

other

choices

of

the

-LRB-

i

j

-RRB-

can

not

lead

to

efficient

implementations

too

Recall

that

a

primitive

operation

is

a

function

f

that

maps

a

set

Q

of

k

objects

to

or

If

the

expansion

is

defined

properly

then

f

-LRB-

Q

-LRB-

-RRB-

-RRB-

f

provided

is

small

enough

In

general

f

-LRB-

Q

-LRB-

-RRB-

-RRB-

will

be

the

sign

of

a

fairly

complicated

function

in

-LRB-

Since

f

is

now

a

binary

function

we

can

identify

f

with

ftrue

falseg

and

express

it

as

a

predicate

We

will

follow

this

practice

in

the

following

sections

of

this

paper

-RRB-

One

way

to

allow

for

an

efficient

evaluation

of

f

-LRB-

Q

-LRB-

-RRB-

-RRB-

is

to

choose

the

-LRB-

i

j

-RRB-

in

different

orders

of

magnitude

such

that

two

expressions

each

consisting

of

several

factors

of

the

form

-LRB-

i

j

-RRB-

can

be

compared

solely

on

the

basis

of

the

index

pairs

-LRB-

i

j

-RRB-

involved

When

we

evaluate

f

-LRB-

Q

-LRB-

-RRB-

-RRB-

we

can

sort

its

terms

in

order

of

decreasing

significance

which

can

be

done

by

comparing

sets

of

index

pairs

The

most

significant

term

will

be

a

term

without

any

factor

it

will

be

equal

to

f

-LRB-

Q

-RRB-

The

first

term

with

a

nonzero

coefficient

decides

the

sign

of

the

function

If

Q

is

nondegenerate

to

begin

with

then

f

-LRB-

Q

-LRB-

-RRB-

-RRB-

f

-LRB-

Q

-RRB-

and

no

other

term

has

to

be

determined

In

Sections

and

we

will

see

that

such

a

choice

of

the

-LRB-

i

j

-RRB-

allows

us

to

determine

the

sign

of

a

fairly

complicated

polynomial

in

only

a

few

steps

Note

that

SoS

requires

us

to

tell

when

Q

is

degenerate

which

means

that

we

need

to

be

able

to

decide

whether

or

not

f

-LRB-

Q

-RRB-

This

is

not

possible

with

the

kind

of

floating-point

arithmetic

that

it

is

usually

provided

by

current

computers

Instead

we

need

to

use

exact

arithmetic

and

thus

occasionally

long

integers

These

admittedly

somewhat

expensive

operations

occur

only

inside

the

primitives

and

do

not

concern

the

user

of

SoS

Furthermore

the

length

of

such

long

integers

is

bounded

by

a

constant

if

kd

the

number

of

input

parameters

of

f

is

bounded

by

a

constant

In

most

geometric

algorithms

this

constant

is

reasonably

small

In

Section

we

report

on

our

experience

in

implementing

SoS

and

give

an

indication

to

what

extent

the

use

of

long

integer

arithmetic

slows

down

the

computation

This

point

can

not

be

taken

lightly

because

the

long

integer

arithmetic

is

likely

to

occur

in

the

innermost

loop

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

peculiar

feature

of

SoS

itself

but

is

necessary

whenever

we

do

exact

computation

rather

than

push

our

luck

and

hope

for

the

cancellation

of

round-off

errors

Finite

Point

Sets

a

Case

Study

For

a

further

discussion

of

SoS

it

is

advantageous

to

apply

it

to

certain

geometric

objects

and

certain

primitive

operations

defined

for

these

objects

We

choose

points

in

the

d-dimensional

Euclidean

space

Ed

as

the

objects

for

the

case

study

Notice

that

this

is

actually

no

loss

of

generality

since

every

object

specified

by

d

parameters

can

be

interpreted

as

a

point

in

Ed

The

primitive

operation

that

we

will

consider

takes

d

points

as

input

and

decides

on

which

side

of

the

hyperplane

spanned

by

the

last

d

points

the

first

point

lies

As

we

will

see

in

Section

this

primitive

operation

has

a

wide

range

of

applications

If

a

given

finite

point

set

is

perturbed

as

explained

in

Section

one

can

ignore

all

degeneracies

and

special

cases

The

price

for

this

simulated

simplicity

is

that

the

coordinates

of

the

points

are

now

symbolic

expressions

in

Even

for

a

simple

task

such

as

the

comparison

of

two

coordinates

we

need

a

custom-made

procedure

that

handles

the

expansions

of

the

coordinates

Let

ssi

j

be

the

j-th

coordinate

of

point

pi

and

let

ssk

l

be

the

l-th

coordinate

of

pk

i

k

n

and

Simulation

of

Simplicity

j

l

d.

To

decide

which

one

of

the

two

corresponding

perturbed

coordinates

is

smaller

we

define

a

predicate

Smaller

as

follows

Smaller

-LRB-

ssi

j

ssk

l

-RRB-

true

iff

ssi

j

-LRB-

-RRB-

ssk

l

-LRB-

-RRB-

Due

to

SoS

we

can

neglect

degeneracies

i.e.

we

have

ssi

j

-LRB-

-RRB-

ssk

l

-LRB-

-RRB-

and

for

this

reason

the

predicate

Smaller

-LRB-

ssi

j

ssk

l

-RRB-

false

if

and

only

if

ssi

j

-LRB-

-RRB-

ssk

l

-LRB-

-RRB-

The

implementation

of

this

predicate

is

fairly

straightforward

since

we

can

compare

the

terms

-LRB-

i

j

-RRB-

and

-LRB-

k

l

-RRB-

by

comparing

the

defining

index

pairs

-LRB-

see

Section

Lemma

-RRB-

Predicate

-LRB-

Smaller

-RRB-

Assume

the

expansion

-LRB-

i

j

-RRB-

defined

as

in

Section

-LRB-

-RRB-

With

this

for

indices

i

k

n

and

j

l

d

which

satisfy

-LRB-

i

j

-RRB-

-LRB-

k

l

-RRB-

the

predicate

Smaller

-LRB-

ssi

j

ssk

l

-RRB-

can

be

implemented

as

follows

function

Smaller

-LRB-

ssi

j

ssk

l

-RRB-

returns

Boolean

begin

if

ssi

j

ssk

l

then

return

-LRB-

ssi

j

ssk

l

-RRB-

else

if

i

k

then

return

-LRB-

i

k

-RRB-

else

return

-LRB-

j

l

-RRB-

end

Notice

that

in

this

case

the

coordinates

ssi

j

and

ssk

l

as

well

as

their

index

pairs

-LRB-

i

j

-RRB-

and

-LRB-

k

l

-RRB-

have

to

be

passed

as

arguments

whenever

predicate

Smaller

is

called

This

means

that

in

popular

programming

languages

such

as

Pascal

the

function

heading

would

be

something

like

FUNCTION

smaller

-LRB-

i

j

k

l

Pij

Pkl

-RRB-

Boolean

but

implementation

details

like

this

will

be

ignored

in

the

remainder

of

the

paper

Furthermore

notice

that

we

have

Smaller

-LRB-

ssi

j

ssk

l

-RRB-

true

iff

det

ssi

j

-LRB-

-RRB-

ssk

l

-LRB-

-RRB-

In

Section

we

will

express

more

complicated

predicates

than

just

comparisons

of

coordinates

by

similar

determinants

For

matrices

not

exceeding

a

given

size

it

is

not

difficult

to

specify

the

expansion

-LRB-

i

j

-RRB-

such

that

all

requirements

discussed

in

Section

are

satisfied

This

will

be

done

in

Section

Finally

Section

extends

the

results

to

homogeneous

coordinates

The

procedures

that

implement

the

predicates

will

be

developed

in

Section

Predicates

Expressed

by

Determinants

This

section

introduces

the

notion

of

orientation

of

a

sequence

of

d

points

in

Ed

With

this

concept

we

will

be

able

to

give

an

implementation

of

the

primitive

operation

for

d

points

mentioned

above

Simulation

of

Simplicity

The

orientation

of

a

sequence

of

points

-LRB-

pid

-RRB-

in

Ed

is

either

negative

or

positive

unless

the

d

points

lie

in

a

common

hyperplane

in

which

case

the

orientation

is

undefined

The

exceptional

case

is

a

degeneracy

that

can

be

ignored

if

the

points

are

perturbed

We

define

the

orientation

of

a

sequence

recursively

It

will

be

important

that

the

orientation

of

a

sequence

depends

only

on

the

relative

position

of

the

points

to

each

other

and

not

on

their

absolute

positions

If

the

dimension

d

then

the

orientation

of

-LRB-

-RRB-

is

positive

if

and

it

is

negative

if

-LRB-

compare

with

Figure

-LRB-

a

-RRB-

and

-LRB-

b

-RRB-

-RRB-

If

d

then

-LRB-

-RRB-

has

positive

orientation

if

the

three

points

define

a

left-turn

in

the

plane

that

is

lies

to

the

left

of

the

directed

line

that

passes

through

and

in

this

order

If

-LRB-

-RRB-

defines

a

right-turn

then

its

orientation

is

negative

Note

that

the

orientation

of

-LRB-

-RRB-

is

the

same

as

the

orientation

of

-LRB-

-RRB-

as

seen

from

Indeed

the

line

through

and

can

be

identified

with

as

soon

as

we

choose

a

direction

of

the

line

This

direction

is

provided

by

the

location

of

It

goes

from

left

to

right

as

seen

from

-LRB-

see

Figure

-LRB-

c

-RRB-

and

-LRB-

d

-RRB-

-RRB-

-LRB-

a

-RRB-

positive

-LRB-

b

-RRB-

negative

-LRB-

c

-RRB-

positive

-LRB-

d

-RRB-

negative

Figure

The

orientation

of

d

points

in

dimension

d

for

d

If

d

then

the

orientation

of

-LRB-

pid

-RRB-

is

the

same

as

the

orientation

of

-LRB-

pid

-RRB-

as

seen

from

For

example

-LRB-

-RRB-

in

has

positive

orientation

if

observes

-LRB-

-RRB-

making

a

left-turn

In

most

situations

where

the

concept

of

orientation

is

used

the

interest

is

in

the

position

of

one

point

relative

to

d

other

points

pid

We

thus

say

that

lies

on

the

positive

side

of

-LRB-

pid

-RRB-

if

-LRB-

pid

-RRB-

has

positive

orientation

and

lies

on

the

negative

side

of

-LRB-

pid

-RRB-

if

-LRB-

pid

-RRB-

has

negative

orientation

To

decide

upon

the

orientation

of

a

sequence

of

d

points

in

Ed

we

use

the

matrix

BBBB

;d

;d

ssid

ssid

ssid

;d

CCCCA

-LRB-

-RRB-

Lemma

The

orientation

of

-LRB-

pid

-RRB-

is

positive

if

and

only

if

sign

-LRB-

det

-RRB-

and

it

is

negative

if

and

only

if

sign

-LRB-

det

-RRB-

Notice

that

det

vanishes

if

and

only

if

the

d

points

are

degenerate

that

is

they

lie

in

a

common

hyperplane

a

case

that

can

be

neglected

within

the

perturbed

point

set

P

-LRB-

-RRB-

Recall

from

linear

algebra

that

the

determinant

of

a

matrix

is

multiplied

by

if

we

exchange

two

rows

Thus

the

orientation

of

a

permutation

of

-LRB-

pid

-RRB-

is

the

same

as

the

orientation

of

the

sequence

itself

if

the

number

of

transpositions

is

even

otherwise

its

orientation

is

the

opposite

of

the

orientation

of

-LRB-

pid

-RRB-

Simulation

of

Simplicity

There

are

plenty

of

algorithms

for

point

set

problems

which

are

based

on

computing

the

orientation

of

a

sequence

of

points

Prime

examples

are

the

construction

of

convex

hulls

-LRB-

see

-LSB-

-RSB-

-LSB-

-RSB-

-LSB-

-RSB-

-LSB-

-RSB-

or

-LSB-

-RSB-

-RRB-

computing

matrices

as

discussed

in

-LSB-

-RSB-

and

-LSB-

-RSB-

and

finding

convex

subsets

-LRB-

see

-LSB-

-RSB-

-LSB-

-RSB-

and

-LSB-

-RSB-

-RRB-

The

remainder

of

this

section

considers

the

primitive

operations

required

by

the

three-dimensional

convex

hull

algorithm

of

Preparata

and

Hong

which

is

described

in

-LSB-

-RSB-

-LSB-

-RSB-

and

-LSB-

-RSB-

The

first

step

of

the

algorithm

sorts

the

points

in

To

perform

this

step

it

needs

to

compare

the

of

two

points

which

can

be

done

by

computing

the

orientation

of

their

orthogonal

projections

onto

the

Second

it

constructs

the

two-dimensional

convex

hull

of

the

points

projected

onto

the

Here

the

primitive

operation

is

to

decide

whether

three

points

-LRB-

in

the

-RRB-

define

a

left-turn

or

a

right-turn

Third

the

algorithm

constructs

the

three-dimensional

convex

hull

by

repeating

the

following

operation

Given

a

plane

pivoting

about

two

extreme

points

and

find

the

point

hit

first

by

this

plane

This

operation

can

be

reduced

to

a

number

of

comparisons

of

the

form

Given

two

points

and

which

one

is

hit

earlier

by

the

pivoting

plane

To

perform

such

a

comparison

is

equivalent

to

deciding

on

which

side

of

the

plane

through

and

point

lies

This

is

the

same

as

computing

the

orientation

of

-LRB-

-RRB-

Thus

we

see

that

the

convex

hull

algorithm

of

Preparata

and

Hong

requires

three

primitive

operations

all

of

which

determine

the

orientation

of

point

sequences

Choosing

the

Form

of

the

Perturbation

As

explained

in

Section

the

primitive

operation

that

determines

the

orientation

of

a

sequence

of

d

points

in

d

dimensions

computes

the

sign

of

a

determinant

of

a

-LRB-

d

-RRB-

by

-LRB-

d

-RRB-

matrix

SoS

replaces

the

coordinates

ssi

j

in

this

matrix

by

entries

of

the

form

ssi

j

-LRB-

i

j

-RRB-

The

determinant

itself

is

then

the

sum

of

a

finite

number

of

terms

where

each

term

is

the

product

of

d

items

and

an

item

is

either

an

original

coordinate

or

an

-LRB-

i

j

-RRB-

Thus

each

term

consists

of

a

coefficient

which

is

the

product

of

original

coordinates

and

a

so-called

product

a

product

of

factors

of

the

form

-LRB-

i

j

-RRB-

The

number

of

factors

-LRB-

i

j

-RRB-

can

be

zero

in

which

case

the

product

is

defined

to

be

equal

to

As

mentioned

in

Section

it

is

irrelevant

what

exactly

the

definition

of

the

expansion

is

as

long

as

it

satisfies

certain

requirements

The

computational

simulation

is

uneffected

if

we

change

the

definition

of

the

expansion

within

allowed

limits

Even

so

it

is

important

to

show

that

there

is

at

least

one

expansion

that

satisfies

the

requirements

The

existence

of

such

an

expansion

implies

the

physical

existence

of

an

appropriately

perturbed

point

set

which

is

the

only

guarantee

for

the

consistency

of

our

method

we

have

We

define

-LRB-

i

j

-RRB-

ffi?j

-LRB-

-RRB-

for

i

n

j

d

and

ffi

d

and

show

that

this

choice

satisfies

all

the

requirements

of

SoS

Notice

that

the

amount

of

perturbation

experienced

by

coordinate

ssi

j

is

larger

than

the

perturbation

of

ssk

l

if

and

only

if

-LRB-

i

j

-RRB-

OE

-LRB-

k

l

-RRB-

that

is

i

k

or

i

k

and

j

l.

Furthermore

we

have

Y

-LRB-

i

j

-RRB-

OE

-LRB-

k

l

-RRB-

-LRB-

i

j

-RRB-

Y

-LRB-

i

j

-RRB-

OE

-LRB-

k

l

-RRB-

ffi?j

ffi?l

-LRB-

k

l

-RRB-

-LRB-

-RRB-

Simulation

of

Simplicity

if

This

is

equivalent

to

stating

that

ffi?l

the

exponent

of

-LRB-

k

l

-RRB-

is

larger

than

the

sum

of

the

exponents

of

all

-LRB-

i

j

-RRB-

with

-LRB-

i

j

-RRB-

OE

-LRB-

k

l

-RRB-

It

follows

that

it

is

sufficient

to

consider

the

sets

of

index

pairs

when

we

compare

two

products

Let

and

be

two

different

products

and

let

I

-LRB-

-RRB-

and

I

-LRB-

-RRB-

be

the

two

associated

sets

of

index

pairs

We

call

I

-LRB-

-RRB-

smaller

than

I

-LRB-

-RRB-

if

the

set

I

-LRB-

-RRB-

I

-LRB-

-RRB-

is

empty

or

if

-LRB-

i

j

-RRB-

OE

-LRB-

k

l

-RRB-

for

-LRB-

i

j

-RRB-

the

largest

index

pair

in

I

-LRB-

-RRB-

I

-LRB-

-RRB-

and

-LRB-

k

l

-RRB-

the

largest

index

pair

in

I

-LRB-

-RRB-

I

-LRB-

-RRB-

Lemma

Let

and

be

two

positive

constants

and

let

and

be

two

different

products

Then

for

a

small

enough

if

I

-LRB-

-RRB-

is

smaller

than

I

-LRB-

-RRB-

Lemma

is

an

immediate

consequence

of

-LRB-

-RRB-

and

the

fact

that

a

small

enough

can

compensate

the

influence

of

the

constants

and

Notice

that

it

is

actually

irrelevant

which

index

pairs

I

-LRB-

-RRB-

and

I

-LRB-

-RRB-

contain

The

only

thing

of

importance

is

the

relative

position

of

I

-LRB-

-RRB-

and

I

-LRB-

-RRB-

in

the

ordering

of

all

sets

of

index

pairs

where

large

index

pairs

are

more

significant

in

the

comparison

of

sets

than

small

index

pairs

Observe

also

that

Lemma

holds

if

we

increase

the

value

of

ffi

in

the

definition

of

the

expansion

It

turns

out

that

this

lemma

is

the

crucial

property

that

allows

us

to

prove

that

P

-LRB-

-RRB-

the

perturbed

point

set

is

simple

and

that

the

orientation

of

d

points

in

P

-LRB-

-RRB-

can

be

computed

efficiently

Lemma

The

set

P

-LRB-

-RRB-

is

nondegenerate

if

is

sufficiently

small

Proof

To

prove

the

assertion

we

show

that

for

no

choice

of

d

mutually

distinct

indices

id

the

determinant

of

the

matrix

-LRB-

-RRB-

BBBBB

ffi

ffi

;d

ffi?d

ffi

ffi

;d

ffi?d

ssid

ffi

ssid

ffi

ssid

;d

ffi?d

CCCCCA

-LRB-

-RRB-

is

equal

to

zero

To

see

this

we

assume

w.l.o.g.

that

id

n

and

sort

the

terms

of

det

-LRB-

-RRB-

in

order

of

increasing

exponents

of

Specifically

det

is

the

first

term

and

-LRB-

-RRB-

dd

ffi?d

-LRB-

d

-RRB-

id?ffi

the

last

one

Each

term

is

of

the

form

b

c

for

some

constants

b

and

c.

Because

we

can

assume

that

is

arbitrarily

small

the

absolute

value

of

the

first

term

with

nonzero

coefficient

b

is

bigger

than

the

sum

of

all

other

terms

Furthermore

such

a

term

always

exists

since

-LRB-

-RRB-

guarantees

that

no

two

terms

of

the

determinant

have

the

same

exponent

of

and

thus

such

a

term

can

not

cancel

For

example

the

coefficient

of

the

last

term

is

-LRB-

-RRB-

dd

and

can

not

be

canceled

by

any

other

term

Consequently

det

-LRB-

-RRB-

does

not

vanish

As

pointed

out

in

the

proof

of

Lemma

the

most

significant

term

of

the

polynomial

det

-LRB-

-RRB-

is

the

determinant

det

of

the

original

coordinates

If

the

orientation

of

the

original

sequence

-LRB-

pid

-RRB-

is

defined

then

this

term

is

nonzero

which

implies

that

the

orientation

of

the

perturbed

sequence

is

the

same

This

is

reassuring

since

it

shows

that

the

perturbation

does

not

change

nondegenerate

relations

of

the

original

point

set

Simulation

of

Simplicity

The

curious

reader

might

wonder

why

the

perturbation

is

defined

in

the

peculiar

form

given

by

the

expansion

-LRB-

-RRB-

As

mentioned

before

there

are

many

other

choices

that

could

be

used

for

example

-LRB-

i

j

-RRB-

ffi

j

is

such

a

possibility

This

expansion

would

also

work

but

its

implementation

is

slightly

more

difficult

than

that

of

-LRB-

-RRB-

-LRB-

compare

with

Section

-RRB-

On

the

other

hand

many

less

exotic

choices

do

not

work

The

remainder

of

this

section

illustrates

this

by

considering

two

choices

of

-LRB-

i

j

-RRB-

which

appear

simpler

than

-LRB-

-RRB-

The

two

choices

are

-LRB-

i

j

-RRB-

i?ffi

j

and

-LRB-

i

j

-RRB-

-LRB-

i

ffi

j

-RRB-

In

both

cases

Lemma

does

not

hold

The

reason

for

the

failure

is

that

both

expansions

do

not

satisfy

-LRB-

-RRB-

and

thus

possibly

lead

to

cancellations

of

terms

in

det

-LRB-

-RRB-

Such

cancellations

occur

for

example

if

all

d

points

of

the

sequence

coincide

with

the

origin

In

this

case

the

matrix

-LRB-

-RRB-

equals

BBBB

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

d

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

d

-RRB-

-LRB-

id

-RRB-

-LRB-

id

-RRB-

-LRB-

id

d

-RRB-

CCCCA

If

we

define

-LRB-

i

j

-RRB-

i?ffi

j

then

the

second

column

is

equal

to

times

the

first

column

which

implies

that

det

-LRB-

-RRB-

if

d

If

-LRB-

i

j

-RRB-

-LRB-

i

ffi

j

-RRB-

then

the

sum

of

the

first

and

the

third

columns

equals

twice

the

second

column

hence

det

-LRB-

-RRB-

if

d

Homogeneous

Coordinates

When

we

develop

the

primitive

procedures

for

computing

the

orientation

of

d

points

in

Section

we

represent

a

point

by

its

homogeneous

coordinates

This

representation

is

slightly

more

general

than

ordinary

Cartesian

coordinates

-LRB-

it

can

also

represent

points

at

infinity

-RRB-

and

leads

to

a

slightly

more

uniform

procedural

treatment

Let

p

be

a

point

in

Ed

and

let

-LRB-

ssCd

-RRB-

be

its

sequence

of

Cartesian

coordinates

Point

p

has

d

homogeneous

coordinates

-LRB-

ssHd

ssHd

-RRB-

such

that

ssCi

ssHi

ssHd

for

i

d

Thus

p

is

ssHd

times

the

point

whose

Cartesian

coordinates

are

equal

to

the

first

d

homogeneous

coordinates

of

p.

Notice

that

the

homogeneous

coordinates

of

p

are

not

unique

we

still

represent

the

same

point

p

if

we

multiply

each

coordinate

by

the

same

nonzero

scalar

If

we

decrease

the

absolute

value

of

ssHd

without

changing

the

other

homogeneous

coordinates

then

p

moves

away

from

the

origin

on

a

straight

line

and

it

reaches

infinity

when

ssHd

becomes

Indeed

p

is

at

infinity

if

and

only

if

ssHd

Using

homogeneous

coordinates

it

is

not

allowed

to

have

all

d

coordinates

are

equal

to

in

this

event

p

is

not

defined

Simulation

of

Simplicity

We

next

extend

Lemma

to

homogeneous

coordinates

that

is

we

characterize

the

orientation

of

a

sequence

of

d

points

-LRB-

pid

-RRB-

pi

-LRB-

ssHi

ssHi

ssHi

;d

ssHi

;d

-RRB-

in

terms

of

their

homogeneous

coordinates

The

orientation

of

a

sequence

of

d

points

is

not

defined

if

any

of

the

points

lies

at

infinity

In

fact

it

is

not

possible

to

generalize

the

notion

of

orientation

to

points

at

infinity

without

changing

our

interpretation

of

a

point

at

infinity

For

example

consider

a

sequence

S

of

d

finite

points

and

one

point

p

-LRB-

ssHd

-RRB-

at

infinity

We

can

think

of

p

as

the

limit

of

points

p

-LRB-

ffl

-RRB-

-LRB-

ssHd

ffl

-RRB-

when

ffl

goes

to

zero

but

as

well

we

can

think

of

p

as

the

limit

of

these

points

if

ffl

is

negative

and

approaches

zero

If

we

replace

p

by

p

-LRB-

ffl

-RRB-

with

ffl

small

enough

then

ffl

and

ffl

lead

to

different

orientations

We

thus

restrict

our

discussion

of

orientation

to

finite

points

Define

BBBB

;d

;d

ssHid

ssHid

ssHid

;d

CCCCA

-LRB-

-RRB-

If

ssHi

;d

for

d

then

is

the

same

as

the

matrix

used

in

Lemma

Otherwise

we

can

multiply

the

rows

such

that

ssHi

;d

The

sign

of

det

changes

if

we

multiply

a

row

with

a

negative

number

which

implies

the

following

result

Lemma

Let

-LRB-

pid

-RRB-

be

a

sequence

of

points

with

pi

-LRB-

ssHi

ssHi

ssHi

;d

ssHi

;d

-RRB-

and

ssHi

;d

Their

orientation

is

positive

if

sign

-LRB-

det

-RRB-

Qd

sign

-LRB-

ssHi

;d

-RRB-

negative

if

sign

-LRB-

det

-RRB-

Qd

sign

-LRB-

ssHi

;d

-RRB-

and

undefined

if

det

In

contrast

to

Cartesian

coordinates

a

point

is

now

represented

by

d

coordinates

which

makes

it

necessary

to

choose

ffi

d

when

defining

the

expansion

-LRB-

i

j

-RRB-

in

-LRB-

-RRB-

With

this

it

is

easy

to

prove

that

determinants

can

not

vanish

which

implies

that

Lemma

holds

also

for

the

new

setting

using

homogeneous

coordinates

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

points

as

defined

in

Section

Its

implementation

will

be

based

on

the

expansion

specified

in

Section

-LRB-

-RRB-

and

on

the

fact

that

the

orientation

can

be

found

by

evaluating

the

sign

of

a

determinant

as

stated

in

Sections

and

The

crux

of

the

implementation

is

that

this

determinant

is

a

polynomial

in

The

computation

of

the

sign

of

such

a

polynomial

is

discussed

in

Section

The

coefficients

of

the

polynomial

turn

out

to

be

subdeterminants

of

the

original

matrix

Based

on

this

observation

Section

gives

an

algorithm

that

generates

these

subdeterminants

in

sequence

of

decreasing

significance

by

employing

a

special

encoding

scheme

Finally

in

Section

we

will

briefly

address

the

problem

of

sign

computation

of

integer

determinants

in

general

Simulation

of

Simplicity

In

Sections

and

we

defined

the

orientation

of

a

sequence

of

points

in

d-dimensional

Euclidean

space

given

by

Cartesian

and

homogeneous

coordinates

We

now

formally

develop

the

corresponding

predicate

that

uses

perturbation

in

the

sense

of

SoS

In

the

Cartesian

case

each

point

p

is

given

by

its

d

coordinates

p

-LRB-

ss

ss

;d

-RRB-

whereas

in

the

case

of

homogeneous

coordinates

a

point

is

represented

by

a

-LRB-

d

-RRB-

tupel

p

-LRB-

ss

ss

;d

ss

;d

-RRB-

Let

P

pn

be

a

set

of

n

points

in

Ed

and

denote

by

P

-LRB-

-RRB-

-LRB-

-RRB-

pn

-LRB-

-RRB-

g

its

perturbed

version

using

the

expansion

of

Section

-LRB-

-RRB-

assuming

ffi

large

enough

such

that

Lemma

is

valid

Now

define

for

d

points

with

distinct

indices

id

all

in

the

range

from

through

n

Positived

-LRB-

pid

-RRB-

true

iff

the

orientation

of

-LRB-

-LRB-

-RRB-

pid

-LRB-

-RRB-

-RRB-

is

positive

Degenerate

cases

can

be

neglected

because

we

simulate

simplicity

From

Lemma

it

follows

that

Positived

is

equivalent

to

the

test

whether

or

not

sign

-LRB-

det

-LRB-

-RRB-

-RRB-

with

-LRB-

-RRB-

denoting

the

the

corresponding

matrix

of

the

perturbed

Cartesian

coordinates

as

in

-LRB-

-RRB-

In

the

homogeneous

case

-LRB-

see

Lemma

-RRB-

we

have

to

check

whether

or

not

sign

-LRB-

det

-LRB-

-RRB-

-RRB-

dY

sign

-LRB-

ssi

;d

-LRB-

-RRB-

-RRB-

Here

-LRB-

-RRB-

denotes

the

perturbed

version

of

matrix

in

-LRB-

-RRB-

whose

rows

are

formed

by

the

homogeneous

coordinates

of

the

points

involved

that

is

-LRB-

-RRB-

BBBB

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

d

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

d

-RRB-

ssid

-LRB-

id

-RRB-

ssid

-LRB-

id

-RRB-

ssid

;d

-LRB-

id

d

-RRB-

CCCCA

At

first

sight

the

development

of

such

an

determinant

seems

to

be

a

painful

exercise

Yet

it

will

turn

out

that

it

is

not

that

hard

and

can

be

achieved

in

an

algorithmically

clean

way

Anyway

to

begin

with

something

easy

consider

det

-LRB-

-RRB-

det

ssi

-LRB-

i

-RRB-

ssi

-LRB-

i

-RRB-

ssj

-LRB-

j

-RRB-

ssj

-LRB-

j

-RRB-

Simulation

of

Simplicity

Let

-LRB-

-LRB-

-RRB-

-LRB-

ik

jk

-RRB-

-RRB-

Qk

-LRB-

i

j

-RRB-

and

call

it

a

k-fold

product

-LRB-

-RRB-

is

called

the

product

Furthermore

assume

i

j

When

we

now

develop

the

determinant

we

get

det

-LRB-

-RRB-

ssi

ssi

ssj

ssj

-LRB-

-RRB-

ssj

-LRB-

i

-RRB-

ssj

-LRB-

i

-RRB-

ssi

-LRB-

j

-RRB-

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

ssi

-LRB-

j

-RRB-

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LRB-

-RRB-

where

the

terms

are

already

sorted

by

increasing

powers

of

Note

again

that

the

first

coefficient

corresponds

to

the

unperturbed

determinant

i.e.

whose

evaluation

would

be

part

of

any

implementation

of

the

predicate

of

course

followed

by

the

more

or

less

awkward

handling

of

all

possible

degeneracies

Observe

also

that

the

coefficient

of

the

fifth

term

is

a

constant

namely

Thus

the

last

two

terms

have

no

influence

on

the

sign

of

det

-LRB-

-RRB-

Therefore

the

number

of

relevant

terms

of

the

polynomial

det

-LRB-

-RRB-

is

only

rather

than

which

is

the

total

number

of

terms

It

is

convenient

to

assume

id

-LRB-

compare

with

-LRB-

-RRB-

-RRB-

This

assumption

together

with

Lemma

implies

that

the

sign

of

det

-LRB-

-RRB-

and

det

-LRB-

-RRB-

can

be

computed

without

any

further

knowledge

of

the

values

of

the

indices

Clearly

this

is

not

the

case

in

general

but

can

always

be

achieved

by

appropriate

row

exchanges

in

-LRB-

-RRB-

or

-LRB-

-RRB-

recall

that

each

exchange

changes

the

sign

of

the

determinant

For

this

assume

a

procedure

Sortd

-LRB-

-LRB-

id

-RRB-

-LRB-

-RRB-

-RRB-

that

returns

for

a

given

sequence

of

d

indices

-LRB-

id

-RRB-

the

sorted

sequence

-LRB-

-RRB-

Additionally

Sortd

returns

which

is

set

to

the

number

of

exchanges

used

We

can

now

implement

predicate

Positived

using

two

operations

SignDet

and

SignDet

that

compute

the

sign

of

the

polynomials

det

-LRB-

-RRB-

and

det

-LRB-

-RRB-

assuming

id

Both

functions

will

be

discussed

in

Section

Predicate

-LRB-

Positive

-RRB-

Let

pid

be

d

points

in

Ed

given

in

Cartesian

or

homogeneous

coordinates

with

distinct

indices

all

between

and

n

Then

the

following

pseudocode

is

an

implementation

of

the

predicate

Positived

Simulation

of

Simplicity

function

Positived

-LRB-

pid

-RRB-

returns

Boolean

local

begin

Sortd

-LRB-

-LRB-

id

-RRB-

-LRB-

-RRB-

-RRB-

if

Cartesian

coordinates

then

SignDet?d

BB

-LRB-

-RRB-

;d

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

CCA

else

SignDet?d

BB

-LRB-

-RRB-

;d

-LRB-

-RRB-

;d

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

;d

-LRB-

-RRB-

CCA

if

odd

-LRB-

-RRB-

then

if

Cartesian

coordinates

then

return

-LRB-

-RRB-

else

return

-LRB-

Qd

sign

-LRB-

ssi

;d

-LRB-

-RRB-

-RRB-

-RRB-

end

The

problem

is

now

to

give

efficient

implementations

for

the

two

functions

SignDet

d

and

SignDet?d

We

feel

that

it

is

important

to

stress

that

efficiency

is

meant

in

a

practical

sense

in

theory

it

can

be

done

in

constant

time

anyway

assuming

d

is

a

constant

The

Sign

of

a

Perturbed

Determinant

We

now

illustrate

the

implementation

of

SoS

on

the

bottommost

programming

level

by

implementing

function

SignDet?D

which

returns

the

sign

of

a

D-by-D

determinant

det

D

-LRB-

-RRB-

for

any

given

D

primitive

SignDet?D

can

be

treated

in

the

same

way

To

appreciate

the

significance

of

a

-LRB-

practically

-RRB-

efficient

implementation

of

SignDet?D

we

point

out

that

this

is

in

fact

the

major

part

of

SoS

at

least

when

applied

to

the

predicate

described

above

Provided

that

iD

we

will

show

that

it

is

possible

without

great

effort

to

generate

the

sequence

of

the

coefficients

of

det

D

-LRB-

-RRB-

in

decreasing

order

of

significance

Since

can

be

assumed

to

be

sufficiently

small

-LRB-

but

positive

-RRB-

the

sign

of

the

polynomial

is

therefore

equivalent

to

the

sign

of

the

first

nonvanishing

coefficient

Using

simple

rules

for

evaluating

a

determinant

as

exemplified

for

det

-LRB-

-RRB-

in

-LRB-

-RRB-

the

coefficient

of

every

term

in

det

D

-LRB-

-RRB-

is

a

subdeterminant

of

the

unperturbed

matrix

D.

Here

a

single

entry

is

called

a

subdeterminant

and

by

definition

the

subdeterminant

is

equal

to

To

tell

the

whole

truth

we

must

mention

that

each

coefficient

in

effect

is

a

subdeterminant

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

We

say

that

the

-LRB-

t

-RRB-

st

coefficient

in

order

of

decreasing

significance

denoted

by

det

M?D

t

is

the

cofactor

of

depth

t

of

matrix

D

-LRB-

-RRB-

Note

that

this

coefficient

already

includes

its

proper

sign

Thus

det

M?D

det

D

The

size

of

the

corresponding

matrix

-LRB-

i.e.

the

number

of

rows

or

columns

-RRB-

is

denoted

by

kt

k

-LRB-

M?D

t

-RRB-

These

definitions

are

illustrated

in

Table

which

shows

all

significant

terms

of

det

-LRB-

-RRB-

In

the

column

with

heading

t

we

display

the

product

associated

with

the

cofactor

of

depth

t

The

column

vt

will

be

explained

later

Simulation

of

Simplicity

t

kt

kt

vt

det

M

t

t

-LSB-

-RSB-

det

ssi

ssi

ssj

ssj

-LRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssj

-RRB-

ssj

-LRB-

i

-RRB-

-LSB-

-RSB-

det

-LRB-

ssj

-RRB-

ssj

-LRB-

i

-RRB-

-LSB-

-RSB-

det

-LRB-

ssi

-RRB-

ssi

-LRB-

j

-RRB-

-LSB-

-RSB-

det

-LRB-

-RRB-

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

Table

The

relevant

terms

of

det

-LRB-

-RRB-

This

leads

to

the

pseudocode

implementation

of

SignDet?D

shown

below

It

assumes

that

iD

and

that

the

sequence

of

subdeterminants

sorted

by

increasing

depth

is

known

The

code

also

requires

a

function

SignDet

k

-LRB-

-RRB-

that

calculates

the

sign

of

det

for

a

k-by-k

matrix

The

authors

have

not

been

able

to

find

an

alternative

way

to

determine

the

sign

but

to

compute

the

actual

determinant

Unfortunately

computing

the

-LRB-

exact

-RRB-

determinant

of

a

matrix

of

integers

demands

the

use

of

long

integer

arithmetic

More

about

that

in

Section

function

SignDet?D

-LRB-

D

-RRB-

returns

or

local

oe

kt

t

begin

t

repeat

t

t

kt

k

-LRB-

M?D

t

-RRB-

oe

SignDetkt

-LRB-

M?D

t

-RRB-

until

oe

return

oe

end

Function

SignDet?D

scans

through

the

table

of

relevant

subdeterminants

Two

lines

of

the

pseudocode

kt

k

-LRB-

M?D

t

-RRB-

and

oe

SignDetkt

-LRB-

M?D

t

-RRB-

indicate

table

lookups

In

Pascal

this

could

be

implemented

as

a

CASE-statement

For

D

it

would

consist

of

different

cases

as

shown

below

CASE

t

OF

s

-LRB-

-RRB-

s

Sign

-LRB-

-RRB-

s

Sign

-LRB-

-RRB-

s

Sign

-LRB-

-RRB-

s

END

If

the

depth

counter

is

of

no

interest

one

can

even

unwind

the

loop

and

come

up

with

the

following

code

Simulation

of

Simplicity

FUNCTION

-LRB-

-RRB-

Integer

BEGIN

-LRB-

-RRB-

IF

THEN

goto

Sign

-LRB-

-RRB-

IF

THEN

goto

-LRB-

exit

-RRB-

END

To

give

more

insight

into

the

computation

of

the

terms

of

det

D

-LRB-

-RRB-

in

the

order

of

decreasing

significance

we

now

consider

the

three-dimensional

case

that

is

det

-LRB-

-RRB-

det

B

ssi

-LRB-

i

-RRB-

ssi

-LRB-

i

-RRB-

ssi

-LRB-

i

-RRB-

ssj

-LRB-

j

-RRB-

ssj

-LRB-

j

-RRB-

ssj

-LRB-

j

-RRB-

ssk

-LRB-

k

-RRB-

ssk

-LRB-

k

-RRB-

ssk

-LRB-

k

-RRB-

CA

This

polynomial

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

coefficients

out

of

a

total

of

One

is

that

the

coefficient

of

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

is

equal

to

which

is

nonzero

we

can

therefore

stop

there

and

consider

no

further

terms

The

other

reason

is

that

certain

coefficients

occur

more

than

once

that

is

with

different

products

For

example

det

-LRB-

-RRB-

ssk

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

ssk

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LRB-

-RRB-

Clearly

there

is

no

need

to

test

ssk

since

at

this

depth

ssk

is

already

known

otherwise

the

sign

determination

would

have

stopped

immediately

after

testing

the

coefficient

of

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

Generating

the

Sequence

of

Significant

Coefficients

The

properly

sorted

sequences

of

terms

of

the

polynomials

det

-LRB-

-RRB-

and

det

-LRB-

-RRB-

are

apparently

very

regular

In

the

following

this

regularity

will

be

worked

out

and

exploited

by

an

algorithm

that

automatically

generates

the

correct

sequence

of

terms

This

procedure

can

be

embedded

in

an

implementation

of

the

function

SignDet

D

that

computes

the

sign

of

det

D

-LRB-

-RRB-

We

agree

that

a

procedure

that

generates

each

term

of

det

D

-LRB-

-RRB-

by

collecting

the

proper

rows

and

columns

of

the

original

matrix

is

in

a

practical

sense

much

slower

than

a

straight-line

program

that

scans

through

a

fixed

sequence

of

submatrices

However

in

higher

dimensions

the

former

might

be

the

better

strategy

since

the

likelihood

of

det

M?D

o

for

all

o

with

o

t

decreases

very

fast

as

t

increases

Let

alone

the

fact

that

the

tables

of

relevant

terms

for

det

D

-LRB-

-RRB-

becomes

rather

long

for

large

D

The

algorithm

to

be

described

can

also

be

used

for

automatic

generation

of

such

tables

and

even

for

the

automatic

generation

of

codes

implementing

them

We

now

discuss

in

detail

how

we

can

extract

the

individual

terms

of

the

polynomial

det

D

-LRB-

-RRB-

Recall

that

a

term

is

of

the

form

b

c

where

b

is

called

the

coefficient

and

c

is

the

product

of

the

term

If

c

-LRB-

-LRB-

-RRB-

-LRB-

ik

jk

-RRB-

-RRB-

-LRB-

so

it

is

a

k-fold

product

-RRB-

then

we

call

-LRB-

i

j

-RRB-

active

for

k.

Given

the

product

of

a

term

we

can

extract

the

coefficient

b

from

the

given

Simulation

of

Simplicity

t

kt

kt

vt

det

M

t

t

-LSB-

-RSB-

det

B

ssi

ssi

ssi

ssj

ssj

ssj

ssk

ssk

ssk

CA

-LRB-

-RRB-

-LSB-

-RSB-

det

ssj

ssj

ssk

ssk

-LRB-

i

-RRB-

-LSB-

-RSB-

det

ssj

ssj

ssk

ssk

-LRB-

i

-RRB-

-LSB-

-RSB-

det

ssj

ssj

ssk

ssk

-LRB-

i

-RRB-

-LSB-

-RSB-

det

ssi

ssi

ssk

ssk

-LRB-

j

-RRB-

-LSB-

-RSB-

det

-LRB-

ssk

-RRB-

ssk

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssk

-RRB-

ssk

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssi

ssi

ssk

ssk

-LRB-

j

-RRB-

-LSB-

-RSB-

det

-LRB-

ssk

-RRB-

ssk

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssi

ssi

ssk

ssk

-LRB-

j

-RRB-

-LSB-

-RSB-

det

ssi

ssi

ssj

ssj

-LRB-

k

-RRB-

-LSB-

-RSB-

det

-LRB-

ssj

-RRB-

ssj

-LRB-

-LRB-

k

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssj

-RRB-

ssj

-LRB-

-LRB-

k

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssi

-RRB-

ssi

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

-RRB-

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

Table

The

relevant

terms

of

det

-LRB-

-RRB-

matrix

by

crossing

out

all

rows

and

columns

that

contain

an

active

-LRB-

i

j

-RRB-

In

order

to

avoid

extensive

double

indexing

and

index

inversions

we

assume

that

the

points

whose

coordinates

are

the

entries

in

the

D

rows

of

the

matrix

D

have

indices

through

D

This

allows

us

to

ignore

the

difference

between

a

point

index

and

the

corresponding

row

index

Indeed

this

assumption

is

no

loss

of

generality

since

the

only

property

used

in

computing

the

sign

of

det

D

-LRB-

-RRB-

is

that

the

point

indices

are

sorted

and

therefore

the

actual

values

are

irrelevant

With

this

assumption

-LRB-

i

j

-RRB-

is

in

the

i

th

row

and

the

j

th

column

and

we

cross

out

rows

ik

and

columns

jk

This

leaves

a

-LRB-

D

k

-RRB-

by

-LRB-

D

k

-RRB-

submatrix

Table

illustrates

these

definitions

for

D

If

b

c

is

the

term

of

depth

t

then

the

notation

in

Table

is

such

that

b

det

M?D

t

c

t

and

kt

is

the

number

of

rows

-LRB-

or

columns

-RRB-

of

M?D

t

Note

that

we

did

not

yet

specify

how

we

can

decide

whether

b

is

or

times

the

determinant

of

the

submatrix

We

now

describe

a

rule

that

is

based

on

the

number

of

transpositions

needed

to

sort

a

certain

permutation

For

row

D

let

j

be

the

column

such

that

-LRB-

j

-RRB-

is

active

in

the

term

that

we

currently

consider

By

definition

of

a

determinant

there

can

be

at

most

one

Simulation

of

Simplicity

such

column

but

it

could

very

well

be

that

there

is

no

such

column

In

this

case

we

choose

j

such

that

ss

j

belongs

to

the

main

diagonal

of

the

submatrix

that

was

obtained

after

crossing

out

rows

and

columns

as

described

above

If

the

number

of

exchanges

needed

to

sort

-LRB-

jD

-RRB-

is

odd

then

b

det

M?D

t

is

times

the

determinant

of

the

submatrix

otherwise

it

is

times

this

determinant

Interestingly

the

number

of

exchanges

needed

to

sort

the

sequence

-LRB-

jD

-RRB-

is

even

if

and

only

if

i

ji

is

odd

for

an

even

number

of

pairs

-LRB-

i

ji

-RRB-

k.

To

see

this

notice

that

the

total

number

of

pairs

-LRB-

j

<=-RRB-

with

j

odd

is

even

since

DX

-LRB-

j

<=-RRB-

DX

Now

observe

that

-LRB-

jD

-RRB-

can

be

sorted

using

only

exchanges

of

adjacent

columns

that

is

of

integers

j

that

differ

by

one

Note

also

that

we

can

dispense

with

all

exchanges

between

two

columns

where

both

contain

an

active

-LRB-

i

j

-RRB-

or

both

do

not

Thus

every

exchange

of

two

columns

increases

or

decreases

the

number

of

pairs

-LRB-

i

ji

-RRB-

with

i

ji

odd

by

one

which

implies

the

claim

This

property

will

be

used

in

the

algorithm

that

computes

the

proper

sign

The

key

observation

that

allows

us

to

automatically

generate

the

relevant

terms

of

det

D

-LRB-

-RRB-

is

that

-LRB-

-LRB-

-RRB-

-LRB-

ik

jk

-RRB-

-RRB-

is

the

product

of

a

relevant

term

if

and

only

if

ik

and

jk

In

other

words

the

-LRB-

i

j

-RRB-

go

monotonically

from

the

left

top

to

the

right

bottom

of

the

matrix

To

see

this

take

an

product

that

does

not

satisfy

this

condition

and

consider

the

product

defined

by

the

same

indices

that

is

obtained

by

matching

the

smallest

i

with

the

smallest

j

the

two

second

smallest

indices

etc.

This

new

product

is

more

significant

than

the

old

one

since

the

exponent

of

it

defines

is

smaller

than

the

exponent

of

the

old

product

Furthermore

the

coefficients

that

correspond

to

the

two

products

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

products

and

their

corresponding

coefficients

uses

a

vector

v

-LSB-

vD

vD

-RSB-

where

each

vi

is

an

integer

between

and

D

and

vi

corresponds

to

the

i-th

row

of

det

D

-LRB-

-RRB-

vD

is

set

equal

to

D

and

is

used

only

for

convenience

The

interpretation

of

v

is

as

follows

To

encode

the

product

-LRB-

-LRB-

-RRB-

-LRB-

ik

jk

-RRB-

-RRB-

we

set

vi

j

for

k.

For

every

i

such

that

the

i-th

row

does

not

contain

an

active

-LRB-

i

j

-RRB-

we

define

vi

vi

with

i

the

smallest

integer

in

ik

D

that

is

larger

than

i.

Thus

v

in

v

implies

that

-LRB-

v

<=-RRB-

is

active

if

and

only

if

v

v

For

example

v

-LSB-

-RSB-

implies

that

the

product

of

the

encoded

term

is

-LRB-

-RRB-

Other

examples

can

be

found

in

Table

which

gives

the

vectors

of

all

relevant

terms

in

det

-LRB-

-RRB-

The

next

problem

that

we

face

is

how

to

generate

the

terms

of

det

D

in

the

correct

order

that

is

in

the

order

of

decreasing

significance

Here

we

use

the

fact

that

v

-LSB-

vd

vD

-RSB-

encodes

a

more

significant

term

than

-LSB-

-RSB-

if

and

only

if

vj

for

j

the

largest

index

such

that

vj

This

implies

that

v

-LSB-

D

D

D

-RSB-

encodes

the

most

significant

term

and

indeed

it

encodes

-LRB-

-RRB-

whose

coefficient

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

-LRB-

v

-RRB-

returns

Vector

local

begin

while

v

do

v

v

for

down

to

do

v

v

return

v

end

The

alert

reader

will

have

noticed

that

the

above

function

returns

an

illegal

vector

if

the

input

vector

is

-LSB-

D

-RSB-

which

is

not

a

problem

because

the

determinant

evaluation

is

such

that

already

-LSB-

D

;D

-RSB-

encodes

a

nonzero

coefficient

thus

there

is

no

reason

to

call

Next

v

again

After

initializing

v

to

-LSB-

D

D

D

-RSB-

successive

calls

to

Next

v

give

the

desired

sequence

of

vectors

It

remains

to

be

shown

how

the

coefficient

of

the

encoded

term

can

be

computed

The

procedure

below

decodes

v

and

returns

the

submatrix

M

obtained

after

deleting

the

proper

rows

and

columns

from

D

It

also

returns

s

equal

to

or

depending

on

whether

the

coefficient

equals

det

M

or

det

M

and

returns

k

which

is

equal

to

the

number

of

rows

-LRB-

or

columns

for

that

matter

-RRB-

of

M

procedure

Matrix

-LRB-

v

s

k

M

-RRB-

global

D

D

local

begin

M

D

k

D

s

for

to

d

do

if

v

v

then

fin

this

case

-LRB-

v

-RRB-

is

activeg

if

odd

-LRB-

v

-RRB-

then

s

s

delete

row

from

M

delete

column

v

from

M

k

k

end

We

can

now

modify

the

code

of

SignDet?D

by

replacing

the

table

lookup

by

appropriate

calls

to

Next

v

and

Matrix

With

additional

modifications

the

same

algorithm

can

be

used

to

generate

the

table

of

relevant

terms

in

det

D

-LRB-

-RRB-

or

even

to

generate

the

corresponding

code

for

SignDet?D

for

any

D.

Note

that

in

the

latter

case

the

loop

in

SignDet

D

is

to

be

repeated

only

until

kt

since

in

generating

mode

the

values

of

the

determinants

are

not

computed

and

thus

there

is

no

natural

abortion

of

the

cycle

of

calls

The

result

for

D

can

be

seen

in

Table

in

the

Appendix

A

nice

feature

of

the

above

algorithms

is

that

we

only

need

to

change

the

initialization

of

v

to

-LSB-

D

D

;D

-RSB-

to

get

an

implementation

for

SignDet?D

which

computes

the

sign

of

the

polynomial

det

-LRB-

-RRB-

For

this

case

the

loop

over

all

relevant

terms

has

to

be

repeated

until

either

the

corresponding

cofactor

is

nonzero

or

if

we

are

in

generating

mode

until

kt

See

Tables

and

in

the

Appendix

for

the

relevant

terms

of

det

D

-LRB-

-RRB-

for

D

It

Simulation

of

Simplicity

seems

worthwhile

to

mention

that

Cartesian

coordinates

should

be

used

whenever

possible

This

reduces

the

problem

roughly

by

one

dimension

compared

to

the

homogeneous

case

-LRB-

compare

e.g.

Tables

and

-RRB-

The

presented

polynomials

det

D

-LRB-

-RRB-

and

det

D

-LRB-

-RRB-

illustrate

that

the

computational

overhead

caused

by

SoS

is

acceptably

small

One

has

to

keep

in

mind

that

the

most

significant

term

of

these

determinants

corresponds

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

polynomials

have

to

be

evaluated

down

to

large

depths

Indeed

the

largest

depth

or

the

sum

of

all

depths

that

occurs

in

a

computation

can

be

used

as

a

measure

for

the

degree

of

degeneracy

of

the

input

data

By

evaluating

the

subdeterminants

we

systematically

take

care

of

all

possible

degenerate

cases

Take

for

example

the

evaluation

of

det

-LRB-

-RRB-

Different

cases

can

be

distinguished

by

looking

at

the

largest

depth

tmax

reached

during

the

computations

This

tmax

can

be

or

and

the

corresponding

degeneracy

is

as

follows

-LRB-

compare

with

Table

in

the

Appendix

-RRB-

tmax

The

three

points

pi

pj

and

pk

are

in

general

position

tmax

The

three

points

are

collinear

but

pj

pk

and

the

line

containing

the

three

points

is

not

vertical

tmax

The

three

points

lie

on

a

common

vertical

line

but

pj

pk

tmax

Point

pj

coincides

with

pk

but

not

with

pi

and

the

line

through

pi

and

pj

is

not

vertical

tmax

All

three

points

lie

on

a

common

vertical

line

and

pj

pk

It

would

be

interesting

to

see

this

somewhat

unnatural

case

analysis

in

greater

detail

since

it

gives

a

nonobvious

breakdown

into

degenerate

cases

that

has

curious

properties

This

discussion

completes

the

implementation

of

SoS

with

respect

to

the

predicate

Positived

for

point

sets

in

Ed

We

considered

both

the

Cartesian

and

the

homogeneous

case

The

key

was

to

find

a

method

that

generates

the

proper

sequence

of

relevant

terms

of

det

D

-LRB-

-RRB-

and

det

D

-LRB-

-RRB-

ordered

by

decreasing

significance

With

this

the

implementation

of

the

functions

SignDet?D

and

SignDet?D

was

easy

We

will

see

in

Section

that

both

functions

can

also

be

used

to

implement

other

predicates

Remarks

on

the

Sign

Computation

of

Determinants

In

the

previous

sections

we

reduced

all

computations

to

a

sequence

of

sign

evaluations

of

determinants

In

the

primitives

discussed

in

this

paper

the

matrices

are

at

most

of

size

-LRB-

d

-RRB-

by

-LRB-

d

-RRB-

d

the

dimension

of

the

space

and

all

elements

are

assumed

to

be

integers

Theoretically

the

sign

of

such

a

determinant

can

be

determined

in

constant

time

if

we

assume

that

d

is

a

constant

This

assumption

is

indeed

fair

since

SoS

is

intended

primarily

for

low-dimensional

geometric

computations

In

practice

however

it

is

important

to

optimize

the

sign

computation

since

it

will

be

in

the

innermost

loop

of

every

program

that

uses

SoS

which

does

not

mean

that

this

issue

is

less

important

for

programs

not

employing

SoS

We

remark

on

a

few

methods

that

can

be

used

to

get

speed

in

these

computations

One

important

condition

that

we

have

to

meet

is

that

the

sign

of

the

determinant

has

to

be

Simulation

of

Simplicity

computed

exactly

we

can

not

tolerate

a

for

a

etc.

Assuming

that

the

coordinates

or

parameters

are

integers

we

can

either

use

long

integer

arithmetic

or

modular

arithmetic

based

on

the

Chinese

remainder

theorem

For

details

on

both

methods

refer

to

-LSB-

-RSB-

If

we

actually

compute

the

determinant

in

order

to

find

its

sign

and

no

method

is

known

to

the

authors

that

avoids

the

actual

computation

of

the

determinant

we

have

to

be

prepared

to

deal

with

numbers

of

absolute

size

at

least

D

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-by-D

matrix

whose

entries

are

all

zero

except

for

the

ones

in

the

main

diagonal

where

they

are

equal

to

the

determinant

of

this

matrix

is

D

An

upper

bound

on

the

absolute

value

of

the

determinants

is

given

by

a

well

known

theorem

of

Hadamard

that

states

that

jdet

-LRB-

:D

:D

-RRB-

j

DY

i

vuuut

DX

j

j

Among

other

things

this

upper

bound

on

the

absolute

value

of

a

determinant

gives

us

an

upper

bound

on

the

number

of

computer

words

needed

for

the

computation

if

we

use

long

integer

arithmetic

Without

any

hardware

support

long

integer

arithmetic

is

very

time

consuming

which

might

motivate

us

to

resort

to

the

use

of

approximation

methods

Any

computation

of

the

determinant

using

floating-point

arithmetic

of

bounded

length

is

such

an

approximation

Floating-point

arithmetic

is

usually

rather

fast

since

it

enjoys

the

needed

hardware

support

on

most

of

today

's

computers

If

the

value

that

we

get

is

sufficiently

far

from

zero

we

can

be

sure

that

the

correct

value

is

different

from

zero

and

lies

on

the

same

side

of

zero

But

how

can

we

quantify

sufficiently

far

from

zero

In

any

case

we

could

now

use

Gaussian

elimination

-LRB-

see

e.g.

-LSB-

-RSB-

-RRB-

which

takes

O

-LRB-

-RRB-

time

or

asymptotically

faster

methods

based

on

matrix

multiplication

as

described

for

instance

in

-LSB-

-RSB-

We

do

not

believe

that

the

latter

methods

could

be

of

any

practical

use

though

However

if

the

value

that

we

get

is

suspiciously

close

to

zero

we

have

to

use

some

other

method

to

determine

the

sign

of

the

determinant

Finally

we

would

like

to

mention

that

the

determinant

of

a

D-by-D

matrix

can

be

expressed

in

terms

of

subdeterminants

and

that

some

of

these

subdeterminants

might

later

appear

again

when

the

evaluation

of

det

D

-LRB-

-RRB-

or

det

D

-LRB-

-RRB-

proceeds

It

is

conceivable

that

the

values

of

such

subdeterminants

are

saved

and

used

again

when

needed

Even

so

we

do

not

believe

that

such

a

method

could

lead

to

significant

savings

since

we

expect

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

be

based

on

primitive

operations

that

compute

the

sign

of

determinants

Those

include

problems

that

deal

with

objects

different

from

points

There

are

two

major

reasons

why

determinants

are

useful

beyond

problems

for

points

One

is

that

more

complicated

geometric

objects

are

often

given

by

a

finite

set

or

sequence

of

points

Examples

are

line

segments

given

by

two

points

and

triangles

specified

by

three

points

This

will

be

illustrated

in

Section

which

revisits

the

Parity

Algorithm

discussed

in

the

Introduction

The

other

reason

-LRB-

and

this

is

the

more

profound

although

Simulation

of

Simplicity

less

obvious

of

the

two

-RRB-

is

that

other

objects

can

be

thought

of

as

points

in

a

different

space

Take

for

example

a

hyperplane

in

d

dimensions

It

can

be

specified

by

a

linear

relation

of

the

form

dxd

d

Multiplying

the

above

relation

with

a

nonzero

constant

does

not

change

the

hyperplane

This

suggests

that

we

think

of

the

hyperplane

as

the

point

with

homogeneous

coordinates

-LRB-

d

d

-RRB-

in

d

dimensions

This

view

of

hyperplanes

will

be

discussed

in

more

detail

in

Sections

and

Of

course

an

n-gon

specified

by

a

sequence

of

n

points

in

the

plane

can

be

interpreted

as

a

point

too

in

this

case

it

is

a

point

in

dimensions

However

in

contrast

to

the

former

case

this

view

is

not

likely

to

lead

to

any

useful

application

of

determinants

since

it

becomes

increasingly

expensive

to

compute

them

as

the

size

of

the

matrix

increases

Finally

Section

shows

that

even

nonlinear

geometric

objects

such

as

circles

and

spheres

can

profitably

be

interpreted

as

points

in

low

dimensions

as

well

By

no

means

do

we

believe

that

the

list

of

applications

for

primitives

concerning

the

sign

of

determinants

as

presented

in

this

paper

is

exhaustive

In

fact

because

of

the

versatility

of

determinants

an

enumeration

of

their

applications

in

geometric

computation

is

far

beyond

the

scope

of

this

paper

We

agree

though

that

such

an

enumeration

is

a

challenging

task

Point-in-Polygon

Test

Recall

the

Parity

Algorithm

for

the

point-in-polygon

problem

sketched

in

the

Introduction

In

order

to

test

whether

a

given

point

p

lies

inside

a

simple

polygon

P

the

algorithm

intersects

the

horizontal

half-line

r

whose

left

endpoint

is

p

with

all

edges

of

polygon

P

If

the

number

of

edges

intersecting

r

is

odd

then

p

lies

inside

P

and

if

this

number

is

even

p

lies

outside

The

subtlety

of

this

algorithm

lies

in

the

treatment

of

special

cases

since

the

above

characterization

holds

in

general

only

if

we

introduce

certain

artificial

counting

mechanisms

whenever

r

contains

a

vertex

or

even

an

entire

edge

of

P

In

this

section

we

show

that

the

test

whether

or

not

an

edge

intersects

the

horizontal

half-line

r

can

be

reduced

to

computing

the

signs

of

certain

determinants

SoS

is

then

used

to

simulate

a

perturbation

of

the

point

and

the

polygon

which

removes

all

degeneracies

The

algorithm

assumes

that

P

is

given

by

a

sequences

of

vertices

-LRB-

vn

-RRB-

and

that

all

coordinates

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

endpoints

Let

u

-LRB-

-RRB-

and

w

-LRB-

-RRB-

be

the

two

endpoints

and

recall

that

p

-LRB-

-RRB-

is

the

left

endpoint

of

r.

Because

of

SoS

we

can

assume

that

u

w

p

are

not

collinear

and

that

no

two

of

the

three

points

lie

on

a

common

horizontal

line

Note

first

that

r

and

e

intersect

only

if

the

second

coordinate

of

p

lies

between

the

second

coordinates

of

u

and

w.

Assume

If

indeed

then

r

e

if

and

only

if

-LRB-

u

w

p

-RRB-

defines

a

left-turn

-LRB-

see

Figure

-RRB-

It

is

now

not

very

difficult

to

develop

this

case

analysis

into

a

predicate

that

tests

for

intersection

To

perturb

the

points

we

use

the

same

expansion

as

described

in

Section

that

is

we

replace

vi

-LRB-

i

i

-RRB-

by

vi

-LRB-

-RRB-

-LRB-

i

-LRB-

-RRB-

i

-LRB-

-RRB-

-RRB-

where

i

j

-LRB-

-RRB-

i

j

-LRB-

i

j

-RRB-

with

-LRB-

i

j

-RRB-

as

in

-LRB-

-RRB-

For

a

uniform

treatment

we

define

p

-LRB-

-RRB-

and

write

the

predicate

for

arbitrary

three

vertices

rather

than

for

and

two

successive

vertices

of

P

Simulation

of

Simplicity

-LRB-

a

-RRB-

-LRB-

b

-RRB-

-LRB-

c

-RRB-

p

u

w

p

u

w

p

u

w

Figure

The

three

cases

to

consider

for

r

e

using

SoS

In

-LRB-

a

-RRB-

r

and

e

do

not

intersect

since

the

second

coordinate

of

p

does

not

lie

between

those

of

u

and

w

In

-LRB-

c

-RRB-

they

do

not

intersect

since

-LRB-

u

w

p

-RRB-

is

a

right-turn

Predicate

-LRB-

IntersectHalfLine

-RRB-

Let

vi

vj

and

vk

be

three

vertices

with

pairwise

different

indices

i

j

k

n

The

following

pseudocode

returns

true

if

the

edge

from

vj

-LRB-

-RRB-

to

vk

-LRB-

-RRB-

intersects

the

horizontal

half-line

whose

left

endpoint

is

given

by

vi

-LRB-

-RRB-

and

false

otherwise

function

IntersectHalfLine

-LRB-

vi

vj

vk

-RRB-

returns

Boolean

local

begin

W.l.o.g.

assume

Smaller

-LRB-

j

k

-RRB-

if

Smaller

-LRB-

j

i

-RRB-

Smaller

-LRB-

i

k

-RRB-

then

-LRB-

-LRB-

i

j

k

-RRB-

-LRB-

-RRB-

-RRB-

SignDet

B

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

CA

if

odd

-LRB-

-RRB-

then

return

-LRB-

-RRB-

else

return

false

end

A

few

remarks

are

in

order

When

the

above

function

is

applied

to

the

point-in-polygon

problem

i

always

holds

Thus

the

sorting

of

-LRB-

i

j

k

-RRB-

can

be

reduced

to

a

single

comparison

between

j

and

k.

Furthermore

to

avoid

all

degeneracies

for

the

point-in-polygon

test

it

is

sufficient

to

perturb

only

the

point

p

Indeed

if

det

B

i

-LRB-

-RRB-

i

-LRB-

-RRB-

j

j

k

k

CA

then

we

necessarily

have

j

k

i

-LRB-

-RRB-

and

therefore

the

determinant

does

not

even

get

evaluated

The

savings

that

one

gets

this

way

are

only

nominal

which

we

interpret

as

an

argument

for

the

efficiency

of

our

general

method

The

remainder

of

this

section

is

used

to

comment

on

what

happens

if

the

test

point

p

lies

on

the

boundary

of

the

polygon

P

If

we

use

the

above

primitive

as

is

SoS

will

neglect

this

special

case

and

find

that

p

lies

on

either

side

of

P

's

boundary

The

decision

depends

on

the

relative

positions

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

be

desirable

If

it

is

not

acceptable

one

could

test

whether

or

not

p

lies

on

the

boundary

of

P

before

running

the

Parity

Algorithm

with

SoS

Once

more

this

test

can

be

reduced

to

computing

signs

of

determinants

Hyperplanes

in

Euclidean

Space

Algorithms

for

hyperplanes

play

a

central

role

in

computational

geometry

This

becomes

obvious

when

one

thinks

of

the

importance

of

problems

such

as

linear

programming

computing

the

intersection

of

half-spaces

and

constructing

arrangements

of

hyperplanes

-LRB-

see

-LSB-

-RSB-

and

-LSB-

-RSB-

for

further

details

and

references

-RRB-

The

goal

of

this

section

is

to

demonstrate

how

the

techniques

of

Section

can

be

used

to

implement

a

typical

primitive

operation

needed

in

those

algorithms

This

will

open

up

an

entire

class

of

problems

to

the

use

of

SoS

The

main

tool

that

lets

us

exploit

the

techniques

of

Section

when

we

handle

hyperplanes

is

a

duality

transformation

that

maps

hyperplanes

to

points

and

vice

versa

In

essence

this

transform

is

nothing

but

a

reinterpretation

of

what

hyperplanes

and

points

are

In

this

section

we

assume

that

a

hyperplane

h

in

Ed

is

specified

by

its

nonzero

normal

vector

a

-LRB-

d

-RRB-

and

a

number

d

called

the

offset

Now

a

hyperplane

h

consists

of

all

points

x

Ed

such

that

hx

ai

d

-LRB-

-RRB-

that

is

the

scalar

product

of

x

and

a

equals

the

offset

Notice

that

the

hyperplane

does

not

change

if

we

multiply

the

normal

vector

and

the

offset

by

some

nonzero

number

We

define

h

as

the

point

whose

homogeneous

coordinates

are

-LRB-

d

d

-RRB-

Geometrically

speaking

h

lies

on

the

line

through

the

origin

defined

by

a

and

the

distance

of

h

from

the

origin

is

the

inverse

of

the

distance

between

h

and

the

origin

This

can

easily

verified

after

observing

that

j

d

j

is

the

distance

between

h

and

the

origin

provided

a

has

unit

length

Note

also

that

the

origin

lies

between

h

and

h

-LRB-

see

Figure

-RRB-

Conversely

for

a

point

p

with

homogeneous

coordinates

-LRB-

ssd

ssd

-RRB-

we

let

p

be

the

hyperplane

with

normal

vector

-LRB-

ssd

-RRB-

and

offset

ssd

h

h

-LRB-

-RRB-

Figure

Mapping

a

line

to

a

point

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

remembers

what

p

h

means

algebraically

namely

that

ssd

d

ssd

d

It

is

equally

easy

to

prove

that

this

mapping

preserves

the

relative

order

between

a

point

and

a

hyperplane

To

describe

what

exactly

we

mean

by

this

define

h

fxjhx

ai

d

g

and

h

fxjhx

ai

d

g

Simulation

of

Simplicity

and

call

those

the

positive

and

negative

sides

or

half-spaces

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

offset

of

a

hyperplane

h

by

we

do

not

change

the

hyperplane

but

we

do

change

the

sides

of

h

what

was

previously

its

positive

side

is

now

its

negative

one

and

the

other

way

round

We

will

take

advantage

of

this

curiosity

by

encoding

the

positive

and

negative

sides

into

the

hyperplane

's

specification

Note

that

geometrically

the

normal

vector

of

a

hyperplane

h

points

to

its

positive

side

The

primitive

operation

that

we

wish

to

tackle

in

this

section

is

to

decide

on

which

side

of

a

hyperplane

hid

the

intersection

of

d

other

hyperplanes

hid

lies

By

the

use

of

SoS

the

absence

of

any

kind

of

degeneracies

can

be

assumed

so

-LRB-

-RRB-

through

hid

-LRB-

-RRB-

intersect

in

a

unique

point

which

does

not

lie

on

hid

-LRB-

-RRB-

By

Cramer

's

rule

the

intersection

point

p

-LRB-

ssd

-RRB-

of

d

hyperplanes

is

given

by

the

coordinates

ssi

det

d

i

det

d

where

d

is

the

matrix

BBBB

;d

;d

id

id

id

;d

CCCCA

and

d

i

is

the

same

matrix

after

replacing

the

i-th

column

from

the

left

by

the

vector

BBBB

;d

;d

id

;d

CCCCA

Point

p

lies

in

the

positive

half-space

of

hd

if

and

only

if

id

id

ssd

id

;d

id

;d

Provided

that

det

d

is

positive

this

is

equivalent

to

det

d

id

det

d

id

det

d

;d

id

;d

det

d

id

;d

In

case

of

a

negative

det

d

the

above

statement

is

valid

after

reversing

the

direction

of

the

inequality

Consequently

p

h

d

if

and

only

if

det

d

det

d

This

can

be

seen

by

developing

det

d

det

BBBBBBB

;d

;d

;d

;d

id

id

id

;d

id

;d

id

id

id

;d

id

;d

CCCCCCCA

using

the

last

row

Now

we

can

use

this

to

write

a

procedure

that

decides

on

which

side

of

a

hyperplane

d

other

hyperplanes

intersect

It

uses

SoS

as

described

in

Section

Simulation

of

Simplicity

Predicate

-LRB-

OnPositiveSide

-RRB-

Let

hid

be

d

hyperplanes

in

d

dimensions

given

as

in

-LRB-

-RRB-

and

with

distinct

indices

id

n

The

following

function

written

in

pseudocode

returns

true

if

the

intersection

Td

hi

-LRB-

-RRB-

lies

in

the

positive

half-space

of

hid

-LRB-

-RRB-

and

false

if

it

lies

in

the

negative

one

function

OnPositiveSided

-LRB-

hid

hid

-RRB-

returns

Boolean

local

begin

Sortd

-LRB-

-LRB-

id

-RRB-

-LRB-

-RRB-

-RRB-

Sortd

-LRB-

-LRB-

id

id

-RRB-

-LRB-

-RRB-

-RRB-

SignDet?d

BBBB

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

CCCCA

if

odd

-LRB-

-RRB-

then

SignDet?d

BBBBBBB

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

;d

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

;d

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

;d

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

;d

-LRB-

-RRB-

CCCCCCCA

if

odd

-LRB-

-RRB-

then

return

-LRB-

-RRB-

end

Nonvertical

Hyperplanes

In

many

applications

we

know

that

all

hyperplanes

we

have

to

deal

with

are

nonvertical

that

is

they

intersect

the

d-th

coordinate

axis

in

a

unique

point

Examples

are

Voronoi

diagrams

or

more

generally

power

diagrams

for

arbitrary

order

and

weighted

Voronoi

diagrams

-LRB-

see

for

instance

-LSB-

-RSB-

and

-LSB-

-RSB-

-RRB-

It

is

beyond

the

scope

of

this

paper

to

describe

how

the

data

for

those

problems

are

used

to

generate

hyperplanes

it

will

be

enough

to

know

that

they

are

obtained

via

geometric

transforms

which

do

not

create

vertical

hyperplanes

A

nonvertical

hyperplane

h

in

d-dimensions

can

be

specified

by

a

relation

of

the

form

d

xd

d

-LRB-

-RRB-

The

advantage

of

describing

a

hyperplane

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

-LRB-

compare

for

instance

det

in

Table

and

det

in

Table

-RRB-

Since

every

hyperplane

h

is

now

nonvertical

we

can

uniquely

define

what

we

mean

when

we

say

that

a

point

lies

-LRB-

vertically

-RRB-

above

or

below

h.

Define

h

fx

-LRB-

xd

-RRB-

j

d

xd

d

g

and

let

h

Ed

h

h

A

point

p

is

said

to

lie

above

h

if

p

h

and

below

h

if

p

h

Simulation

of

Simplicity

The

primitive

operation

that

we

consider

in

this

section

decides

whether

the

intersection

of

d

hyperplanes

hid

lies

above

or

below

hyperplane

hid

The

use

of

SoS

as

in

Section

allows

us

to

assume

that

indeed

through

hid

intersect

in

a

unique

point

that

does

not

lie

on

hid

A

decision

procedure

based

on

comparing

the

signs

of

the

two

determinants

can

be

derived

from

the

procedure

given

in

Section

We

just

replace

all

i

;d

-LRB-

-RRB-

by

and

exchange

the

last

two

columns

of

the

second

matrix

in

function

OnPositiveSide

d

This

leads

to

the

following

predicate

Predicate

-LRB-

Above

-RRB-

Let

hid

be

d

nonvertical

hyperplanes

in

Ed

specified

as

in

-LRB-

-RRB-

and

with

pairwise

different

indices

id

n

The

following

predicate

returns

true

if

the

point

of

intersection

Td

hi

-LRB-

-RRB-

lies

above

hid

-LRB-

-RRB-

and

false

if

it

lies

below

hid

-LRB-

-RRB-

function

Aboved

-LRB-

hid

hid

-RRB-

returns

Boolean

local

begin

Sortd

-LRB-

-LRB-

id

-RRB-

-LRB-

-RRB-

-RRB-

Sortd

-LRB-

-LRB-

id

id

-RRB-

-LRB-

-RRB-

-RRB-

SignDet?d

BB

-LRB-

-RRB-

;d

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

CCA

if

odd

-LRB-

-RRB-

then

SignDet?d

BBBB

-LRB-

-RRB-

;d

-LRB-

-RRB-

;d

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

;d

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

;d

-LRB-

-RRB-

CCCCA

if

odd

-LRB-

-RRB-

then

return

-LRB-

-RRB-

end

In-sphere

Test

In

d

dimensions

any

d

affinely

independent

points

-LRB-

i.e.

points

that

do

not

lie

in

a

common

hyperplane

-RRB-

define

a

unique

sphere

that

goes

through

the

d

points

For

example

in

two

dimensions

there

is

a

unique

circle

through

any

three

noncollinear

points

Given

d

points

pd

the

problem

we

address

in

this

section

is

how

we

can

determine

whether

pd

lies

inside

or

outside

the

sphere

specified

by

the

first

d

points

assuming

this

sphere

is

unique

Such

a

test

is

useful

for

constructing

Voronoi

diagrams

-LRB-

as

shown

in

-LSB-

-RSB-

for

d

-RRB-

and

other

problems

where

circles

and

spheres

play

a

role

An

elegant

solution

to

this

problem

can

be

given

using

a

transform

that

lifts

a

sphere

in

d

dimensions

to

d

dimensions

where

it

is

represented

by

a

hyperplane

This

transformation

can

be

traced

back

in

the

literature

to

-LSB-

-RSB-

and

has

since

been

used

throughout

the

computational

geometry

literature

-LRB-

see

-LSB-

-RSB-

-LSB-

-RSB-

and

-LSB-

-RSB-

-RRB-

For

the

case

of

circles

in

the

plane

we

explain

this

transformation

in

detail

and

finally

phrase

the

predicate

for

general

dimensions

Let

U

be

the

paraboloid

of

revolution

whose

symmetry

axis

is

the

and

let

c

-LRB-

-RRB-

-LRB-

-RRB-

Simulation

of

Simplicity

be

a

circle

in

the

Note

that

-LRB-

-RRB-

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

-LRB-

-RRB-

The

quick

reader

will

already

have

verified

that

the

vertical

projection

of

U

c

which

is

an

ellipse

in

three

dimensions

onto

the

is

equal

to

the

original

circle

c

A

point

p

-LRB-

-RRB-

lies

inside

c

if

and

only

if

its

vertical

projection

onto

U

lies

below

c

This

insight

gives

us

some

hope

that

in

fact

the

problem

can

be

bent

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

points

which

we

call

and

The

first

three

determine

the

circle

c

and

therefore

the

plane

c

Moreover

if

we

project

them

vertically

onto

U

then

c

is

the

plane

through

these

points

on

the

paraboloid

U

The

question

is

now

whether

-LRB-

-RRB-

which

is

the

vertical

projection

of

onto

U

lies

below

c

-LRB-

in

which

case

lies

inside

c

-RRB-

or

above

c

-LRB-

then

lies

outside

c

-RRB-

By

the

use

of

SoS

we

can

assume

that

the

four

points

are

in

general

position

This

problem

can

be

mapped

to

the

plane

problem

of

the

previous

section

if

we

use

a

dual

transform

This

transform

replaces

each

point

on

U

by

the

unique

plane

whose

intersection

with

U

is

this

point

If

-LRB-

-RRB-

then

the

formula

for

this

dual

plane

is

p

-LRB-

-RRB-

We

see

that

this

is

indeed

the

lifting

map

applied

to

point

p

-LRB-

-RRB-

in

the

This

duality

transform

preserves

incidences

and

above-below

order

in

a

way

similar

to

the

duality

transform

described

in

Section

This

leaves

us

with

the

following

correspondence

between

the

original

point-circle

problem

and

the

derived

plane-point

problem

Point

lies

inside

c

-LRB-

the

circle

through

points

and

-RRB-

if

and

only

if

the

intersection

point

of

the

planes

p

p

and

p

lies

below

p

The

statement

is

also

valid

if

we

replace

inside

c

by

outside

c

and

below

p

by

above

p

We

leave

the

generalization

of

this

two-dimensional

exercise

to

three

and

higher

dimensions

to

the

curious

reader

In

any

case

Predicate

can

now

be

used

to

implement

Predicate

which

formalizes

the

in-sphere

test

in

d

dimensions

If

we

apply

Predicate

directly

we

will

find

ourselves

computing

the

sign

of

determinants

of

the

form

det

BB

;d

-LRB-

;d

-RRB-

;d

-LRB-

;d

-RRB-

CCA

The

sign

does

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

above

type

and

this

is

that

the

values

in

the

-LRB-

d

-RRB-

st

column

from

the

left

depend

on

the

values

in

the

left

d

columns

In

particular

with

SoS

the

expressions

of

the

point

coordinates

appear

in

mixed

products

in

the

-LRB-

d

-RRB-

st

column

This

turns

out

to

be

a

real

pain

when

we

implement

SoS

for

this

type

of

determinants

A

cheap

trick

that

handles

this

problem

is

not

to

perturb

the

original

points

but

rather

to

perturb

the

vertical

projections

onto

the

paraboloid

in

d

dimensions

In

effect

this

means

that

we

introduce

ssi

;d

dX

for

d

-LRB-

-RRB-

Simulation

of

Simplicity

and

then

perturb

the

points

-LRB-

ssi

ssi

;d

ssi

;d

-RRB-

Because

the

perturbation

of

the

-LRB-

d

-RRB-

st

coefficient

does

not

depend

on

the

first

d

coefficients

this

implies

that

the

points

are

perturbed

away

from

the

paraboloid

U

On

the

other

hand

if

the

perturbation

is

small

enough

we

are

still

close

enough

to

the

original

situation

Predicate

-LRB-

InSphere

-RRB-

Let

pid

be

d

points

in

d

dimensions

with

pairwise

different

indices

in

the

range

from

through

n

The

program

below

returns

true

if

the

perturbed

image

of

pid

lies

inside

the

sphere

through

the

perturbed

images

of

the

first

d

points

and

returns

false

if

it

lies

outside

function

InSphered

-LRB-

pid

pid

-RRB-

returns

Boolean

local

begin

Sortd

-LRB-

-LRB-

id

-RRB-

-LRB-

-RRB-

-RRB-

Sortd

-LRB-

-LRB-

id

id

-RRB-

-LRB-

-RRB-

-RRB-

SignDet?d

BB

-LRB-

-RRB-

;d

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

CCA

if

odd

-LRB-

-RRB-

then

Set

ssi

;d

as

in

-LRB-

-RRB-

SignDet?d

BBBB

-LRB-

-RRB-

;d

-LRB-

-RRB-

;d

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

;d

-LRB-

-RRB-

-LRB-

-RRB-

;d

-LRB-

-RRB-

;d

-LRB-

-RRB-

CCCCA

if

odd

-LRB-

-RRB-

then

return

-LRB-

-RRB-

end

Note

that

the

rightmost

column

of

the

first

matrix

in

the

above

program

should

really

consist

of

's

To

stress

the

similarity

with

predicate

Aboved

in

the

previous

section

we

replaced

the

's

by

's

and

thus

changed

the

sign

of

This

effect

is

compensated

by

the

fact

that

we

want

to

return

true

where

function

Aboved

returns

false

Remarks

and

Discussion

The

main

contribution

of

this

paper

is

the

introduction

of

a

general

technique

that

can

be

used

to

deal

with

degenerate

input

for

geometric

programs

The

main

purpose

of

this

paper

is

to

demonstrate

that

this

technique

-LRB-

which

we

call

SoS

the

Simulation

of

Simplicity

-RRB-

is

immanently

practical

despite

its

high-powered

appearance

Indeed

the

authors

believe

that

SoS

will

become

a

standard

tool

for

implementing

geometric

algorithms

A

pragmatic

consequence

of

this

technique

is

that

authors

of

geometric

algorithms

can

now

be

more

confident

about

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

properties

of

an

algorithm

that

allows

us

to

use

SoS

when

we

implement

it

One

important

feature

of

algorithms

that

are

amenable

to

SoS

is

that

their

algebraic

computations

are

of

constant

depth

The

deeper

the

algebraic

computation

the

more

complicated

is

the

polynomial

-LRB-

or

in

general

the

function

-RRB-

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

roots

can

be

eliminated

by

squaring

the

equation

and

similar

techniques

can

be

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

roots

of

integers

-LRB-

assuming

the

endpoint

coordinates

are

integers

-RRB-

Deciding

which

one

of

the

two

paths

is

shorter

is

a

difficult

question

unless

the

number

of

square

roots

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

produce

results

for

the

perturbed

set

of

objects

rather

than

for

the

original

ones

In

certain

settings

such

as

in

computer

graphics

this

fact

can

often

be

ignored

However

when

unperturbed

results

are

needed

some

postprocessing

has

to

be

performed

This

paper

does

not

deal

with

this

issue

and

further

work

has

to

be

done

Nevertheless

in

most

of

the

applications

mentioned

in

this

paper

the

postprocessing

step

is

more

or

less

trivial

In

the

point-in-polygon

problem

one

can

simply

add

a

test

whether

or

not

the

query

point

lies

on

a

boundary

edge

In

the

case

of

Voronoi

diagrams

or

arrangements

of

hyperplanes

we

identify

and

eliminate

zero-length

edges

or

higher-dimensional

faces

of

zero

measure

In

the

convex-hull

setting

it

is

possible

to

undo

the

perturbation

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

difficult

however

to

use

SoS

or

any

other

perturbation

scheme

for

finding

all

data

points

on

the

boundary

of

the

convex

hull

This

is

because

the

perturbation

may

decide

that

a

point

is

inside

the

hull

if

it

lies

on

a

boundary

edge

or

face

In

this

case

the

point

would

be

prematurely

discarded

We

refer

to

-LSB-

-RSB-

for

a

more

extensive

discussion

of

the

limitations

of

symbolic

methods

aimed

at

resolving

robustness

problems

in

geometric

algorithms

In

order

to

increase

the

credibility

of

our

claim

that

SoS

is

indeed

a

practical

programming

tool

the

second

author

compiled

a

prototype

version

of

a

SoS

library

-LSB-

-RSB-

and

implemented

the

threedimensional

edge-skeleton

algorithm

of

-LSB-

-RSB-

We

believe

it

is

fair

to

say

that

this

algorithm

is

an

extraordinary

challenge

for

someone

who

wants

to

do

it

without

SoS

From

run-time

profiles

of

this

program

we

learned

that

most

of

the

computing

time

was

spent

on

multiplying

long

integers

in

order

to

compute

signs

of

determinants

The

speed-up

that

we

got

in

our

implementation

from

replacing

long-integer

by

normal

-LRB-

built-in

-RRB-

integer

arithmetic

was

a

factor

somewhere

around

Of

course

for

the

normal

integer

arithmetic

to

work

we

severely

restricted

the

range

of

the

coordinates

that

were

used

In

any

case

this

makes

it

clear

where

future

work

has

to

go

if

we

want

to

produce

programs

that

are

reliable

and

which

are

as

fast

as

software

that

uses

floatingpoint

arithmetic

and

is

therefore

inherently

unreliable

The

most

promising

way

to

eliminate

this

overhead

factor

seems

to

be

the

design

of

a

special

piece

of

hardware

that

computes

the

sign

of

determinants

for

integer

matrices

Such

effort

seems

justified

by

the

versatility

of

determinants

Simulation

of

Simplicity

demonstrated

in

Section

We

would

like

to

mention

though

that

even

without

the

availability

of

such

specialized

hardware

we

believe

that

SoS

is

of

practical

value

in

implementing

geometric

algorithms

Aside

from

the

obvious

savings

in

time

and

effort

for

the

programmer

it

seems

to

us

that

the

use

of

SoS

is

currently

the

only

hope

to

produce

geometric

software

that

is

in

any

sense

reliable

We

end

this

section

by

pointing

out

a

new

direction

for

further

research

it

is

the

systematic

study

of

primitive

operations

used

and

needed

for

geometric

algorithms

If

one

undertook

the

venture

of

building

a

library

of

primitives

for

geometric

algorithms

besides

computing

signs

of

determinants

what

other

operations

would

have

to

be

in

the

collection

Is

it

even

clear

that

computing

the

sign

of

a

determinant

is

such

an

indispensable

operation

or

are

there

less

expensive

ways

to

determine

the

orientation

of

d

points

in

d

dimensions

References

-LSB-

-RSB-

A.

V.

Aho

J.

E.

Hopcroft

and

J.

D.

Ullman

The

Design

and

Analysis

of

Computer

Algorithms

Addison-Wesley

Reading

Massachusetts

-LSB-

-RSB-

F.

Aurenhammer

and

H.

Imai

Geometric

relations

among

Voronoi

diagrams

Technical

Report

Institute

f?ur

Informationsverarbeitung

Technische

Universit?at

Graz

Austria

-LSB-

-RSB-

A.

Charnes

Optimality

and

Degeneracy

in

Linear

Programming

Econometrica

-LRB-

-RRB-

-LCB-

April

-LSB-

-RSB-

V.

Chv?atal

Linear

Programming

W.

H.

Freeman

and

Company

New

York

-LSB-

-RSB-

V.

Chv?atal

and

G.

Klincsek

Finding

Largest

Convex

Subsets

In

Proceedings

of

the

Southeastern

Conference

on

Combinatorics

Graph

Theory

and

Computing

pages

-LCB-

-LSB-

-RSB-

G.

B.

Dantzig

Linear

Programming

and

Extensions

Princeton

University

Press

Princeton

New

Jersey

-LSB-

-RSB-

G.

B.

Dantzig

A.

Orden

and

P.

Wolfe

The

Generalized

Simplex

Method

for

Minimizing

a

Linear

Form

Under

Linear

inequality

Restrictions

Pacific

Journal

of

Mathematics

-LRB-

-RRB-

-LCB-

June

-LSB-

-RSB-

H.

Edelsbrunner

Edge-Skeletons

in

Arrangements

with

Applications

Algorithmica

-LRB-

-RRB-

-LCB-

-LSB-

-RSB-

H.

Edelsbrunner

Algorithms

in

Combinatorial

Geometry

Springer-Verlag

Heidelberg

West

Germany

-LSB-

-RSB-

H.

Edelsbrunner

and

L.

J.

Guibas

Topologically

Sweeping

an

Arrangement

Journal

of

Computer

and

System

Sciences

-LRB-

-RRB-

-LCB-

February

-LSB-

-RSB-

H.

Edelsbrunner

and

R.

Waupotitsch

Computing

a

Ham-Sandwich

Cut

in

Two

Dimensions

Journal

of

Symbolic

Computation

-LRB-

-RRB-

-LCB-

June

Simulation

of

Simplicity

-LSB-

-RSB-

A.

R.

Forrest

Computational

Geometry

in

Practice

In

E.

A.

Earnshaw

editor

Fundamental

Algorithms

for

Computer

Graphics

pages

-LCB-

Springer-Verlag

Berlin

Heidelberg

West

Germany

-LSB-

-RSB-

J.

E.

Goodman

and

R.

Pollack

Multidimensional

Sorting

SIAM

Journal

on

Computing

-LRB-

-RRB-

-LCB-

August

-LSB-

-RSB-

L.

J.

Guibas

and

J.

Stolfi

Primitives

for

manipulation

of

general

subdivisions

and

the

computation

of

Voronoi

diagrams

ACM

Transactions

on

Graphics

-LRB-

-RRB-

-LCB-

April

-LSB-

-RSB-

G.

H.

Golub

and

Ch

F.

Van

Loan

Matrix

Computations

John

Hopkins

University

Press

Baltimore

Maryland

-LSB-

-RSB-

D.

E.

Knuth

The

Art

of

Computer

Programming

Volume

Seminumerical

Algorithms

Addison-Wesley

Reading

Massachusetts

-LSB-

-RSB-

E.

P.

M?ucke

SoS

A

First

Implementation

Master

's

thesis

University

of

Illinois

at

Urbana-Champaign

Department

of

Computer

Science

Urbana

Illinois

September

-LSB-

-RSB-

F.

P.

Preparata

and

S.

J.

Hong

Convex

Hulls

of

Finite

Sets

of

Points

in

Two

and

Three

Dimensions

Communications

of

the

ACM

-LRB-

-RRB-

-LCB-

February

-LSB-

-RSB-

F.

P.

Preparata

and

M.

I.

Shamos

Computational

Geometry

An

Introduction

Springer-Verlag

New

York

-LSB-

-RSB-

R.

Seidel

A

convex

hull

algorithm

optimal

for

point

sets

in

even

dimensions

Technical

Report

-LCB-

Department

of

Computer

Science

University

of

British

Columbia

Vancouver

British

Columbia

-LSB-

-RSB-

R.

Seidel

On

the

size

of

closest-point

Voronoi

diagrams

Technical

Report

Institute

f?ur

Informationsverarbeitung

Technische

Universit?at

Graz

Austria

-LSB-

-RSB-

R.

Seidel

Constructing

Higher-Dimensional

Convex

Hulls

in

Logarithmic

Cost

per

Face

In

Proceedings

of

the

Annual

ACM

Symposium

on

Theory

of

Computing

pages

-LCB-

Berkeley

California

May

-LSB-

-RSB-

C.

K.

Yap

Symbolic

Treatment

of

Geometric

Degeneracies

In

Proceedings

of

the

IFIP

Conference

on

System

Modeling

and

Optimization

Chuo

University

Tokyo

-LSB-

-RSB-

C.

K.

Yap

A

Geometric

Consistency

Theorem

for

a

Symbolic

Perturbation

Scheme

In

Proceedings

of

the

Annual

ACM

Symposium

on

Computational

Geometry

pages

-LCB-

Urbana

Illinois

June

Simulation

of

Simplicity

Appendix

In

this

appendix

we

give

the

relevant

subdeterminants

sorted

in

sequence

of

decreasing

significance

needed

for

computing

the

signs

of

det

-LRB-

-RRB-

det

-LRB-

-RRB-

det

-LRB-

-RRB-

and

det

-LRB-

-RRB-

Each

sequence

is

given

in

a

table

that

also

shows

the

corresponding

product

t

and

the

size

kt

of

the

matrix

M?d

t

-LRB-

M?dt

-RRB-

associated

with

the

-LRB-

t

-RRB-

st

significant

term

in

the

polynomial

det

D

-LRB-

-RRB-

-LRB-

det

D

-LRB-

-RRB-

-RRB-

The

third

column

of

each

table

shows

vt

the

vector

that

encodes

the

subdeterminant

of

depth

t.

Recall

that

this

vector

was

used

to

produce

the

proper

sequences

of

subdeterminants

by

successive

calls

of

procedure

Next

v.

t

kt

kt

vt

det

M

t

-LSB-

-RSB-

det

ssi

ssj

-LRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

-RRB-

-LRB-

i

-RRB-

Table

i

The

relevant

terms

of

det

-LRB-

-RRB-

t

kt

kt

vt

det

M

t

-LSB-

-RSB-

det

B

ssi

ssi

ssj

ssj

ssk

ssk

CA

-LRB-

-RRB-

-LSB-

-RSB-

det

ssj

ssk

-LRB-

i

-RRB-

-LSB-

-RSB-

det

ssj

ssk

-LRB-

i

-RRB-

-LSB-

-RSB-

det

ssi

ssk

-LRB-

j

-RRB-

-LSB-

-RSB-

det

-LRB-

-RRB-

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

Table

ii

The

relevant

terms

of

det

-LRB-

-RRB-

Simulation

of

Simplicity

t

kt

kt

vt

det

M

t

-LSB-

-RSB-

det

BBB

ssi

ssi

ssi

ssj

ssj

ssj

ssk

ssk

ssk

ssl

ssl

ssl

CCCA

-LRB-

-RRB-

-LSB-

-RSB-

det

B

ssj

ssj

ssk

ssk

ssl

ssl

CA

-LRB-

i

-RRB-

-LSB-

-RSB-

det

B

ssj

ssj

ssk

ssk

ssl

ssl

CA

-LRB-

i

-RRB-

-LSB-

-RSB-

det

B

ssj

ssj

ssk

ssk

ssl

ssl

CA

-LRB-

i

-RRB-

-LSB-

-RSB-

det

B

ssi

ssi

ssk

ssk

ssl

ssl

CA

-LRB-

j

-RRB-

-LSB-

-RSB-

det

ssk

ssl

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssk

ssl

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

B

ssi

ssi

ssk

ssk

ssl

ssl

CA

-LRB-

j

-RRB-

-LSB-

-RSB-

det

ssk

ssl

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

B

ssi

ssi

ssk

ssk

ssl

ssl

CA

-LRB-

j

-RRB-

-LSB-

-RSB-

det

B

ssi

ssi

ssj

ssj

ssl

ssl

CA

-LRB-

k

-RRB-

-LSB-

-RSB-

det

ssj

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssj

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssi

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

-RRB-

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

Table

iii

The

relevant

terms

of

det

-LRB-

-RRB-

Simulation

of

Simplicity

t

kt

kt

vt

det

M

t

t

-LSB-

-RSB-

det

BBB

ssi

ssi

ssi

ssi

ssj

ssj

ssj

ssj

ssk

ssk

ssk

ssk

ssl

ssl

ssl

ssl

CCCA

-LRB-

-RRB-

-LSB-

-RSB-

det

B

ssj

ssj

ssj

ssk

ssk

ssk

ssl

ssl

ssl

CA

-LRB-

i

-RRB-

-LSB-

-RSB-

det

B

ssj

ssj

ssj

ssk

ssk

ssk

ssl

ssl

ssl

CA

-LRB-

i

-RRB-

-LSB-

-RSB-

det

B

ssj

ssj

ssj

ssk

ssk

ssk

ssl

ssl

ssl

CA

-LRB-

i

-RRB-

-LSB-

-RSB-

det

B

ssj

ssj

ssj

ssk

ssk

ssk

ssl

ssl

ssl

CA

-LRB-

i

-RRB-

-LSB-

-RSB-

det

B

ssi

ssi

ssi

ssk

ssk

ssk

ssl

ssl

ssl

CA

-LRB-

j

-RRB-

-LSB-

-RSB-

det

ssk

ssk

ssl

ssl

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssk

ssk

ssl

ssl

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssk

ssk

ssl

ssl

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

B

ssi

ssi

ssi

ssk

ssk

ssk

ssl

ssl

ssl

CA

-LRB-

j

-RRB-

-LSB-

-RSB-

det

ssk

ssk

ssl

ssl

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssk

ssk

ssl

ssl

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

Table

iv

The

relevant

terms

of

det

-LRB-

-RRB-

-LRB-

to

be

continued

-RRB-

Simulation

of

Simplicity

t

kt

kt

vt

det

M

t

t

-LSB-

-RSB-

det

B

ssi

ssi

ssi

ssk

ssk

ssk

ssl

ssl

ssl

CA

-LRB-

j

-RRB-

-LSB-

-RSB-

det

ssk

ssk

ssl

ssl

-LRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

B

ssi

ssi

ssi

ssk

ssk

ssk

ssl

ssl

ssl

CA

-LRB-

j

-RRB-

-LSB-

-RSB-

det

B

ssi

ssi

ssi

ssj

ssj

ssj

ssl

ssl

ssl

CA

-LRB-

k

-RRB-

-LSB-

-RSB-

det

ssj

ssj

ssl

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssj

ssj

ssl

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssj

ssj

ssl

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssi

ssi

ssl

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssl

-RRB-

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssl

-RRB-

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssi

ssi

ssl

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssl

-RRB-

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssi

ssi

ssl

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-RRB-

-LSB-

-RSB-

det

B

ssi

ssi

ssi

ssj

ssj

ssj

ssl

ssl

ssl

CA

-LRB-

k

-RRB-

-LSB-

-RSB-

det

ssj

ssj

ssl

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssj

ssj

ssl

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssi

ssi

ssl

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssl

-RRB-

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

Table

continued

Simulation

of

Simplicity

t

kt

kt

vt

det

M

t

t

-LSB-

-RSB-

det

ssi

ssi

ssl

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-RRB-

-LSB-

-RSB-

det

B

ssi

ssi

ssi

ssj

ssj

ssj

ssl

ssl

ssl

CA

-LRB-

k

-RRB-

-LSB-

-RSB-

det

ssj

ssj

ssl

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssi

ssi

ssl

ssl

-LRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-RRB-

-LSB-

-RSB-

det

B

ssi

ssi

ssi

ssj

ssj

ssj

ssl

ssl

ssl

CA

-LRB-

k

-RRB-

-LSB-

-RSB-

det

B

ssi

ssi

ssi

ssj

ssj

ssj

ssk

ssk

ssk

CA

-LRB-

l

-RRB-

-LSB-

-RSB-

det

ssj

ssj

ssk

ssk

-LRB-

-LRB-

l

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssj

ssj

ssk

ssk

-LRB-

-LRB-

l

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssj

ssj

ssk

ssk

-LRB-

-LRB-

l

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssi

ssi

ssk

ssk

-LRB-

-LRB-

l

-RRB-

-LRB-

j

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssk

-RRB-

ssk

-LRB-

-LRB-

l

-RRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssk

-RRB-

ssk

-LRB-

-LRB-

l

-RRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssi

ssi

ssk

ssk

-LRB-

-LRB-

l

-RRB-

-LRB-

j

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssk

-RRB-

ssk

-LRB-

-LRB-

l

-RRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

ssi

ssi

ssk

ssk

-LRB-

-LRB-

l

-RRB-

-LRB-

j

-RRB-

-RRB-

-LSB-

-RSB-

det

ssi

ssi

ssj

ssj

-LRB-

-LRB-

l

-RRB-

-LRB-

k

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssj

-RRB-

ssj

-LRB-

-LRB-

l

-RRB-

-LRB-

k

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssj

-RRB-

ssj

-LRB-

-LRB-

l

-RRB-

-LRB-

k

-RRB-

-LRB-

i

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

ssi

-RRB-

ssi

-LRB-

-LRB-

l

-RRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-RRB-

-LSB-

-RSB-

det

-LRB-

-RRB-

-LRB-

-LRB-

l

-RRB-

-LRB-

k

-RRB-

-LRB-

j

-RRB-

-LRB-

i

-RRB-

-RRB-

Table

continued

computational geometry
degenerate data
determinants
implementation
perturbation
programming tool
symbolic computation