%aah.tex   Axioms and Hulls

%\magnification\magstephalf
\hsize=13cm
\vsize=19cm
\font\eightsl=cmsl8 at 8truept
\font\eightrm=cmr8
\font\eightmi=cmmi8
\font\sc=cmcsc10
\font\ninebf=cmbx9
\font\ninerm=cmr9
\scriptfont\slfam=\eightsl

\def\mjm{\mathrel-\joinrel\joinrel\mathrel-}
\def\ldt{\mathrel{.\,.}}
%\def\bib{\par\noindent\hangindent 20pt}
\newdimen\bibindent \bibindent=30pt
\def\bib[#1]{\smallbreak\noindent\hbox to\bibindent{[#1]\hfill}%
 \hangindent\bibindent\ignorespaces}
\def\biba{\par\hangindent 60pt}
\def\blackslug{\hbox{\hskip 1pt \vrule width 4pt height 6pt depth
 1.5pt \hskip 1pt}}
%\baselineskip14pt
\hyphenation{counter-clockwise}
\def\bn{\bigskip\noindent}
\def\ruparrow{{\setbox0=\hbox{$\nearrow$}
 \rlap{$\vcenter{\hbox to\wd0{\hfil$\searrow$\hfil}}$}\box0}}
\def\luparrow{{\setbox0=\hbox{$\nwarrow$}
 \rlap{$\vcenter{\hbox to\wd0{\hfil$\swarrow$\hfil}}$}\box0}}
\def\duparrow{{\setbox0=\hbox{$\swarrow$}
 \rlap{$\vcenter{\hbox to\wd0{\hfil$\searrow$\hfil}}$}\box0}}
\def\uuparrow{{\setbox0=\hbox{$\nwarrow$}
 \rlap{$\vcenter{\hbox to\wd0{\hfil$\nearrow$\hfil}}$}\box0}}
\def\ua{\uparrow}
\def\da{\downarrow}
\def\ra{\rightarrow}
\def\la{\leftarrow}
\def\Lrl{\Longleftrightarrow}
\def\RA{\Longrightarrow}
\def\LA{\Leftarrow}
\def\pfbox
  {\hbox{\hskip 5pt\lower1pt\vbox{\hrule
  \hbox to 5pt{\vrule height 7pt\hfill\vrule}
  \hrule}}\hskip3pt}
\def\display#1:#2:#3\par{\par\hangindent #1 \noindent
	\hbox to #1{\hfill #2 \hskip .1em}\ignorespaces#3\par}
\def\disleft#1:#2:#3\par{\par\hangindent#1\noindent
	 \hbox to #1{#2 \hfill \hskip .1em}\ignorespaces#3\par}
\def\sqbox
  {\hbox{\hskip 1pt\lower0pt\vbox{\hrule
  \hbox to 6pt{\vrule height 6pt\hfill\vrule}
  \hrule}}\hskip1.5pt}


\input picmac
\input rotate

\newcount\n
\newcount\k
\newcount\m
\newdimen\x

\def\|#1{\m=\n \advance\m-1
  \beginpicture(1,\m)(0,0)
  \multiput(0,0)(0,1)\n{\line(1,0)1}
  \ifnum#1>0 \module{#1}\fi
  \endpicture}
\def\module#1{\beginpicture(0,0)(0,0)
  \k=\n \advance\k-#1
  \put(.5,\k){\line(0,-1)1}
  \multiput(.5,\k)(0,-1)2{\disk{.2}}
  \endpicture}

\unitlength=10pt
\n=5

% primitive index macros
% "stuff for index" will go into a file for sorting and into normal text
% "!stuff for index" will go into the file only
\expandafter\def\expandafter\dospecials\expandafter{\dospecials\do\"}
\def\hexcode{"} \catcode`\"=\active

\newif\ifpreprint
\newif\ifinxmode
\newwrite\inx \newwrite\bnx
\newbox\inxbox

\newif\ifsilent
\def\beginxref{\futurelet\next\beginxrefswitch}
\def\beginxrefswitch{\ifx\next!\let\next=\silentxref
  \else\silentfalse\let\next=\xref\fi \next}
\def\silentxref!{\silenttrue\xref}
\let"=\beginxref

\def\xref#1"{\ifinxmode\edef\text{#1}\makexref\fi
  \ifsilent\ignorespaces\else#1\fi}
\def\makexref{\global\setbox\inxbox=%
   \vbox{\unvbox\inxbox\allowbreak\hbox{\inxstyle\text}}%
  \xdef\writeit{\write\inx{\text\space!\space
     \noexpand\number\pageno.}}\writeit}
% index items at bot of proofs may be on wrong page; but .inx file is correct
% --- EXCEPT when "item" occurs at BEGINNING OF PARAGRAPH at beginning of page

\catcode`\@=\active \def@{\mskip1mu\relax}
\expandafter\def\expandafter\dospecials\expandafter{\dospecials\do\@}

\preprintfalse		% WE ARE MAKING THE REAL BOOK!
%\preprinttrue		% No, we aren't!
%\inxmodetrue		% WE ARE PREPARING A ROUGH INDEX!
\inxmodefalse           % No, we aren't!

\ifinxmode\immediate\openout\inx=\jobname.inx \fi % file for index reminders
\ifinxmode\immediate\openout\bnx=\jobname.bnx \fi % file for bibliog index

\def\ref[#1]{[\ifinxmode\xdef\writeit{\write\bnx{#1:
 \noexpand\number\pageno.}}\writeit\fi#1]}

\newbox\inxfootbanner
\def\hours{\count0=\time \divide\count0 by60 % find the o'clock
  \multiply\count0 by40 \advance\count0\time % convert to hhmm
  \advance\count0 10000 \expandafter\gobbleone\number\count0\relax}
\def\gobbleone1{}
\setbox\inxfootbanner=\rlap{\hbox to 6.5in{\hrulefill\sevenrm\quad
 Author's page proof produced by \TeX\ at
 \hours\space on \ifcase\month\or
   January\or February\or March\or April\or May\or June\or
   July\or August\or September\or October\or November\or December\fi
  \space\number\day}}
\def\makeinxfooter{\vbox to0pt{\kern10pt\copy\inxfootbanner\kern4pt
  \rlap{\vbadness=\maxdimen \inxcolumns}\vss}}
\def\inxcolumns{\ifvoid\inxbox\let\next\relax\else\let\next\contribcol\fi\next}
\def\contribcol{\setbox0=\vsplit\inxbox to54pt
  \vtop{\unvbox0}\kern20pt \inxcolumns}
\def\inxstyle{\vrule height6pt depth2pt width0pt \sevenrm}
\splittopskip=6pt

\def\beginsection #1. #2. {\bigbreak\bigskip
  \uppercase{\def\rhead{#2}}
  \noindent{\bf\hbox to\parindent{#1.\hfil}#2}
  \par\nobreak\smallskip\noindent}
\def\beginstarsection #1. #2. #3{\bigbreak\bigskip
  \uppercase{\def\rhead{#2}}
  \noindent{\bf\hbox to\parindent{#1.\hfil}#2}*
  \par\vfootnote*{#3}\nobreak\smallskip\noindent\ignorespaces}
\def\beginspecsection #1. {\vfill\eject
  \uppercase{\def\rhead{#1}}
  \centerline{\bf #1}\bigskip}

\output{\shipout\vbox{\makeheadline\pagebody
  \ifpreprint\ifinxmode\makeinxfooter\fi\fi}
  \advancepageno
  \ifnum\outputpenalty>-1000000 \else\dosupereject\fi}
\headline{\ifodd\pageno \hfil\eightrm\rhead\hfil\llap{\tenrm\folio}
  \else\rlap{\tenrm\folio}\hfil\eightrm AXIOMS AND HULLS\hfil\fi}

\newbox\ncht \setbox\ncht=\hbox{$n\choose2$}

% To produce only a subset of pages, put the page numbers on separate
% lines in a file called pages.tex, ended by 999
% WARNING: This will screw up the .grf file! Save it, then restore it.
% WARNING: This may screw up the .ref file (if there are \tabrefs). Ditto.
\let\Shipout=\shipout
\newread\pages \newcount\nxtpg \openin\pages=pages
\def\getnxtpg{\ifeof\pages\else
 {\endlinechar=-1\read\pages to\next
  \ifx\next\empty % in this case we should have eof now
  \else\global\nxtpg=\next\fi}\fi}
\ifeof\pages\else\message{OK, I'll ship only the requested pages!}
 \getnxtpg\fi
\def\shipout{\ifeof\pages\let\next=\Shipout
 \else\ifnum\pageno=\nxtpg\getnxtpg\let\next=\Shipout
  \else\let\next=\Tosspage\fi\fi \next}
\newbox\garbage \def\Tosspage{\deadcycles=0\setbox\garbage=}

%\centerline{\bf Axioms and Hulls}
%\smallskip
%\centerline{\sl Donald E. Knuth}
%\centerline{\sl Computer Science Department, Stanford University, 
%Stanford, CA 94305}

%\bigskip\bigskip\bigskip
%\noindent{\bf Introduction.\quad}
\def\rhead{INTRODUCTION}
\noindent
{\sc One way to advance} the science of computational geometry is to make a
comprehensive study of primitive operations that are used in many
different algorithms. This monograph attempts such an investigation in the
case of two primitive predicates: The {\it "counterclockwise"\/}
relation~$pqr$, which states that the circle through points $(p,q,r)$
is traversed counterclockwise when we encounter the points in cyclic order
$p,q,r,p,\ldots\,$; and the {\it "incircle"\/} relation $pqrs$, which
states that $s$ lies inside that circle if $pqr$ is true, or outside that
circle if $pqr$ is false. "!notation $pqr$""!notation $pqrs$"

The counterclockwise and incircle
 predicates can be applied in many ways. For example, the line
segment~$pq$ "intersects" the line segment~$rs$ if and only if $pqr \neq
pqs$ and $prs\neq qrs$. But the principal applications studied below
are the computation of "convex hulls" (the ordered pairs of
points~$pq$ such $pqr$ holds for all other points~$r$) and "Delaunay
triangulations" (the ordered triples $\Delta pqr$ such that $spqr$
"!Senatus Populusque Romanus"
holds for all other points~$s$). Delaunay triangulations are of special
importance because "Voronoi regions" are easily calculated once the
Delaunay triangulation is known.

The value of an axiomatic approach to geometrical questions has been clear
ever since "Euclid" published his {\sl Elements\/} about 2300 years ago.
Once we know the essential properties of the objects we are dealing with,
we can construct rigorous proofs about what is true and what is false.
"Axioms" supplement our geometric intuition, giving us new ways to view
a problem via manipulation of logical formulas; we often see patterns
in symbols that we cannot see in diagrams, just as we often see patterns
in diagrams that we cannot see in symbols.
Axioms are especially vital in computational geometry, when an algorithm
must make discrete decisions between alternative procedures. Many algorithms
that rely on "floating-point arithmetic" are doomed to failure unless
floating-point approximations obey suitable laws. Horror stories abound
about methods that ``blow up'' or produce unacceptable results.

Section 1 introduces five basic axioms for the counterclockwise
predicate that will be studied in the remainder of these notes. A~set
of triples~$pqr$ that obeys these axioms will be  called a {\it "CC system"}.
The five axioms are shown to be independent of each other in section~2, which
also considers a number of alternative axioms and introduces a graphical
technique by which logical manipulations on ternary predicates are
easily performed by hand. Section~3 investigates the general systems that
arise when only the first four axioms are assumed; then section~4
investigates what happens when we introduce Axiom~5 but omit Axiom~4.
The latter systems turn out to be much more interesting, and we call
them "pre-CC" systems. Pre-CC systems are intimately related to a
special kind of graph called a {\it"vortex-free tournament"\/}:
This is a directed graph in which either $p\ra q$ or $q\ra p$ holds for all
$p\neq q$, with the special property that no four points form a ``vortex''
(a~subtournament consisting of a 3-cycle and a source or sink).
Vortex-free "tournaments" are shown to have a very simple structure, and
later sections of the notes demonstrate that this structure is the
key property underlying the counterclockwise relation as well as convexity
in higher dimensions. Section~5 shows that pre-CC systems contain most
of the structure of CC systems. Section~6, on the other hand,
establishes a negative result: Although vortex-free tournaments have a
very simple structure, they do not have a simple decision procedure;
the problem of determining whether a given set of relations is
consistent with the existence of a vortex-free tournament turns out to
be NP-complete.

Sections 7 and 8 plunge deeper into the internal structure of CC
systems, showing that all such systems can be represented conveniently and
canonically in terms of {\it"primitive sorting networks"\/}---networks
of comparators that had previously been studied in connection with an
entirely different problem. This characterization makes it possible to
determine the asymptotic number of CC systems, in section~9, where
related questions concerning {\it arrangements of pseudolines\/} are also
considered.

Indeed, CC systems are equivalent to combinatorial structures that
have arisen in a variety of different contexts. Section~10
demonstrates a two-to-one correspondence between pre-CC systems and
{\it "uniform oriented matroids"\/} of rank~3, which are defined by
axioms of a quite different nature.

The study of "convex hulls" begins in section~11, which presents an
efficient method for finding the convex hull of any CC system
using only the $pqr$ "!hulls, see convex hulls"
predicate. Another such algorithm, which turns out to have a
surprisingly short computer program, is described in section~12.
Section~13 compares various implementations of these algorithms by
presenting the results of empirical tests on several kinds of data.
Section~14 explains how to make the algorithms robust, by avoiding
degenerate situations that otherwise occur when points are collinear
or coincident.

A weaker form of "robustness" is the subject of section~15: An algorithm
is said to be {\it"parsimonious"\/} if it never evaluates  a primitive
predicate whose value could have been deduced from previously evaluated
predicates. General principles of parsimonious algorithms are
discussed in the context of sorting, then a particular algorithm for
convex hulls is shown to be parsimonious.

Section 16 wraps up the study of abstract CC systems by noting that CC
systems can be composed with each other, using operations analogous to
cartesian products.

The "incircle" predicate is introduced in section 17, where it is shown
to obey axioms that are identical to those of CC systems except with
another point thrown in. The resulting sets of quadruples $pqrs$ are
said to form a {\it"CCC system"}. The associated theory, which
fortunately turns out to
be quite elementary, leads to section~18, which might be considered
the ``grand climax'' of this monograph: An efficient algorithm is derived
that will find the Delaunay triangulation of any given CCC system.
In particular, when the algorithm of section~18 is applied to points in the
plane under the usual interpretation of the incircle predicate, it becomes
the shortest and fastest method known to the author for computing
"Delaunay triangulations" (hence "Voronoi regions"). Moreover, the
degeneracy-removal techniques discussed in section~19 make this
algorithm highly robust. Although the method is quite similar to the
randomized incremental procedure of \ref[36], it incorporates several
simplifications of practical importance.

Section 20 explains how the two-dimensional concepts of CC and CCC
systems fit into more general systems in higher dimensions. Section~21
closes with a historical review of related literature, and section~22
lists several open problems. A~number of additional problems are
stated throughout the text.

After writing these notes, the author "!Knuth" has become ever more
convinced of the value of "axiomatic methods" as a sound basis for
computer science in general and for computational geometry in
particular. In fact, one of the Delaunay triangulation algorithms he
had hoped to prove correct turned out in fact to be invalid, although
the method had produced satisfactory results in preliminary tests.
Diagrams and special cases are essential for intuition, but they are
notoriously poor substitutes for rigorous logic! Once the axioms for
CCC systems were understood, it was easy to construct a counterexample
to the ill-fated algorithm and (a~few hours later) to find a correct
procedure. The robust procedure of sections~18 and~19 would probably
never have been found without the knowledge gained while preparing
sections 1--17.

\bn{\bf Disclaimer.}\quad
This monograph is rather long, because the material seems to be
interesting enough to deserve an expository, self-contained treatment.
The author has tried to organize things in such a way that the material
can be skimmed; for example, cross references between sections are
frequently provided. Many of the lemmas and theorems presented below
are equivalent to results that are already well known in other
formulations. However, references to this other work have often been
deferred, in order to avoid interrupting the main flow of ideas.
Section~21 attempts to outline the full history of the subject and to
give credit where credit is due. 

\bn{\bf Claimer.}\quad
On the other hand, the following things appear to be new contributions,
as far as the author is aware: the axioms for CC
systems in section~1, and in particular the fact that Axiom~5 implies
its mirror image; the preliminary investigation of ``interior triple
systems'' of section~3, and in particular the $2^{\Theta(n^3)}$
bound established there; the NP-completeness results of section~6,
except for the known material about {\tt CSAT}; the canonical form of
a reflection network in section~8, and the simple proof of (9.5) based
on that form; the numerical results in sections~9 and~20, except for
the smaller cases; the proof of equivalence between CC systems and
oriented matroids in section~10, which seems to be simpler than the
treatments of \ref[48] and \ref[51] even when the latter are specialized to
uniform matroids of rank~3; the convex hull algorithms of sections~11
and~12; the proof in section~14 that lexicographic order is not
sufficient to break ties in degenerate cases; the examples of
parsimonious algorithms in section~15; the constructions of
section~16; the characterization of incircle in section~17; the
general algorithm of section~18, except for the analysis of that
algorithm borrowed from \ref[36]; the technique for degeneracy removal in
section~19, and the accompanying remarks about calculating signs of
determinants via exact computations on floating-point data; the
notion of a dual hypertournament (not necessarily geometric) in
section~20.

\beginsection 1. Axioms.
Let us begin by deriving axioms that hold for the counterclockwise relation
between sets of up to five points in the Euclidean plane. If points
$p$, $q$, $r$ have Cartesian coordinates $(x_p,y_p)$, $(x_q,y_q)$, and
$(x_r,y_r)$, it is well known that the counterclockwise predicate
corresponds to the sign of a determinant:
$$pqr\ \Longleftrightarrow \ \det\pmatrix{x_p&y_p&1\cr
\noalign{\smallskip}
x_q&y_q&1\cr
\noalign{\smallskip}
x_r&y_r&1\cr}>0\,.\eqno(1.1)$$
We shall denote this determinant by $\vert pqr\vert$.
"!notation $\vert pqr\vert$"

\goodbreak
The simplest axioms involve only three points:

\proclaim Axiom 1 {\rm ("cyclic symmetry")}. $pqr\RA qrp$.

\proclaim Axiom 2 {\rm ("antisymmetry")}. $pqr\RA \neg\,prq$.

\proclaim Axiom 3 {\rm ("nondegeneracy")}. $pqr\;\vee\;prq$.

\noindent "!Axioms 1--5"
In all cases there is an implied quantification ``for all distinct
points $p$, $q$, $r$ in a given set~$S$.'' 
Axioms~1 and~2 are simple consequences of the "determinant identities"
$\vert pqr\vert=\vert qrp\vert=-\vert prq\vert$.
We assume in Axiom~3 that
no three points of~$S$ are collinear; "collinear points" are
characterized by the relation $\vert pqr\vert=0$.

The next axiom applies to four distinct points:

\proclaim Axiom 4 {\rm ("interiority")}. $tqr\wedge ptr\wedge
pqt\RA pqr$.

\noindent
Intuitively, if $t$ lies to the left of the directed lines $qr$, $rp$,
and $pq$, then $t$ must be inside the triangle $pqr$, which must have
counterclockwise orientation. Axiom~4 is a consequence of the
determinant identity
$$\vert pqr\vert=\vert tqr\vert +\vert ptr\vert+\vert
pqt\vert\,,\eqno(1.2)$$
which is a consequence of expanding the left hand side of
$$\det\pmatrix{x_p&y_p&1&1\cr
\noalign{\smallskip}
x_q&y_q&1&1\cr
\noalign{\smallskip}
x_r&y_r&1&1\cr
\noalign{\smallskip}
x_t&y_t&1&1\cr}=0$$
by cofactors of its last column. We shall write `$t\in\Delta pqr$' as
an abbreviation for the three relations `$tqr\wedge ptr\wedge pqt$'.
These three relations can also be written `$tpq\wedge tqr\wedge trp$',
by Axiom~1. "!notation $t\in\Delta pqr$"

"Cramer's rule" tells us that any four points of a plane satisfy
$$t={\vert tqr\vert\over \vert pqr\vert}\,p+{\vert ptr\vert\over \vert
pqr\vert}\,q+{\vert pqt\vert\over \vert pqr\vert}\,r\eqno(1.3)$$
if $\vert pqr\vert \neq 0$. Thus, $t\in\Delta pqr$ implies that
point~$t$ is a "convex combination" of the points $p$, $q$, and~$r$.
This property leads to a fifth axiom, which applies to any five
distinct points:

\proclaim Axiom 5 {\rm ("transitivity")}. $tsp\wedge tsq\wedge tsr\wedge
tpq\wedge tqr\RA tpr$.

\noindent
The first three hypotheses state that points $p$, $q$, $r$ lie in the
halfplane to the left of~$ts$; the last two hypotheses state that $q$
is left of~$tp$ and $r$ is left of~$tq$. Hence the conclusion is
geometrically obvious that $r$ is left of~$tp$. A~formal proof follows
from the fact that $\vert tpr\vert\le0$ implies $\vert pqr\vert>0$ by (1.2),
so (1.3) expresses $t$ as
a convex combination of $p,q,r$; hence the determinant
$\vert tst\vert$ is a convex combination of the positive determinants
$\vert tsp\vert,\;\vert tsq\vert,\;\vert tsr\vert$. But that is
impossible because $\vert tst\vert=0$.

The same argument yields a similar axiom:

\def\bfprime{\rlap{$^{\prime}$}\kern.005in$^{\prime}$}
\proclaim Axiom 5\bfprime\ {\rm (dual transitivity)}. $stp\wedge stq\wedge 
str\wedge tpq\wedge tqr\RA tpr$. "!dual axioms"

\noindent
This statement is not obviously a consequence of Axioms 1--5; but we
can in fact deduce it as follows, without even using Axiom~4.
 Assume that Axiom~$5'$ fails, so that
$$stp\wedge stq\wedge str\wedge tpq\wedge tqr\wedge trp$$
by Axioms 1--3. We can now prove that
$$spq\RA srp\,,$$
as follows. The implication certainly holds if $pqr$ is true,
since Axiom 5 tells us that $pqs\wedge  pqt\wedge pqr\wedge pst\wedge
ptr\RA psr$. 
Suppose $spq\wedge spr\wedge prq$; then we must have $rqs$, otherwise
Axiom~5 would say that $rsq\wedge rsp\wedge rst\wedge rqp\wedge
rpt\RA rqt$. But $rqs$ causes another problem, since Axiom~5 also
carries the implication $qsr\wedge qst\wedge qsp\wedge qrt\wedge
qtp\RA qrp$.

Thus we have proved $spq\RA srp$ with three applications of Axiom~5. 
A~symmetric argument shows that $srp\RA
sqr$, and that $sqr\RA spq$; thus
$$spq\RA srp\RA sqr\RA spq$$
and we have either $spq\wedge srp\wedge sqr$ or $sqp\wedge spr\wedge
srq$. But both of these contradict Axiom~5, since
$$\eqalign{stp\wedge stq\wedge str\wedge spq\wedge sqr&\RA
spr\,;\cr
stq\wedge stp\wedge str\wedge sqp\wedge spr&\RA sqr\,.\cr}$$

Our proof that Axioms 1, 2, 3, and 5 imply Axiom $5'$ is now complete.
A~similar proof shows that 1, 2, 3, and~$5'$ imply~5; we just complement
the value of each triple containing~$s$ in the argument above.

In later sections of these notes we will see that Axioms 1--5 are
strong enough to construct ``convex hulls'' that have many of the
familiar properties of convex hulls in the plane. We will also see
that Axioms 1--5 define a theory equivalent to several other
theories that have arisen in other contexts. Therefore it is
reasonable to give a special name to three-point predicates that
satisfy Axioms 1--5; we shall call them {\it"CC systems"\/} (short for
``"counterclockwise systems"'').

CC systems do not capture all the properties of counterclockwise
relations between points in the plane; determinants satisfy many weird
and wonderful identities, such as the "syzygy" "!determinant identities"
$$\def\;{\mskip1mu}
\eqalignno{&\vert pqw\vert\;\vert rpv\vert\;\vert qry\vert\;\vert
prx\vert\;\vert quz\vert+\vert rpv\vert\;\vert qru\vert\;\vert
rpz\vert\;\vert qpy\vert\;\vert qwx\vert+
\vert qru\vert\;\vert pqw\vert\;\vert rpz\vert\;\vert prx\vert\;\vert
qvy\vert\cr
\noalign{\smallskip}
&\enspace\null+\vert qru\vert\;\vert pqw\vert\;\vert rpz\vert\;\vert
qpy\vert\;\vert rvx\vert+
\vert pqw\vert\;\vert rpv\vert\;\vert pqx\vert\;\vert rqz\vert\;\vert
ruy\vert+\vert rpv\vert\;\vert qru\vert\;\vert pqx\vert\;\vert
qpy\vert\;\vert rwz\vert\cr
\noalign{\smallskip}
&\enspace\null+\vert rpv\vert\;\vert qru\vert\;\vert pqx\vert\;\vert rqz\vert\;\vert
pwy\vert +\vert qru\vert\;\vert pqw\vert\;\vert qry\vert\;\vert
prx\vert\;\vert pvz\vert
+\vert pqw\vert\;\vert rpv\vert\;\vert qry\vert\;\vert rqz\vert\;\vert
pux\vert\cr
\noalign{\smallskip}
&\hskip10em =0\,,&(1.4)\cr}$$
which is related to the theorem of Pappus.
This identity
\ref[8]
implies that the counterclockwise triples of any nine
points in the plane must satisfy the complicated axiom
$$\eqalignno{\neg\,&\bigl((pqw\oplus rpv\oplus qry\oplus prx\oplus
quz)\;\wedge\;(rpv\oplus qru\oplus rpz\oplus qpy\oplus qwx)\cr
\noalign{\smallskip}
&\qquad\wedge\,\cdots\,\wedge\;
(pqw\oplus rpv\oplus qry\oplus rqz\oplus pux)\bigr)\,,&(1.5)\cr}$$
where $\oplus$ denotes exclusive or. For if each of the parenthesized
clauses in (1.5) were true, each term on the left of (1.4) would be positive,
and the sum could not be zero.

Incidentally, identity (1.4) has cyclic "symmetry" with respect to the
transformation $p\ra q\ra r\ra p$,
$u\ra v\ra w\ra u$, $x\ra y\ra z\ra x$. 
It also has a less obvious symmetry in which $p,u,x$
remain fixed and the other elements switch places in their orbits:
$q\leftrightarrow r$, $v\leftrightarrow w$, $y\leftrightarrow z$. (In
the latter case, the first four determinants in each term change sign.)
Thus it has six symmetries altogether.

We will show below that it is possible to construct a CC system such
that all of the counterclockwise triples $pqw$, $rpv$, $qvy$,
$\ldots\,$, $pux$
occurring in (1.4) and (1.5) are 
 true. Thus CC systems can violate (1.5); they
are more general than the systems obtainable from actual points in
Euclidean geometry. Indeed, this is not surprising, when we consider
that Axioms 1, 2, 3, and~5 
were obtained entirely by considering configurations
of at most 5~points. We could hardly expect such axioms to be strong
enough to deduce the 9-point "theorem of Pappus", which states that if
eight of the triples of points $pux$, $pvx$, $pwy$, $qvy$, $qwy$,
$quz$, $rwz$, $ruz$, $rvx$ are "collinear", then the ninth triple is
also collinear. (A~diagram appears in section~7 below.)

If a CC system can arise from actual points in the plane, we will call
it {\it realizable}. The fact that "unrealizable CC systems" exist is no
real handicap, because we can construct efficient algorithms that
solve geometric problems in any CC system. Such algorithms are more
general than algorithms that work only with coordinates of points, and
proofs of correctness can be quite simple because CC systems are
defined by very simple axioms. "!realizable systems"

\beginsection 2.  Independence.
We have seen that Axioms 1, 2, 3, and~5 
imply Axiom~$5'$, and it is natural to
wonder whether Axioms 1--5 themselves contain some redundancy. It
turns out that each of them is independent, in the sense that no four
axioms together are strong enough to imply the fifth.

"Axiom 2"
is clearly "independent", since the other axioms hold if $pqr$ is
uniformly true for all distinct points $p,q,r$. "Axiom~3" is also
independent, since the other axioms hold if $pqr$ is uniformly false.

"Axiom 1" is independent because Axioms 2 and~3 are valid on a
three-element set $\{a,b,c\}$ for which we have
$$abc,\;\neg\,acb,\;bac,\;\neg\,bca,\;cab,\;\neg\,cba\,.\eqno(2.1)$$
(Axioms 4 and 5 are vacuously satisfied on any three-element set.)

A ternary relation $pqr$ that satisfies Axioms 1--3 is unambiguously
specified by exhibiting a triple for each three-element subset. These
triples are independent, so there are $2^{{n\choose 3}}$ ways to
satisfy Axioms 1--3 over an $n$-element set.

A four-element set $\{a,b,c,d\}$ with triples
$$dbc,\;adc,\;abd,\;cba\eqno(2.2)$$
and their cyclic shifts satisfies Axiom 1--3 but not Axiom~4;
furthermore Axiom~5  holds vacuously. Therefore "Axiom~4" is
independent.

Finally, we can establish the independence of "Axiom 5" by constructing
triples on $\{a,b,c,d,e\}$ that satisfy only Axioms 1--4. We will do
this by introducing several ideas that will be useful below. Consider
the somewhat symmetrical triples
$$abc,\;dab,\;dbc,\;dca,\;eab,\;ebc,\;eca,\;ead,\;ebd,\;ecd\,.\eqno(2.3)$$
For each point $p$ we can form a "directed graph" ("digraph") with arcs
$q\ra r$ iff $pqr$ holds; the five graphs in this case are
$$\vcenter{\halign{%
$\hfil#\hfil$\quad&$\hfil#\hfil\;$&$\hfil#\hfil\;$&$\hfil#\hfil$\quad%
&$\hfil#\hfil$\quad&$\hfil#\hfil$\quad&$\hfil#\hfil\;$%
&$\hfil#\hfil\;$&$\hfil#\hfil$\quad&$\hfil#\hfil$\quad%
&$\hfil#\hfil$\quad&$\hfil#\hfil\;$&$\hfil#\hfil\;$%
&$\hfil#\hfil$\quad&$\hfil#\hfil$\quad&$\hfil#\hfil$\quad%
&$\hfil#\hfil\;$&$\hfil#\hfil\;$&$\hfil#\hfil$\quad%
&$\hfil#\hfil$\quad&$\hfil#\hfil$\quad&$\hfil#\hfil\;$%
&$\hfil#\hfil\;$&$\hfil#\hfil$\quad&$\hfil#\hfil$\cr
&b&\ra&c&&&c&\ra&a&&&a&\ra&b&&&%
a&\ra&b&&&a&\ra&b\cr
a\,:&\da&\ruparrow&\ua&,
&b\,:&\da&\ruparrow&\ua&,
&c\,:&\da&\ruparrow&\ua&,
&d\,:&\ua&\luparrow&\ua&,
&e\,:&\ua&\duparrow&\da&.\cr
&d&\ra&e&&&d&\ra&e&&&d&\ra&e&&&%
c&\la&e&&&c&\ra&d\cr}}$$
In fact, these directed graphs are {\it"tournaments"\/}
\ref[56];
that is, either $q\ra r$ or $r\ra q$ appears, for each
pair of distinct vertices~$q$ and~$r$. Any system of triples
satisfying Axioms~2 and~3 on an $n$-element set corresponds to a set of
$n$~tournaments, and Axiom~1 adds that 
the arc $q\ra r$ appears in the tournament
for~$p$ if and only if the arcs $r\ra p$ and $p\ra q$ appear
respectively in the tournaments for~$q$ and~$r$.

A tournament containing no 3-cycles is called {\it"transitive"}. Such
tournaments contain no "cycles" whatever, because any $k$-cycle $a_1\ra
a_2\ra\cdots\ra a_k\ra a_1$ for $k>3$ can always be shortened to
$a_1\ra a_3\ra \cdots\ra a_k\ra a_1$ if $a_3\not\ra a_1$. Axiom~4 says
that any 3-cycle $p\ra q\ra r\ra p$ in a tournament for~$t$ must
correspond to a triple $pqr$, whose effects are recorded in arcs of
the tournaments for $p,q,r$ that do not involve vertex~$t$. Axiom~5
says that the tournament for~$t$ must not contain four vertices
forming a 3-cycle $pqr$ and a source~$s$:
$$\vcenter{\halign{%
$\hfil#\hfil$\quad&$\hfil#\hfil\;$&$\hfil#\hfil\;$&$\hfil#\hfil$\quad%
&$\hfil#\hfil$\cr
&s&\ra&p\cr
t\,:&\da&\duparrow&\ua&.\cr
&q&\ra&r\cr}}$$
Axiom $5'$ says, similarly, that no derived tournament should contain a
3-cycle and a sink. (A "source" dominates all other vertices; a "sink" is
dominated by them.)

The tournaments for $a,b,c$ derived from triples (2.3) are transitive
linear orderings: They define the respective linear orderings
$b<d<e<c$, $c<d<e<a$, and $a<d<e<b$. But the tournaments for $d$
and~$e$ violate Axioms~5 and~$5'$, respectively. The only 3-cycle
present in these tournaments is $a\ra b\ra c\ra a$, and the
triple~$abc$ does appear in (2.3), so Axiom~4 holds. Thus Axioms~5
and~$5'$ cannot be derived from Axioms 1--4. (Note that any construction
 satisfying Axioms 1--3 must satisfy both Axioms~5 and~$5'$ or
neither of them.)

The digraph technique provides a convenient way to work with axioms on
small triple systems by hand. Indeed, the author drew literally
hundreds of diagrams like the above while writing these notes.
Digraphs make it easy to show, for example, that
Axioms 1--5 imply the law of ``"interior transitivity",''
$$t\in\Delta pqr\  \wedge\  s\in\Delta pqt\ \RA\ s\in\Delta
pqr\,.\eqno(2.4)$$
The hypotheses give us $tqr$, $ptr$, $pqt$, $sqt$, $pst$, $pqs$; and
Axiom~4 adds~$pqr$. Five arcs of the tournaments
$$\vcenter{\halign{%
$\hfil#\hfil$\quad&$\hfil#\hfil\;$&$\hfil#\hfil\;$&$\hfil#\hfil$\qquad%
&$\hfil#\hfil$\quad
&$\hfil#\hfil\;$&$\hfil#\hfil\;$&$\hfil#\hfil\;$&$\hfil#\hfil$\cr
&q&\ra&r&&r&\ra&p\cr
p\,:&\da&\searrow&\ua&q\,:&&\ruparrow&\ua\cr
&s&\ra&t&&s&\la&t\cr}}$$
are therefore known, and Axiom 5 will be violated in $p$'s tournament
unless we have $s\ra r$; hence~$psr$. Similarly, Axioms~$5'$ in~$q$'s
tournament implies $r\ra s$ and~$qrs$.
This completes the proof of~(2.4). The status of the remaining triple,
either $trs$ or~$srt$, is not implied by the hypotheses.

Notice that the interior transitivity law (2.4) holds vacuously in
example (2.3). Therefore it is strictly weaker than the transitive law
of Axiom~5; we cannot derive Axiom~5 from Axioms 1--4 and~(2.4).

Incidentally, we cannot derive law (2.4) from Axioms 1--4 either.
Consider, for example, what happens when we switch three of the triples
of~(2.3):
$$abc,\;dab,\;dbc,\;dca,\;eab,\;ebc,\;eac,\;eda,\;ebd,\;edc\,.\eqno(2.5)$$
These triples are certainly counter-intuitive if we try to think of
them in terms of counterclockwise relations between points; they say
that $a\in\Delta edc$, $d\in\Delta abc$, $d\in\Delta ebc$, $e\in\Delta
abd$, and that no other interior point relations hold. Therefore they
satisfy Axioms 1--4 but not~5, $5'$, or~(2.4).

Rule (2.4) is actually a combination of two implications, 
$$\eqalignno{t\in\Delta pqr\ \wedge\ s\in\Delta pqt\ &\RA\ sqr\,,&{\rm
(2.4a)}\cr
t\in\Delta pqr\ \wedge\ s\in\Delta pqt\ &\RA\ psr\,;&{\rm (2.4b)}\cr}$$
and we can show that each of them implies the other, in the presence
"!dual axioms"
of Axioms 1--4. Suppose, for example, that (2.4a) holds but (2.4b) is
false. Then we have $tqr$, $trp$, $tpq$, $sqt$, $pst$, $pqs$, $sqr$,
$spr$, and Axiom~4 yields $rst$ because $p\in\Delta rst$. But
$t\in\Delta rsq$ and $p\in\Delta rst$ and $spq$ contradict (2.4a).
Similarly, if (2.4b) holds but
(2.4a) is false, we have $tqr$, $trp$, $tpq$, $sqt$, $pst$, $pqs$,
$qsr$, $psr$, hence $q\in\Delta srt$ and $srt$; then $t\in\Delta srp$
and $q\in\Delta srt$ and $spq$ contradict (2.4b). On the  other hand,
(2.4a) and (2.4b) are independent if Axiom~4 is lacking; the triples
$$ebc,aec,abe,dbe,ade,abd,dbc,acd,abc,ced\eqno({\rm 2.6a})$$
violate (2.4b) when $(p,q,r,s,t)=(a,b,c,d,e)$, but their interior
point relations $a\in\Delta cde$, $c\in\Delta aed$, $d\in\Delta abe$,
$d\in\Delta ace$, $e\in\Delta abc$, $e\in\Delta cad$ do not lead to
any violations of (2.4a). The opposite triples
$$\postdisplaypenalty=10000
cbe,cea,eba,ebd,eda,dba,cbd,dca,cba,dec\eqno({\rm 2.6b})$$
satisfy (2.4b) but not (2.4a).

While we're cataloguing consequences of Axioms 1--5, we might as well
consider yet another rule. Let $\sqbox pqrs$ stand for the four
"!notation $\sqbox pqrs$"
relations $pqr\wedge qrs\wedge rsp\wedge spq$; thus, $\sqbox pqrs$
means that points $(p,q,r,s)$ define a 4-gon, a~convex quadrilateral.
Axioms~1, 2, 3, and~5 imply that
$$\sqbox pqrs\ \wedge\ t\in\Delta pqr\ \RA\ \sqbox ptrs\,.\eqno(2.7)$$
For the hypotheses give five arcs of the tournaments
$$\vcenter{\halign{%
$\hfil#\hfil$\quad&$\hfil#\hfil\;$&$\hfil#\hfil\;$&$\hfil#\hfil$\enspace%
&$\hfil#\hfil$\qquad&$\hfil#\hfil$\quad&$\hfil#\hfil\;$%
&$\hfil#\hfil\;$&$\hfil#\hfil$\quad&$\hfil#\hfil$\cr
%\quad%
%&$\hfil#\hfil$\quad&$\hfil#\hfil\;$&$\hfil#\hfil\;$%
&q&\ra&r&&&p&\ra&q\cr
p\,:&\da&\duparrow&\ua&,
&r\,:&\ua&\ruparrow&\ua\cr
&s&&t&&&s&&t\cr}}$$
and Axiom 5 will fail in $p$'s tournament unless $pts$; Axiom~$5'$
will fail in $r$'s~tournament unless $rst$.

Rule (2.7), like rule (2.4), has two parts
"!dual axioms"
$$\eqalignno{\sqbox pqrs\ &\wedge\  t\in\Delta pqr\ \RA\ trs\,;&{\rm
(2.7a)}\cr
\sqbox pqrs\ &\wedge\ t\in\Delta pqr\ \RA\ spt\,.&{\rm (2.7b)}\cr}$$
Each of these implies the other. For if, say, (2.7b) holds but not
(2.7a), we have $pqr$, $qrs$, $rsp$, $spq$, $tqr$, $ptr$, $pqt$,
$tsr$,  and $spt$,
leaving only the status of~$qts$ in doubt. If $qts$ is true we have
$\sqbox tspq$ and $r\in\Delta tsp$; but $tqr$ contradicts (2.7b). And
if $qst$ we have $\sqbox spqr$ and $t\in\Delta spq$; again, $rst$
contradicts (2.7b). A~similar argument, reversing the sense of all
triples and renaming variables, derives (2.7b) from (2.7a).

Although our proof of (2.7) was very similar to the proof of (2.4),
rule (2.7) is actually stronger than (2.4), yet weaker than Axiom~5.
The triples
$$abc,bcd,cda,dab,eab,ebc,eca,eda,edb,edc\eqno(2.8)$$
satisfy Axioms 1--4 and (2.4), but (2.7) fails when
$(p,q,r,s,t)=(a,b,c,d,e)$. Thus Axioms 1--4 and (2.4) are too weak to
imply (2.7). But Axioms 1--4 and (2.7) do imply (2.4); to demonstrate
this, we need only verify (2.4a). Suppose ${t\in\Delta pqr}\wedge
{s\in\Delta pqt}\wedge srq$. Then $q\in\Delta rts$, and Axiom~4
implies~$rts$. We cannot have~$prs$, since $p\in\Delta rst$ would
imply~$rst$. Therefore~$psr$; we now have $\sqbox srpq\wedge
t\in\Delta srp$. Rule (2.7b) yields~$qst$, a~contradiction, completing
the proof. Finally, Axioms 1--4 and (2.7) hold in (2.3), so they are
not strong enough to imply Axiom~5.

It can be shown that Axioms 1--3 together with (2.4a) and (2.7) imply
(2.4b), even when Axiom~4 fails.

Although Axioms 1--5 are independent, they do not give the shortest
possible definition of a "CC system". It is easy to see that Axioms~1
and~2 can both be deduced from Axiom~3 in conjunction with the rule
$$pqr\ \RA\ \neg qpr\,.\eqno(2.9)$$

\beginsection 3. Interior triple systems.
Let's take a minute to study further properties of ternary predicates that
satisfy Axioms 1--4 but not necessarily any further laws. We shall
call them {\it"interior triple systems"}, for want of a better name. 

Axiom 4 is rather pleasant because it has many symmetries. Besides an
obvious circular "symmetry" with respect to the cycle $(p,q,r)$, we can
recast Axiom~4 in various other ways, such as
`$tqr\wedge ptr\wedge\neg\,pqr\,\RA\,\neg\,pqt$', i.e.,
$$rtq \wedge prq \wedge ptr\ \RA\ ptq\,;\eqno(3.1)$$
and this is just like the original statement of "Axiom~4", but with $r$
playing the role of~$t$. In fact, the axiom is best written as a
clause instead of as an implication:
$$rqt \vee prt \vee qpt \vee pqr\,.\eqno(3.2)$$
This clause form makes it easy to see that the axiom is invariant
under all 12~permutations of the "alternating group"~$A_4$. 
Therefore if we have any {\it ordered\/} set of four points
$(a,b,c,d)$, we need not test Axiom~4 for all $4!$~ways of mapping
$(p,q,r,t)$ to $(a,b,c,d)$; we merely need to verify two clauses
$$(abd \vee bcd \vee cad \vee acb)\ \wedge\ 
(bad \vee cbd \vee acd \vee abc)\,.\eqno(3.3)$$

A large family of interior triple systems on $n$ points
$\{a_1,\ldots,a_n\}$ can be obtained by constructing an arbitrary
sequence of "permutations" $P_3,P_4,\ldots,P_n$, where $P_k$ is a "linear
ordering" of $\{1,2,\ldots,k-1\}$. Given any such sequence, the set of
all triplets $a_ia_ja_k$ where $i<k$, $\,j<k$, and $i$ precedes~$j$ in~$P_k$,
defines a system in which Axiom~4 holds. For if $i<j<k<l$, we must
have
$$(a_ia_ja_l \vee a_ja_ka_l \vee a_ka_ia_l)
\ \wedge\ (a_ja_ia_l \vee a_ka_ja_l \vee a_ia_ka_l)\,,$$
and this is stronger than (3.3). The number of such systems is
$$2!\,\ldots\,(n-2)!\,(n-1)!=2^{\Omega(n^2\log n)}\,.\eqno(3.4)$$

We have seen that Axioms 5 and~$5'$ can be viewed as restrictions on the
tournaments defined by the triples containing a given point. Axiom~4
imposes no such restriction. Indeed, an interior triple system can be
constructed on $\{a_0,a_1,\ldots,a_n\}$ in which point~$a_0$ is
associated with any desired "tournament". "!embedding"
Given a tournament on $\{a_1,\ldots,a_n\}$ for the triples
$a_0a_ia_j$, suitable
 triples that do not involve~$a_0$ can be obtained by the
construction of the previous paragraph, where we define~$P_k$ so that
all elements $i<k$ such that $a_k\ra a_i$ in the given tournament
precede all elements $j<k$ such that $a_j\ra a_k$. Then if the given
tournament contains a cycle $a_i\ra a_j\ra a_k\ra a_i$, where
$k=\max(i,j,k)$, the system will contain the triple $a_ia_ja_k$ as
required by Axiom~4.

The total number of interior triple systems is in fact considerably
larger than the lower bound in (3.4).
If $n=3m$ we can form $2^{@n^3\!/27}$ such systems on
the set $S=\{x_1,\ldots,x_m,y_1,\ldots,y_m,z_1,\ldots,z_m\}$ as
follows: Let $Q_k$ be an arbitrary subset of $\{1,\ldots,m\}\times
\{1,\ldots,m\}$, for $1\leq k\leq m$; there are
$(2^{@m^2})^m=2^{@n^3\!/27}$ ways to choose $Q_1,\ldots,Q_m$, and each of
these will lead to an interior triple system. If $a,b,c\in S$ and
$a<b<c$, where we assume that 
$$x_1<\cdots<x_m<y_1<\cdots<y_m<z_1<\cdots<z_m\,,$$
then we include the triple $abc$ if and only if $a=x_i$ and $b=y_j$
and $c=z_k$ and $(i,j)\in Q_k$; otherwise we include~$acb$. 

Property (3.3) is verified as follows: Let $a<b<c<d$. We cannot have
$acd\wedge abc$, because that would imply both $c=y_j$ and $c=z_k$.
Hence $cad\vee acb$. Similarly we cannot have $abd\wedge bcd$, which
would imply $b=y_j=x_i$. Thus $(cad\vee acb)\wedge(bad\vee cbd)$ must
hold, and (3.3) must be true.

The interior triple systems just constructed usually fail to satisfy
the interior transitivity axiom~(2.4). For example, let $p=z_l$,
$q=z_k$, $r=x_h$, $s=x_i$, and $t=y_j$, where $h<i<j<k<l$, $(h,j)\in
Q_k$, $(h,j)\not\in Q_l$, $(i,j)\not\in Q_k$, and $(i,j)\in Q_l$. Then
we have $r<s<t<q<p$, and it can be checked that $t\in\Delta pqr$ and
$s\in\Delta pqt$; but $s\not\in\Delta pqr$. Similarly, the systems
based on permutations~$P_k$ usually violate~(2.4).

These constructions show that interior triple systems are quite
plentiful. Such systems need not possess structural properties that
make them particularly interesting in studies of geometry. But the
special class of {\it"transitive interior triple systems"}, which
satisfy (2.4) in addition to Axioms 1--4, can perhaps be shown to have
a more geometric structure. The interested reader may also wish to
determine the asymptotic number of transitive interior systems; is it,
for example, $2^{\Omega(n^2\log n)}$? "!open problems"

Incidentally, it is amusing to try replacing Axiom~4 by the much
stronger axiom
$$tpq \wedge tqr\ \RA\ pqr\,.\eqno(3.5)$$
A simple induction shows that the only triple systems satisfying
Axioms 1--3 and (3.5) are isomorphic to the CC systems obtained from
the vertices of "$n$-gons" in the plane, defined on points
$\{a_1,\ldots,a_n\}$ by
$$a_ia_ja_k\ \Longleftrightarrow\ (i<j<k) \vee (j<k<i) \vee
(k<i<j)\,.\eqno(3.6)$$ 

\beginsection 4. Vortex-free tournaments.
Although sets of triples satisfying Axioms 1--4 do not necessarily
have many of the counterclockwise properties of points in the plane,
it turns out that Axioms 1, 2, 3, and~5 are enough to
guarantee a rich geometrical structure. Let us now take a close look
at the significance of Axiom~5 and its dual, Axiom~$5'$. Ternary
relations satisfying Axioms 1, 2, 3, and either~5 or~$5'$ 
(therefore both~5 and~$5'$) will be called {\it"pre-CC systems"}.

The tournaments associated with individual points of pre-CC systems
are of particular interest because they have a nice characterization.
Suppose Axioms~5 and~$5'$ are expressed in clause form, 
$$\eqalign{&(tps \vee tqs \vee trs \vee tqp \vee trq \vee
tpr)\cr
\noalign{\smallskip}
&\qquad\qquad\wedge\ (spt \vee sqt \vee srt \vee tqp \vee trq \vee
tpr)\,;\cr}\eqno(4.1)$$
this is the same as
$$\eqalign{&\neg\,(tsp \wedge  tsq \wedge tsr \wedge tpq
\wedge tqr \wedge trp)\cr
\noalign{\smallskip}
&\qquad\qquad\wedge\ \neg\,(stp \wedge stq \wedge str \vee tpq \wedge tqr
\wedge trp)\,.\cr}\eqno(4.2)$$
Both formulations say that the "tournament" associated with $t$ is {\it
"vortex-free"}, i.e., that it contains neither the ``"in-vortex"'' nor the
``"out-vortex",'' "!vortex"

\vskip15pt

$$\hbox{\qquad\hfil or \qquad\qquad\qquad\qquad ,\hfil}\eqno(4.3)$$

\vskip20pt

\noindent
among its 4-point subtournaments. 
It follows that if $p_1\ra p_2\ra\cdots\ra p_m\ra p_1$ is any "cycle" of
the tournament and if $q$ is any other point, then there exist~$j$
and~$k$ such that $p_j\ra q\ra p_k$.

The study of vortex-free tournaments is facilitated by the idea of
{\it"signed points"}, namely the original points $a_1,\ldots,a_n$ and
their "complements" $\bar{a}_1,\ldots,\bar{a}_n$. 
The original points are said to be positive, and their complements are
said to be negative. The operation of changing sign is called {\it
"negation"}, and we define "!absolute value of signed points"
$$\bar{\bar{a}}=a\qquad{\rm and}\qquad \vert
a\vert=\vert\bar{a}\vert =a\,.\eqno(4.4)$$
The relation $a_i\ra a_j$ is now extended to signed points by defining
$\bar{a}_j\ra a_i$, $a_j\ra\bar{a}_i$, and $\bar{a}_i\ra\bar{a}_j$
whenever $a_i\ra a_j$ holds. Thus, negation of a signed point reverses
the directions of all arcs touching~it.

\proclaim Lemma. A tournament is vortex-free if and only if it can be
obtained from a transitive tournament by negating a subset of its
points. "!transitive tournament"

\noindent{\it Proof.}\quad
Negating any point of an in-vortex produces an out-vortex, and
conversely. Therefore negation preserves vortex-freeness; any
tournament obtained from a transitive tournament by repeated negation
must be vortex-free.

Let $a$ be any point of a vortex-free tournament. Negate every
point~$p$ such that $p\ra a$, thereby obtaining a tournament such that
$a\ra p$ for all $p\neq a$. This new tournament is vortex-free, so it
cannot contain any cycles. Therefore it is transitive.\quad\pfbox

\proclaim Corollary. A tournament on\/ $n$ points is vortex-free if and
only if there is a string\/ $\alpha_1\alpha_2\ldots\alpha_n$ containing
each point or its complement, such that
$$\alpha_j\ra\alpha_k\qquad{\rm for}\quad 1\leq j<k\leq
n\,.\eqno(4.5)$$
Moreover, it is possible to construct such a string by examining the
direction of only\/ $O(n\log n)$ arcs.
"!strings that define vortex-free tournaments"

\noindent{\it Proof.}\quad
Condition (4.5) is simply a rephrasing of the lemma, in terms of our
notational conventions for signed points.

To construct a suitable string $\alpha_1\alpha_2\ldots\alpha_n$, we
may choose $\alpha_1$ to be any signed point. Then if a partial string
$\alpha_1\ldots\alpha_k$ has been constructed representing a
vortex-free subtournament on $k$~points for some $k$ with $1\leq k<n$,
let $p$ be any point distinct from
$\vert\alpha_1\vert,\ldots,\vert\alpha_k\vert$, and let $\alpha=p$
or~$\bar{p}$ according as $\alpha_1\ra p$ or $p\ra\alpha_1$. We know
from the lemma that there exists~$j$ in the range $1\leq j\leq k$ such
that $\alpha_i\ra\alpha$ for $1\leq i\leq j$ and $\alpha\ra\alpha_i$
for $j<i\leq k$; the value of~$j$ can be determined by using binary
search to examine the direction of at most $\lceil@\lg k\rceil$ arcs.
This yields a string
$\alpha'_1\ldots\alpha'_{k+1}=\alpha_1\ldots\alpha_j\,\alpha\,\alpha_{j+1}\ldots\alpha_k$
that represents a subtournament of $k+1$ points; and the process can
therefore continue with $k$ replaced by $k+1$ and
$\alpha_1\ldots\alpha_k$ replaced by $\alpha'_1\ldots\alpha'_{k+1}$,
until $k=n$.\quad\pfbox

\bigskip
The proof of this corollary shows that there are precisely $2n$
strings $\alpha_1\alpha_2\ldots\alpha_n$ that represent a given
vortex-free tournament by relation (4.5), since there is one string
for each choice of~$\alpha_1$. The rest of the string is then uniquely
determined. In fact, the $2n$ possible strings are related to each
other in a simple way, because
$$\alpha_1\alpha_2\ldots\alpha_n\qquad{\rm and}\qquad
\alpha_2\ldots\alpha_n\,\bar{\alpha}_1$$
define the same vortex-free tournament. The set of all strings
representing a given tournament is the set of all $n$-element
substrings of the infinite periodic string
$$\alpha_1\alpha_2\ldots\alpha_n\,\bar{\alpha}_1\bar{\alpha}_2\ldots
\bar{\alpha}_n\,\alpha_1\alpha_2\ldots\alpha_n\,
\bar{\alpha}_1\,\ldots\,,\eqno(4.6)$$
because these are the strings we obtain by repeatedly moving the first
element to the end and negating it, and because each of the $2n$
signed points occurs exactly once as the first element of one of these
substrings.

This method of representation makes it clear that there are precisely
$2^n n!/2n=2^{n-1}(n-1)!$ ways to define a vortex-free tournament on
$n$ labeled points. "!enumeration""!nonisomorphic systems, enumeration of"

We can also count the number of nonisomorphic vortex-free
tournaments, because there is one for every equivalence class of
boolean strings $\sigma_1\sigma_2\ldots\sigma_n$ under the equivalence
relation generated by
$$\sigma_1\sigma_2\ldots\sigma_n\ \equiv\
\sigma_2\ldots\sigma_n\bar{\sigma}_1\,.\eqno(4.7)$$
(Here each $\sigma_k$ is 0 or 1, and $\bar{\sigma}=1-\sigma$.) For
example, when $n=5$ the equivalence classes on the 32~boolean strings
of length~5 are
$$\advance\thickmuskip-.8mu
\eqalign{%
&00000\equiv 00001\equiv 00011\equiv 00111\equiv 01111\equiv
11111\equiv 11110\equiv 11100\equiv
11000\equiv 10000\,;\cr
\noalign{\smallskip}
&00010\equiv 00101\equiv 01011\equiv 10111\equiv 01110\equiv
11101\equiv 11010\equiv 10100\equiv
01000\equiv 10001\,;\cr
\noalign{\smallskip}
&00100\equiv 01001\equiv 10011\equiv 00110\equiv 01101\equiv
11011\equiv 10110\equiv 01100\equiv
11001\equiv 10010\,;\cr
\noalign{\smallskip}
&01010\equiv 10101\,.\cr}$$
The 0s correspond to positive variables and the 1s correspond to
negative variables in a string $\alpha_1\alpha_2\ldots\alpha_n$ that
represents a given tournament.

To see why isomorphism of tournaments corresponds to equivalence of
boolean strings, consider for example the vortex-free tournaments on
$\{a_1,\ldots,a_5\}$ defined by the strings
$a_1\bar{a}_2a_3\bar{a}_4a_5$ and $\bar{a}_3a_1\bar{a}_4a_2\bar{a}_5$.
The corresponding boolean vectors, 01010 and 10101, are equivalent, so
the two tournaments are supposed to be isomorphic. And indeed, the
tournament defined by $\bar{a}_3a_1\bar{a}_4a_2\bar{a}_5$ is also
defined by $a_1\bar{a}_4a_2\bar{a}_5a_3$, so we obtain an isomorphism
from the first to the second by mapping $(a_1,a_2,a_3,a_4,a_5)$ to
$(a_1,a_4,a_2,a_5,a_3)$. 

Conversely, inequivalence of the boolean strings implies nonisomorphism
of the tournaments. For example, the tournament defined by
$a_1\bar{a}_2a_3\bar{a}_4a_5$ is not isomorphic to, say,
$a_2\bar{a}_1\bar{a}_4a_5a_3$, whose boolean string is
$01100\not\equiv 01010$. For if the original~$a_k$ is mapped
to~$a_{f(k)}$, we could complement $a_{f(2)}$ and $a_{f(4)}$,
getting a transitive tournament in which $a_{f(1)}\ra\bar{a}_{f(2)}\ra
a_{f(3)}\ra\bar{a}_{f(4)}\ra a_{f(5)}$. The 10~strings
$\alpha_1\ldots\alpha_5$ representing that tournament cannot have the
form $a_2\bar{a}_1\bar{a}_4a_5a_3$, because they correspond only to
boolean strings of negation patterns that are equivalent to 01010.
This argument has been expressed in terms of a particular example with
$n=5$, but it is perfectly general.

Thus the number $N(n)$ of nonisomorphic vortex-free tournaments on
$n$~points can be deduced by counting equivalence classes, and we can
solve that problem by slightly extending "MacMahon"'s classic solution
to the problem of counting all distinct "necklace patterns" (see
\ref[33, pages 139--141]).
We have
$$\eqalign{2nN(n)&=\sum_{\sigma_1,\ldots,\sigma_n\in\{0,1\}}\,
\sum_{k=0}^{2n-1}[@\sigma_1\ldots\sigma_n=\sigma_{k+1}\ldots\sigma_{k+n}@]\cr
\noalign{\medskip}
&=\sum_{k=0}^{2n-1}\,
\sum_{\sigma_1,\ldots,\sigma_n\in\{0,1\}}[@\sigma_1\ldots\sigma_n
=\sigma_{k+1}\ldots\sigma_{k+n}@]\cr}$$
when we define $\sigma_{j+n}=\bar{\sigma}_j$ for all $j>0$; for if we
write down $2n$~strings $\alpha'_{k+1}\ldots\alpha'_{k+n}$ for each
equivalence class starting with any representative
$\sigma'_1\ldots\sigma'_n$ of that class, $\sigma_1\ldots\sigma_n$
occurs as often as there are solutions to the string equation
$\sigma_1\ldots\sigma_n=\sigma_{k+1}\ldots\sigma_{k+n}$. (In this
formula for $2n\,N(n)$  we are
using "Iverson's convention", which evaluates bracketed statements to~0
if they are false, to~1 if they are true; see
\ref[46].)

Given any value of~$k$, the inner sum over $\sigma_1,\ldots\sigma_n$
is 0 if $g=\gcd(k,2n)$ divides~$n$, because the condition $\sigma_j
=\sigma_{j+n}$ for all~$j$ implies that
$\sigma_1=\sigma_{g+1}=\sigma_{2g+1}=\cdots\,$, and we know that
$\sigma_1\neq\sigma_{n+1}$. But if $g$ does not divide~$n$, the sum is
$2^{g/2}$, because we can vary $\sigma_1,\ldots,\sigma_{g/2}$
independently and set $\sigma_{j+g/2}=\bar{\sigma}_j$ for all~$j$; in this
case $g/2$ is an odd divisor of~$n$. Thus if $n=2^lq$ and $q$ is odd,
the nonzero terms occur when $\gcd(k,2n)=2n/d$, where $d$ divides~$q$;
and in such cases $k=2nr/d$, where $r$ is relatively prime to~$d$.
Hence
$$\eqalignno{2nN(n)&=\sum_{d\backslash
q}2^{n/d}\,\sum_{r=0}^{d-1}\,[@\gcd(r,d)=1@]\cr
\noalign{\medskip}
&=\sum_{\scriptstyle{d\backslash n\atop d\ {\rm odd}}}
2^{n/d}\varphi(d)\,,&(4.8)\cr}$$
and $N(n)$ is determined. In particular, when $n$ is odd, the number
of nonisomorphic vortex-free tournaments on $n$~points is one half the
number of distinct necklace patterns of length~$n$ that can be formed
with two kinds of beads. When $n$ is an odd prime~$p$ times a power of~2,
the number of nonisomorphic vortex-free tournaments is
$\bigl(2^n+(p-1)2^{n/p}\bigr)/2n$. 

Notice that the vortex-free tournament defined by
$\alpha_1\alpha_2\ldots\alpha_n$ is transitive if and only if the
corresponding boolean string is equivalent to $00\ldots 0$. This
occurs if and only if the boolean string has the form $0^k1^{n-k}$ or
$1^k0^{n-k}$ for some~$k$, if and only if the string
$\alpha_1\alpha_2\ldots\alpha_n\bar{\alpha}_1$ has exactly one change
of sign between adjacent elements.

The theory of tournaments includes numerous results about so-called
{\it"score vectors"\/} $(s_1,s_2,\ldots,s_n)$, which are the outdegrees
of the points, sorted into nondecreasing order~\ref[56].
Vortex-free tournaments on 5 or fewer points are characterized up to
isomorphism by their score vectors. But the two tournaments defined by
$$a_1a_2a_3\bar{a}_4a_5a_6\qquad{\rm and}\qquad
a_6a_5\bar{a}_4a_3a_2a_1$$ 
both have the score vector $(1,2,2,3,3,4)$; they are anti-isomorphic,
but not isomorphic.

J. W. "Moon" \ref[57] has given another characterization of vortex-free
tournaments, which he studied because they are precisely the
tournaments whose subtournaments are all either "transitive" or
irreducible. (A~tournament is said to be "reducible" if it has more than
one strong component, or equivalently if its vertices can be
partitioned into nonempty subsets~$P$ and~$Q$ with $p\ra q$ for all
$p\in P$ and $q\in Q$.) There is an integer $m\geq 1$ such that the
number of blocks of consecutive elements of the same sign is
either~$2m$ or~$2m-1$ in every string $\alpha_1\,\ldots\,\alpha_n$ that
defines a given vortex-free tournament, depending on whether the signs
of~$\alpha_1$ and~$\alpha_n$ are different or the same. Let us say
that a vortex-free tournament belongs to class~$m$ if $m$ is that
integer; thus, transitive tournaments belong to class~1, and a
vortex-free tournament on $n$~vertices may belong to a class whose
number is as high as $\lceil n/2\rceil$. Moon proved (4.8) by showing
that the number of nonisomorphic vortex-free tournaments of class~$m$ on
$n$~vertices~is
$${1\over n}\,\sum_{\scriptstyle{k\backslash n\atop
k\backslash(2m-1)}}\varphi(k){n/k\choose (2m-1)/k}\,,\eqno(4.9)$$
then summing on $m$.

Further characterizations of vortex-freeness were recently discovered
by Fred "Galvin" \ref[23]: A tournament is vortex-free if and only if
every subtournament of even order contains an even number of cyclic
triples $p\to q\to r\to p$, if and only if every subtournament of
order~$2m$ has exactly $m$ vertices of score less than~$m$.
A~tournament contains no out-vortex if and only if every subtournament
of order~$2m$ has at most $m$ vertices of score less than~$m$,
if and only if it can be partitioned into two parts $P$ and~$Q$, where
$P$~is vortex-free, $Q$~is transitive, and $p\to q$ for all $p\in P$,
$q\in Q$.

We are, however, digressing from our main topic of CC systems and
geometry. CC~systems, which correspond intuitively to arrangements of
points in the plane, satisfy all of the axioms considered above; hence
every point~$p$ in a CC system on $n$~points has an associated
vortex-free tournament defined by a string
$\alpha_1\alpha_2\ldots\alpha_{n-1}$ on the remaining points. This
string is, in fact, easy to interpret: It represents the order in
which the remaining points are encountered when a straight line
through~$p$ rotates counterclockwise through $180^{\circ}$. The
positive elements of $\alpha_1\alpha_2\ldots\alpha_{n-1}$ are the
points to the left of the initial position of this "sweep line"; the
negative elements are those to the right. 
If the sweep line is given a suitable direction, the positive elements
are all encountered ``ahead'' of~$p$ and the negative ones are all
encountered ``behind''~$p$. We have the counterclockwise
triple $p@ \alpha_1\alpha_k$ iff $\alpha_1$ and~$\alpha_k$ have the
same sign. When the sweep line passes~$\alpha_1$, point
$\vert\alpha_1\vert$ passes to the other side, and the process
continues in the same way on
$\alpha_2\ldots\alpha_{n-1}\bar{\alpha}_1$. The $2(n-1)$ different
strings $\alpha_1\alpha_2\ldots\alpha_{n-1}$ that define $p$'s
tournament correspond to the different initial positions and
orientations of the sweep line.

The lemma and corollary we have proved do not rely on Axiom 1, so
vortex-free tournaments
 characterize all sets of triples that satisfy Axioms 2, 3, 5,
and~$5'$. Let us call these {\it"weak pre-CC systems"}. The triples of
any weak pre-CC system (hence in particular the triples of any CC system)
can be represented efficiently in a computer by an $n\times n$ matrix~$A$
such that, for each pair of points $p\neq q$, the value of $A_{pq}$ is
the position of~$q$ or~$\bar{q}$ in a string
$\alpha_{p,1}\ldots\alpha_{p,n-1}$ that defines the tournament
associated with~$p$; we also need an $n\times n$ boolean matrix~$B$
such that $B_{pq}$ is the sign of~$q$ in that string. Then we have
$$\eqalign{pqr\ \Longleftrightarrow\ &\bigl((A_{pq}<A_{pr}) \wedge
(B_{pq}=B_{pr})\bigr)\cr
\noalign{\smallskip}
&\qquad\vee\ \bigl((A_{pq}>A_{pr})\wedge (B_{pq}\neq B_{pr})\bigr)
\,.\cr}\eqno(4.10)$$
In practice, the matrices $A$ and $B$ often make it possible to
compute the value of a given relation $pqr$ more quickly than
evaluating it directly from its definition, since the definition might
require the evaluation of a determinant or the analysis of some other
complex criteria. The "preprocessing" time needed to compute $A$ and~$B$
involves only $O(n^2\log n)$ steps, according to the corollary proved
above. "!counterclockwise queries"

The number of weak pre-CC systems on $n$ labelled points is exactly
$$\bigl(2^{n-2}(n-2)!\bigr)^n\ =\ 2^{\Theta(n^2\log n)}\,,\eqno(4.11)$$
because this is the number of ways to define $n$ independent
vortex-free tournaments on $n-1$ points. This is substantially smaller
than the total number $2^{(n-2)(n-1)n/2}$ of triple systems that are
required to satisfy only Axioms~2 and~3.

"Axiom 1" makes the individual tournaments dependent on each other. If
$q\ra r$ is present in the tournament associated with~$p$, then $r\ra
p$ is present in the tournament for~$q$ and 
 $p\ra q$ is in the tournament for~$r$. Thus,
the structure of pre-CC systems is more refined than the structure of
systems that are known only to be weakly pre-CC.

\beginsection 5. Pre-CC systems and CC systems.
Let us extend the idea of "signed points" to triples, so that
$$pqr\Lrl\neg\,pq\bar{r}\Lrl p\bar{q}\bar{r}\Lrl \neg\,p\bar{q}r\Lrl
\bar{p}\bar{q}r\Lrl\neg\,\bar{p}\bar{q}\bar{r}\Lrl\bar{p}q\bar{r}\Lrl
\neg\,\bar{p}qr\,.\eqno(5.1)$$
Negating a point in a triple system therefore complements the value of
all triples that contain that point.

The following theorem shows that pre-CC systems are not much different
from full CC systems; thus, Axiom~5 captures almost all the
important properties of Axiom~4:

\proclaim Theorem. A set of triples is a "pre-CC system" if and only if
it can be obtained from a CC system by negating a subset of its
points.

\noindent{\it Proof.}\quad
Negating a point preserves Axioms 1, 2, and~3, and it interchanges
Axioms~5 and~$5'$. Therefore "negation"  takes pre-CC systems into pre-CC
systems, and any system obtained from a CC system by repeated negation
must be pre-CC.

Conversely, let $a$ and $b$ be any points of a pre-CC system. Negate
the remaining points~$p$ if necessary so that $abp$ holds for all~$p$.
We will show that the resulting system is a CC system.

Indeed, Axiom 5 implies that the tournament for~$a$ is transitive. It
follows that Axiom~4 cannot be violated by four points that include
the point~$a$;  we cannot have 
$$(apq \wedge aqr \wedge arp \wedge rqp) \vee (aqp \wedge
arq \wedge apr \wedge pqr)$$
when the tournament for $a$ is transitive. Moreover, any four points
$\{p,q,r,t\}$ different from~$a$ can be ordered such that $p\ra q\ra
r\ra t$ in~$a$'s tournament. Suppose the tournament for~$t$ is defined
by the string $\alpha_1\ldots\alpha_{n-1}$, where $\alpha_1=a$. Then
$p$, $q$, $r$ must occur in this string with a positive sign, because
we have $tap$, $taq$, and $tar$. Hence the restriction of the
tournament for~$t$ to $\{p,q,r\}$ is transitive, and $\{p,q,r,t\}$
cannot violate Axiom~4.\quad\pfbox

\bigskip
Our proof of the theorem has, in fact, told us more: 

\proclaim Corollary.
A pre-CC system for which at least one point is associated with a
transitive tournament is a CC system.

We will see in section 11 below that the converse of this corollary is
also true: Every CC system with at least three points has at least
three points associated with a "transitive tournament". Such points may
be called {\it"extreme points"}, since a point of a realizable
CC~system is associated with a transitive tournament if and only if it
lies on the convex hull.

A {\it"signed bijection"\/} is a one-to-one correspondence from one set
of signed points to another that sends $\alpha\mapsto\beta$ if and
only if it sends $\bar{\alpha}\mapsto\bar{\beta}$. A~{\it"signed
permutation"\/} is a signed bijection from a set of signed points to
itself. There are $2^n n!$ signed permutations on $n$~elements,
because there are $n!$ ways to choose the absolute values of the
images and $2^n$ ways to choose the signs. The group of all signed
permutations on $n$~elements is the group of automorphisms of the
"$n$-cube", also known as the "hyperoctahedral group", sometimes
denoted~$B_n$ (see, for example, 
\ref[1]).

Let us say that two pre-CC systems are {\it"preisomorphic"\/} if there
is a signed bijection~$\sigma$ that carries one into the other in
such a way that $pqr$ holds in the first iff
$\sigma(p)\sigma(q)\sigma(r)$ holds in the second. The theorem just
proved states that every pre-CC system is preisomorphic to a CC
system. Nonisomorphic CC systems can sometimes be preisomorphic; for
example, it turns out that there are exactly three isomorphism classes
of CC systems on 5~elements, all preisomorphic to each other. It
follows that every pre-CC system on 5~elements can be obtained by
negation and renaming of points from the CC system that
corresponds to the vertices of a pentagon.

It is easy to see which CC systems are preisomorphic to "$n$-gons", as
defined in (3.6), because we merely need to determine which points can
be negated without violating Axiom~4. Axiom~4 applies to subsets of
4~points, and all 4-element subsystems of an $n$-gon are equivalent to
the vertices of a square. If the four points are $(a,b,c,d)$ in
counterclockwise order, the valid triples are $abc$, $bcd$, $cda$, and
$dab$; and it is easy to verify that the 16~possible negations all
produce CC systems except when we map $(a,b,c,d)$ into
$(\bar{a},b,\bar{c},d)$ or $(a,\bar{b},c,\bar{d})$. Thus we obtain a
CC system from an $n$-gon by "negation" if and only if the negated
vertices are consecutive. The three nonisomorphic systems obtained
from a pentagon occur when we negate 0, 1, or~2 consecutive vertices:
$$\def\\(#1,#2){\put(#1,#2){\disk{.3}}}
\vcenter{\hbox{\beginpicture(8,5)(0,0)
\\(4,2)\\(6,2.3333)\\(2,2.3333)\\(8,3.3333)\\(0,3.3333)
\put(4,2){\line(6,1)2}
\put(4,2){\line(-6,1)2}
\put(0,3.3333){\line(2,-1)2}
\put(8,3.3333){\line(-2,-1)2}
\endpicture}}\;,\qquad
\vcenter{\hbox{\beginpicture(7,5)(0,0)
\\(0,4.5)\\(7,4.5)\\(2.3333,3.91667)\\(4.6667,3.91667)\\(3.5,1)
\put(0,4.5){\line(4,-1){2.3333}}
\put(7,4.5){\line(-4,-1){2.3333}}
\put(2.3333,3.91667){\line(1,0){2.3334}}
\endpicture}}\;,\qquad
\vcenter{\hbox{\beginpicture(6,5)(0,0)
\\(.5,4.8333)\\(5.5,4.8333)\\(3,4)\\(1.75,1)\\(4.25,1)
\put(1.75,1){\line(1,0){2.5}}
\put(3,4){\line(3,1){2.5}}
\put(3,4){\line(-3,1){2.5}}
\endpicture}}\;;\eqno(5.2)$$
in general when we negate $k$ consecutive vertices of an $n$-gon, the
resulting CC system is equivalent to the sets of points obtained by
placing an upward-bending horizontal arrangement of $n-k$ points
sufficiently far above a downward-bending arrangement of $k$~points,
$$\def\\(#1,#2){\put(#1,#2){\disk{.3}}}
\vcenter{\hbox{\beginpicture(18,11)(0,0)
\\(0,9.5)\\(2,8.7)\\(4,8.3667)\\(6,8.3667)\\(8,8.7)\\(10,9.5)
\put(0,9.5){\line(5,-2)2}
\put(10,9.5){\line(-5,-2)2}
\put(4,8.3667){\line(-6,1)2}
\put(6,8.3667){\line(6,1)2}
\put(4,8.3667){\line(1,0)2}
\\(1,1)\\(3,1.8)\\(5,2,13333)\\(7,1.8)\\(9,1)
\put(3,1.8){\line(-5,-2)2}
\put(7,1.8){\line(5,-2)2}
\put(3,1.8){\line(6,1)2}
\put(7,1.8){\line(-6,1)2}
\put(15.5,7.5){\makebox(0,0){$n-k$}}
\put(15,1.5){\makebox(0,0){$k$}}
\endpicture}}.\eqno(5.3)$$
If $k$ and $n-k$ are both greater than 1, the upper and lower points
will be concave with respect to each other and the convex hull will be
of size~4. Exactly $\lfloor(n+1)/2\rfloor$
nonisomorphic CC systems are obtained in this way, because the
negation of $n-k$ consecutive points is essentially the same as the
negation of~$k$. 

An $n$-gon has exactly $2n$ "preautomorphisms" (preisomorphisms
with itself), generated by the cyclic shift
$\sigma=(1,2,\ldots,n)\mapsto (2,\ldots,n,1)$ and by the negated
reflection $\rho=(1,2,\ldots,n)\mapsto
(\bar{n},\ldots,\bar{2},\bar{1})$; the
mapping $\sigma\rho\mskip2mu\sigma\rho$ is the identity. (Exceptions: When
$n=3$ there are 12~preautomorphisms, generated by $\sigma$, $\rho$,
and $(1,2,3)\mapsto (1,\bar{2},\bar{3})$. When $n=4$, there are~24,
generated by $\sigma$, $\rho$, and $(1,2,3,4)\mapsto
(1,\bar{3},\bar{4},2)$. A~signed permutation that fixes 1 and takes
$2\mapsto k$ or $\bar{k}$ must take $(3,\ldots,n)\mapsto
(k+1,\ldots,n,\bar{2},\ldots,\overline{k-1})$ or
$(\overline{k+1},\ldots,\bar{n},2,\ldots,k-1)$, respectively, in order
to preserve the tournament corresponding to~1; this mapping is never a
preautomorphism when $n>4$, so there are no further exceptions.)

If $p$ and $q$ are signed points of a pre-CC system and if $p'$
and~$q'$ are signed points of another, there is at most one
preisomorphism~$\sigma$ with $\sigma(p)=p'$ and $\sigma(q)=q'$. For if
the tournament for~$p$ is defined by the string
$\alpha_1\alpha_2\ldots\alpha_{n-1}$ where $\alpha_1=q$, and if the
tournament for $p'$ is defined by
$\alpha'_1\alpha'_2\ldots\alpha'_{n-1}$ where $\alpha'_1=q'$, then we
must have $\sigma(\alpha_k)=\alpha'_k$ for all~$k$. Notice that the
tournament for $p$ is defined by $\alpha_1\ldots\alpha_{n-1}$ iff the
tournament for $\bar{p}$ is defined by $\alpha_{n-1}\ldots\alpha_1$.

Suppose two CC systems are preisomorphic under the signed
bijection~$\sigma$, and suppose $\sigma(p)$ is positive for all
extreme points. In other words, we are assuming that whenever $p$ has a
transitive tournament in the first CC system, $\sigma(p)$ is a
positive point of the second system. We can prove that  $\sigma(p)$
must then be positive for all~$p$. Let $\tau(p)=\vert \sigma(p)\vert$
be the ordinary (unsigned) bijection corresponding to~$\sigma$; if
the claim is false, we have $\tau(s)=\overline{\sigma(s)}$ for
some~$s$. Let $p,q,r$ be extreme points; then 
$pqr\Lrl\tau(p)\tau(q)\tau(r)$,
$pqs\Lrl\neg\,\tau(p)\tau(q)\tau(s)$,
$qrs\Lrl\neg\,\tau(q)\tau(r)\tau(s)$,
$rps\Lrl\neg\,\tau(r)\tau(p)\tau(s)$.
Since $s$ is not an extreme point, we can choose $p,q,r$ so that
$s\in\Delta pqr$ by letting $q$ and~$r$ be the extreme points closest
to~$s$ in the tournament for~$p$. But then Axiom~4 is violated 
in the second CC system.

If $p$ is an extreme point of any CC system, we obtain a preisomorphic
CC system by negating~$p$ (i.e., by mapping $p\mapsto\bar{p}$ and
"!negation"
leaving all other points unchanged); this follows from the corollary
above, because $\bar{p}$ has a transitive tournament.

Now suppose two CC systems are preisomorphic under~$\sigma$, and let
$k$ be the number of negated points. We call $k$ the {\it distance\/}
between the two systems under~$\sigma$. If the original systems are
not isomorphic, there must be an extreme point~$p$ in the first system for
which $\sigma(p)$ is negative. Negating $p$ gives us another CC system
"!adjacent pre-CC systems"
whose distance from the second system is only $k-1$ under~$\sigma'$,
where $\sigma'$ is the mapping $\sigma'(x)=\sigma(x)$ if $\vert
x\vert\neq p$, $\overline{\sigma(x)}$ if $\vert x\vert=p$. Therefore
we can go from one CC system to any other preisomorphic CC system
by repeatedly negating extreme points.

\beginsection 6. An NP-complete problem.
When working with CC systems, we need to deal with partial
information---to know when certain sets of triples imply others.
Ideally we would like to have an efficient way to solve decision problems
involving the vertices of a CC system. But unfortunately it turns out that the
axioms, though simple, can lead to situations that are probably very
difficult to decide in general. We will prove in this section that it
is "NP-complete" to decide whether specified values of fewer than
${n\choose 3}$ triples can be completed to a full set of values that
satisfies Axioms 1--5. In fact, it turns out to be NP-complete to
decide a much simpler problem, which concerns only the ${n-1\choose
2}$ triples involving a particular point: Given a "directed graph", can
additional arcs be added to make that graph into a "vortex-free
tournament"?

The analogous question for "transitive tournaments" is much easier; we
"!topological sorting"
can add such arcs if and only if the given digraph has no cycles. But
the question of consistency with respect to vortex-freeness is
evidently much harder---even though the total number of vortex-free
tournaments is only $2^{n-1}(n-1)!$, whose logarithm is asymptotically
equal to the log of the number~$n!$ of transitive tournaments, and
even though problems about cycles are usually  ``linear'' and/or
reducible to efficient algorithms based on the theory of matroids.

Before we prove this negative result, a few preparations are
necessary. Recall that the "satisfiability problem" {\tt "SAT"} asks if it
is possible to find boolean values of variables $(x_1,\ldots,x_n)$ such
that every clause in
 a given set of "clauses" is true, where each clause has the
form $(\sigma_1\vee\cdots\vee\sigma_k)$, and where each $\sigma_j$ is
either $x_i$ or~$\bar{x}_i$, a~variable or its complement. The {\tt
"3SAT"} problem is the special case where each clause has the form
$(\sigma_1\vee\sigma_2\vee\sigma_3)$.

We will work with another special case of {\tt SAT} called {\tt"CSAT"}
for ``"complementary satisfiability".''  In {\tt CSAT} the clauses come
in pairs: Whenever $(\sigma_1\vee\cdots\vee\sigma_k)$ is a clause, the
complementary clause $(\bar{\sigma}_1\vee\cdots\vee\bar{\sigma}_k)$ is
also present. Special cases of {\tt CSAT} called {\tt 3CSAT} and {\tt
4CSAT} involve further restrictions to~3 or~4 literals~$\sigma_i$ per
clause.

\proclaim Lemma. {\tt 3SAT} reduces to {\tt 4CSAT}.

\noindent{\it Proof.}\quad
Given a set of clauses over $n$ variables $(x_1,\ldots,x_n)$, add a
new variable~$x_0$ and construct the new clauses
$$(x_0\vee\sigma_1\vee\sigma_2\vee\sigma_3) \wedge
(\bar{x}_0\vee\bar{\sigma}_1\vee\bar{\sigma}_2\vee\bar{\sigma}_3)\eqno(6.1)$$
for each clause in the original {\tt 3SAT} problem. If the original
problem is satisfied by the boolean values $x_1=b_1$, \dots,~$x_n=b_n$,
the new one is satisfied by $x_0=0$, $x_1=b_1$, \dots, $x_n=b_n$.
If the new problem is satisfied by $x_0=b_0$, $x_1=b_1$, \dots,~$x_n=b_n$,
the original is satisfied by $x_1=b_1$, \dots,~$x_n=b_n$
if $x_0=0$, or by $x_1=\bar{b}_1$, \dots, $x_n=\bar{b}_n$ if
$x_0=1$.\quad\pfbox

\proclaim Lemma. {\tt 4CSAT} reduces to {\tt 3CSAT}.

\noindent{\it Proof.}\quad
Introduce new auxiliary variables $a_j$ for every given pair of clauses
$(\sigma_1\vee\sigma_2\vee\sigma_3\vee\sigma_4)\ \wedge\
(\bar{\sigma}_1\vee\bar{\sigma}_2\vee\bar{\sigma}_3\vee\bar{\sigma}_4)$,
and replace these clauses by
$$(a_j\vee\sigma_1\vee\sigma_2)\ \wedge\
(\bar{a}_j\vee\sigma_3\vee\sigma_4)\ \wedge\
(\bar{a}_j\vee\bar{\sigma}_1\vee\bar{\sigma}_2)\ \wedge\
(a_j\vee\bar{\sigma}_3\vee\bar{\sigma}_4)\,.\eqno(6.2)$$
If the original problem is satisfied by boolean values $(\sigma_1,\sigma_2,
\sigma_3,\sigma_4)$, the new clauses are satisfied by taking
$a_j=(\bar{\sigma}_1\wedge\bar{\sigma}_2)\vee(\sigma_3\wedge\sigma_4)$.
Conversely, if the new clauses are satisfied by certain boolean values, we have
either $(\sigma_1\vee\sigma_2)\ \wedge\ (\bar{\sigma}_3\vee\bar{\sigma}_4)$
or $(\bar{\sigma}_1\vee\bar{\sigma}_2)\ \wedge\
(\sigma_3\vee\sigma_4)$, depending on whether $a_j=0$ or $a_j=1$; in
both cases the original clauses are satisfied.\quad\pfbox

\bigskip
Note: The {\tt 3CSAT} problem is the same as ``"not-all-equal {\tt
3SAT}",''
which is problem LO3 in "Garey" and "Johnson"'s catalog
\ref[24, Appendix 9.1].
This problem was first proved NP-complete by Thomas J. "Schaefer"
\ref[64].

Now we come to the problem of "vortex-free completion", {\tt"VFC"},
mentioned above: Decide whether a given directed graph is a subgraph
of a vortex-free tournament.

\proclaim Theorem. {\tt 3CSAT} reduces to {\tt VFC}.

\noindent{\it Proof.}\quad
Given a set of complementary pairs of clauses on $x_1,\ldots,x_n$, we
construct a directed graph on the points $p_0,p_1,\ldots,p_n$, plus
ten additional points $a_j$, $a'_j$, $a''_j$, $b_j$, $b'_j$, $b''_j$,
$c_j$, $c'_j$, $c''_j$, $d_j$ for each clause. If this digraph can be
embedded in a vortex-free tournament, the final arc $p_0\ra p_k$ will
correspond to the value $x_k=1$, and $p_k\ra p_0$ will correspond to
$x_k=0$. The arcs of the directed graph are obtained by defining
27~arcs corresponding to the $j\/$th pair of clauses
$(\sigma_1\vee\sigma_2\vee\sigma_3)\ \wedge\
(\bar{\sigma}_1\vee\bar{\sigma}_2\vee\bar{\sigma}_3)$ as follows: If
$\sigma_1=x_k$, include the eight arcs
$$\vcenter{\halign{$\hfil#\hfil\;$&$\hfil#\hfil\;$%
&$\hfil#\hfil\;$&$\hfil#\hfil\;$&$\hfil#\hfil$\quad&#\hfil\cr
p_0&\ra&a'_j&\ra&a_j\cr
&\duparrow&&\duparrow&&;\cr
p_k&\ra&a''_j&\ra&d_j\cr}}\eqno(6.3)$$
if $\sigma_1=\bar{x}_k$, include
$$\vcenter{\halign{$\hfil#\hfil\;$&$\hfil#\hfil\;$%
&$\hfil#\hfil\;$&$\hfil#\hfil\;$&$\hfil#\hfil$\quad&#\hfil\cr
p_0&\ra&a'_j&\ra&d_j\cr
&\duparrow&&\uuparrow&&;\cr
p_k&\ra&a''_j&\ra&a_j\cr}}\eqno(6.4)$$
Include eight similar arcs for $\sigma_2$ using the points $b_j$,
$b'_j$, $b''_j$ instead of $a_j$, $a'_j$, $a''_j$; and eight more
for~$\sigma_3$, using points $c_j$, $c'_j$, $c''_j$. Also include
three additional arcs $a_j\ra b_j\ra c_j\ra a_j$. 

Suppose this digraph can be completed to a vortex-free tournament.
Then if $p_0\ra p_k$, we must have $a'_j\ra a''_j$ and $a_j\ra d_j$ if
construction (6.3) was used, or $a'_j\ra a''_j$ and $d_j\ra a_j$ if
\thinspace(6.4) was used. Similarly, the arc $p_k\ra p_0$ forces either $d_j\ra
a_j$ or $a_j\ra d_j$, respectively. Thus we have $a_j\ra d_j$ if and
only if $\sigma_1=1$, in our interpretation of the arc direction
between~$p_0$ and~$p_k$. The same applies to $b_j$ and~$c_j$. The
cycle $a_j\ra b_j\ra c_j\ra a_j$ now means that $\sigma_1$, $\sigma_2$,
and $\sigma_3$ cannot be all~0 or all~1. Hence the clauses
$(\sigma_1\vee\sigma_2\vee\sigma_3)\ \wedge\
(\bar{\sigma}_1\vee\bar{\sigma}_2\vee\bar{\sigma}_3)$ are satisfied.

Conversely, if all clauses can be satisfied by boolean values
$x_1,\ldots,x_n$, we must show that the directed graph can indeed be
embedded in a vortex-free tournament. Consistent arcs need to be found
between all points, including those between, say, $a_j$~and~$b''_i$
for $i\neq j$, without introducing any vortices. A~suitable string of
signed points to define the desired tournament can be constructed in
the form
$$p_0\,A_1\ldots A_m\,\sigma_1\ldots\sigma_n\,B_1\ldots B_m\,C_1\ldots
C_m\,d_1\ldots d_m\eqno(6.5)$$
where $\sigma_k=p_k$ or $\bar{p}_k$ according as $x_k=1$ or~0, and
where $(A_j,B_j,C_j)$ depend on the $j\/$th clause pair
$(\sigma_1\vee\sigma_2\vee\sigma_3)\,\wedge\,(\bar{\sigma}_1\vee
\bar{\sigma}_2\vee\bar{\sigma}_3)$ as follows:
$$\vcenter{\halign{$\hfil#\hfil$\qquad
&$\hfil#\hfil$\qquad&$\hfil#\hfil$\qquad&$\hfil#\hfil$\cr
{\rm If}&\hbox{then $A_j$ gets}&\hbox{and $B_j$ gets}&\hbox{and $C_j$
gets}\cr
\noalign{\medskip}
\sigma_1=x_k=1&a'_j&a_j&a''_j\,;\cr
\noalign{\smallskip}
\sigma_1=\bar{x}_k=1&a''_j&a_j&a'_j\,;\cr
\noalign{\smallskip}
\sigma_1=x_k=0&a''_j&\bar{a}_j&a'_j\,;\cr
\noalign{\smallskip}
\sigma_1=\bar{x}_k=0&a'_j&\bar{a}_j&a''_j\,.\cr}}\eqno(6.6)$$
A similar construction is applied to $\sigma_2$ and $\sigma_3$, but
with $b_j$ and~$c_j$ variables instead of $a_j$, $a'_j$, and~$a''_j$.
The three variables put into~$A_j$ and the three put into~$C_j$ can be
in any order; but for definiteness we will put $a'_j$ or~$a''_j$
first, then $b'_j$ or~$b''_j$, then $c'_j$ or~$c''_j$. The
string~$B_j$ should be either
$$\eqalignno{&a_j\bar{c}_jb_j\quad{\rm or}\quad
b_j\bar{a}_jc_j\quad{\rm or}\quad c_j\bar{b}_ja_j\cr
\noalign{\smallskip}
&\qquad{\rm or}\quad\bar{a}_jc_j\bar{b}_j\quad{\rm
or}\quad\bar{b}_ja_j\bar{c}_j\quad {\rm or}\quad
\bar{c}_jb_j\bar{a}_j\,,&(6.7)\cr}$$
depending on the variables placed by (6.6) into~$B_j$. Two of $a_j$,
$b_j$,~$c_j$ will have the same sign, and this selects a unique member
of (6.7).

For example, if clause-pair~$j$ is $(\bar{q}\vee r\vee s)\,\wedge\,
(q\vee\bar{r}\vee\bar{s})$, and if the clauses are satisfied by
$\bar{q}\wedge r\wedge\bar{s}$, then $A_j=a''_jb'_jc''_j$,
$B_j=a_j\bar{c}_jb_j$,  $C_j=a'_jb''_jc'_j$, and (6.5) will contain
$$p_0\,a''_jb'_jc''_j\,\bar{q}r\bar{s}\,a_j\bar{c}_jb_j\,a'_jb''_jc'_j\,d_j$$
when we erase all other points. 

It remains to prove that all arcs of the original directed graph are
consistent with the arc directions implied by string (6.5). The arcs
of (6.3) and (6.4) that touch $p_0$ and~$d_j$ are consistent, because
$a'_j$ and~$a''_j$ appear between~$p_0$ and~$d_j$ in (6.5). The arcs
that touch $p_k$ are consistent, because we have either 
$a'_ja_ja''_j$ or $a''_j\bar{a}_ja'_j$ when $\sigma_1=x_k$, and we
have either $a'_jp_ka''_j$
or $a''_j\bar{p}_ka'_j$ depending on whether $x_k=1$ or~0. The arcs
that touch $a_j$ are consistent, because we have either $a''_ja_ja'_j$
or $a'_j\bar{a}_ja''_j$ when $\sigma_1=\bar{x}_k$. The same
observations apply to $b_j$ and~$c_j$ variables. Finally, the arcs
$a_j\ra b_j\ra c_j\ra a_j$ are consistent with all of the
possibilities in (6.7).\quad\pfbox

\proclaim Corollary. The problem of deciding whether the values of a
given set of triples are consistent with Axioms 1--5 is NP-complete. 

\noindent{\it Proof.}\quad
This problem is clearly in NP. The theorem shows that it is NP-hard
just to decide whether triples all involving a single point~$t$ will
satisfy Axioms 5 and~$5'$. To complete the proof, we need to show that
any vortex-free tournament is the tournament associated with a point
of some CC system."!embedding"

Given any vortex-free tournament on $\{a_1,\ldots,a_n\}$, let $a_0$ be
another point, and define $a_0\ra a_k$ for all~$k$. Then let
$a_ia_ja_k$ be true if and only if at least two of the relations
$a_i\ra a_j$, $a_j\ra a_k$, $a_k\ra a_i$ are true. This rule defines a
system of triples in which the original tournament is the tournament
associated with~$a_0$. We claim that it is, in fact, a~CC system.
Axioms 1--3 certainly hold.

Suppose $t\in\Delta pqr$; that is, suppose we have $tpq$, $tqr$, and
$trp$. Then the inequalities
$$\eqalign{%
[t\ra p]+[p\ra q]+[q\ra t]&\geq 2\cr
[t\ra q]+[q\ra r]+[r\ra t]&\geq 2\cr
[t\ra r]+[r\ra p]+[p\ra t]&\geq 2\cr}$$
can be added to give
$$[p\ra q]+[q\ra r]+[r\ra p]+3\geq 6\,.$$
Hence $p\ra q\ra r\ra p$, and Axiom 4 has been verified.

Moreover, the given system has the property that $t\in\Delta pqr$
implies $t\ra p\vee q\ra t$, $t\ra q\vee r\ra t$, and $t\ra r\vee p\ra t$.
Hence we have either $$t\ra p\;\wedge\; t\ra q\;\wedge\; t\ra r$$ or $$p\ra t
\;\wedge\;q\ra t\;\wedge\; r\ra t\,.$$ But that is impossible in a vortex-free
tournament; so $t\in\Delta pqr$ can occur only when $t$ is the special
point~$a_0$. Axiom~5 now follows immediately.

Alternatively, we can use a geometric argument to show that the stated
triples form a CC system. Let the given vortex-free tournament be
defined by the string of signed points $\alpha_1\ldots\alpha_n$ and
consider arbitrary angles $$0<\theta_1<\cdots<\theta_n<\pi.$$ If
$\alpha_j=a_k$ let $a_k$ be the complex number $e^{i\theta_j}$; if
$\alpha_j=\bar{a}_k$ let $a_k=-e^{i\theta_j}$. Let $a_0=0$. Then
$a_ia_ja_k$ is true as defined above if and only if the points
$(a_i,a_j,a_k)$ form a counterclockwise triple in the complex plane.
This argument shows that it is "NP-hard" to determine whether or not a
given set of triples is part of a {\it realizable\/} CC system.
(Indeed, the latter problem may not even be in~NP, although "Tarski's
decision procedure"
\ref[68]
shows that realizability can be tested in finite time.)\quad\pfbox

\beginsection 7. Fitting tournaments together.
Suppose we want to generate, or to imagine that we could generate, all
pre-CC systems on seven points $\{0,1,2,3,4,5,6\}$. (We might as
well name the points by using the digits themselves, instead of
wasting time writing $\{a_0,a_1,\ldots,a_6\}$.) We can assume that the
vortex-free tournament associated with~0 is defined by the string
123456, because a signed permutation on $\{2,3,4,5,6\}$ will produce all
other cases. The corollary in section~5 now tells us that our pre-CC
system will in fact be a bona fide CC system: Axiom~4 will
automatically be satisfied, since the tournament for~0 is transitive.

Let us now proceed to consider all possible tournaments
associated with~1. If 1's tournament is defined by a string
$\alpha_1\alpha_2\alpha_3\alpha_4\alpha_5\alpha_6$ ending with
$\alpha_6=0$, we see that $\alpha_1$, $\alpha_2$, $\alpha_3$,
$\alpha_4$, and~$\alpha_5$ must be positive; this follows because 012,
013, 014, 015, and 016 are all true. Thus
$\alpha_1\alpha_2\alpha_3\alpha_4\alpha_5$ is a permutation of
$\{2,3,4,5,6\}$. A~moment's thought shows that all $5!$~"permutations"
are possible; we  can construct examples in the plane where the points
2, 3, 4, 5,~6 are ``seen'' from~1 in any desired order, given their
counterclockwise order as seen from~0. Suppose, then, that we say the
tournament associated with~1 is defined by some string such as 436250.

The tournament associated with 6 can similarly be defined by a string
$$\beta_1\beta_2\beta_3\beta_4\beta_5\beta_6$$ that starts with
$\beta_1=0$, and $\beta_2\ldots\beta_6$ must be a permutation of the
positive points $\{1,2,3,4,5\}$. Now, however, the permutation is no
longer arbitrary. For example, everything preceding~6 in
$\alpha_1\ldots\alpha_5$ must follow~1 in $\beta_2\ldots\beta_6$,
because $1x 6$ holds if~$61x$. Everything following~6 in
$\alpha_1\ldots\alpha_5$ must also precede~1 in
$\beta_2\ldots\beta_6$.

Further restrictions are present as well.
For example, we will not be able to complete the construction if
$\beta_2\ldots\beta_6=25143$. The tournament associated with~3 would
then include
$$\vcenter{\halign{%
$\hfil#\hfil\;$&$\hfil#\hfil\;$&$\hfil#\hfil$\quad%
&$\hfil#\hfil$\cr
0&\ra&1\cr
\ua&\luparrow&\ua&,\cr
4&\la&6\cr}}$$
violating Axiom 5. Also the tournament associated with 2 would include
$$\vcenter{\halign{%
$\hfil#\hfil\;$&$\hfil#\hfil\;$&$\hfil#\hfil$\quad%
&$\hfil#\hfil$\cr
0&\ra&1\cr
\ua&\uuparrow&\da&,\cr
5&\ra&6\cr}}$$
another violation. If $\alpha_1\ldots\alpha_5=43625$, it turns out
that the only possibility for $\beta_2\ldots\beta_6$ is 52134.

Pursuing this line of reasoning, we will discover that the strings
defining tournaments for 0, 1, and~$n$ in a pre-CC system can be
respectively 
$$1\,2\ldots n\,,\quad \alpha\,n\,\beta^{\rm R}\,0\,,\hbox{ and }
0\,\beta'^{\rm R}\,1\,\alpha'$$
 (where $\beta^{\rm R}$ is the reverse of
string~$\beta$) if and only if $\alpha$ and~$\alpha'$ are permutations
on a subset of $\{2,\ldots,n-1\}$ having no "inversions" in common, and
$\beta$ and~$\beta'$ are "permutations" on the complementary subset
having no inversions in common. (An inversion is a pair of numbers
$j<k$ that appears with~$k$ to the left of~$j$. In our example above,
$\alpha$~and~$\alpha'$ both contained the inversion $4\,3$;
$\beta$~and~$\beta'$ both contained~$5\,2$.)

This is a rather strong condition, because we can prove without
difficulty that the probability for 
two random permutations to contain no common
inversions is at most $(n+1)/2^n$. (This is the
probability that each element has at most as many inversions in one
permutation as in the reverse of the other.)

The conditions for four or more strings defining compatible
tournaments are increasingly complex and restrictive. It appears that
we cannot construct nearly as many pre-CC systems as we might have
expected, given our study of weak pre-CC systems.

\newdimen\savexii \savexii=\fontdimen12\tensy \fontdimen12\tensy=2pt
\def\0{\scriptfont0=\eightrm}
\def\1{\scriptfont1=\eightmi}
\def\ratop{\lower1pt\hbox{$\scriptstyle r$}\atop}
Although it is difficult to piece tournaments together one by one in
this manner, there is a fairly simple way to avoid such complications
if we try to construct the tournaments in parallel. Instead of
thinking of a single directed line that sweeps around one vertex at a
time, let us imagine a family of parallel lines, one passing through
each point, each directed consistently. "!parallel sweep lines""!sweep lines"
If these lines revolve at the same rate, the moment when point~$p$
enters into the tournament for~$q$ will be the same as the moment when
$\bar{q}$ enters the tournament for~$p$; this occurs when the lines through~$p$
and~$q$ cross, with $p$~visible in the positive direction from~$q$ and
$q$~visible in the negative direction from~$p$. We can represent this
situation by writing~$\1{p\atop q}$. 

As the parallel lines sweep through $180^{\circ}$, each pair of points
$\{p,q\}$ will be encountered exactly once, either in the form
$\1{p\atop q}$ or~$\1{q\atop p}$. From these $\copy\ncht$ ordered pairs,
we can write down strings defining the vortex-free tournaments associated with
each point as before, appending~$p$ to string~$q$ and~$\bar{q}$ to
string~$p$ when the pair $\1{p\atop q}$ appears.

Of course, not every arrangement of ordered pairs will work; we want
to define a pre-CC system, not just a weak pre-CC system. Thus the
tournament for~$p$ must contain the arc $q\ra r$ iff the tournament
for~$q$ contains $r\ra p$. The three ordered pairs involving
$\{p,q,r\}$ will have at least one variable (say~$p$) occurring both
on top and on the bottom, say as $\1{p\atop r}\;{q\atop p}$. Then
$p$'s~tournament will contain $q\ra r$; so the tournament for~$q$ will
be consistent only if $\1{q\atop r}$ precedes $\1{q\atop p}$ or $\1{\ratop
q}$ follows~$\1{q\atop p}$, and the tournament for~$r$ will be
consistent only if $\1{\ratop q}$ precedes~$\1{p\atop r}$ or $\1{q\atop r}$
follows~$\1{p\atop r}$. The only way to make both of~them consistent is
to have $\1{q\atop r}$ between~$\1{p\atop r}$ and~$\1{q\atop p}$.
Similarly, if the pairs involving~$p$ are $\1{r\atop p}\;{p\atop q}$, we
must have $\1{\ratop q}$ between them.

We have therefore demonstrated the necessity of the following {\it
"betweenness rule"}, if $\copy\ncht$ ordered pairs are supposed 
to define a pre-CC system:
$$\1\eqalignno{&{\rm if}\ {\textstyle{p\atop q}}\ {\rm and}\ 
{\textstyle{\ratop p}}\ \hbox{occur (in either order),}\cr
\noalign{\smallskip}
&{\rm then}\ {\textstyle{\ratop q}}\ \hbox{occurs between them.}&(7.1)\cr}$$
Conversely, if an arrangement of $\copy\ncht$ ordered pairs obeys
the betweenness rule, they define $n$~strings for vortex-free
tournaments in which all triples $pqr$, $qrp$, $rpq$ have the same
value. Therefore they define a pre-CC system.

In fact, they define a CC system. Given an arrangement of $\copy\ncht$
ordered pairs satisfying (7.1), let's say that $p\succ q$ if
$\1{p\atop q}$ appears. Then $r\succ p$ and $p\succ q$ implies $r\succ
q$, so the relation is "transitive". The points can therefore be listed
in order $(p_1,p_2,\ldots,p_n)$ so that "!topological sorting"
$$p_j\succ p_k\quad\iff\quad j>k\,.\eqno(7.2)$$
Point~$p_1$ occurs only in the lower row, so its tournament is defined
by a string with no negated entries. Thus $p_1$ has a transitive
tournament, and we know from the corollary in section~5 that this
guarantees a CC system.

We are now ready
to complete an investigation we began
in section~1 above: We wish to construct a CC system on nine points
that is "unrealizable" in the plane, by constructing a CC system in
which each of the triples occurring in the determinants of identity
(1.4) is a counterclockwise triple of points.

Figure~1 on the next page
shows a symmetrical configuration of nine
points that would correspond to the theorem of Pappus if the lines
$xv$, $yw$, and $zu$ were straightened so that the triangles now
containing $p$, $q$, and~$r$ shrink to points, and if $p$, $q$,~$r$
move to those triple-intersection points. We have perturbed $p$,
$q$,~$r$ slightly, and bent three of the lines, so that the triples
$pux$, $ruy$, $qvy$, and six others obtained by cyclic rotation
$$p\ra q\ra r\ra p\,,\qquad u\ra v\ra w\ra u\,,\qquad x\ra y\ra z\ra x
\eqno(7.3)$$
will all have counterclockwise orientation. (Some sort of perturbation
and line-bending is obviously necessary if we are to have a diagram,
because we know that no CC system containing the triples of (1.4) can
be realizable.) The other counterclockwise triples needed, namely
$pqw$, $pqx$, $qpy$, and their cyclic counterparts under (7.3), are
clearly present in Figure~1.

\topinsert
\vskip350pt
\centerline{Figure 1. A non-Euclidean CC system.}
\endinsert
\goodbreak
We can write down ${9\choose 2}=36$ ordered pairs by looking at the
diagram and imagining "parallel" "sweep lines" that rotate
counterclockwise after initially pointing directly upward between~$yu$
and~$yv$:
$$\advance\thickmuskip0mu minus 2mu
\1\textstyle
{r\atop y}\;{u\atop y}\;{p\atop y}\;{w\atop y}\;{w\atop p}\;
{r\atop q}\;{w\atop u}\;{x\atop y}\;{x\atop p}\;{x\atop u}\;
{p\atop u}\;{w\atop q}\;{x\atop q}\;{x\atop w}\;{x\atop r}\;
{x\atop v}\;{r\atop v}\;{p\atop q}\;{w\atop v}\;{x\atop z}\;
{r\atop z}\;{w\atop z}\;{w\atop r}\;{p\atop v}\;{p\atop z}\;
{v\atop z}\;{q\atop z}\;{u\atop z}\;{u\atop q}\;{p\atop r}\;
{u\atop v}\;{y\atop z}\;{y\atop q}\;{y\atop v}\;{q\atop v}\;
{u\atop r}\,.\enspace\eqno(7.4)$$
It is easy to check that the betweenness condition (7.1) is satisfied;
therefore sequence (7.4) defines a CC system.
The induced "linear ordering" (7.2)~is
$$z\;v\;q\;y\;r\;u\;p\;w\;x\,.\eqno(7.5)$$
The tournaments for $p$, $u$, and~$x$ are
$$\eqalignno{p:\;\
&\bar{y}\,w\,x\,\bar{u}\,\bar{q}\,\bar{v}\,\bar{z}\,\bar{r}\cr
\noalign{\smallskip}
u:\;\
&\bar{y}\,w\,x\,p\,\bar{z}\,\bar{q}\,\bar{v}\,\bar{r}\cr
\noalign{\smallskip}
x:\;\
&\bar{y}\,\bar{p}\,\bar{u}\,\bar{q}\,\bar{w}\,\bar{r}\,\bar{v}\,
\bar{z}\,,&(7.6)\cr}$$
and those for $q$, $r$, $v$, $w$, $y$, $z$ are obtained by applying
the symmetry relation (7.3). (Actually we get
$$q:\ r\,w\,x\,p\,\bar{z}\,u\,y\,\bar{v}\,;$$
but $r\,w\,x\,p\,\bar{z}\,u\,y\,\bar{v}$ is equivalent to the string
$\bar{z}\,u\,y\,\bar{v}\,\bar{r}\,\bar{w}\,\bar{x}\,\bar{p}$ that we get
by applying (7.3) to~$p$'s string
$\bar{y}\,w\,x\,\bar{u}\,\bar{q}\,\bar{v}\,\bar{z}\,\bar{r}$.)
%The tournament for~$x$ is transitive, so this pre-CC system is a CC
%system.

Notice that the first 12 pairs of (7.4), which cover $60^{\circ}$ of
the sweeping process in Figure~1, are transformed into the next
12~pairs by applying (7.3) and flipping. If we keep on going
after~$180^{\circ}$, the next pairs will be $\1{y\atop r}\,{y\atop
u}\,{y\atop p}\,{y\atop w}\,{p\atop w}\,\cdots\,$, representing
(7.4) but flipped. This, in fact, is a general principle that applies
to every consistent arrangement of $\copy\ncht$ pairs, symmetrical
or not: We can always continue to append more pairs by repeating the original
$\copy\ncht$ pairs upside down, and then by starting the whole cycle
again.
The consistency condition (7.1) will be satisfied throughout the
entire infinite sequence of pairs obtained in this way; for if say the
pattern in the first half cycle is $\1{p\atop q}\,\cdots\,{\ratop q}
\,\cdots\,{\ratop p}$, the infinite sequence includes the pairs
$$\1\textstyle{
{p\atop q}\,\cdots\,{\ratop q}\,\cdots\,{\ratop p}\,\cdots\,
{q\atop p}\,\cdots\,{q\atop r}\,\cdots\,
{p\atop r}\,\cdots\,{p\atop q}\,\cdots\,{\ratop q}\,\cdots\,
{\ratop p}\,\cdots\,{q\atop p}\,\cdots\,
{q\atop r}\,\cdots\,{p\atop r}\,\cdots\,{p\atop q}}\,\cdots\;.\eqno(7.7)$$
If we take any $\copy\ncht$ consecutive pairs of the infinite
sequence, we get a consistent arrangement that defines an identical
sequence of tournaments, because the strings for each tournament are
each being shifted and complemented.

We have seen on intuitive grounds (via parallel sweep lines) that the
counterclockwise triples of every realizable CC system can be defined
by an arrangement of $\copy\ncht$ ordered pairs satisfying the
betweenness condition (7.1); we have also proved that every such
arrangement defines a CC~system. To complete the chain of reasoning,
 we now want to show that every CC system, realizable or not,
 is defined by such an arrangement.

Suppose we are given $n$ vortex-free tournaments associated with 
 points labeled $\{1,\ldots,n\}$, where the string $\alpha_p$
defining the tournament for~$p$ contains the points
$\{\overline{1},\ldots,\overline{p-1},p+1,\ldots,n\}$. The tournaments
are assumed to be consistent; i.e., if $q\ra r$ in~$\alpha_p$, then
$r\ra p$ in~$\alpha_q$ and $p\ra q$ in~$\alpha_r$. Each
string~$\alpha_p$ can be represented as a sequence of ordered pairs,
using $\1{p\atop q}$ for $\bar{q}$ and $\1{q\atop p}$ for~$q$.
We will show how to construct an arrangement of all $\copy\ncht$
pairs, containing $\alpha_1,\alpha_2,\ldots,\alpha_n$ as
subarrangements. The construction proceeds by induction on~$n$: First
we delete~`$n$' from $\alpha_1$, \dots,~$\alpha_{n-1}$ and arrange the
${n-1\choose 2}$ pairs~$\1{p\atop q}$ for $1\leq q<p<n$ in some manner
consistent with the remainder of $\alpha_1$, \dots,~$\alpha_{n-1}$. Then
we divide the pairs into two classes, assigning $\1{p\atop q}$ to
class~$L$ if $\bar{p}$ follows~$\bar{q}$ in~$\alpha_n$ and to
class~$R$ if $\bar{p}$ precedes~$\bar{q}$ in~$\alpha_n$. Notice that
$\1{p\atop q}$ is in~$R$ iff $npq$ is true iff $p$ follows~$n$
in~$\alpha_q$ iff $\bar{q}$ follows~$n$ in~$\alpha_p$. Therefore
we will be done if all pairs of~$L$ precede all pairs of~$R$; the
pairs of~$\alpha_n$ can then all be inserted between~$L$ and~$R$.

If the construction runs into trouble, there must be a pair $\1{p\atop
q}$ of~$R$ immediately followed by a pair $\1{\ratop s}$ of~$L$. We can
interchange those pairs if $p,q,r,s$ are distinct,
 obtaining an arrangement with one less
problematic~$R$ before~$L$, because the new arrangement will still be
consistent with $\alpha_1,\ldots,\alpha_{n-1}$. If $p,q,r,s$ are not
distinct, suppose $p=r$. Then $npq$ is true and $nps$ is false, so
$\bar{q}$ follows~$n$ and $n$ follows~$\bar{s}$ in~$\alpha_p$.
Therefore $\bar{q}$ follows~$\bar{s}$ in~$\alpha_p$, contradicting
the fact that $\1{p\atop q}$ precedes~$\1{p\atop s}$. Similarly, if $q=s$
we reach a contradiction after noting that $p$ would have to
follow~$n$ and $n$ would have to follow~$r$ in~$\alpha_q$. The only
other possibilities are $p=s$ or $q=r$; but these violate the
betweenness condition (7.1), so such an arrangement cannot be consistent
with $\alpha_1,\ldots,\alpha_{n-1}$. We have proved that the
construction will eventually succeed, after possibly interchanging
pairs that don't overlap.

A small example should help make this construction clear. Suppose
$$\alpha_1=3\,4\,2\,5\,,\quad\alpha_2=3\,4\,\bar{1}\,5\,,\quad
\alpha_3=\bar{2}\,\bar{1}\,5\,4\,,\quad
\alpha_4=\bar{2}\,\bar{1}\,5\,\bar{3}\,,\quad
\alpha_5=\bar{1}\,\bar{2}\,\bar{4}\,\bar{3}\,.$$
We begin by setting $n=2$ and
suppressing all entries that are at most~2, trivially
obtaining $\0{2\atop 1}$. Then $n$ advances to~3, and we obtain $\0{3\atop
2}\,{3\atop 1}\,{2\atop 1}$ since $\0{2\atop 1}\in R$. Then $n$ advances
to~4; now we have $\0{3\atop 2}$ and $\0{3\atop 1}\in L$
and $\0{2\atop 1}\in R$, so we obtain the sequence
$$\textstyle\0{3\atop 2}\,{3\atop 1}\,{4\atop 2}\,{4\atop 1}\,{4\atop
3}\,{2\atop 1}\,.$$ Finally, when $n=5$, all pairs except $\0{4\atop 3}$
are in~$L$, so we interchange $\0{4\atop 3}$ with~$\0{2\atop 1}$ and
obtain $$\textstyle\0{3\atop 2}\,{3\atop 1}\,{4\atop 2}\,{4\atop 1}\,{2\atop
1}\,{5\atop 1}\,{5\atop 2}\,{5\atop 4}\,{5\atop 3}\,{4\atop 3}\,.$$

\proclaim Theorem. Every arrangement of the\/ $\copy\ncht$ distinct
ordered pairs\/ $\1{p\atop q}$ of\/ $n$~given points as an ordered list
satisfying the betweenness condition (7.1) defines a CC system.
Conversely, every CC system can be defined by such an arrangement.

\noindent{\it Proof.}\quad
We have already proved the first part. 
To prove the converse, we use the fact that any CC system has a point
whose tournament is transitive; this will be proved in section~11
below. Thus we can number the points $\{1,\ldots,n\}$ so that the
tournament associated with~1 is defined by the string
$\alpha_1=2\,3\,\ldots\,n$, and the tournaments associated with
$2,\ldots,n$ are defined by strings $\alpha_2,\ldots,\alpha_n$
beginning with~$\bar{1}$. It follows that the elements of~$\alpha_p$
are $\{\overline{1},\ldots,\overline{p-1},p+1,\ldots,n\}$, and the
construction above can be used to produce the desired
arrangement.\quad\pfbox

\bigskip
Three distinct points $\{p,q,r\}$ of a CC system are said to allow
{\it "mutation"\/} if we cannot deduce the value of $pqr$ from the
values of all other triples; they allow {\it "pre\-mutation"} if complementing
$pqr$ yields a pre-CC system. The latter condition is easily recognizable if
we look at the associated tournaments: Let us say that $q$ is {\it
"!adjacent in vortex-free tournament"
adjacent\/} to~$r$ in the tournament for~$p$ if $q$ or $\bar q$ appears
next to~$r$ in the infinite string~(4.6) representing that tournament;
then points $p,q,r$ allow
premutation if and only if each is adjacent to the other in the tournament
for the third. For example, if $q$ is not adjacent to~$r$ in the
tournament for~$p$, there are signed points $s$ and~$t$ such that
$p$'s tournament restricted to~$\{q,r,s,t\}$ has the form
$$p:\ q\,s\,r\,t\qquad {\rm or}\qquad p:\ q\,s\,\bar r\,t\,;$$
but then the value of $pqr$ is deducible from the values of $pqs$,
$pqt$, $psr$, $pst$, and $prt$, by Axiom~5. Conversely, if the
tournament for~$p$ has the form $p:\,q\,r\,\alpha$ or
$p:\,q\,\bar r\,\alpha$, for some string~$\alpha$,
we can complement $pqr$ without altering
any other triples involving~$p$ by changing that tournament to
$p:\,r\,q\,\alpha$ or $p:\,\bar r\,q\,\alpha$, respectively. If
all three adjacencies hold, we obtain compatible tournaments when
$pqr$ is complemented, so $\{p,q,r\}$ must allow premutation.

Several mutations are easy to spot in (7.4); indeed, it's not difficult
to prove that a subsequence like
$\1{x\atop p}\,{x\atop u}\,{p\atop u}$ guarantees mutability. Nine such
mutations are possible, one for each of the nine lines in Figure~1.

The triple $\{x,y,z\}$ allows premutation but not mutation, because $xyz$ can
be complemented without violating Axiom~5 but not without violating
Axiom~4. It is interesting to note that all ten premutations allowed by
Figure~1 are disjoint, i.e., independent of each other; we obtain
$2^{10}$ pre-CC systems by assigning arbitrary values to the triples
$pux$, $pvz$, $pwy$, $qvy$, $qwx$, $quz$, $rwz$, $ruy$, $rvx$, and $xyz$. 
And we obtain $2^9$ CC systems
by keeping $xyz$ true while assigning arbitrary values to the other nine.
Of course many of these systems will be isomorphic.
All of the resulting CC systems turn out to be realizable, except the one
we began~with. 

\beginsection 8. Reflection networks.
The arrangements in the preceding theorem are strongly related to
configurations called ``"primitive sorting network"s'' that have arisen
in a completely different context (see 
\ref[45, exercise 5.3.4--36]).
A~{\it "comparator"\/} $[i:j]$ operates on a sequence of numbers
$(x_1,\ldots,x_n)$ by replacing $x_i$ and~$x_j$ respectively by
$\min(x_i,x_j)$ and $\max(x_i,x_j)$. A~{\it sorting network\/} is a
sequence of comparators that will sort any given sequence
$(x_1,\ldots,x_n)$; that is, the successive comparators will produce
an output sequence that always satisfies $x_1\leq\cdots\leq x_n$.
A~"sorting network" is called {\it primitive\/} if its comparators all
have the form $[i:i+1]$, thus operating on adjacent elements. "Floyd"
proved \ref[20]
that a sequence of such comparators is a sorting network if and only
if it sorts the single permutation $(n,\ldots,2,1)$. We may assume
that a sorting network contains no redundant comparators, i.e., no
comparators that can be removed because previous comparators ensure
that $x_i\leq x_j$. Floyd's theorem implies that an irredundant
primitive sorting network is equivalent to a sequence of
"!adjacent transpositions"
adjacent {\it"transpositions"\/} $[i,i+1]$, which changes an array
$(x_1,x_2,\ldots,x_n)$ into its reflection $(x_n,\ldots,x_2,x_1)$. We
shall call such a sequence a {\it"reflection network"\/} for
convenience.

\unitlength=8pt
For example, here are the reflection networks that arise for $n=5$ as
a consequence of classical sorting methods called ``"bubblesort",''
``"cocktail-shaker sort",'' and ``"odd-even transposition sort"'' 
\ref[45]:
$$
\vcenter{\halign{\hfil#\hfil\quad\qquad&\hfil#\hfil\quad\qquad&\hfil#\hfil\cr
\|0\|4\|3\|2\|1\|4\|3\|2\|4\|3\|4\|0&
\|0\|4\|3\|2\|1\|2\|3\|4\|3\|2\|3\|0&
\let\\=\module \|0\\1\|3\\2\|4\\1\|3\\2\|4\\1\|3\|0\cr
\noalign{\smallskip}
bubble&cocktail-shaker&odd-even\cr}}
\eqno(8.1)$$
(The reflection properties of the odd-even transposition method have been
well known for almost 300 years in the English art of "change-ringing";
they are the first changes of ``Plain Bob'' \ref[58, pages 346 and 379].)

A reflection network for $n$~elements consists of exactly $\copy\ncht$
transpositions, because every adjacent transposition decreases the
number of "inversions" by~1 if we begin with the array $(n,\ldots,2,1)$;
this array has $\copy\ncht$ inversions, and the final array
$(1,2,\ldots,n)$ has none. We can construct reflection networks easily
by starting with $(n,\ldots,2,1)$ and repeatedly exchanging any two
adjacent elements that happen to be
 out of order; after $\copy\ncht$~steps we
will surely arrive at $(1,2,\ldots,n)$, and the sequence of operations
performed will be a reflection network. 

We have observed that every arrangement of $\copy\ncht$ pairs that
satisfies the betweenness rule (7.1) defines a "linear order"~(7.2). In fact, 
reflection networks are in one-to-one correspondence with "betweenness
arrangements" having a given linear order. If we number the points
1~to~$n$ according to the linear order, then the arrangement specifies
a sequence of adjacent interchanges that converts $(n,\ldots,2,1)$
into $(1,2,\ldots,n)$. For if the first pair is~$\1{p\atop q}$, we must
have $p=q+1$; otherwise there would be an~$r$ such that $\1{p\atop r}$
and~$\1{\ratop q}$ both appear, without $\1{p\atop q}$ between them.
Therefore interchanging~$p$ with~$q$ is an adjacent interchange in
$(n,\ldots,2,1)$. Removing $\1{p\atop q}$ from the left, placing
$\1{q\atop p}$ at the right, and interchanging the labels of~$p$ and~$q$
allows us to repeat this argument $\copy\ncht$~times. For example,
the reflection network corresponding to the 36~pairs of the near-Pappus
"unrealizable CC system" of (7.4)~is
$$\n=9 \textfont1=\eightmi
\def\\#1{#1\cr}
\vcenter{\hbox{\lower3pt\vbox{\baselineskip\unitlength
  \halign{\hfil$#$\hfil\cr\\x\\w\\p\\u\\r\\y\\q\\v\\z}}
\|0\|5\|4\|3\|2\|3\|6\|4\|1\|2\|3\|2\|5\|4\|5\|6\|7\|6\|3\|5\|8\|7\|6\|7\|4%
\|5\|4\|3\|2\|3\|6\|4\|1\|2\|3\|2\|5\|0
\lower3pt\vbox{\baselineskip\unitlength
  \halign{\hfil$#$\hfil\cr\\z\\v\\q\\y\\r\\u\\p\\w\\x}}}}
\eqno(8.2)$$
Conversely, a reflection network defines betweenness arrangements. For
if $r>p>q$, the inversion $rq$ must be removed between the times when
the inversions~$rp$ and~$pq$ are removed. For example, the "bubblesort"
network of (8.1) corresponds to the arrangement
$$\0\textstyle{{2\atop 1}\,{3\atop 1}\,{4\atop 1}\,{5\atop 1}\,
{3\atop 2}\,{4\atop 2}\,{5\atop 2}\,{4\atop 3}\,{5\atop 3}\,{5\atop
4}}\,;$$
this, in turn, defines the vortex-free tournaments
$$1:2\,3\,4\,5\,,\quad 2:\bar{1}\,3\,4\,5\,,\quad
3:\bar{1}\,\bar{2}\,4\,5\,,\quad
4:\bar{1}\,\bar{2}\,\bar{3}\,5\,,\quad
5:\bar{1}\,\bar{2}\,\bar{3}\,\bar{4}$$
of the CC system corresponding to a pentagon. The "cocktail-shaker sort"
network defines the tournaments"!$n$-gon"
$$1:2\,3\,4\,5\,,\quad 2:\bar{1}\,5\,3\,4\,,\quad
3:\bar{1}\,5\,\bar{2}\,4\,,\quad
4:\bar{1}\,5\,\bar{2}\,\bar{3}\,,\quad
5:\bar{1}\,\bar{4}\,\bar{3}\,\bar{2}\,;$$
this is isomorphic to the middle example of (5.1), with point~5 at the
bottom and points $(2,3,4,1)$ at the top. The "odd-even transposition
sort" defines
$$1:2\,3\,4\,5\,,\quad 2:3\,5\,4\,\bar{1}\,,\quad
3:\bar{2}\,\bar{1}\,5\,4\,,\quad
4:5\,\bar{2}\,\bar{1}\,\bar{3}\,,\quad
5:\bar{4}\,\bar{2}\,\bar{1}\,\bar{3}\,,$$
another pentagon. The third example of (5.1) can be defined by the
network 
$$\vcenter{\hbox{\|0\|4\|3\|2\|3\|4\|1\|2\|3\|4\|2\|0}}\quad,\eqno(8.3)$$
with tournaments
$$1:2\,3\,4\,5\,,\quad 2:\bar{1}\,4\,5\,3\,,\quad
3:\bar{1}\,4\,5\,\bar{2}\,,\quad
4:\bar{1}\,\bar{3}\,\bar{2}\,5\,,\quad
5:\bar{1}\,\bar{3}\,\bar{2}\,4\,.$$

Notice that the third diagram in (8.1) shows pairs of transpositions
above each other. When $\vert i-j\vert >1$, the transpositions
$[i,i+1]$ and $[j,j+1]$ commute; they can be performed in
either order, or simultaneously, without changing their effect.
Similarly, two ordered pairs $\1{p\atop q}\;{\ratop s}$ can be
interchanged in a betweenness arrangement without affecting the
corresponding CC system, if $\1{p\atop q}$ and~$\1{\ratop s}$ have no
points in common. We call two reflection networks {\it equivalent\/}
if they can be obtained from each other by interchanging transpositions that
commute."!equivalent reflection networks"

One way to eliminate the effect of commutation is to bring each
transposition as far to the left as possible. For example, 
(8.2) is converted in this way to the following compressed form:
$$\n=9 \textfont1=\eightmi
\def\\#1{#1\cr}\let\!=\module
\vcenter{\hbox{\lower3pt\vbox{\baselineskip\unitlength
  \halign{\hfil$#$\hfil\cr\\x\\w\\p\\u\\r\\y\\q\\v\\z}}
\|0\|5\!4\|6\|3\|2\!1\|3\!2\|4\!3\|5\!2\|4\!3\|5\|6\|7\!6\|8\!5\|7\!4\|6\!5\|7%
\!4\|6\|3\|2\!1\|3\!2\|4\!3\|5\|2\|0
\lower3pt\vbox{\baselineskip\unitlength
  \halign{\hfil$#$\hfil\cr\\z\\v\\q\\y\\r\\u\\p\\w\\x}}}}
\eqno(8.4)$$
Equivalent networks have the same compressed form. The "odd-even
transposition sort" has the shortest compressed form, among all
reflection networks for $n$~points; the "cocktail-shaker sort" has 
one of the longest, because it doesn't compress at all.

Another way to avoid the effect of commutativity is to insist that
$[i,i+1]$ be followed by $[j,j+1]$ only if $j\leq i+1$. (If $j>i+1$,
the transposition
$[j,j+1]$ should be done first, perhaps even before the predecessor of
$[i,i+1]$.) This gives a canonical order; two reflection networks
whose transpositions appear in canonical order are equivalent if and
only if they are identical. The canonical order corresponding to
(8.4)~is 
$$\n=9 \textfont1=\eightmi
\def\\#1{#1\cr}
\vcenter{\hbox{\lower3pt\vbox{\baselineskip\unitlength
  \halign{\hfil$#$\hfil\cr\\x\\w\\p\\u\\r\\y\\q\\v\\z}}
\|0\|5\|6\|4\|3\|2\|3\|4\|5\|1\|2\|3\|4\|5\|6\|7\|8\|6\|7\|5\|6\|7\|2\|3\|4\|5%
\|6\|4\|3\|2\|3\|4\|5\|1\|2\|3\|2\|0
\lower3pt\vbox{\baselineskip\unitlength
  \halign{\hfil$#$\hfil\cr\\z\\v\\q\\y\\r\\u\\p\\w\\x}}}}
\eqno(8.5)$$

The CC system defined by an arrangement is unchanged if we remove the
first pair~$\1{p\atop q}$ and append~$\1{q\atop p}$ as a new last pair.
The corresponding operator on reflection networks removes the first
transposition $[i,i+1]$ and appends $[n-i,n-i+1]$ at the end.
Reflection networks are called {\it"weakly equivalent"\/} if they can
be obtained from each other by commutativity and/or end-around moves.
For example, the odd-even transposition sort is weakly equivalent to
"bubblesort" in (8.1), because we can move four of its
transpositions from the upper left to the lower right.

There is an "almost-canonical form" for reflection networks under weak
equivalence, giving one canonical reflection network for each {\it
"extreme point"\/} of the corresponding CC system. An extreme point is a
point that is smallest or largest in the ordering induced by an
arrangement; equivalently, it is a point that appears in the top or
bottom line of the corresponding reflection network.
It is not difficult to see that the number of extreme points is
exactly the number of transpositions $[1,2@]$ that occur between the
top two rows plus the number of transpositions $[n-1,n]$ between
the bottom two rows.

If $x$ is an extreme point, we can move transpositions from front to
back until we get to the transposition $[1,2@]$ that moves $x$ down from
the top row. Let $[1,2@]$ be the first transposition of our
almost-canonical form. Then the reflection network will contain a
first occurrence of $[2,3]$, which moves $x$ down once more; there will be
a first occurrence of $[3,4]$ after that, when $x$ moves again; and so
on. All transpositions that happen to be intermixed with those that
move $x$ are disjoint from those that move~$x$, so we can commute them
to the left and then remove them to the right. Therefore we can assume
that the first $n-1$ transpositions are
$$[1,2@]\,[2,3]\,\ldots\,[n-1,n]$$ in this order. The remaining
$\copy\ncht-(n-1)={n-1\choose 2}$ transpositions now define a
reflection network on $n-1$ elements. That network should be put into
the canonical form described earlier, in which $[j,j+1]$ follows
$[i,i+1]$ only if $j\leq i+1$. This is the {\it almost-canonical
form\/}  for
weak equivalence, promised above, given the extreme point~$x$.

Incidentally, it is not difficult to prove that any reflection
network in canonical form begins with $[1,2@]\,[2,3]\,\ldots\,[n-1,n]$
whenever its first transposition is $[1,2@]$. In fact, the first
appearance of $[1,2@]$ in any canonical reflection network is always
followed immediately by $[2,3]\,\ldots\,[n-1,n]$. 

Two reflection networks that begin with
$[1,2@]\,[2,3]\,\ldots\,[n-1,n]$ define the same CC system on
$\{1,2,\ldots,n\}$  if and only if
the networks on $n-1$ defined by the remaining ${n-1\choose 2}$
transpositions are (strongly) equivalent. Otherwise the networks would
define different tournaments. Thus, two reflection networks can be tested
for weak equivalence by putting one of them in almost-canonical form
and seeing if that network is identical
 with any of the almost-canonical forms
corresponding to extreme points of the other. If so, the two networks
are weakly equivalent. If not, they're not.

For example, it turns out that all of the almost-canonical forms of
"bubblesort" (the pentagon) are identical, namely"!$n$-gon"
$$ 
\vcenter{\hbox{\|0\|1\|2\|3\|4\|1\|2\|3\|1\|2\|1\|0}}\quad;\eqno(8.6)$$
the "cocktail-shaker" sort on 5 elements has three almost-canonical
forms,
$$ 
\vcenter{\hbox{\|0\|1\|2\|3\|4\|3\|2\|3\|1\|2\|3\|0}}\,,\ \
\vcenter{\hbox{\|0\|1\|2\|3\|4\|3\|2\|1\|2\|3\|2\|0}}\,,\ \
\vcenter{\hbox{\|0\|1\|2\|3\|4\|2\|3\|2\|1\|2\|3\|0}}\eqno(8.7)$$
and (8.3) has four:
$$ \interdisplaylinepenalty=10000
\eqalignno{&
\vcenter{\hbox{\|0\|1\|2\|3\|4\|2\|1\|2\|3\|2\|1\|0}}\;,\hskip4em
\vcenter{\hbox{\|0\|1\|2\|3\|4\|2\|3\|1\|2\|3\|1\|0}}\;,\cr
\noalign{\bigskip}
&\hskip5em\vcenter{\hbox{\|0\|1\|2\|3\|4\|3\|1\|2\|3\|1\|2\|0}}\;,\hskip4em
\vcenter{\hbox{\|0\|1\|2\|3\|4\|1\|2\|3\|2\|1\|2\|0}}\;.&(8.8)}$$
These are all of the almost-canonical forms on five points. And if we
strike out the first four transpositions and the bottom line, we
obtain canonical representations of
all the (strong) equivalence classes on four points.
The number of
distinct almost-canonical forms corresponding to a given CC system is
a divisor of the number of extreme points, because each
almost-canonical form has a unique ``successor'' after making
end-around moves.

These observations yield the following theorem:

\proclaim Theorem. Two arrangements of\/ $\copy\ncht$ pairs
satisfying the betweenness condition yield the same CC system if and
only if one can be obtained from the other by interchanging disjoint
pairs and/or removing the first pair\/~$\1{p\atop q}$ and
appending\/~$\1{q\atop p}$ at the end. The number of CC systems on\/
$\{1,2,\ldots,n\}$ such that\/ $npq$ holds iff\/ $n>p>q$ is the number
of equivalence classes of reflection networks on\/ $n-1$ elements. The
number of nonisomorphic CC systems on\/ $n$~points is the number of
weak equivalence classes of reflection networks on\/ $n$~elements.

\noindent
{\it Proof}.\quad
 If two arrangements define the same CC system, we can use
the stated operations to transform the associated networks into
almost-canonical form for some extreme point~$x$. 

These forms must be identical, or different tournaments will be
defined.
A~CC system on $\{1,2,\ldots,n\}$ with the stated property defines and
is defined by a unique arrangement beginning with ${n\atop
n-1}\,\ldots\,{n\atop 2}\,{n\atop 1}$, up to interchange of disjoint
pairs.\quad\pfbox

\bigskip
The left-right mirror image of a reflection network is a reflection
network that corresponds to an {\it"anti-isomorphic"\/} CC system: If
$pqr$ is true in the CC system defined by the original network, then
$pqr$ is false in the new system, and conversely. All reflection
networks on~5 or fewer elements are weakly equivalent to their mirror
images, but the following 6-element network is not:
$$\advance\abovedisplayskip3pt\advance\belowdisplayskip3pt
\n=6 \baselineskip=\unitlength \eightrm
\vcenter{\hbox{\lower2pt\vbox{\halign{#\cr6\cr5\cr4\cr3\cr2\cr1\cr}}
\|0\|1\|2\|3\|4\|5\|1\|2\|3\|4\|3\|2\|1\|2\|3\|2\|0
\lower2pt\vbox{\halign{#\cr1\cr2\cr3\cr4\cr5\cr6\cr}}}}\hskip5em
\unitlength=20pt
\vcenter{\hbox{\beginpicture(4,3)(0,0)
\def\\#1#2{\put(#1,#2){\disk{.15}}}%
\\03\\11\\32\\42\\00\\10
\put(-.3,3.2){\makebox(0,0)1}
\put(1.1,1.4){\makebox(0,0)2}
\put(2.4,1.9){\makebox(0,0)3}
\put(4.2,1.8){\makebox(0,0)4}
\put(1.3,-.2){\makebox(0,0)5}
\put(-.3,-.2){\makebox(0,0)6}
\put(0,3){\line(0,-1)3}
\put(0,3){\line(1,-3)1}
\put(0,3){\line(1,-2)1}
\put(0,3){\line(3,-1)3}
\put(0,3){\line(4,-1)4}
\put(1,1){\line(3,1)3}
\put(0,0){\line(3,2)3}
\put(0,0){\line(2,1)4}
\put(1,0){\line(-1,3)1}
\put(1,0){\line(3,2)3}
\endpicture}}\eqno(8.9)$$
The corresponding CC system is realizable by a diagram such as
the one shown; the mirror reflection of the diagram defines a CC system that is
anti-isomorphic, but not isomorphic, to the unreflected system.

Reflection networks can be transformed into reflection networks in yet
another way. When the first transpositions are
$[1,2@]\,\ldots\,[n-1,n]$, as in an almost-canonical form, it is
legitimate to reflect each of the others about a horizontal axis, thus
replacing $[i,i+1]$ by $[n-i-1,n-i@]$.
Applying this to the bubblesort network, for example,% we find that
$$
\vcenter{\hbox{\|0\|1\|2\|3\|4\|1\|2\|3\|1\|2\|1\|0}}
\qquad\hbox{becomes}\qquad
\vcenter{\hbox{\|0\|1\|2\|3\|4\|3\|2\|1\|3\|2\|3\|0}}\quad.\eqno(8.10)$$
Let us say that reflection networks are {\it"preweakly equivalent"\/}
if they can be transformed into each other by using this "flip"
operation together with the operations associated with weak
equivalence. (The adjective ``preweakly'' is admittedly a somewhat
weak contribution to mathematical terminology, but we will see in a
moment that flipping is associated with preisomorphism.)

The flip operation has an easily understood affect on the
corresponding CC systems. 
If we follow it by $\copy\ncht$ end-around shifts we obtain a
network that is like the original unflipped network except that the
first transpositions are changed from $[1,2@]\,\ldots\,[n-1,n]$ to
$[n-1,n]\,\ldots\,[1,2@]$, and all other transpositions are shifted
down one.
Suppose the corresponding arrangement of
pairs begins ${n\atop n-1}\,\ldots\,{n\atop 2}\,{n\atop 1}$ before
shifting down; the corresponding arrangement after shifting is
obtained by changing these to ${1\atop n}\,{2\atop
n}\,\ldots\,{n-1\atop n}$. The betweenness condition still holds
because we have $p>q$ in every other pair~$\1{p\atop q}$. The effect on
tournaments is obtained by changing $n$ to~$\bar{n}$ in the strings
$\alpha_1,\ldots,\alpha_{n-1}$, and by replacing the string
$\alpha_n=\overline{n-1}\,\ldots\,\overline{2}\,\overline{1}$ by
$\overline{\alpha_n}=1\,2\,\ldots\,(n-1)$. This is precisely equivalent to
what we would obtain by the preisomorphism that takes
$(1,\ldots,n-1,n)\mapsto (1,\ldots,n-1,\bar{n}\,)$; thus the CC
systems are preisomorphic.

The discussion at the end of section~5 proves, in fact, that any two
preisomorphic CC systems correspond to reflection networks that are
preweakly equivalent.

\fontdimen12\tensy=\savexii % restore normal positioning of \atop

Reflection networks have an important relationship to {\it"simple"
"arrangements of pseudolines"\/} as defined by "Levi" in 1926
\ref[52] "!pseudolines"
(see "Gr\"unbaum"'s exposition
\ref[35]).
Such an arrangement consists of $n$~simple closed curves in the
"projective plane", with the property
 that every pair of curves intersects exactly
once; the $\copy\ncht$ intersection points must also be  distinct.
Thinking of the projective plane as a sphere with
antipodal points identified, we can stretch and bend each curve so
that it stays roughly parallel to the equator, and so that all
intersections occur in the ``western hemisphere.'' Then a
Mercator-like projection of these curves as seen on a map of the
western hemisphere will look just like a reflection network, except
that the transposition modules are changed into "crossovers". For
example, the 5-point bubblesort network of (8.6) is the same as the
pseudoline arrangement
$$\unitlength=10pt
\baselineskip=\unitlength
\def\\#1{\m=\n \advance\m-1
  \beginpicture(1,\m)(0,0)
  \k=#1 \advance\k-1
  \multiput(0,\m)(0,-1)\k{\line(1,0)1}
  \k=\m \advance\k-#1
  \multiput(0,0)(0,1)\k{\line(1,0)1}
  \multiput(0,\k)(0,1)2{\line(1,0){.375}}
  \put(.375,\k){\line(1,4){.25}}
  \put(.625,\k){\line(-1,4){.25}}
  \multiput(1,\k)(0,1)2{\line(-1,0){.375}}
  \endpicture}
\vcenter{\hbox{\lower2pt\vbox{\halign{\hfil$#$\hfil\cr
 a\cr b\cr c\cr d\cr e\cr}}
\ \|0\\1\\2\\3\\4\\1\\2\\3\\1\\2\\1\|0\
\lower2pt\vbox{\halign{\hfil$#$\hfil\cr
 e\cr d\cr c\cr b\cr a\cr}}}}\quad,
\eqno(8.11)$$
where $a,b,c,d,e$ are antipodal points at the boundary of the
hemisphere.

Interchanging crossovers that do not overlap preserves the
arrangement; moving a crossover from the left to the right (and
turning it upside
down) preserves it too, if we rotate the lines slightly about the
polar axis. The ``flip'' transformation also preserves a
pseudoline arrangement; this corresponds to moving the line at upper
left and lower right up and past the "north/south pole". (The
pseudolines divide the projective plane into $\copy\ncht+1$ cells,
one to the right of each crossover and one at the pole; the extreme
points correspond to the lines that touch the cell containing the
pole. Flipping, which is equivalent to shifting down,
moves the pole into the cell that appears at the
top left and bottom right in  the unshifted network.)

An arrangement of pseudolines is called {\it"stretchable"\/} if the
lines can all be made straight without changing the topological
configuration of cells. Stretchable arrangements correspond to
"realizable CC systems"; hence a CC system that is preisomorphic to a
realizable CC system is realizable.

\proclaim
Corollary. The number of nonpreisomorphic CC systems on\/ $n$~points
is the number of preweak equivalence classes of reflection networks
on\/ $n$~elements, and it is also the number of topologically different simple
arrangements of\/ $n$~pseudolines in a projective plane.

\beginsection 9. Enumeration.
Let $A_n$ be the total number of reflection networks on $n$~elements,
and let $B_n$, $C_n$, $D_n$, $E_n$  be the corresponding number of 
equivalence classes, weak equivalence classes, weak
equivalence/anti-equivalence classes, and preweak equivalence classes.
"Stanley" "!enumeration"
\ref[67]
proved the remarkable theorem that
$$A_n={\copy\ncht_{\mathstrut}\,!\over
1^{n-1}\,3^{n-2}\,5^{n-3}\,\ldots\,(2n-3)^1}\;;\eqno(9.1)$$ 
instructive combinatorial and algebraic explanations of this formula
have been found by "Edelman" and "Greene" 
\ref[16],
"Lascoux" and "Sch\"utzenberger" \ref[50].
Computer calculations give the following numerical results for
small~$n$:"!enumeration, numerical results"
$$\vcenter{\halign{\hfil#\hfil\quad%
&\hfil#\quad&\hfil#\quad&\hfil#\hskip.8em&\hfil#\hskip.6em&\hfil#\enspace
&\hfil#\enspace&\hfil#\enspace&\hfil#\enspace&\hfil#\cr
$n$&1&2&3&4&5&6&7&8&9\cr
\noalign{\smallskip}
$A_n$&1&1&2&16&768&292864&1100742656&48608795688960&29258366996258488320\cr
$B_n$&1&1&2&8&62&908&24698&1232944&112018190\cr
$C_n$&1&1&1&2&3&20&242&6405&316835\cr
$D_n$&1&1&1&2&3&16&135&3315&158830\cr
$E_n$&1&1&1&1&1&4&11&135&4382\cr}}$$

We have seen in section~8 that $C_n$ is the number of nonisomorphic CC
systems on $n$~points. In section~10 we will prove that $D_n$ is the
number of nonisomorphic "uniform" "acyclic" "oriented matroids" of rank~3 on
$n$~elements. This
quantity~$D_n$ is also the number of topologically distinct, simple
arrangements of pseudolines with a marked cell, as discussed by
"Goodman" and "Pollack"
\ref[30].

The numbers $B_n$ and $C_n$ are related by
$$B_{n-1}/n\leq C_n\leq B_{n-1}\,,\eqno(9.2)$$
because a weak equivalence class on $n$~elements has at most $n$
almost-canonical forms, and there are $B_{n-1}$ almost-canonical
forms. Obviously
$$C_n/2\leq D_n\leq C_n\,.\eqno(9.3)$$
We also have
$$D_n\left/\left(\copy\ncht+1\right)\right.\leq E_n\leq
D_n\,,\eqno(9.4)$$
because we get at most $\copy\ncht+1$ preweakly inequivalent
networks from a given weak equivalence/anti-equivalence 
 class by moving the pole into
each cell of the corresponding pseudoline arrangement. (This is much
better than the obvious bound $C_n/2^n\leq E_n$ that we get by simply
counting the number of ways to negate points. Most point-negations
give a pre-CC system that violates "Axiom~4".)

The number $A_n$ is asymptotically $2^{\Theta(n^2\log n)}$. Indeed, 
$\log\copy\ncht\,!=\copy\ncht\log\copy\ncht+O(n^2)=n^2\log
n+O(n^2)$, and if $n$ is even we have
$$\eqalign{\log\prod_{k=0}^{n-1}(2n-2k-1)^k&=\sum_{k=0}^{n-1}k\log(2n-2k-1)\cr
\noalign{\smallskip}
&<\sum_{k=0}^{n/2-1}k\log 2n+\sum_{k=1}^{n/2}(n-k)\log n\cr
\noalign{\smallskip}
&<\sum_{k=1}^{n/2}n\log 2n={\textstyle{1\over 2}}\,n^2\log 2n\,.\cr}$$

The table above indicates that $B_n$ is substantially smaller
than~$A_n$, and indeed we can easily prove that
$$B_n<2^{@n^2+n}\,,\eqno(9.5)$$
based on the canonical forms described in section~8. Every canonical
form is a sequence of transpositions
$[i_1,i_1+1]\,\ldots\,[i_l,i_l+1]$ where $l=\copy\ncht$ and
$i_{k+1}\leq i_k+1$ for $1\leq k<l$; and there are fewer than
$\smash{4^{l+n}=2^{@n^2+n}}$ such sequences with $i_1<n$, whether they
correspond to reflection networks or not. For if we write down $i_1$
left "parentheses", then for $1\leq k<l$ append $i_k-i_{k+1}+1$ right
parentheses and another left parenthesis, and finish with $i_l$~right
parentheses, we obtain a balanced string of $l+i_1-1$ matched
parenthesis pairs from which $i_1\ldots i_l$ can be reconstructed. The
number of such strings with $m$~matched pairs is the "Catalan" number
${1\over m+1}\,{2m\choose m}$, which is less than~$4^m$."!horizon theorem"

Thus $\log B_n/\log A_n\ra 0$ as $n\ra \infty$. We have seen in (4.11)
that weak pre-CC systems have the same asymptotic behavior as~$A_n$,
namely $2^{\Theta(n^2\log n)}$; hence "Axiom~1" has a strong effect on
the total number of systems.

We can also prove a lower bound for $B_n$, having an asymptotic growth
like (9.5) except for the coefficient of~$n^2$ in the exponent. The
following
construction is based on the "odd-even transposition sort" (8.1); we
need some notational conventions in order to describe it precisely. If
$\alpha$ is a sequence of transpositions
$[i_1,i_1+1]\,\ldots\,[i_m,i_m+1]$, let $\alpha+c$ denote the sequence
$[i_1+c,\allowbreak
i_1+c+1]\,\ldots\,[i_m+c,i_m+c+1]$. Suppose $a<b$, and let
$\sigma_{a,b}$ be the sequence of $b-a$ transpositions
$[a,a+1]\,[a+1,a+2]\,\ldots\,[b-1,b]$. If $a<i<b$, we have
$[i,i+1]\sigma_{a,b}=\sigma_{a,b}[i-1,i@]$; therefore if all
transpositions $[i,i+1]$ in a sequence~$\alpha$ satisfy $a<i<b$, we
have
$$\alpha\sigma_{a,b}=\sigma_{a,b}(\alpha-1)\,.\eqno(9.6)$$
If $\alpha$ is a sequence of $m$~disjoint transpositions $[i,i+1]$,
all with $a<i<b$, there are $2^m$~ways to write
$\alpha=\alpha'\alpha''$; and for each of these we have
$\alpha\sigma_{a,b}=\alpha'\sigma_{a,b}(\alpha''-1)$. Moreover, these
$2^m$~subnetworks are inequivalent; this will be the key to
constructing a large number of inequivalent reflection networks.

\proclaim Lemma. $B^n\geq 2^{@n^2\!/6-O(n)}$.

\noindent{\it Proof.}\quad
Let $n=2m$ where $m$ is odd, and for $1\leq k\leq m$ let
$\alpha_k=[1,2@]\,[3,4]\,\ldots\,\allowbreak{[m-2,m-1]}$ if $k$ is odd,
$\alpha_k=[2,3]\,[4,5]\,\ldots\,[m-1,m]$ if $k$ is even. We know that
$\alpha_1\alpha_2\ldots\alpha_m$ is a reflection network on
$m$~elements. It follows that
$$\sigma_{m,n}\sigma_{m-1,n-1}\,\ldots\,\sigma_{1,m+1}
\,\alpha_1\ldots\alpha_m\,(\beta+m)$$
is a reflection network on $n$ elements, whenever $\beta$ is a
reflection network for $m$~elements. By (9.6), this network leads to others
such as
$$(\alpha_1+m)@\sigma_{m,n}(\alpha_2+m-1)@\sigma_{m-1,n-1}\,
\ldots\,(\alpha_m+1)@\sigma_{1,m+1}\,(\beta+m)\,.$$
Furthermore, we can write each $\alpha_k$ as $\alpha'_k\alpha''_k$ in
$2^{(m-1)/2}$ ways, giving $2^{m(m-1)/2}=2^{@n^2\!/8-n/4}$ inequivalent
reflection networks
$$\eqalignno{%
&(\alpha'_1+m)@\sigma_{m,n}(\alpha''_1+m-1)(\alpha'_2+m-1)@\sigma_{m-1,n-1}
(\alpha''_2+m-2)\ldots\cr
&\hskip16em(\alpha'_m+1)@\sigma_{1,m+1}\alpha''_m
(\beta+m)\,.&(9.7)\cr}$$
Therefore $B_n\geq 2^{@n^2\!/8-n/4}B_{n/2}$, when $n\bmod 4=2$, and the
lemma follows because we can prove by induction that 
$B_n\geq 2^{@n^2\!/6-5n/2}$.\quad\pfbox

\proclaim Corollary. The numbers\/ $B_n$, $C_n$, $D_n$, and\/~$E_n$ all
grow asymptotically as\/ $2^{\Theta(n^2)}$.

\noindent {\it Proof}.\quad
The bounds in (9.5) and the lemma establish this for~$B_n$. Equations
(9.2), (9.3), and (9.4) show that the other quantities are not
substantially different.\quad\pfbox

\bigskip
A somewhat sharper upper bound can be proved if we work harder. The
main fact we need is that there aren't
too many inequivalent networks in a weak equivalence class:
$$B_n\leq 3^nC_n\,.\eqno(9.8)$$
Take a reflection network from some weak equivalence class, and append
a copy of the same network but upside down; this gives a network of
$n(n-1)$ transpositions. Imagine that this network has been pasted on
the equator of a sphere. The number of (strongly) inequivalent
reflection networks that are weakly equivalent to the given one is at
most the number of ways we can choose $\copy\ncht$ ``consecutive
transpositions'' from this periodic double network. And this is the
number of {\it"cutpaths"}, namely the number of southward paths from the
"north pole" to the south pole, hitting each line once without touching
any transposition modules. 
All transpositions between a cutpath and its antipodal mate form one
of the networks enumerated by~$B_n$.

The exact number of cutpaths can be computed by putting the number~1
in the cell at the north pole, then filling every other cell with the
sum of the numbers in the adjacent cells lying to the north. The total
number of cutpaths will then be the number in the cell at the south
pole. For example, we get the following numbers from one of the
networks constructed in the lemma above when $m=3$ and $n=6$:
$$\n=6 \unitlength=11pt \baselineskip=\unitlength \x=2.5pt \ninebf
\setbox0=\hbox{\raise\x\vbox{\halign{\hbox to0pt{\hss#\hss}\cr
        1\cr1\cr4\cr5\cr15\cr}}%
\|0\|4\|3\|4\|5\|2\|3\|4\|3\|2\|1\|2\|3\|4\|5\|4\|0\|2\|3\|2\|1\|4\|3\|2\|3\|4%
\|5\|4\|3\|2\|1\|2\|0%
\raise\x\vbox{\halign{\hbox to0pt{\hss#\hss}\cr
        1\cr1\cr4\cr5\cr15\cr}}}
\def\\#1.#2,{\hbox to#2\unitlength{\hfil#1\hfil}}
\vcenter{\halign{\hfil#\hfil\qquad\cr
1\cr
\noalign{\medskip}
\hbox{\copy0\kern-\wd0\kern.5\unitlength
 \raise\x\vbox{\hbox{\\.10,\\1.10,\\1.9,}
                \hbox{\\.5,\\1.4,\\2.2,\\1.6,\\1.2,\\2.4,\\1.6,\\2.2,}
                \hbox{\\.2,\\2.4,\\1.2,\\4.4,\\2.6,\\3.4,\\3.2,\\1.4,}
                \hbox{\\.1,\\6.2,\\3.4,\\7.6,\\2.2,\\5.6,\\7.4,\\1.2,}
                \hbox{\\.4,\\12.10,\\15.12,}}}\cr
42\cr}}\eqno(9.9)$$
There are 42~cutpaths in this case.

The cells form a "directed acyclic graph" (a ``"dag"'')
 if we connect adjacent cells
by southward-pointing arcs. The unique source vertex is the cell at
the north pole; the unique sink vertex is the cell at the south pole;
there are $n(n-1)$ other vertices. The cutpaths are the paths from
source to sink. The arcs entering and leaving each vertex have a
definite left-to-right order. (More precisely, the order is cyclic,
but this distinction matters only at the source and the sink.)

Each arc of the dag can be labeled with a number from~1 to~$n$,
representing the name of the point currently occupying the line that
is being crossed when we move from one cell down to another.
(Equivalently, the arc label is the number of the corresponding
pseudoline, if we regard the transposition modules as crossovers.)
Each vertex can be labeled with the set of all arc numbers on the path
from the source. (This is the set of all pseudolines crossed by that
path.) The arc labels on every cutpath form a permutation of
$\{1,2,\ldots,n\}$, uniquely identifying the path.

We want to prove that there are at most $3^n$ cutpaths. This would
certainly hold if all vertices were known to have outdegree $\leq 3$,
as in the example above; but some vertices might have high outdegree.
We need to establish some special property of the dag if we are going
to obtain a decent upper bound on the number of cutpaths. Otherwise
we might, for example, have a dag with approximately $n$~vertices on
odd levels and just one vertex on every even level, in which case
there would be approximately $n^{n/2}$~cutpaths.

The property we need depends on {\it"middle arcs"}, the arcs other than
the leftmost or rightmost that lead out of a vertex whose outdegree is
$\geq 3$. All arcs from the source vertex  can also be considered
middle arcs. If $p$ is the label of any middle arc leading from
vertex~$v$, we will prove that no path from~$v$ goes through any other
middle arc labeled~$p$.

\goodbreak
Let $v\ra u$ be a middle arc from~$v$ with label~$p$. Suppose there is
a path $v\ra w\ra^{\ast}x\ra y$ where $x\ra y$ is another middle arc
labeled with~$p$. Then $w\neq u$, because $p$ cannot occur twice on a
path. Notice that a middle arc always goes to a vertex of indegree~1 and
outdegree $\geq 2$. The transposition immediately to the left of
cell~$y$ brings~$p$ up to the line above~$y$, and the transposition
immediately to the right of~$y$ brings~$p$ down again; thus,
$p$~zigzags when it labels a middle arc. $\bigl($See, for example, the cells
containing~`1' in the second, third, and fourth rows of (9.9).$\bigr)$

{\bf Case 1}, $v$~is the source vertex. Then $p$ is an "extreme point",
a~point that moves from bottom to top to bottom in the reflection
network, without zigzagging. Therefore $p$ cannot be a middle label
anywhere else. {\bf Case 2}, $w$~is to the left of~$u$. Extend the
path to a cutpath $n\ra^{\ast} v\ra w\ra^{\ast}x\ra y\ra
z\ra^{\ast}s$, where $n$ is the source, $z$~is the rightmost child
of~$y$, and $s$ is the sink. This cutpath defines a reflection
network in which the first transposition moves~$p$ down and replaces
it by~$q$, the label on $y\ra z$. Thereafter $q$ stays above~$p$. But
$q$ cannot be above~$p$  at the arc $v\ra u$, because $q$ would then appear
as a label on the path $n\ra^{\ast}v$. {\bf Case 3}, $w$~is to the
right of~$u$. This case is symmetrical to Case~2.

To complete the proof of (9.8), let $a_{m,r}$ be the maximum number of
paths of length~$m$ from any vertex in such a dag when there are
$r$~permissible labels on middle arcs. Then $B_n\leq a_{n,n}C_n$, and
we can show by induction on~$m$ that $a_{m,r}\leq 3^r2^{m-r}$. 
The latter inequality is clear for $m=0$, and when $m>0$ we have
$$\eqalign{a_{m,r}&\leq\max(1\cdot a_{m-1,r},\,2\cdot a_{m-1,r},\,3\cdot 
a_{m-1,r-1},\,4\cdot a_{m-1,r-2},\,5\cdot a_{m-1,r-3},\,\ldots\,)\cr
\noalign{\smallskip}
&=\max\bigl({\textstyle{{1\over 2},1,1,{8\over 9},{20\over
27},\ldots\,}}\bigr) 3^r2^{m-r}=3^r2^{m-r}\,.\cr}$$
(If the outdegree is $k+2$, there will be $k$ newly prohibited labels
on middle arcs in the remaining paths of length $m-1$.)

\proclaim Theorem. The number\/ $C_n$ of nonisomorphic CC systems is at
most\/ $3^{n\choose 2}$.

\noindent{\it Proof}.\quad
We have shown that $C_n\leq B_{n-1}\leq 3^{n-1}C_{n-1}$, and
$C_1=1$.\quad\pfbox

\bigskip
The quantity $3^n$ in (9.8) can probably be reduced to~$n2^{n-2}$; at
least, this is what we get from the bubblesort network (an "$n$-gon"),
and the author has been unable to construct
examples with a larger number of cutpaths. (It is {\it not\/} true
that the number is bounded by~$2^{n-2}$ times the number of extreme
points.) Computer experiments for small~$n$ provide good support for the
conjectured bound~$n2^{n-2}$:
$$\vcenter{\halign{\hfil#\hfil\qquad&\hfil#\quad&\hfil#\quad&\hfil#\cr
$n$&min&max&mean\cr
\noalign{\smallskip}
4&12&16&14.0\cr
5&22&40&31.3\cr
6&36&96&58.9\cr
7&56&224&106.5\cr
8&82&512&194.5\cr
9&116&1152&353.9\cr}}$$
These mean values assume a uniform distribution over the equivalence
classes enumerated by~$D_n$. Of course, a~sequence does not always
reveal its true asymptotic behavior until the values become large.

\indent"Goodman" and "Pollack"
\ref[31] 
have proved that the number of different {\it"realizable"\/} CC systems
is only $2^{\Theta(n\log n)}$. Their upper bound depends on "Milnor"'s
theorem of algebraic geometry, which implies that the zeroes of a
polynomial of degree~$d$ in~$k$ real variables always partition~$R^k$
into at most $(2+d)(1+d)^{k-1}$ connected components. Consider the polynomial
in $(x_1,y_1,\ldots,x_n,y_n)$ that we obtain by multiplying ${n\choose
3}$ distinct determinants $\vert pqr\vert$ together;
this polynomial  will vanish at the
``boundaries'' between nonisomorphic realizable CC systems. Hence the
number of such systems is at most
$\bigl({2+2{n\choose 3}}\bigr)(1+2{n\choose 3}\bigr)^{2n-1}$.

Goodman and Pollack's lower bound argument is much more elementary.
Given $n$~points defining a realizable system, draw the $\copy\ncht$
lines connecting them, thereby obtaining ${1\over 3}n^3-{4\over 3}n+2$
cells. Put an $(n+1)$st point in ``general position'' in any of those
cells, thus obtaining ${1\over 3}n^3-{4\over 3}n+2$ different systems
on $n+1$ labeled points. The total number of nonisomorphic realizable
systems is therefore at least equal to $\prod_{k=2}^{n-1}\bigl({1\over
3}k^4-{4\over 3}k+2\bigr)\big/\,n!$.

A similar lower bound follows, in fact, from a simple direct
construction. Replace each point of an $n$-gon by a pair of points
extremely close together. Rotating each pair of points independently
gives at least $(n-1)^n\!/n$ nonisomorphic, realizable CC systems on
$2n$~points. "!enumeration [end of page range]"


\beginstarsection 10. Oriented matroids. {This section is
independent of the rest of the monograph, except for sections 20 and~21,
and it can be omitted on first reading.}
CC~systems turn out to be equivalent
to configurations that have arisen in yet another part of mathematics,
where they are known as ``"uniform" "acyclic" "oriented matroids" of
"rank"~3.'' More precisely, there is a two-to-one correspondence
between CC~systems on a set of labeled points and all such oriented
matroids defined on the same set. The two CC systems with the same
image under this correspondence are obtained from each  other by
negating the value of every triple~$pqr$.

The axioms for matroids are quite different from the axioms for
CC~systems, so it is worthwhile to study how the two kinds of systems
are derivable from each other. First, we need some definitions. A uniform
oriented matroid of rank~3 is a collection
of {\it"circuits"}, which are sets of "signed points" $\{p,q,r,s\}$ with
the following properties:"!Axioms M1--M4"

\smallskip
\display 40pt:{\bf M1.}:
If $\{p,q,r,s\}$ is a circuit, the absolute values $\vert p\vert$,
$\vert q\vert$, $\vert r\vert$, $\vert s\vert$ are distinct.

\display 40pt:{\bf M2.}:
If $\{a,b,c,d\}$ is any set of four unsigned points, there is a
circuit $\{p,q,r,s\}$ with $\vert p\vert=a$, $\vert q\vert=b$, $\vert
r\vert=c$, $\vert s\vert=d$.

\display 40pt:{\bf M3.}:
If $C=\{p,q,r,s\}$ is a circuit, so is the negated set
$\overline{C}=\{\bar{p},\bar{q},\bar{r},\bar{s}\}$. 

\display 40pt:{\bf M4.}:
If $C=\{p,q,r,s\}$ and $C'=\{\bar{p},q',r',s'\}$ are any circuits with
$C'\neq \overline{C}$, then there is at least one circuit~$C''$ contained in
the set $\{q,r,s,q',r',s'\}$.

\smallskip\noindent
An oriented matroid is called {\it"acyclic"\/} if every circuit contains
at least one negative point (hence at least one positive point, by~M3).

The theory of oriented matroids is quite extensive, and it deals with
considerably more general systems than these. (See
\ref[6], \ref[21], and \ref[48].)
The general definition is 
like the one above except that circuits are allowed to contain any number
of signed points; then Axiom~M2 is replaced by the statement
that no circuit is properly contained in another. The theory is
motivated by the study of "linear dependence" in a vector field over
an order field: Equations of the form $a_1x_1+\cdots+a_rx_r=0$ in
which any $r-1$ of the~$x_j$ are linearly independent define the sets
$\{{\rm sign}(a_1)x_1,\ldots,{\rm sign}(a_r)x_r\}$, which are
circuits of an oriented matroid. Our purpose here is to look closely
at one small corner of the theory, which corresponds to CC systems.
For brevity we'll call a collection of circuits satisfying M1--M4
 a~{\sl 4M} {\it system}."!4M system"

Axioms M1, M2, M3 boil down to saying that every circuit is obtained by
attaching signs to a four-point set, and that every four-point set of
unsigned points corresponds in this way to at least two circuits
(which are negatives of each other). In fact, every four-point set
corresponds to {\it exactly\/} two circuits~$C$ and~$\overline{C}$. For if
we could have, say, $C=\{p,q,r,s\}$ and $C'=\{\bar{p},q,r,\bar{s}\}$, then
 M4 would imply the existence of $C''\subseteq
\{q,r,s,\bar{s}\}$, which is impossible.

The connection between 4M systems~${\cal M}$ and CC systems~${\cal C}$
is quite simple: The circuits $\{p,q,r,s\}$ of~${\cal M}$ are
precisely the sets of signed points such that the signed triples
of~${\cal C}$ satisfy
$$sqp=srq=spr=pqr\,,\eqno(10.1)$$
where $=$ denotes equality of boolean values (all true or all false).

Although rule (10.1) is simple, we have to show that it makes sense.
In the first place we need to verify that the equations are symmetric
in $p,q,r,s$: If we interchange any two variables, the two triples
containing them are negated, and the other two triples change places
while being negated; so equality is indeed preserved. Moreover, if we
negate all four points, we negate all four triples; hence $\{p,q,r,s\}$ is
a circuit if and only if $\{\bar{p},\bar{q},\bar{r},\bar{s}\}$ is.

Finally, we can verify that we obtain exactly one system of triples
satisfying Axioms 1--3 if we start with a 4M~system and use (10.1) to
define counterclockwise relations, assuming that a particular triple
$abc$ is true. (Another system, with $abc$ false, will also be
defined, having all triples complemented.) Suppose we have defined all
triples consistently on a subset~$S$ containing at least three points.
This is true initially with $S=\{a,b,c\}$. If $p\notin S$, we can
define all triples on $S\cup\{p\}$ as follows: To define $pqr$, let
$q,r,s$ be any signed points of~$S$, with signs chosen so that
$\{p,q,r,s\}$ is a circuit. Then we take $pqr=srq$. This definition,
which agrees with (10.1), does not depend on~$s$. For if
$\{p,q',r',t\}$ is another circuit, with $\vert q'\vert=\vert q\vert$
and $\vert r'\vert=\vert r\vert$ and $\vert t\vert\neq\vert s\vert$,
then $\{\bar{p},\bar{q}',\bar{r}',\bar{t}\,\}$ is also a circuit by~M3,
hence by~M4 there is a circuit
$C\subseteq\{q,\bar{q}',r,\bar{r}',s,\bar{t}\,\}$
Let $C=\{q'',r'',s,\bar{t}\,\}$, where $\vert q''\vert=\vert q\vert$ and
$\vert r''\vert=\vert r\vert$. Then (10.1) implies that
$sr''q''=\bar{t}\,q''r''=tr''q''$, and it follows that $srq=trq$. Thus
$pqr$ gets the same value via point~$t$ as it does via point~$s$.

For example, let's consider the triples on four points $\{a,b,c,d\}$
that can be obtained from a 4M~system. In this case there are just two
circuits,~$C$ and~$\overline{C}$. If $C=\{a,b,c,\bar{d}\}$, the
triples according to (10.1) satisfy $dab=dbc=dca=abc$; so we have
$d\in\Delta abc$ if those triples are all false, and $d\in\Delta cba$ if
they are all true. Another case arises when
$C=\{a,\bar{b},c,\bar{d}\}$; then we have $dba=dca=dcb=acb$, which is
a 4-gon with~$b$ opposite~$d$ and~$a$ opposite~$c$; the vertices in
clockwise order are either $abcd$ or $cbad$ depending on whether the
triples are true or false. Finally if $C=\{a,b,c,d\}$, we have triples
$dba=dcb=dac=abc$ that violate Axiom~4. Therefore "Axiom~4" holds if and
only if the 4M system is acyclic as defined above.

We will show that any 4M system (possibly cyclic) defines a pre-CC
system; thus, pre-CC systems are in two-to-one correspondence with
systems of circuits that satisfy M1--M4. In fact it turns out that the
full power of Axiom~M4 is not needed. We will be able to deduce
Axiom~5 from two very special cases of that axiom, once we have used
it as above to establish a well-defined system of triples satisfying Axioms
1--3.
The derivation begins with an intermediate result:

\bn{\bf"Axiom 6".}\quad
$\neg(tsp\wedge tsq\wedge tsr\wedge tpq\wedge tqr\wedge trp\wedge
sqp\wedge srq)$.

\bn
The first six triples of this axiom are the same as Axiom~5; they
state that the tournament for~$t$ has a vortex out of~$s$. The two
additional triples say that the tournament for~$s$ has two arcs $q\ra
p$ and $r\ra q$ that go ``against the grain'' of the cycle arcs $p\ra q\ra
r$ in the tournament for~$t$. Thus, Axiom~6 is apparently weaker than
Axiom~5. We can derive it from~M4 by assuming $tsp\wedge tsq\wedge
tsr\wedge tpq\wedge tqr\wedge sqp\wedge srq$ and proving that $trp$
must then be false. The triples $tsq\wedge tsr\wedge tqr\wedge srq$
are the same as $t\bar{q}s\wedge tr\bar{q}\wedge tsr\wedge s\bar{q}r$,
so $\{s,\bar{q},r,t\}$ is a circuit by (10.1). The triples $tsp\wedge
tsq\wedge tpq\wedge sqp$ are the same as $t\bar{p}s\wedge
tq\bar{p}\wedge tsq\wedge s\bar{p}q$, so $\{s,\bar{p},q,t\}$ is also a
circuit. Therefore by~M4, $\{s,\bar{p},r,t\}$ must be a circuit: We
must have $t\bar{p}s=tr\bar{p}=tsr=s\bar{p}r$. In particular, since
$tsr$ is known to be true, $trp$~must be false.

Axiom 6 is related to the law of "interior transitivity", (2.4), which
says that if $q\in\Delta tsr$ and $p\in\Delta tsq$ then $p\in\Delta
tsr$. In these terms, Axiom~6 says, ``if $q\in\Delta tsr$ (i.e.,
if $tsq\wedge tqr\wedge srq$) and $tsr$ and $p\in\Delta tsq$ (i.e.,
$tsp\wedge tpq\wedge sqp$) then $tpr$''; here $tpr$ is half of the
conclusion $p\in\Delta tsr$, as in (2.4b), the other half being $psr$. The
hypothesis $tsr$, which does not appear in (2.4), follows from
$q\in\Delta tsr$ if we assume Axiom~4. However, we know from section~2
that Axiom~4 and (2.4b),
i.e., Axioms~4 and~6, are not strong enough to imply Axiom~5.
 At least one more consequence of M4 is needed.

Notice, however, that M4 is valid for {\it signed\/} points, while we
have used only unsigned points in our derivation of Axiom~6. Therefore
Axiom~6 is actually true for all combinations of signed points
$p,q,r,s,t$. There is one "symmetry" that takes Axiom~6 into itself
(negate~$s$, negate~$t$, and interchange~$p$ with~$r$); otherwise the
signed permutations of $p,q,r,s,t$ yield $32\times 5!/2=960$ different
axioms, all of which are valid on any 5-point system of triples
derived from a 4M system.

We need not use all this flexibility. It suffices to consider a single
additional axiom, obtained from Axiom~6 by negating $s$, $p$, $q$,
and~$r$; the two triples not involving~$t$ then change sign:

\bn{\bf Axiom 6\bfprime.}\quad
$\neg(tsp\wedge tsq\wedge tsr\wedge tpq\wedge tqr\wedge trp\wedge
spq\wedge sqr)$.

\bn
This axiom states that an out-vortex in one tournament cannot coexist
with two arcs that go ``{\it with\/} the grain.'' Together with
Axiom~6, it implies that no out-vortex can exist; two out of three
arcs must go one way or the other. Thus, Axioms~6 and~$6'$, together
with Axioms 1--3, imply Axiom~5.

We have proved that every 4M system defines two complementary pre-CC
systems. There remains a possibility that Axioms M1--M4 might imply
even more; they might define a restricted class of pre-CC systems,
because our proof did not apply the full power of Axiom~M4. Therefore
we want to show conversely that any given pre-CC system defines a 4M
system, if we use relation (10.1) to define circuits.

%Axioms M1 and M3 clearly hold. Axiom M2 is satisfied because the triples
%($sqp,srq,spr,pqr$) run through all 16~combinations of true and false
%as $(s,p,q,r)$ run through all 16~combinations of plus and minus. We
%will prove Axiom~M4 by induction on the number of distinct elements in
%the set $U=\{\vert p\vert,\vert q\vert,\vert r\vert,\vert
%q'\vert,\vert r'\vert,\vert s'\vert\}$. If $U$ has only 4~elements,
%the two circuits in~M4 must be~$C$ and~$\overline{C}$, so there is no
%problem.

%For convenience in the following proof (and in the following proof
%only), we will use the notation `$pqrs$' to mean ``$\{p,q,r,s\}$ is a
%circuit,'' i.e., that $sqp=srq=spr=pqr$, when $p,q,r,s$ are signed
%points. Furthermore, a~variable with a primed name, such as~$p'$,
%will denote either~$p$ or~$\bar{p}$.

%Suppose $U$ has 5 elements. Then we are given $pqra$ and
%$\bar{p}\,q'r'x$; and we must prove $q''r''ax$, where
%$q''\subseteq\{q,q'\}$ and $r''\subseteq\{r,r'\}$. Without loss of
%generality we can assume that $pqr$ is true. Then $qar$ is true; and
%so is $qrx$, because $pq'r'=q'r'x$ implies $pqr=qrx$. It follows that
%$q''r''ax$ holds, where $q''=q$ or~$\bar{q}$ according as $axr$ is
%true or false, and $r''=r$ or~$\bar{r}$ according as $axq$ is false or
%true. If $q'=q$ then we need~$axr$, to avoid the vortex $p\ra q\ra
%a\ra p$ out of~$x$ in $r$'s tournament. If $r'=r$ then we need~$aqx$,
%to avoid the vortex $p\ra a\ra r\ra p$ into~$x$ in $q$'s~tournament.
%Therefore $q''\subseteq\{q,q'\}$ and $r''\subseteq\{r,r'\}$, as
%required. 

%Suppose $U$ has 6 elements. Then we are given $pqab$ and
%$\bar{p}\,q'xy$; we must find a circuit $\subseteq\{q,q',a,b,x,y\}$. Let
%$q''a'b'x$ hold, and consider two cases:
%Case~1, $q''\subseteq\{q,q'\}$. If $a'=a$ and $b'=b$, we are done.
%Otherwise suppose $a'=\bar{a}$; then $pqab\wedge q''\bar{a}\,b'x\RA
%pq'''b''x$, by induction, where
%$q'''\subseteq\{q,q''\}\subseteq\{q,q'\}$. If $b''=b$, then
%$pq'''bx\wedge\bar{p}\,q'xy\RA q''''bxy$ by induction, with
%$q''''\subseteq\{q,q'\}$; otherwise $pqab\wedge pq'''\bar{b}\,x\RA
%pq''''ax$, and induction yields a suitable circuit $q'''''axy$.
%Case~2, $q''=\bar{q}$ and $q'=q$. Then $pqab\wedge\bar{q}\,a'b'x\RA
%pa''b''x$. If $a''=a$, then $pqab\wedge q\,\bar{a}\,\overline{b''}\,\bar{x}\RA
%pqb'''\bar{x}$; thus we have either $pqb\,\bar{x}$ or
%$pq\,\bar{b}\,\bar{x}\wedge pqab\RA pqa\,\bar{x}$. Either way we can
%combine the result with $\bar{p}\,qxy$ to get $p'qay$ or $p'qby$, and
%one more use of the induction hypothesis will yield a suitable circuit.
%Otherwise $a''=\bar{a}$; then $pqab\wedge p\,\bar{a}\,b''x\RA pqb'''x$,
%and if $b'''=\bar{b}$ we have $pqab\wedge pq\,\bar{b}\,x\RA pqax$. Both
%$pqbx$ and $pqax$ are one easy step from victory.

%Finally, suppose $U$ has 7 elements. Then we are given $pabc$ and
%$pxyz$; we can assume $a'b'c'x$. If $a'=a$, $b'=b$, and $c'=c$, we're
%done. Otherwise, say $a'=\bar{a}$; then $pabc\wedge\bar{a}\,b'c'x\RA
%pb''c''x$. If $b''=b$ and $c''=c$, induction finds a suitable circuit
%from $pbcx$ and $\bar{p}\,xyz$. Otherwise, say $b''=\bar{b}$; then
%$pabc\wedge p\,\bar{b}\,c''x\RA pac'''x$. If $c'''=c$, induction applies
%as before; otherwise $pabc\wedge pa\,\bar{c}\,x\RA pabx$, and once again
%induction will do the job.

First we will show that the circuits defined by (10.1), given any pre-CC
system, satisfy the following three laws introduced by Jon "Folkman"
\ref[21, Section~5]:"!Axioms L1--L3"

\medskip
\display 40pt:{\bf L1.}:
If $\{p,q,r,s\}$ is a circuit, the absolute values $\vert p\vert$,
$\vert q\vert$, $\vert r\vert$, $\vert s\vert$ are distinct.

\smallskip
\display 40pt:{\bf L2.}:
If $\{a,b,c,d\}$ is any set of four unsigned points, there are exactly
two circuits $\{p,q,r,s\}$ with $\vert p\vert=a$, $\vert q\vert=b$,
$\vert r\vert=c$, $\vert s\vert=d$, and these circuits are negatives
of each other.

\smallskip
\display 40pt:{\bf L3.}:
If $\{p,q,r,s\}$ is a circuit and if $t$ is a signed point with $\vert
t\vert\notin\{\,\vert p\vert,\vert q\vert,\vert r\vert,\vert
s\vert\,\}$, then there is a circuit $\subseteq\{p,q,r,s,t\}$
containing~$t$. 

\medskip\noindent
Axiom L1 (which is the same as M1) obviously holds. Axiom~L2 is
satisfied because the triples ($sqp$, $srq$, $spr$, $pqr$) run through
all 16~combinations of true and false as $(s,p,q,r)$ run through all
16~combinations of plus and minus. Axiom~L3 is satisfied because we
know that all pre-CC systems on five elements are preisomorphic to a
pentagon. The circuits for the pentagon (3.6) on $\{1,2,3,4,5\}$ form
a 1--cycle"!$n$-gon"
$$\vcenter{\halign{$\hfil#\hfil\,$&$\hfil#\hfil\,$&$\hfil#\hfil$\cr
\{1\bar{2}3\bar{4}\}&{\mjm}\{1\bar{2}3\bar{5}\}{\mjm}\{1\bar{2}4\bar{5}\}
{\mjm}\{1\bar{3}4\bar{5}\}{\mjm}&\{2\bar{3}4\bar{5}\}\cr
\vert&&\vert\cr
\{\bar{2}3\bar{4}5\}&{\mjm}\{\bar{1}3\bar{4}5\}{\mjm}\{\bar{1}2\bar{4}5\}
{\mjm}\{\bar{1}2\bar{3}5\}{\mjm}&\{\bar{1}2\bar{3}4\}\cr}}\eqno(10.2)$$
in which each circuit $\{p,q,r,s\}$ has two neighbors, one containing
the remaining point~$t$ and the other containing~$\bar{t}$, as required
by~L3.

There also is a more direct, low-level proof that L3 holds. If
$\{p,q,r,s\}$ is a circuit, we can assume (possibly negating
$p,q,r,s$), that we have $sqp\wedge srq\wedge spr\wedge pqr$. To avoid
a vortex in the tournament for~$s$, we must have at least one of
$stp$, $stq$, $str$ true, and at least one false; without loss of
generality, we can assume that $stp=stq=srt=tpq$. To avoid a vortex
between~$t$ and the cycle $q\ra r\ra s\ra q$ in the tournament for~$p$,
we must then have $ptr=pqt$. And this makes $\{p,r,s,t\}$ a circuit if
$tpq$ is true, or $\{q,r,s,t\}$ a circuit if $tqp\wedge tqr$, or
$\{p,q,r,t\}$ a circuit if $tqp\wedge trq$.

Call a system satisfying Axioms L1--L3 a "4L system". We can prove
directly that a 4M system is a 4L system; only Axiom~L3 needs to be
verified. If $\{p,q,r,s\}$ and $\{p',q',r',t\}$ are circuits, with
primed variables indicating plus or minus, then there is nothing to
prove if $p'=p$, $q'=q$, $r'=r$. Otherwise suppose $p'=\bar{p}$, and
apply Axiom~M4 to $\{p,q,r,s\}$ and $\{\bar{p},q',r',t\}$, obtaining a
circuit $\{q'',r'',s,t\}$. Again we're done if $q''=q$ and $r''=r$;
otherwise suppose $q''=\bar{q}$, and apply Axiom~M4 to $\{p,q,r,s\}$
and $\{\bar{q},r'',s,t\}$ to get a circuit $\{r'',p,s,t\}$. If
$r''=r$, we are done, otherwise $\{\bar{r},p,s,t\}$ is one easy step
from victory.

A 3L system is like a 4L system but with 3-element circuits instead of
4-element circuits. We can obtain a 3L system from a 4L system by
fixing a point~$s$ and letting $\{p,q,r\}$ be a circuit  iff
$\{p,q,r,s\}$ or $\{p,q,r,\bar{s}\}$ is a circuit 
in a given 4L system. Axiom~L3
is satisfied; namely, if $\{p,q,r\}$ is a circuit and $t$ is a signed
point with $\vert t\vert\notin\{\,\vert p\vert,\vert q\vert,\vert
r\vert\,\}$, then either $\{p,q,t\}$ or $\{p,r,t\}$ or $\{q,r,t\}$ is
a circuit. For we can assume that $\{p,q,r,s\}$ was a circuit, and there
will be difficulty only if $\{p,q,r,t\}$ was also a circuit. But then
either $\{q,r,t,\bar{s}\}$ or $\{p,r,t,\bar{s}\}$ or
$\{p,q,t,\bar{s}\}$ was a circuit.

Now we want to prove that every 4L system is a 4M system; only Axiom
M4 needs to be verified. First we prove a very special case: If
$\{p,q,r,u\}$ and $\{\bar{p},q,r,v\}$ are circuits in a 4L system,
then $\{q,r,u,v\}$ is also a circuit. The analogous result is easily
proved in a 3L system. For if $\{p,q,u\}$ and $\{\bar{p},q,v\}$ are
circuits, but $\{q,u,v\}$ is not, Axiom~L3 applied to $\{p,q,u\}$
and~$v$ yields $\{p,u,v\}$ and the same axiom applied to
$\{\bar{p},q,v\}$ and~$u$ yields $\{\bar{p},u,v\}$, a~contradiction.
The proof in a 4L system can now be obtained by reducing
 the problem to the 3L systems in
which we fix $q$ and~$r$; we deduce the existence of circuits
$\{q',r,u,v\}$ and $\{q,r',u,v\}$, where $q'=q$ or~$\bar{q}$ and $r'=r$
or~$\bar{r}$. The only viable possibility is $q'=q$ and $r'=r$.

"Folkman" completed his proof that Axioms L1--L3 imply Axioms M1--M4 by
establishing a stronger result of independent interest."!adjacent circuits"

\proclaim Theorem. Any two circuits $\{p,q,r,s\}$ and $\{p,t,u,v\}$ of
a 4L system are connected by a path of circuits contained in
$\{p,q,r,s,t,u,v\}$, where two circuits are considered to be adjacent
if they have all but one element in common. 

\noindent
{\it Proof}.\quad
The analogous result is easy in a 3L system: Given circuits
$\{p,q,r\}$ and $\{p,u,v\}$, if they are not identical we can assume
that $\vert v\vert\notin\{\,\vert q\vert,\vert r\vert\,\}$ and $\vert
r\vert\notin\{\,\vert u\vert,\vert v\vert\,\}$. If they are not
adjacent, there is a two-step path between them by Axiom~L3, unless
$\{v,q,r\}$ and $\{r,u,v\}$ are circuits. And in the latter case,
three steps suffice.

In a 4L system, the proof is by induction on the number of distinct
elements in $\{p,q,r,s,t,u,v\}$, the result being trivial if
this number is $\leq 5$. Otherwise we can assume that $\vert
v\vert\notin \{\,\vert q\vert,\vert r\vert,\vert s\vert\,\}$. Consider
the 3L system obtained by fixing~$p$; this system contains the
circuits $\{q,r,s\}$ and $\{u,v,w\}$, and by Axiom~L3 it also contains
either $\{q,r,v\}$ or $\{q,s,v\}$ or $\{r,s,v\}$, say $\{q,r,v\}$. We
can therefore find a path of length $l\leq 4$ from $\{q,r,s\}$ to
$\{t,u,v\}$, and this path can be lifted to a path that passes through
circuits $\{p_j,x_j,y_j,z_j\}$, where
$\{p_0,x_0,y_0,z_0\}=\{p,q,r,s\}$, $\{p_l,x_l,y_l,z_l\}=\{p,t,u,v\}$,
$p_j=p$ or~$\bar{p}$, $\{x_j,y_j,z_j\}\subseteq\{q,r,s,t,u,v\}$, and
$\{x_{j+1},y_{i+1},z_{i+1}\}$ is adjacent to $\{x_j,y_j,z_j\}$. If each
$p_j=p$, we are done. Otherwise there is a least $j\geq 0$ with
$p_{j+1}=\bar{p}$ and a greatest $k<l$ with $p_k=\bar{p}$. By the
special case of Axiom~M4 already verified, we know that
$\{x_j,y_j,z_j\}\cup\{x_{j+1},y_{j+1},z_{j+1}\}=\{P,Q,R,S\}$ and
$\{x_k,y_k,z_k\}\cup\{x_{k+1},y_{k+1},z_{k+1}\}=\{P,T,U,V\}$ are
circuits; we are justified in assuming that they contain a common
point~$P$, because they are both contained in the set
$\{q,r,s,t,u,v\}$. In fact, they contain at least two common points,
and they can be connected by induction.\quad\pfbox

\proclaim Corollary. Every 4L system is a 4M system.

\noindent{\it Proof}.\quad
Given $C=\{p,q,r,s\}$ and $C'=\{\bar{p},t,u,v\}$, with
$C'\neq\bar{C}$, we can assume that $\vert v\vert\notin\{\,\vert
p\vert, \vert q\vert,\vert r\vert,\vert s\vert\,\}$. Hence there is a
circuit $C''\subseteq\{p,q,r,s,v\}$ containing~$v$, and a path
from~$C''$
 to~$C'$ contained in $\{p,\bar{p},q,r,s,t,u,v\}$. The
first circuit on this path that doesn't contain~$p$ doesn't
contain~$\bar{p}$ either.\quad\pfbox

\bigskip
This completes the proof of equivalence between 4M systems and pre-CC
systems, hence between acyclic 4M systems and CC systems. 

Oriented
matroids have orthogonal duals, which are defined by ``"cocircuits"'';
the cocircuits of a 4M system turn out to be the $\copy\ncht$
complementary pairs of sets of signed points~$p$ where $\vert
p\vert\notin\{a,b\}$, with~$p$ and~$q$ having the same sign iff
$abp=abq$. "!dual matroids"
Although this connection between cocircuits and counterclockwise
triples is simpler than (10.1), there does not appear to be a proof of
equivalence between pre-CC systems and the duals of 4M systems that is
any simpler than the proof given here.

\beginsection 11. Convex hulls.
We define the {\it"convex hull"\/} of a CC system to be the set of all
ordered pairs~$ts$ of distinct points such that $tsp$ holds for all
$p\notin\{s,t\}$. 

If $ts$ is in the convex hull, the tournament for $t$ is transitive,
by Axiom~5. The conventions of section~4 tell us that the tournament
for~$t$ can be defined by a string $\alpha=p_1\,\ldots\,p_{n-1}$ 
of positive points, with $p_1=s$. It follows that $p_{n-1}t$
is also in the
convex hull. But $tp_j$ and~$p_kt$ do not belong to the convex hull
for any $j>1$ or any $k<n-1$.

This argument implies that every "extreme point" (i.e., every point with
a transitive tournament) appears exactly twice among the ordered pairs
of the convex hull, once as the first element and once as the second; 
those pairs must then consist of a number of directed
cycles. In fact, there is always a unique cycle:

\proclaim
Lemma. The convex hull of a CC system on\/ $n\geq 2$ points consists of
ordered pairs that form a cycle,
$$t_1t_2,\;t_2t_3,\;\ldots,\;t_{m-1}t_m,\;t_mt_1\,,\qquad m\geq
2\,.\eqno(11.1)$$ 

\noindent{\it Proof.}\quad
First we prove that there is at most one cycle. If $t$ is an extreme
point with tournament defined by $\alpha=p_1\ldots p_{n-1}$, and if
$t's'$ is any ordered pair of the convex hull with $t'\neq t$ and
$s'\neq t$, we must have $t'=p_j$ and $s'=p_k$ for some $j<k$, because
$t's't$ is the same as $tt's'$. Hence all such ordered pairs can be
numbered $t_1t_2,t_2t_3,\ldots,t_{m-2}t_{m-1}$, with $t_1=p_1$ and
$t_{m-1}=p_{n-1}$. The remaining pairs of the convex hull are
$p_{n-1}t$ and~$tp_1$, so we have a cycle of the form (11.1) with
$t_m=t$.

It remains to be shown that there is at least one cycle, i.e., that the
convex hull is nonempty. If there are only two points $\{a,b\}$, the
convex hull is $\{ab,ba\}$. If there are $n>2$ points, let $p$ be one
of them, and let $\{t_1t_2,\ldots,t_{m-1}t_m,t_mt_1\}$ be the convex
hull of the remaining $n-1$ points; this set is nonempty, by induction
on~$n$. Suppose the convex hull of all $n$~points is empty. Then we
must have $pt_{k+1}t_k$ for $1\leq k<m$, and $pt_1t_m$. Let $k$ be
maximum such that $pt_kt_1$ holds; then $k\geq 2$ and $k<m$, and we
have $pt_1t_{k+1}$. Hence $p\in\Delta t_{k+1}t_kt_1$, and Axiom~4
yields $t_{k+1}t_kt_1$, contradicting the assumption that
$t_kt_{k+1}q$ holds for all $q\notin \{t_k,t_{k+1},p\}$.\quad\pfbox

\bigskip
The proof of the lemma uses both "Axiom~4" and "Axiom~5", and this is no
accident. For if $p$, $q$,~$r$, and~$t$ violate Axiom~4, they define a
system of triples with no convex hull. And if $p,q,r,s,t$ violate
Axiom~5, they define a system with~$ts$ in the convex hull but not
$pt$, $qt$, $rt$, or~$st$. Therefore Axioms~4 and~5 are necessary and
sufficient to obtain a ternary relation in which all subsets have a
convex hull satisfying (11.1), assuming that Axioms 1--3 hold.

We can have $m=2$ in (11.1) only when $n=2$; hence we were justified
in previous sections when we asserted that every CC system on three or
more points contains at least three extreme points.

Incidentally, we noted in section 4 that vortex-free tournaments are
not characterized by their "score vectors". The same is true for pre-CC
systems. But "Goodman" and "Pollack" \ref[29] have shown that CC systems are
nicer in this respect. If we know, for each pair of points~$pq$, the
number of paths~$r$ such that $pqr$ holds, then we can reconstruct the
entire CC system. This follows because the pairs with score~0 form the
convex hull; and a point~$p$ on the hull has a transitive tournament,
so we can call the other points $q_0,\ldots,q_{n-2}$, where $pq_j$ has
score~$j$. Now $pq_jq_k$ holds iff $j>k$; so we compute the scores for
the reduced CC system with $p$ removed, and repeat the process.

If $\{t_1t_2,\ldots,t_{m-1}t_m,t_mt_1\}$ is the convex hull of a CC
system, we can prove that
$$t_it_jt_k\ {\rm whenever}\ i<j<k\,.\eqno(11.2)$$
This is true by the definition of convex hull when $j=i+1$ or $j=k-1$.
Otherwise, we can assume by induction on $k-i$ that $t_{i+1}t_jt_k$
and $t_it_jt_{k-1}$ are true; the tournament for~$t_i$ would then contain a
vortex $t_{k-1}\ra t_k\ra t_j\ra t_{k-1}$ out of~$t_{i+1}$ if we
had~$t_it_kt_j$. Therefore the cyclic sequence of extreme points
$(t_1,\ldots,t_m)$ forms an $m$-gon: The counterclockwise
relation~$t_it_jt_k$ holds if and only if"!$n$-gon"
$$i<j<k\quad {\rm or}\quad j<k<i\quad {\rm or}\quad k<i<j\,,\eqno(11.3)$$
as in (3.6).

\proclaim
Theorem. Suppose points\/ $(t_1,\ldots,t_m)$ of a CC system form an\/
$m$-gon, and let\/ $p$ be another point. If\/ $p$ lies outside the\/
$m$-gon, say\/ $pt_1t_m$, then there exist indices\/ $1\leq j\leq l<m$
such that
$$pt_kt_{k+1}\hbox{ if and only if }j\leq k\leq l\,.\eqno(11.4)$$
On the other hand if\/ $p\in\Delta t_it_jt_k$ for some\/ $i<j<k$, we have\/
$pt_mt_1$ and\/ $pt_kt_{k+1}$ for\/ $1\leq k<m$.

\noindent{\it Proof}.\quad
If $pt_1t_m$, the ordered pairs $ts$ with $t\neq p$ and $s\neq p$ in
the convex hull of $\{p,t_1,\ldots,t_m\}$ are precisely the pairs
$t_kt_{k+1}$ such that $pt_kt_{k+1}$ holds. Since the convex hull is a
cycle, these pairs must be consecutive and the full convex hull must
include also $pt_j$ and~$t_{l+1}p$, where $j$ and~$l$ are defined by
(11.3). 

On the other hand if $p\in\Delta t_it_jt_k$, the tournament for~$p$
includes the cycle $t_i\ra t_j\ra t_k\ra t_i$, so $p$ is not an
extreme point. The convex hull of $\{p,t_1,\ldots,t_m\}$ must
therefore be a cycle that doesn't involve~$p$, and the only suitable cycle
is $\{t_1t_2,\ldots,t_{m-1}t_m,t_mt_1\}$.
\quad\pfbox

\bigskip
These observations lead to an efficient "incremental algorithm" to find
"!convex hull, algorithms for"
the convex hull of any CC system. Suppose the points are numbered
$\{a_1,\ldots,a_N\}$ in any order, where $N\geq 2$. We will find the
convex hull of $\{a_1,\ldots,a_n\}$ successively for $n=2,3,\ldots,N$;
the current convex hull $(t_1,t_2,\ldots,t_m)$ will be represented by
putting $t_1$ in a separate place and keeping the ordered list
$(t_2,\ldots,t_m)$ in a "binary search tree" of some kind \ref[45]. Initially
$m=n=2$, $t_1=a_1$, and $t_2=a_2$. If $n<N$, increase~$n$ by~1, set
$p=a_n$, and update the convex hull as follows: {\bf Case~1},~$pt_1t_m$. 
Set $j=1$, 2, \dots, until $j=m-1$ or $pt_jt_{j+1}$.
Then set $l=m-1$, $m-2$, \dots, until $l=j$ or $pt_lt_{l+1}$. Delete
$\{t_{l+2},\ldots,t_m\}$ from the tree. If $j=1$, insert $p$ at the
right of the tree (i.e., after~$t_{l+1}$); otherwise delete
$\{t_2,\ldots,t_{j-1}\}$ from the tree and replace~$t_1$ by~$p$. {\bf
Case~2},~$pt_mt_1$. Let $t_k$ be the root of the tree. Then do a tree
search as follows: If $k=m$ or $t_1p@t_k$, decrease~$k$ so that the new
$t_k$ is the left child of the old; otherwise increase~$k$ so that the
new $t_k$ is the right child of the old. This search terminates either
when we want to decrease~$k$ and $t_k$~has no left child, or when we
want to increase~$k$ and $t_k$~has no right child; in the latter case,
increase~$k$ by~1. Then it follows that $t_1p@t_j$ holds iff $j\geq k$.
(We have essentially placed~$p$ among $(t_2,\ldots,t_m)$ in the
transitive tournament for~$t_1$, knowing that $p$~will appear before~$t_m$.) 
 If $k>2$ and
$pt_{k-1}t_k$, we have $p\in\Delta t_1t_{k-1}t_k$ and the convex hull
does not need to be updated. Otherwise we have discovered that
$pt_kt_{k-1}$, hence $p$~lies outside the $m$-gon $(t_1,\ldots,t_m)$.
Set $j=k-1$, $k-2$, \dots, until $j\leq 2$ or $p@t_{j-1}t_j$. Set
$l=k$, $k+1$, \dots, until $l=m$ or $pt_lt_{l+1}$. Then delete
$\{t_{j+1},\ldots,t_{l-1}\}$ from the tree and insert~$p$
between~$t_j$ and~$t_l$. (If  $j=k-1$
and $l=k$, no deletion is made, and $p$~is inserted in the place where
the missing child occurred during the tree search.)

If the binary search tree is maintained as a balanced tree of some
kind, the total running time of this algorithm will never exceed
$O(N\log N)$, because the total number of tree operations amounts to
at most $N$~searches, $N$~insertions, and $N$~deletions. (Each point is
inserted at most once and deleted at most once.) We cannot
hope for a better worst-case time estimate than this, because the
problem of finding the convex hull is well known to include the
"sorting" problem as a special case: If real numbers $(x_1,\ldots,x_N)$
are given, the convex hull of the~$N$ points $a_k=(x_k,x_k^2)$ will be
$\{a_{p(1)}a_{p(2)},\ldots,a_{p(N-1)}a_{p(N)},a_{p(N)}a_{p(1)}\}$ where
$x_{p(1)}<x_{p(2)}<\cdots < x_{p(N)}$.

\beginsection 12. Another algorithm.
Convex hulls can also be found by an incremental method that uses much
simpler data structures. The current convex hull is maintained in a
doubly linked circular list $(t_1,\ldots,t_m)$, and the
counterclockwise tests are controlled by a binary branching structure
from which no deletions need to be made. We will look closely at
 this alternative algorithm in the present section, because it will
help to clarify a similar algorithm for Delaunay triangulation that
appears in section~18 below.

The binary branching structure needed by this algorithm is essentially
a "dag" with vertices of outdegree at most~2. We will consider it to be
an array consisting of at most $4N-6$ {\it nodes\/}; each node has two
parts $(p,\alpha)$, where $p$ points to an element of the CC system
and $\alpha$ is a nonnegative integer.

The nodes appear in pairs $(p_k,\alpha_k)$ and
$(p_{k+1},\alpha_{k+1})$, representing a {\it"branch instruction"}. The
meaning of instruction~$k$ is, intuitively, ``if $pp_kp_{k+1}$ then go
to~$\alpha_k$, else go to $\alpha_{k+1}$.'' More precise
interpretations of the meaning will be given shortly.

Each element~$t$ of the current convex hull is represented by three
fields {\sl pred\/}$(t)$, {\sl succ\/}$(t)$, and {\sl inst\/}$(t)$.
Here {\sl pred\/}$(t)$ and {\sl succ\/}$(t)$ point to the predecessor
and successor of~$t$ in the convex hull, and {\sl inst\/}$(t)$ is the
address~$k$ of a node $(p_k,\alpha_k)$ such that $p_k=t$ and
$\alpha_k=1$. There will be exactly one such node in the branching
structure for every element of the convex hull, and it will be one
half of an instruction that means ``if $ptt'$ then go to~1 else go to
$\alpha_{k+1}$,'' where $t'$ is the predecessor of~$t$; the code value
$\alpha_k=1$ means that we will have to update the convex hull in the
vicinity of~$t$.

Initially $m=n=2$, and our convex hull on two points $(a_1,a_2)$ is
represented by two nodes
$$(p_0,\alpha_0)=(a_1,1)\,,\quad (p_1,\alpha_1)=(a_2,1)\eqno(12.1)$$
in the branching structure, where
$$\vcenter{\halign{\hfil$#\;$&$#$\hfil\quad&\hfil$#\;$&$#$\hfil\cr
{\sl pred\/}(a_1)&={\sl succ\/}(a_1)=a_2\,,&{\sl inst\/}(a_1)&=0\,;\cr
{\sl pred\/}(a_2)&={\sl succ\/}(a_2)=a_1\,,&{\sl
inst\/}(a_2)&=1\,.\cr}}\eqno(12.2)$$

There is a special variable~$l$, initially~2, which represents the
address of the first unused node. The algorithm now proceeds as
follows, for $n=3,4,\ldots,N$:

{\narrower\smallskip\noindent
{\bf Step H1.}\quad [Consider a new point.]\quad Set $p\la a_n$ and
$k\la 0$.
\smallskip}

{\narrower\smallskip\noindent
{\bf Step H2.}\quad [Follow instructions.]\quad
If $p_kp@ p_{k+1}$, increase $k$ by~1. Then if $\alpha_k=0$, terminate
the updating process; $p$~is not in the convex hull. If $\alpha_k=1$,
go to Step~H3; $p$~will be in the convex hull. Otherwise (i.e., if
$\alpha_k>1$), set
$k\la\alpha_k$ and repeat Step~H2.
\smallskip}

{\narrower\smallskip\noindent
{\bf Step H3.}\quad [Remove obsolete hull points.]\quad
Set $t\la p_k$ and $s\la{\sl pred\/}(t)$; also set $\alpha_k\la l$.
Then perform the following two loops:
\smallskip}

{\narrower\narrower\smallskip\noindent
{\bf Step H3a.}\quad Set $q\la{\sl pred\/}(s)$; while $q\neq t$ and
$psq$, set $\alpha_{{\sl inst\/}(s)}\la l$, $s\la q$, and $q\la {\sl
pred\/}(s)$.
\smallskip}

{\narrower\narrower\smallskip\noindent
{\bf Step H3b.}\quad Set $q\la{\sl succ\/}(t)$; while $q\neq s$ and
$pqt$, set $t\la q$, $\alpha_{{\sl inst\/}(t)}\la l$, and $q\la{\sl
succ\/}(t)$.
\smallskip}

{\narrower\smallskip\noindent
Finally set ${\sl succ\/}(s)\la p$, ${\sl pred\/}(p)\la s$, ${\sl
succ\/}(p)\la t$, ${\sl pred\/}(t)\la p$.
\smallskip}

{\narrower\smallskip\noindent
{\bf Step H4.}\quad [Compile new instructions.] Create the following
four new nodes beginning at address~$l$:
$$\vcenter{\halign{$\hfil#\;$&$#$\hfil\qquad&$\hfil#\;$&$#$\hfil\cr
(p_l,\alpha_l)&=(p,1)\,,&(p_{l+1},\alpha_{l+1})&=(s,l+2)\,;\cr
(p_{l+2},\alpha_{l+2})&=(t,1)\,,&(p_{l+3},\alpha_{l+3})&=(p,0)\,.\cr}}
\eqno(12.3)$$
Then set ${\sl inst\/}(p)\la l$, ${\sl inst\/}(t)\la l+2$, and $l\la
l+4$; the updating process is now complete.\quad\pfbox
\smallskip}

For example, suppose we have $a_1a_2a_3$. Then when $n=3$ we will get
to Step~H3 with $k=0$ and we will get to Step~H4 with $s=a_2$, $t=a_1$.
The current instructions will become
$$\vcenter{\halign{$\hfil#\;$&$#$\hfil\qquad&$\hfil#\;$&$#$\hfil\cr
(p_0,\alpha_0)&=(a_1,2)\,,&(p_1,\alpha_1)&=(a_2,1)\,;\cr
(p_2,\alpha_2)&=(a_3,1)\,,&(p_3,\alpha_3)&=(a_2,4)\,;\cr
(p_4,\alpha_4)&=(a_1,1)\,,&(p_5,\alpha_5)&=(a_3,0)\,;\cr}}
\eqno(12.4)$$
the current convex hull cycle will be $(a_1,a_2,a_3)$, with ${\sl
inst\/}(a_1)=4$, ${\sl inst\/}(a_2)=1$, and ${\sl inst\/}(a_3)=2$; and
$l$~will be~6. The new instructions (12.4) have the following meaning,
when we come through Step~H2 with a new point~$p$:

\medskip
\display 60pt:$(k=0)$:
If $a_1p@ 
a_2$, set $k\la 1$ and go to Step~H3 with $p_k=a_2$; otherwise
set $k\la 2$ and continue.

\smallskip
\display 60pt:$(k=2)$:
If $a_3p@ a_2$, set $k\la 3$ and then set $k\la 4$ and continue;
otherwise go to Step~H3 with $p_k=a_3$.

\smallskip
\display 60pt:$(k=4)$:
If $a_1p@ a_3$, do no updating; otherwise go to Step~H3 with $p_k=a_1$.

\medskip\noindent
In other words, the instructions can be paraphrased as follows:
``If $a_1pa_2$, point~$p$ is outside the hull at~$a_2$. Otherwise if
$a_2p@ a_3$, point~$p$ is outside the hull at~$a_3$. Otherwise if
$a_3p@ a_1$, point~$p$ is outside the hull at~$a_1$. Otherwise
point~$p$ is inside the hull.''

If on the other hand we have $a_2a_1a_3$, the situation will be
essentially the same except that $a_1$ and~$a_2$ will be interchanged.
In that case we will have $(p_0,\alpha_0)=(a_1,1)$,
$(p_1,\alpha_1)=(a_2,2)$; but the behavior of Step~H2 is the same if
nodes~0 and~1 are interchanged (or in general if nodes~$2k$ and $2k+1$
are interchanged).

To prove the "correctness" of the algorithm, we easily verify that the
stated invariant conditions on {\sl pred\/}$(t)$, {\sl succ\/}$(t)$,
and {\sl inst\/}$(t)$ hold, and that we get to Step~H3 only when the
counterclockwise predicate {\sl pred\/}$(p_k)\,p\,p_k$ is true. The
theorem of section~11 then validates the updating of the hull that
occurs in Step~H3. Thus the algorithm will be correct if we can prove
that $p$ is not in the convex hull whenever Step~H2 terminates with
$\alpha_k=0$.

For this purpose, we prove that any execution of Step~H2 that leads to
node number $k=l+3$ in (12.3) must occur for a point~$p'$ such that
$p'\in\Delta spt$. Such a point~$p'$ must follow a path in the
branching structure that leads to $k=l$, after which the algorithm
determines that $pp's$ and $tp'p$ hold. To complete the proof, we need
to demonstrate $sp't$.

The only way to reach $k=l$ is to come through one of the nodes whose
$\alpha$~part is set to~$l$ in Step~H3. Step~H3 finds a sequence of
consecutive nodes $t_0,t_1,t_2,\ldots,t_r,t_{r+1}$ in the current
convex hull such that $p$ lies inside the edges $t_0t_1$ and
$t_rt_{r+1}$ but outside the edges $t_1t_2,\ldots,t_{r-1}t_r$; in
other words, we have
$$pt_0t_1,\;t_1p@t_2,\;\ldots,\;t_{r-1}p@t_r,\;pt_rt_{r+1}\,.$$
(Possibly $t_{r+1}=t_0$, or $t_r=t_0$ and~$t_{r+1}=t_1$.) Step~H3 deletes
the points $t_2,\ldots,t_{r-1}$ from the convex hull and ends with
$s=t_1$ and $t=t_r$. The nodes whose $\alpha$ part is set to~$l$ are
precisely {\sl inst\/}$(t_2),\ldots,{\sl inst\/}(t_r)$. And Step~H2
reaches $k={\sl inst\/}(t_j)$ only if it has determined that
$t_{j-1}p't_j$ holds. 

Therefore the validity of the algorithm boils down to proving the
following result:

\proclaim Lemma. Let\/ $p',p,t_1,\ldots,t_r$ be distinct points of a CC
system such that\/ $r\geq 2$ and\/ $t_it_jt_k$ holds for\/ $1\leq i<j<k\leq
r$. If
$$t_1p@t_2,\;\ldots,\;t_{r-1}p@ t_r,\;pp't_1,\;t_rp'p\,,$$
and if\/ $t_{j-1}p't_j$ holds for some\/~$j$, $1<j\leq r$, then\/
$t_1p't_r$.

\noindent {\it Proof}.\quad
The point $p'$ lies outside the $r$-gon $(t_1,\ldots,t_r)$, so by the
theorem in section~11 we can have $p't_1t_r$ only if $t_1p't_2$ or
$t_rp't_{r-1}$. Thus it suffices to consider the case $r=3$. But when
$r=3$, the hypotheses $t_1t_2t_3\wedge t_1p@ t_2\wedge 
t_2p@ t_3\wedge pp't_1\wedge t_3p'p\wedge p't_1t_3$ 
imply $t_2\in\Delta t_3t_1p$,
hence $t_3t_1p$ by Axiom~4; hence $t_1t_2p'$ by Axiom~5, otherwise the
tournament for~$t_1$ would contain a vortex  $t_2\ra t_3\ra p'\ra
t_2$ out of~$p$; and $t_3t_2p'$ by Axiom~$5'$, otherwise the
tournament for~$t_3$ would contain a vortex from $t_2\ra p'\ra t_1\ra
t_2$ into~$p$. $\bigl($The case $r=3$ is, in fact, equivalent to rule
(2.7).$\bigr)$\quad\pfbox

\bigskip
The running time of this algorithm can be $\Omega(N^2)$ in the worst
case. For example, if the points $(a_1,a_2,\ldots,a_N)$ form an
$N$-gon in the stated order, point~$a_n$ will be inserted into the
hull only after verifying "!$n$-gon"
$a_1a_2a_n$, $a_2a_3a_n$, $a_1a_3a_n$, $a_3a_4a_n$, $a_1a_4a_n$,
\dots, $a_{n-2}a_{n-1}a_n$, $a_1a_{n-1}a_n$.
However, if the points $\{a_1,a_2,\ldots,a_N\}$ are accessed in random
order, the "average running time" turns out to be quite fast, regardless
of the underlying CC system. "!randomization"

\proclaim Theorem. The average number of counterclockwise tests made
by the algorithm above is at most\/ $3N\ln N+O(N)$, assuming that each
of the\/ $N!$~ways to assign subscripts to the points\/
 $\{a_1,\ldots,a_N\}$ is equally likely.

\noindent{\it Proof}.\quad
Steps H1, H3, and H4  take only $O(N)$ units of time, because elements
enter or leave the convex hull at most once each. Therefore Step~H2 is
the ``inner loop,'' and we can prove the theorem by considering how
often each of the instructions (12.3) is executed.

If $l$ is an even number $\geq 2$, let $c_l$ be the number of times
the test $p_lp'p_{l+1}$ is performed with the result false, and let
$c_{l+1}$ be the number of times it is performed with the result true.
Let $C=c_5+c_9+c_{13}+c_{17}+\cdots$ be the number of times Step~H2
terminates with no need to update the hull; clearly $C<N$.

Let $E_j$ be the set of all pairs of points $pq$ such that $pqp'$ is
true for exactly $j$ other points~$p'$.
Let $e_j$ be the number of elements of $E_j$, and let
$e_{<j}=e_0+e_1+\cdots +e_{j-1}$. We will see that the average values of
the numbers~$c_l$ can be bounded as a function of the numbers~$e_{<j}$.

If $tp$ belongs to $E_j$, the test $p_{l+2}p'p_{l+3}=tp'p$ of (12.3)
will yield a false result only if $p'$ is one of the $j$~points that
makes $tpp'$ true. And it will be performed only if $t$ and~$p$ occur
earlier than all~$j$ of those points, with $t$ occurring before~$p$;
otherwise $tp$ would never be part of the current convex hull leading
to the compilation of instructions (12.3). The probability that $t$
and~$p$ appear before~$j$ other given points is $1/(j+2)(j+1)$.
Therefore the sum $c_4+c_8+c_{12}+c_{16}+\cdots$ is at most
$$S=\sum_{j\geq 0}\,{j\,e_j\over (j+1)(j+2)}=\sum_{j\geq
1}\,{(j-2)e_{<j}\over j(j+1)(j+2)}<\sum_{j\geq 1}\,{e_{<j}\over
j(j+1)}\,.\eqno(12.5)$$

Similarly, if $ps$ belongs to $E_j$, the first test
$p_lp'p_{l+1}=pp's$ of (12.3) will yield a false result only if $p$
and~$s$ occur before all $j$~points that make $psp'$ true, with $s$
occurring before~$p$; we conclude that $c_2+c_6+c_{10}+c_{14}+\cdots$
is at most~$S$. Furthermore we have $c_3+c_7+c_{11}+c_{15}+\cdots
=(c_4+c_5)+(c_8+c_9)+\cdots\leq S+C$, because
$c_{l+1}=c_{l+2}+c_{l+3}$ in (12.3). Therefore the total number of
tests in Step~H2 is at most $c_0+c_1+3S+2C=3S+O(N)$.

Recall that the {\it"score"\/} of a vertex $q$ in a tournament is the
number of vertices~$r$ such that $q\ra r$. Thus $pq\in E_j$ if and
only if $q$ has score~$j$ in the tournament associated with~$p$. We
will bound $e_{<j}$ by proving the following result:

\proclaim Lemma. A vortex-free tournament on\/ $n\geq 2j$ vertices has
at most\/ $j$~vertices with score\/ $<j$.

\noindent{\it Proof}.\quad Suppose first that $n=2j$, and let $\alpha$
be any string of signed points defining the tournament. If $\alpha$
has no negative points, the scores are $0,1,\ldots,n-1$, and exactly
$j$ of these are $<j$. Otherwise if $\alpha$ begins with a negative
point, say $\alpha=\bar{v}\,\beta$, we obtain the same tournament from
the string~$\beta v$, which has one less negative point. Otherwise
$\alpha$ has the form $\beta\,u\,\bar{v}\,\gamma$ where $u$~is positive and
$\bar{v}$ is negative. Suppose $u$ has score~$s$ and $v$ has
score~$t$. Then $s+t=n-1=2j-1$, because $p\ra u$ iff $v\ra p$ for all
$p\notin\{u,v\}$. 

Replace $\alpha$ by the string $\beta\,\bar{v}\,u\,\gamma$; this reverses
the direction of the arc $v\ra u$ and leaves all other arcs unchanged.
Therefore the new score of~$u$ is $s+1$ and the new score of~$v$ is
$t-1$. The number of elements with score $<j$ has not changed, because
$u$'s~score increases from $j-1$ to~$j$ iff $v$'s~score decreases
from~$j$ to $j-1$. Repeating these operations will lead eventually to
a string with nothing but positive entries; hence {\it exactly\/}
$j$~elements of every vortex-free tournament on $2j$~vertices have
a score that is $<j$.

If $n>2j$, suppose there are $l$ vertices with score $<j$. Delete any
vertex whose score is $j$ or more; at least one such vertex must
exist, otherwise the total score of all vertices would be at most
$(j-1)n<\copy\ncht$. The new tournament has $l'\geq l$ vertices with
score $<j$, and we know by induction on~$n$ that $l'\leq j$.\quad\pfbox

\bigskip
The lemma proves that $e_{<j}\leq jN$ when $N>2j$, because $e_{<j}$ is
a sum over~$N$ vortex-free tournaments with $N-1$ vertices each.
Therefore we can bound the quantity in (12.5):
$$S<\sum_{j\geq 1}\,{e_{<j}\over j(j+1)}\leq\sum_{1\leq
j<N/2}\,{N\over (j+1)}+\sum_{j\geq N/2}\,{N^2\over j(j+1)}
=N\ln N+O(N)\,.\eqno(12.6)$$
This completes the proof.\quad\pfbox

\bigskip
Our description of the algorithm does not explain how to output the
convex hull after all $N$~points have been processed. One way is to
introduce a new variable~$r$, which always points to a hull vertex;
initially $r$ points to~$a_1$, say. Then in Step~H3, set $r\la p$.

This algorithm is analogous to "quicksort" because it does almost no
work in the inner loop besides making clockwise comparisons, and because
its behavior depends on the cumulative effect of repeated partitioning
of data that is in random order.

\eject\beginsection 13. Comparison of algorithms.
Section~11 presented an algorithm for convex hulls that we may call
{\it"treehull"\/}; section~12 presented another that we may call {\it
"daghull"}. Both algorithms find a convex hull of an arbitrary (possibly
unrealizable) CC system. Treehull can be implemented to take $O(N\log
N)$ time on any given $N$-point CC system; daghull has expected time
$O(N\log N)$ on any given system that is input in random order.

It is interesting to compare both methods to a much simpler algorithm
that we might call {\it"hull insertion"}. Hull insertion operates by
keeping a doubly linked circular list of the points $(t_1,\ldots,t_m)$
currently in the convex hull, just as daghull does, but it uses no
branching structure or anything else. Initially the circular list
contains only the first two points, $a_1$ and~$a_2$:
$${\sl pred\/}(a_1)={\sl succ\/}(a_1)=a_2\;,\qquad {\sl
pred\/}(a_2)={\sl succ\/}(a_2)=a_1\,;\eqno(13.1)$$
and we have a pointer~$r$ to~$a_1$. The algorithm now does the
following simple computation, for $n=3,4,\ldots,N$:"!convex hull, algorithms"

{\narrower\smallskip\noindent
{\bf Step I1.}\quad [Consider a new point.]\quad Set $p\la a_n$ and
$s\la r$.
\smallskip}

{\narrower\smallskip\noindent
{\bf Step I2.}\quad [Go around the hull.]\quad
Set $t\la{\sl succ\/}(s)$. If~$spt$, go to Step~I3. Otherwise, if
$t=r$, no updating needs to be done since $p$ lies inside the $m$-gon
$(t_1,\ldots,t_m)$. Otherwise set $s\la t$ and repeat Step~I2.
\smallskip}

{\narrower\smallskip\noindent
{\bf Step I3.}\quad [Remove obsolete hull points.]\quad If $s\neq r$,
skip to Step~I3b. Otherwise perform both of the following loops:
\smallskip}

{\narrower\narrower\smallskip\noindent
{\bf Step I3a.}\quad Set $q\la{\sl pred\/}(s)$; while $q\neq t$
and~$psq$, set $s\la q$ and $q\la{\sl pred\/}(s)$. Then set $r\la q$.
\smallskip}

{\narrower\narrower\smallskip\noindent
{\bf Step I3b.}\quad Set $q\la{\sl succ\/}(t)$; while $t\neq r$
and~$pqt$, set $t\la q$ and $q\la{\sl succ\/}(t)$.
\smallskip}

{\narrower\smallskip\noindent
Finally set ${\sl succ\/}(s)\la p$, ${\sl pred\/}(p)\la s$, ${\sl
succ\/}(p)\la t$, ${\sl pred\/}(t)\la p$.\quad\pfbox
\smallskip}

\bigskip
Thus, hull insertion tries each edge~$st$ of the current hull; if the
new point lies outside some edge, it is inserted into the hull as a
new extreme point, and it may cause adjacent points to be removed from
the list. But if we get all the way around without finding the new
point outside, the new point must lie inside.

Hull insertion is clearly inefficient when the convex hull is large.
But the method is extremely easy to program, and it has very little
``data structure overhead'' per operation, so it is actually the
method of choice when the number of points is small.

We will compare the algorithms by considering three things:
"!comparison of algorithms"
the length of the corresponding programs (the number of statements to
implement them in the programming language~{\ninerm"C"}, not counting 
implementation of the predicate~$pqr$); the number of times they test a
triple~$pqr$ to see if it has counterclockwise orientation; and the
number of ``"mems"'' the programs use to access and update data structures.
A~{\it mem\/} is a memory reference: Whenever a field of a record is
examined or changed, we add one mem to the running time. Thus, when a
field value is fetched into a ``register,'' one mem is charged;
henceforth that value can be looked at again without further cost,
until the register changes, because computations among a fixed finite
number of registers do not reference memory. The author has found that
mem units provide meaningful machine-independent comparisons between
algorithms for numerous applications; furthermore, there is a simple
way to instrument a {\ninerm"C"}~program so that it will count mems
properly. (See \ref[47].)

Three implementations of "treehull" were tested.
All three use a doubly linked list structure  as well as a tree to
represent the current hull, because many operations of the algorithm
depend on the successors or predecessors of extreme points. The
simplest implementation uses ordinary binary search trees without any
attempt at balancing; the second uses "Aragon" and "Seidel"'s {\it
treap\/} structure \ref[2], which guarantees "!treaps"
that the binary tree will have the probability
distribution of random binary search trees after every operation; the
third uses "Sleator" and "Tarjan"'s {\it"splay trees"\/} \ref[66], which
guarantee $O(N\log N)$ total time in the "worst case".
The second implementation will be called ``"treaphull",'' and the third
will be called ``"splayhull".''

\pageinsert
"!empirical running times"
\vfill
\setbox0=\vbox{\baselineskip=16pt\halign{#\hfil$\;\;$%
&\hfil#%
&+$#\quad$\hfil
&\hfil#%
&+$#\quad$\hfil
&\hfil#%
&+$#\quad$\hfil
&\hfil#%
&+$#\quad$\hfil
&\hfil#%
&+$#\quad$\hfil
&\ \hfil#\cr
&\multispan2{\hfil{\sl hull insertion (27)}\hfil}%
&\multispan2{\hfil{\sl daghull (55)}\hfil}%
&\multispan2{\hfil{\sl treehull (107)}\hfil}%
&\multispan2{\hfil{\sl treaphull (148)}\hfil}%
&\multispan2{\hfil{\sl splayhull (150)}\hfil}%
\cr
\noalign{\vskip2pt}
\hfil{\sl data}\hfil&{\sl mems}&{\sl ccs}&{\sl mems}&{\sl ccs}%
&{\sl mems}&{\sl ccs}&{\sl mems}&{\sl ccs}%
&{\sl mems}&{\sl ccs}&{\sl hull size}\cr
\noalign{\vskip2pt}
\phantom{00}128 cities&1390&1246&3543&1034&2451&754&2856&882%
&3440&1056&13\cr
\phantom{00}100 uniform&912&816&2028&579&1709&525&1869&579%
&1990&552&10\cr
\phantom{0}1000 uniform&13128&12916&21078&6811&17654&6211&18576&6573%
&19430&6929&16\cr
10000 uniform&230288&229836&210795&69806&196109&75278&194857&72973%
&205128&77732&28\cr
\phantom{00}100 $n$-gon&2922&2523&4530&1079&3570&984&5311&1029%
&10713&1015&100\cr
\phantom{0}1000
$n$-gon&251630&247630&63204&16737&45052&14299&63939&15085%
&175928&15503&1000\cr
10000
$n$-gon&25365670&25325671&859311&243106&552193&193636&718351&192442%
&2436850&206162&10000\cr
\phantom{00}100 nested&900&561&7544&2174&2427&583&2869&605%
&3571&604&9\cr
\phantom{0}1000 nested&12910&11435&151002&48855&22670&6847&25983&7248%
&31814&6925&16\cr
10000 nested&192834&189667&2318715&769733&191261&68149&211047&74144%
&229121&75223&19\cr
}}
\centerline{\rotl0}
\vfill
\endinsert

Four kinds of data were used in the author's tests. First was some
realistic data, taken from the latitude and longitude coordinates of
128~cities in the United States and Canada; this data comes from the
"Stanford GraphBase" \ref[47]. The convex hull in this case turned out to
involve 13 of the 128 cities (Vancouver,~{\ninerm BC}; Salem,~{\ninerm OR};
Santa Rosa,~{\ninerm CA}; San Francisco, {\ninerm CA}; Salinas,
{\ninerm CA}; Santa Barbara, {\ninerm CA}; San Diego, {\ninerm CA};
Victoria, {\ninerm TX}; West Palm Beach, {\ninerm FL}; Worcester,
{\ninerm MA}; Saint Johnsbury, {\ninerm VT}; Winnepeg, Manitoba;
and Regina, Saskatchewan).

The second kind of data was uniformly distributed inside a square. The
third kind was simply an "$n$-gon", with points entering in random order.
The convex hull was, of course, much larger in this case than it was in
the others.

There was also a need to test the algorithms on data that was
intentionally {\it nonrandom\/}: When points are considered in random
order, incremental hull algorithms almost never need to decrease the
size of the current convex hull, because a new point rarely displaces
more than one former point. Therefore large portions of the code were
never executed when convex hulls were found from the first three kinds 
of data. In the fourth data set the points came in 10~nested groups,
with $N/10$ randomly chosen points per group. The points in the
$k\/$th group were placed approximately on the edges of a square, with
the side of the square proportional to~$k^2$. More precisely, each
point was either $(a,b)$ or $(b,a)$, chosen with 50/50 probability,
where $a$ was a uniform random integer between~0 and $100k^2$, and $b$
was uniform either between~0 and 100 or between $100k^2-100$ and
$100k^2$. Points of a new group would tend to wash out several points
of an old group, therefore allowing all parts of each algorithm to be
exercised. 

The results are summarized in the table on the next page. Numbers in
parentheses represent lines of code (i.e., statements in~{\ninerm C});
thus, "hull insertion" needs only 27
program statements, compared to 150 for splayhull.
Each of the running time figures stands for a single run, not an
average of many runs, so we should look more at relative magnitudes
than at the precise numbers. The data for each job was the same for
each algorithm, and of course each algorithm gave the same answer. 
The ``"ccs"'' represent calls on the counterclockwise predicate. Each cc~test
 requires six memory references to fetch coordinates, besides the
arithmetic instructions needed to evaluate a determinant; these six
memory references are not included in the count of mems.

As expected, "hull insertion" is intolerably poor on $n$-gons, but
otherwise it is quite reasonable on small problems, and its easily
written program is only 1/4 the size of the program for treehull.
Notice that hull insertion was in fact the fastest of all methods tested, when
presented with 100 random points nested in groups of~10. 

The "daghull" algorithm blows up on nonrandom nested groups,
for obvious reasons; otherwise it performs pretty well, considering
that it requires only half as much code as treehull. But its
data-structure overhead cost, measured in units of mems per~cc, does
not turn out to be as low as we might have expected.

In these experiments "treehull" usually wins on speed, although the
extension to treaps does not make the program a great deal more
complex nor does it lead to excessive overhead for rebalancing. Perhaps
there will be a way to prove that treehull without rebalancing always
has an expected running time as good as that of treaphull; until then,
some people may well prefer to use treaphull, for which we have
rigorous time estimates in spite of the fact that it does not perform
quite as well on the data considered here.
"Treaphull" beat treehull on 10000 uniformly random points in the test
reported above, but further experiments show that there actually is a
good deal of variation in different runs. For example, 
tests were made using exactly
the same 1000 points in the same order, changing only the source
of random numbers used for priorities in the treap; this gave the following
numbers of mems plus ccs in five different runs of treaphull:
$$194857{+}72973\,;\ 235634{+}93539\,;\ 184895{+}68389\,;\
206333{+}78960\,;\ 190092{+}66886\,.$$
The tabulated results are consistent with the conjecture that random
insertions and deletions on "binary search trees" tend to produce trees
whose total path length is less than that of a purely random tree.
That conjecture may be impossibly difficult  to prove, although it is
known to hold in a very special case of the trees containing only
three elements \ref[43]. "!open problems"

In this application the extra program and overhead cost of "splay trees"
is not compensated by improved performance. Other types of
worst-case-"balanced trees" are more difficult to program and will
presumably fare no better; it appears that "treaps" are the balancing
method of choice when rigorous balance estimates are important.

\beginsection 14. Degeneracy.
We began with the assumption that no three points are collinear. But
we could have defined a more general kind of system in which each
triple~$pqr$ has three values `true, false, none' or `$+1$, $-1$, 0',
where the third value means that $\{p,q,r\}$ do not define a triangle.
Such a theory would turn out to be equivalent to the general study of
"acyclic oriented matroids" with rank $\leq 3$. But it is much easier to
develop algorithms for convex hulls based on CC systems as we have
defined them, because special cases need not then  be considered. If
"collinear points" are undesirable in the output, a~simple "postprocessing"
algorithm will remove them.

Therefore let us try to find a way to define the ternary relation
satisfying Axioms 1--5, given an arbitrary set of points in the plane.
We will assume that the points are presented in some definite "linear
order"; our definition of $pqr$ will depend on the order of the points
as well as on their Cartesian "coordinates" $(x_p,y_p)$, $(x_q,y_q)$,
$(x_r,y_r)$. We will write $p\prec q$ if point precedes point~$q$ in
the assumed linear order.

It is easy to satisfy Axioms 1--3. The values of $pqr$ can be defined
arbitrarily when $p\prec q\prec r$, and this implies the values in all
other cases.

It is also fairly easy to satisfy Axiom~4, using a determinant-like
operation. Let $f(p,q)$ be any real-valued function of the
points~$p,q$, and define $pqr$ to be true if the quantity
$$\Delta(p,q,r)=f(p,q)+f(q,r)+f(r,p)-f(q,p)-f(r,q)-f(p,r)\eqno(14.1)$$
is greater than some nonnegative threshold value~$\theta$, or if
$\vert\Delta\vert\leq\theta$ and ${(p\prec q\prec r)}\vee{(q\prec r\prec
p)}\vee
{(r\prec p\prec q)}$. We get the standard definition for
noncollinear points in the plane if $f(p,q)=x_py_q$ and $\theta=0$,
because $\Delta(p,q,r)$ is then the nonzero determinant $\vert
pqr\vert$ of section~1. We get approximations to this definition, if
$f(p,q)$ is an approximation to $x_py_q$ and if~$\theta$ is some error
tolerance. The values added and subtracted in (14.1) are supposed to
be computed without error. Axioms 1--3 are easily verified, and
Axiom~4 is a consequence of the identities
$$\Delta(t,p,q)+\Delta(t,q,r)+\Delta(t,r,p)+\Delta(r,q,p)=0\,.\eqno(14.2)$$
For if we have $tpq\wedge tqr\wedge trp\wedge rqp$ in violation of
"Axiom~4", we must have at most one $\Delta>\theta$; otherwise the
$\Delta$'s could not sum to zero. Thus we may assume by symmetry that
any counterexample must satisfy 
$\bigl((t\prec p\prec q)\vee(p\prec q\prec t)\vee(q\prec t\prec p)\bigr)
\wedge\break\bigl((t\prec q\prec r)\vee(q\prec r\prec t)\vee
(r\prec t\prec q)\bigr)\wedge
\bigl((t\prec r\prec p)\vee(r\prec p\prec t)\vee
(p\prec t\prec r)\bigr)$. But these
inequalities are unsatisfiable by any linear ordering, so Axiom~4 must
hold.

"Axiom 5" is, unfortunately, much more delicate and difficult to
guarantee. Approximations to the determinant, computed with either
fixed-point or "floating-point arithmetic", are almost certainly
untrustworthy. But if we can compute determinants with perfect
accuracy, there are some pleasant ways to obtain a bona fide CC system
for any set of points in the plane.

Suppose first that the points are distinct. Then the definition
of~$pqr$ above will satisfy Axioms 1--5 if we take $f(p,q)=x_py_q$ and
$\theta=0$. To verify this, we start with the determinant identity
$$\vert tpq\vert\,\vert tsr\vert+\vert tqr\vert\,\vert tsp\vert+\vert
trp\vert\,\vert tsq\vert=0\,.\eqno(14.3)$$
The $\Delta$ function (14.1) leads to a similar identity, but the right-hand
side in general is a sum of thirty ``commutator terms'' of the form
$f(p,r)f(q,s)-f(p,s)f(q,r)$; when $f(p,q)=x_py_q$, these commutators
all reduce to $x_py_r\cdot x_qy_s-x_py_s \cdot y_qy_r=0$, assuming exact
arithmetic.

If Axiom 5 fails, with $tsp\wedge tsq\wedge tsr\wedge tpq\wedge
tqr\wedge trp$, we consider cases based on the number of determinants
$\vert tps\vert$, $\vert tqr\vert$, $\vert trp\vert$ that are
positive. {\bf Case~0}, $\vert tpq\vert=\vert tqr\vert =\vert trp\vert=0$.
This case is ruled out by the argument we used to establish Axiom~4.
{\bf Case~1}, $\vert tpq\vert=\vert tqr\vert=0<\vert trp\vert$. Point~$t$
must lie on the lines~$qp$ and~$qr$, so this case is impossible when
the points are distinct. {\bf Case~2}, $\vert tpq\vert>0$ and $\vert
tqr\vert>0$. Identity (14.3) implies that $\vert tsr\vert=\vert
tsp\vert=0$, so point~$s$ must lie on the lines~$tr$ and~$tp$; another
impossibility. Axiom~5 cannot fail, when the points are distinct.

In practice it is desirable to allow repeated points as well as
collinear points; then algorithms will work without exception. A~study
of repeated points also gives insight into the limiting cases that
arise when approximate arithmetic breaks down. However, {\sl there is no
general way to satisfy Axioms 1--5 with the definition above in the
presence of multiple points}, regardless of the linear ordering chosen.
For example, assume that points $p,q,r$
form a counterclockwise triangle, and assume that there are five
identical points inside that triangle. At least two of those five
points, say $t\prec s$, must be consecutive in the assumed linear
ordering. But then we have $tsp\wedge tsq\wedge tsr\wedge tpq\wedge
tqr\wedge trp$, contradicting Axiom~5.

There is, however, a simple and somewhat surprising way to define a CC
system on arbitrary points in the plane. First we assume for
convenience that $\prec$ is a refinement of the "lexicographic order"
relation~$<$:
$$\eqalignno{p<q\ &\Longleftrightarrow\ x_p<x_q\ \vee\ (x_p=x_q\wedge
y_p<y_q)\,;&(14.4)\cr
\noalign{\smallskip}
p<q\ &\RA\ p\prec q\ \RA\ p<q\ \vee\
p=q\,.&(14.5)\cr}$$ 
Then we define $pqr$ to be true if and only if
$$\vert pqr\vert>0\ \vee\ \bigl(\vert pqr\vert=0\ \wedge\
\bigl(\Psi(p,q,r)\vee\Psi(q,r,p)\vee\Psi(r,p,q)\bigr)\bigr)\,,\eqno(14.6)$$
where
$$\Psi(p,q,r)=\bigl((p\prec q\prec r)\wedge(p\neq q)\bigr)\;\vee\;
\bigl((q\prec p\prec r)\wedge(p=q)\bigr)\,.\eqno(14.7)$$
Here $p=q$ means $(x_p,y_p)=(x_q,y_q)$; we will use different variable
names to denote different points of the system, although different
points may happen to be equal, coordinate-wise.

Definition (14.6) takes the construction that worked for collinear but
distinct points and skews it slightly so that it works also for
repeated points. Another way to state the effect of (14.6) is, ``The
counterclockwise predicate~$pqr$ holds with respect to a repeated point
$p=q$ and a different point~$r$ iff $q\prec p\prec r$ or $r\prec p\prec
q$.'' The other case, $(q\prec r\prec p)\wedge(q\neq r)$ in
$\Psi(q,r,p)$, is incompatible with the $\prec$~relation because of
(14.5). The points ``to the left of the line~$pq$'' when $p=q$ and
$p\prec q$, i.e., the points~$r$ such that $pqr$ holds, are therefore
$$\{\,r\mid (r\prec p\wedge r\neq p)\vee p\prec r\prec q\,\}\,;\eqno(14.8)$$
the points ``to the right'' are the remaining ones,
$$\{\,r\mid(r\prec p\wedge r=p)\vee q\prec r\,\}\,.\eqno(14.9)$$
Notice that the definition is not symmetric between left and right.

Axioms 1--3 hold, because (14.6) has cyclic symmetry and because
$\Psi(p,q,r)=\neg\Psi(q,p,r)$. Axiom~4 also holds; it could fail only
if $\vert spq\vert=\vert sqr\vert=\vert srp\vert=\vert rqp\vert=0$,
because of (14.2). If all four determinants vanish, we can assume by
symmetry that $p\prec q\prec r\prec s$. A~simple case analysis now
verifies Axiom~4: If $p\neq q\neq r$ we have $\sqbox pqrs$; if $p\neq
q=r$ we have $r\in\Delta pqs$; if $p=q\neq r$ we have $\sqbox prsq$;
and if $p=q=r$ we have $\sqbox rqps$. (Recall that $r\in\Delta pqs$
means $rpq\wedge rqs\wedge rsp$; $\sqbox pqrs$ means $pqr\wedge
qrs\wedge rsp\wedge spq$.) "!notation..."

"Lexicographic order" is convenient because a "convex combination" of
points lies lexicographically between them:
$$p<q\quad {\rm and}\quad 0<\alpha <1\ \RA\ p<\alpha
p+(1-\alpha)q<q\,.\eqno(14.10)$$
We can use this fact to deduce certain relations between the $\prec$
ordering and the predicate~$pqr$. 

\proclaim Lemma. The counterclockwise triples defined in the plane by
(14.6) contain no four-point configurations of the following kinds:
$$\eqalignno{&p\prec q\prec r\prec s\ \wedge\ s\in\Delta
pqr\,;&(14.11)\cr
&s\prec p\prec q\prec r\ \wedge\ s\in\Delta pqr\,;&(14.12)\cr
&p\prec r\wedge p\prec s\wedge q\prec r\wedge q\prec s\ \wedge\ \sqbox
prqs\,;&(14.13)\cr
&p\prec r\wedge q\prec r\wedge r\prec s\wedge rqs\wedge rsp\wedge
rqp\,;&(14.14)\cr
&p\prec q	\wedge q\prec r\wedge q\prec s\wedge qsp\wedge
qpr\wedge qsr\,.&(14.15)\cr}$$

\noindent{\it Proof}.\quad
If $sqp$, relation (14.14) is a special case of (14.11), because
$s\in\Delta rqp$; otherwise $qsp$ and (14.14) reduces to (14.13).
Similarly, (14.15) is a consequence of (14.12) or (14.13) according as
$psr$ is true or false. So we need only show that (14.11), (14.12),
and (14.13) are impossible. The case analysis above rules them out
whenever all four determinants $\vert spq\vert$, $\vert sqr\vert$,
$\vert srp\vert$, $\vert pqr\vert$ are zero; in particular, they
cannot occur if any two of $\{p,q,r,s\}$ are equal.

If $s\in\Delta pqr$ and $\vert pqr\vert=0$, we have $\vert
spq\vert=\vert sqr\vert=\vert srp\vert=0$, because the determinants
are nonnegative and sum to~$\vert pqr\vert$. Thus we may assume that
$\vert pqr\vert >0$. But then $s$ is a convex combination,
$$s={\vert sqr\vert\over \vert pqr\vert}\,p+{\vert psr\vert\over \vert
pqr\vert}\,q+{\vert pqs\vert\over \vert pqr\vert}\,r\,,$$
which is incompatible with (14.11) or (14.12) unless $s=r$ or $s=p$.

Finally, assume $\sqbox prqs$. Identity (14.2) yields
$$\vert prq\vert+\vert qsp\vert=\vert rqs\vert+\vert spr\vert\,,$$
hence we cannot have $\vert prq\vert=\vert qsp\vert=0$ unless $\vert
rqs\vert=\vert spr\vert$. Suppose $\vert prq\vert>0$; then
$$s+{\vert qsp\vert\over\vert prq\vert}\,r={\vert rqs\vert\over\vert
prq\vert}\,p+{\vert spr\vert\over\vert prq\vert}\,q\,,$$
and the pairs of coefficients on each side are nonnegative and have
the same sum. Dividing by this common sum and applying (14.10) shows
that (14.13) cannot hold unless either $r$ or~$s$ equals either~$p$
or~$q$. A~similar argument applies when we have $\vert qsp\vert
>0$.\quad\pfbox

\proclaim Theorem. The ternary relation defined in (14.6) yields a CC
system on an arbitrary multiset of points in the plane.

\noindent{\it Proof}.\quad
We will give two proofs, one combinatorial/geometric and the other
algebraic/analytic, because both proofs shed some light on the
structure. Only Axiom~5 remains to be verified, so we shall assume
$tsp\wedge tsq\wedge tsr\wedge tpq\wedge tqr\wedge trp$ and try to
obtain a contradiction. We know that Axiom~5 holds whenever the points
are distinct, so our first proof simply rules out all counterexamples
when repeated points appear.

Axiom 4 tells us that $pqr$ holds. Suppose $\vert pqr\vert=0$. Then
the four determinants on $\{p,q,r,t\}$ vanish, and our case analysis
above shows that the only possibility with $t\in\Delta pqr$ is $p\prec
q\prec t\prec r$, with $p\neq q=t$. If also $t=s$, we need $t\prec s$
to satisfy $pts$, but $s\prec t$ to satisfy~$qts$. Hence $t\neq s$
but then $qts$ implies $s\prec q$, contradicting~$rts$. Therefore
$\vert pqr\vert>0$, and in particular the points $\{p,q,r\}$ must be
distinct.

Suppose $t=s$. If $t\prec s$, the relations $tsp$, $tsq$, $tsr$ imply
that $p\prec t$, $q\prec t$, $r\prec t$ unless $t$ equals $p$, $q$,
or~$r$. But that contradicts (14.11), since $t\in\Delta pqr$.
Similarly, if $s\prec t$ we cannot have $t\prec p\wedge t\prec q\wedge
t\prec r$. Therefore we may assume that $t=p$; but then we have either
$r\prec t\prec p\prec s$ or $p\prec s\prec t\prec r$, both of which
contradict~$trp$. Thus $t\neq s$.

Suppose $t=q$; this is the most interesting case. The relations $tpq$
and~$tqr$ imply that we have either $p\prec q\prec t\prec r$ or
$r\prec t\prec q\prec p$. Now $tsq$ gives either $s\prec q\prec t$ or
$t\prec q\prec s$. But $p\prec t\wedge s\prec t\wedge t\prec
r\wedge tsr\wedge trp\wedge tsp$ is impossible by (14.14); and $r\prec
t\wedge t\prec p\wedge t\prec s\wedge tsr\wedge trp\wedge tsp$ is
impossible by (14.15). Thus $t$ must be different from $p$, $q$, $r$,
and~$s$.

The only remaining possibility is $s=q$. Then $\vert tsp\vert=\vert
tqp\vert\leq0$, so $\vert tsp\vert=\vert tpq\vert=0$. 
But if $s\prec q$, the hypotheses $tsq$ and $tpq$ and
$tsp$ force $t\prec s\prec p\prec q$, contradicting $p\neq q$. Hence
$s\succ q$; but then $tsq$ and $tsp$ force $q\prec s\prec p\prec t$,
contradicting~$tpq$. The first proof of Axiom~5 is complete. 

The second proof is completely different; it is based on the idea of
"perturbation", which is well known in the theory of linear programming.
(See \ref[17] for a general treatment of perturbation, called
``"simulation of simplicity".'')
If $p_1\prec p_2\prec\cdots\prec p_n$ is any refinement of
lexicographic order, replace the coordinates $(x_k,y_k)$ of~$p_k$ by
$$p'_k=(x_k-\epsilon^{3n^2-nk},y_k+\epsilon^{3n^2-(n+1)k})\,.\eqno(14.16)$$
If $p\prec q\prec r$, the coordinates of points $p',q',r'$ will be
$(x_p-\delta_p,y_p+\epsilon_p)$,
$(x_q-\delta_q,
y_q+\epsilon_q)$,
$(x_r-\delta_r,y_r+\epsilon_r)$, 
where we have
$$\displaylines{%
\hfill\epsilon_r>\epsilon_q>\epsilon_p>\epsilon^2_r\,;\hfill\llap(14.17)\cr
\noalign{\smallskip}
\hfill\epsilon_r\delta_q>\epsilon_q\delta_r\,,\qquad
\epsilon_r\delta_p>\epsilon_p\delta_r\,,\qquad
\epsilon_q\delta_p>\epsilon_p\delta_q\,;\hfill\llap(14.18)\cr}$$
so the determinant $\vert p'q'r'\vert$ will be 
$$\eqalignno{\vert p'q'r'\vert=\vert pqr\vert
&+\epsilon_r(x_q-x_p)+\delta_r(y_q-y_p)\cr
\noalign{\smallskip}
&\null+\epsilon_q(x_p-x_r)+\delta_q(y_p-y_r)\cr
\noalign{\smallskip}
&\null+\epsilon_p(x_r-x_q)+\delta_p(y_r-y_q)\cr
\noalign{\smallskip}
&\null-\epsilon_r\delta_q+\epsilon_q\delta_r+\epsilon_r\delta_p-
\epsilon_p\delta_r-\epsilon_q\delta_p+\epsilon_p\delta_q\,,&(14.19)\cr}$$
arranged according to
 increasing powers of $\epsilon$. All of these determinants
$\vert p'q'r'\vert$ will
have the sign of the first nonvanishing coefficient of (14.19), for
all~$\epsilon$ in the range $0<\epsilon<\delta$, when $\delta$ is
sufficiently small. We can therefore set $\epsilon={1\over
2}\delta$, and define $pqr$ true iff $\vert p'q'r'\vert >0$.

This definition makes $pqr$ true iff $\vert pqr\vert>0$ or $\vert
pqr\vert=0$ and $p\neq q$, given that $p\prec q\prec r$. For if $\vert
pqr\vert=0$ and $p\neq q$, we have $(x_p,y_p)<(x_q,y_q)$ in
lexicographic order; hence $x_q-x_p>0$ or $x_q-x_p=0$ and $y_q-y_p>0$,
making (14.19) positive. And if $\vert pqr\vert=0$ and $p=q$, there
are two subcases. Either
$q\neq r$, which makes (14.19) negative since
$(x_p-x_r,y_p-y_r)=(x_q-x_r,y_q-y_r)<(0,0)$; or $q=r$, which makes
(14.19) assume the negative sign attached to $\epsilon^{(i+j)n+2n-j}$.

We have proved that our $\epsilon$-based definition is equivalent to
(14.6). Rule (14.6) therefore defines a CC system; indeed, it defines
a "realizable CC system"---a~system that is realizable by points
arbitrarily close to the given ones, having no collinear
triples.\quad\pfbox

\bigskip
Slight changes to (14.16) will produce other ways to define a
realizable CC system by slightly perturbing any given set of points.
But we have seen that no rule simpler than (14.6) will define a CC
system, realizable or not, if we insist that $pqr$ should be true
whenever $\vert pqr\vert$ is positive, unless repeated points are
ruled out.

The lengthy case analysis in the first proof of the theorem indicates that
Axiom~5 can come very close to failure in several ways, whenever triples of
points are nearly collinear. Therefore it appears very unlikely that
any calculation of determinants with less than 100\% accuracy will
define a ternary relation satisfying Axioms 1--5. "Floating-point
arithmetic" is therefore out of the question unless we restrict
coordinates to some domain where floating-point computations are
 exact. For example,
many computer systems now incorporate "IEEE standard
floating-point" arithmetic allowing 53~bits of precision in the {\ninerm"C"}
type {\bf double} or the {\ninerm"FORTRAN"} type {\tt DOUBLEPRECISION}. This
means that exact results are obtainable if the input data is first
rounded to a "fixed-point" range of 26~bits or less. "!rounding"

In general, suppose we decide to convert the input data to a
fixed-point range of $b$~bits. This means that each $x$-coordinate is
rounded to the nearest value of the form $x/2^{d_x}$, where $x$ is an
integer in the range $x_0\leq x<x_0+2^b$ and the parameters~$x_0$
and~$d_x$ are chosen so that all input data lies between $x_0/2^{d_x}$
and $(x_0+2^b)/2^{d_x}$. Each $y$-coordinate is, similarly, rounded to
$y/2^{d_y}$; the values of $y_0$ and~$d_y$ can be independent of~$x_0$
and~$d_x$. Then each determinant $\vert pqr\vert$ depends only on the
$b$-bit integers $(x-x_0,y-y_0)$ corresponding to the rounded
coordinates $(x/2^{d_x},y/2^{d_y})$; the values of~$x_0$, $d_x$,
$y_0$, and~$d_y$ have no effect. For programming purposes we can
therefore assume that all coordinates $(x_p,y_p)$ are nonnegative
integers less than~$2^b$.

The easiest way to evaluate the determinant $\vert pqr\vert$ is to use
the formula
$$\eqalignno{\vert pqr\vert\ =\ \left\vert\matrix{x_p&y_p&1\cr
x_q&y_q&1\cr x_r&y_r&1\cr}\right\vert\ &=\
\left\vert\matrix{x_p-x_r&y_p-y_r&1\cr
x_q-x_r&y_q-y_r&1\cr 0&0&1\cr}\right\vert\cr
\noalign{\smallskip} 
&=\ (x_p-x_r)(y_q-y_r)-(x_q-x_r)(y_p-y_r)\,,&(14.20)\cr}$$
which requires exact arithmetic on $2b+1$ bits plus a sign bit.
 Thus, we can take
$b=26$ if we want to work with standard "IEEE" double-precision
floating-point hardware, or $b=15$ if we want to use ordinary
single-precision integer arithmetic.

This all-integer scheme is attractive even in the case $b=15$, because
we can use rule (14.6) to obtain a CC system that is consistent with
respect to the input data except for small perturbations of at most
$1/32768\approx 0.003$ percent of the range. The data in practical
problems is probably no more accurate than this. Notice that data
values near each other may round to the same integer coordinates, but
rule (14.6) is specifically formulated to be appropriate in such
situations: Repeated points may occur in the rounded data, but they
cause no problem to algorithms based on the CC predicate.

In most applications the determinant $\vert pqr\vert$ vanishes only
rarely, so it is a waste of time to preprocess the data by sorting it
into lexicographic order. Moreover, we have seen that it is
advantageous for algorithms 
 to access the data in random order. Thus, we will
usually want to implement the test for counterclockwise~$pqr$ by using
the following procedure, after rounding the data and attaching a
unique ``"serial number"''~$l_p$ to the point named~$p$:

\bigskip
\display 40pt:{\bf Step 1.}:
Evaluate the determinant $\vert pqr\vert$ with perfect accuracy. If
the result is nonzero, return `true' if it is positive, `false' if it
is negative. Otherwise set $b=$ `true' and proceed to Step~2.

\smallskip
\display 40pt:{\bf Step 2.}:
If $l_p>l_q$, interchange $p\leftrightarrow q$ and complement the
value of~$b$; if $l_q>l_r$, interchange $q\leftrightarrow r$ and 
complement the value of~$b$; repeat until $l_p<l_q<l_r$.

\smallskip
\display 40pt:{\bf Step 3.}:
If $x_p>x_q$, or $x_p=x_q$ and $y_p>y_q$, or $x_p=x_q$ and $y_p=y_q$
and $x_r>x_p$, or $x_p=x_q$ and $y_p=y_q$ and $x_r-x_p$ and $y_r\geq
y_p$, complement the value of~$b$.

\smallskip
\display 40pt:{\bf Step 4.}:
Return the value of $b$.

\bn
 If the data is being randomized in order to obtain
good expected behavior of an algorithm, the "randomization" should be
independent of the $l$~values.  We can usually let $l_p$ be the
location where $x_p$ and~$y_p$ are stored, if the other data
structures point to these coordinate values.

\beginsection 15. Parsimonious algorithms.
Let's pause a moment to take stock of where we are.
We have studied one of the important primitive operations of
computational geometry, the counterclockwise predicate; and we've seen
that efficient algorithms for convex hulls in the plane can be
designed to use that predicate alone, provided that the implementation
of the primitive operation satisfies the axioms of a CC system. The
vast majority of CC systems are unrealizable by points in the plane,
and our algorithms apply in general: Given any CC system, they will
find the unique cycle of extreme points that encloses all other
points.

Yet when we studied the problem of actually implementing the
counterclockwise predicate for points in the plane, we found that
Axiom~5 is difficult to satisfy unless arithmetic is done with perfect
accuracy or with careful control over allowable perturbations of the
given coordinates. And we know that a ternary predicate can lead to
situations incompatible with the basic properties of convex hulls if
it does not obey Axiom~5 and the other axioms. Thus our study of CC
systems seems to have led to the conclusion that any reliable
algorithm for convex hulls, based entirely on the counterclockwise
predicate, requires a rather complicated and time-consuming program to
implement that predicate.

 There are, however, approaches to algorithm design that allow us to
work with inexact implementations of primitive operations. For example,
Steven "Fortune" \ref[22] has suggested the term {\it"parsimonious"\/}
to describe algorithms that ``ask no "stupid questions".'' We can say
more precisely that an algorithm is parsimonious with respect to a
given system of axioms if the algorithm never evaluates a primitive
predicate when the result of that predicate could have been deduced
from facts already known because of previously evaluated predicates.

If a parsimonious algorithm works correctly whenever its primitive
operations obey the relevant axioms, then it works also when the
primitive operations {\it violate\/} the axioms---in the sense that
the algorithm will always terminate and produce a result consistent
with the answers to all questions that its primitive predicates were
asked.

We can get some insight into the nature of parsimonious algorithms by
studying the problem of "sorting" from this standpoint. Most algorithms
for sorting are based on a primitive operation that compares two
keys~$x$ and~$y$, returning the value of the predicate $x<y$. For
simplicity, we will consider only the case of distinct keys, when the
primitive "comparison" operation is supposed to satisfy two axioms:

\medskip
\display 60pt:{\bf R1}: 
("Antisymmetry").\quad $x<y\;\Longleftrightarrow\;\neg(y<x)$.

\smallskip
\display 60pt:{\bf R2}: 
("Transitivity").\quad $x<y\wedge y<z\;\RA\; x<z$.

\medskip\noindent
(These axioms characterize a "transitive tournament".) A parsimonious
sorting algorithm will never compare $x$ to~$y$ unless both outcomes
$x<y$ and $\neg(x<y)$ would be consistent with the results of all
previous tests.

Many of the classic sorting algorithms are, in fact, 
 parsimonious with respect
to R1 and~R2. For example, we will prove below that the following
"treesort" algorithm has the parsimonious property: 
Start with an empty "binary tree",
then repeatedly insert $x_1,\ldots,x_N$ into new nodes of that tree,
then output the contents of the nodes in symmetric order. To
insert~$x$ into an empty binary tree, create a new node having key~$x$
and make it the root, with empty left and right subtrees. To insert~$x$
into a nonempty binary tree with key~$y$ in its root node, compare $x$
to~$y$; then recursively insert~$x$ into the left or the right subtree
according as $x<y$ or not. This algorithm clearly terminates and
outputs the original keys in some order
$x_{p(1)}x_{p(2)}\,\ldots\,x_{p(N)}$ such that $p(1)p(2)\ldots p(N)$ is
a permutation of $\{1,2,\ldots,N\}$ and such that
$$x_{p(1)}<x_{p(2)}<\cdots<x_{p(N)}\,,\eqno(15.1)$$
whenever "Axioms R1 and R2" hold.

\indent"Merge sorting" is another algorithm that turns out to be parsimonious.
This one uses "divide and conquer": Given a list of $N$~keys
$(x_1,\ldots,x_N)$, if $N\leq 1$ there is nothing to do; otherwise sort
the two sublists $(x_1,\ldots,x_{\lfloor N/2\rfloor})$ and
$(x_{\lfloor N/2\rfloor+1},\ldots,x_N)$ recursively, then merge these
to form a final list. To merge $(x_1,\ldots,x_m)$ with
$(y_1,\ldots,y_n)$, producing a sorted list $(z_1,\ldots,z_{m+n})$,
let $(z_1,\ldots,z_m)=(x_1,\ldots,x_m)$, if $n=0$; or let
$(z_1,\ldots,z_n)=(y_1,\ldots,y_n)$, if $m=0$; or set 
$z_1=x_1$ and $(z_2,\ldots,z_{m+n})=(x_2,\ldots,x_m)$ merged with
$(y_1,\ldots,y_n)$, if $m>0$, $n>0$, and $x_1<y_1$; or set
$z_1=y_1$ and
$(z_2,\ldots,z_{m+n})=(x_1,\ldots,x_m)$ merged with
$(y_2,\ldots,y_n)$, otherwise. Again, if the $<$ operation obeys R1
and~R2, merge sorting produces a permutation satisfying (15.1).

In order to prove that treesort is parsimonious, we want to show that
whenever the algorithm tests whether or not $x<y$, there is a model of
the input consistent with the test going either way. One way to
construct such models is to assign real values~$x'_k$ in the open
interval $(0\ldt 1)$ to each input~$x_k$, in such a way that $x'_k<y'$
whenever the algorithm finds $x_k<y$ true, $x'_k>y'$ whenever the
algorithm finds $x_k<y$ false. As the algorithm proceeds, this means
$x'_k$ will be constrained to lie in an interval $(l_k\ldt r_k)$,
where $l_k$ is initially 0 and $r_k$ is initially~1. When the
algorithm inserts~$x_k$ into an empty binary tree, we can for example
set $x'_k={1\over 2}(l_k+r_k)$. Then when the algorithm compares~$x_k$
to~$y$, we will know by induction that $y'$ is the midpoint of the
interval $(l_k\ldt r_k)$, so we can set $r_k\la y'$
if $x<y$, otherwise $l_k\la y'$, and proceed recursively into the
appropriate subtree. This rule gives $x'_k$ a terminating binary
expansion with bits 0 or~1 to indicate a left or right branch in the
tree, ending with a 1~bit when $x_k$ is inserted. None of the tests
$x<y$ could be redundant with respect to R1 and~R2, because the
relation~$<$ on real numbers satisfies those axioms and the numbers
$x'_1,\ldots,x'_N$ cause the algorithm to take that branch.

Another way to show that treesort is parsimonious goes backward
instead of forward: Imagine playing the algorithm out with all
possible combinations of true and false whenever a comparison is made;
this means we are essentially viewing the algorithm as a huge decision
tree. We want to show that each of the leaves of that
tree---corresponding to a terminating computation---has a model
$(x'_1,\ldots,x'_N)$ satisfying R1 and~R2, which causes the algorithm to
reach that leaf. We can compute the numbers $(x'_1,\ldots,x'_N)$ by
taking $x'_{p(1)}\ldots x'_{p(N)}=1\ldots N$, where $p(1)\ldots p(N)$
is~de\-termined by symmetric order of the binary tree constructed on the
path to a given leaf. In this way, for example, $x'_1$~will be equal
to~$k$ iff the binary tree ends up with $k-1$ nodes in its left
subtree. We don't know the model values $x'_1,\ldots,x'_N$ until the
algorithm runs to completion, but then we can assign them with
hindsight.

A backward analysis seems to be the easiest way to prove that merge
sort is parsimonious. We simply need to find a model corresponding to
every leaf of the decision tree so that the result of sorting will be
$x'_{p(k)}=k$; in other words, we want to run the merge sort backwards
to find original numbers $\smash{x'_k=p^{-1}(k)}$ that cause it to follow a
given path. If the numbers $\{z_1,\ldots,z_{m+n}\}$ after merging come
from a given set~$Z$, and if the merging took a particular computation path,
we can reconstruct the sets $X=(x_1,\ldots,x_m)$ and
$Y=(y_1,\ldots,y_n)$ that led to this path by playing the recursion in
reverse. Elegant formulations of such proofs can no doubt be worked
out if the idea of parsimonious algorithms proves to be important;
further details are left to the reader. "!open problems"

Now suppose we have a relation $<$ that does {\it not\/} obey R1
and~R2. For example, the relation might be based on a majority vote
among $2m+1$ observers, who are asked to rank objects according to
some criterion; or it might ask whether $x(t)$ is less than $y(t)$ at
some time~$t$, when $x$ and~$y$ are the solutions to differential
equations that can only be solved numerically with limited precision;
or it might be any relation whatever. When a parsimonious sorting
algorithm is applied to keys $x_1,\ldots,x_N$ governed by an arbitrary
relation~$<$, the algorithm has no way of knowing that Axioms R1
and~R2 are not satisfied; so it finds a permutation $p(1)\ldots p(N)$
of $\{1,\ldots,N\}$ such that (15.1) is deducible from the queries
made.

A parsimonious sorting algorithm will always find a permutation that
satisfies 
$$\hbox{either \  $x_{p(j)}<x_{p(j+1)}$ \  or \ $\neg(x_{p(j+1)}<x_{p(j)})$,
\ for $1\leq j<N\,.$}\eqno(15.2)$$
For the permutation (15.1) is unique, in the presence of R1 and~R2.
And the algorithm could not be correct unless it had explicitly
compared $x_{p(j)}$ with $x_{p(j+1)}$; otherwise it wouldn't know
which was the smaller. Hence the result
of comparing $x_{p(j)}$ to $x_{p(j+1)}$ must be as stated in (15.2);
 anything else would contradict (15.1) by~R1.

These observations have several consequences. First, any sorting
algorithm that is parsimonious with respect to R1 and~R2 will produce
an output satisfying (15.1), if the relation~$<$ satisfies~R1 but is
not necessarily transitive. (This is a constructive version of the
well known theorem that any "tournament" on~$N$ vertices contains a
directed path of length~$N$.) Furthermore, any such sorting algorithm
produces outputs satisfying
$$x_{p(1)}\leq x_{p(2)}\leq\cdots\leq x_{p(N)}\,,\eqno(15.3)$$
where $x\leq y$ means $\neg(y<x)$,
if its relation satisfies not R1 but the weaker law
\medskip
\display 60pt:{\bf R1}\bfprime:
 ("Asymmetry"){\bf.}\quad $x<y\ \RA\ \neg (y<x)$.
\medskip
\noindent
Hence any such algorithm, parsimonious for unequal keys, will also sort
when equal keys are present.

The concept of parsimony depends strongly on the axioms being
considered. For example, suppose we replace R1 and~R2 by~R1$'$ and
\medskip
\display 60pt:{\bf R2}\bfprime:
("Cotransitivity"){\bf.}\quad $\neg(x<y)\wedge\neg(y<z)\ \RA\ 
\neg (x<z)$.
\medskip
\noindent
Then "R1$'$ and R2$'$" imply R2, but they are not strong enough to
imply~R1 because the relation $x<y$ might never be true. The following
algorithm for sorting three elements $\{x,y,z\}$ is parsimonious with
respect to R1$'$ and~R2$'$:
$$\vcenter{\halign{#\hfil\qquad\qquad&$#$\hfil\cr
{\bf if} $(x<y)$\cr
\quad{\bf if} $(y<z)$ output $(xyz)$&x<y<z\cr
\quad{\bf else if} $(z<y)$\cr
\quad\quad{\bf if} $(x<z)$ output $(xzy)$&x<z<y\cr
\quad\quad{\bf else} output $(zxy)$&z\leq x<y\cr
\quad{\bf else} output $(xzy)$&x<y\leq z\leq y\cr
{\bf else if} $(y<x)$\cr
\quad{\bf if} $(x<z)$ output $(yxz)$&y<x<z\cr
\quad{\bf else if} $(y<z)$ output $(yzx)$&y<z\leq x\cr
\quad{\bf else} output $(zyx)$&z\leq y<x\cr
{\bf else if} $(x<z)$ output $(xyz)$&x\leq y\leq x<z\cr
{\bf else} output $(zyx)$.&z\leq x\leq y\leq x\,.\cr}}$$
In all cases, it produces a permutation $x'y'z'$ of $\{x,y,z\}$ that
would satisfy $x'\leq y'\leq z'$ if R1$'$ and~R2$'$ hold. $\bigl($We need to
observe, for example, that
$$x<y\;\wedge\; y\leq z\RA x<z\,,$$ since
$y\leq z$ and $z\leq x$ implies $y\leq x$, i.e., $\neg(x<y).\bigr)$ 
But its output
does not always satisfy (15.2) in the presence of an arbitrary
relation. For example, if we have $x<z$ and $z<y$ and no other true
cases, the algorithm outputs~$xyz$ but we have neither $y<z$ nor
$\neg(z<y)$. Therefore being parsimonious with respect to R1$'$
and~R2$'$ is not as strong as being parsimonious with respect to~R1
and~R2.

If a parsimonious algorithm is known to have guaranteed efficiency in
the worst case, when presented with data that satisfies the relevant
"!worst-case guarantees"
axioms, it will be just as efficient in the worst case when presented
with {\it arbitrary\/} data. Thus, for example, merge sort will always
find a permutation satisfying (15.2) in $O(N\log N)$ time. But such
performance guarantees do not necessarily hold if we know only that a
parsimonious algorithm is efficient on the average when it {\it
"randomizes"\/} its data. For example, treesort is known to make exactly
$$T_N=2(N+1)\,H_N-4N\eqno(15.4)$$
comparisons on the average if it inserts $N$~distinct keys in random
order; but if the relation $x<y$ is false for all~$x$ and~$y$,
treesort will make ${1\over 2}\,N(N-1)$ comparisons regardless of the
order in which it chooses to insert the keys.

Incidentally, we can show that "treesort" does make at most $T_N$
comparisons on the average if the relation~$<$ satisfies~R1 (i.e., if
the keys form a "tournament"), and if the keys are inserted in random
order. The proof is by induction on~$N$. Assuming the truth of this
assertion for tournaments of size less than~$N$, we can conclude that
the average number of comparisons on an $N$-tournament will be at most
$$N-1+\sum_x\,{1\over N}\,(T_{s(x)}+T_{N-1-s(x)})\,,\eqno(15.5)$$
where $s(x)$ is the "score" of $x$. (Here $x$ denotes the key of the
root node; each root key occurs with probability $1/N$.) If two
vertices~$x$ and~$y$ have the same score~$s$, with say $x<y$, we can
change the relation to $y<x$, thereby changing their respective scores
to $s-1$ and $s+1$. Then (15.5) increases by $1/N$ times
$$\eqalign{&T_{s-1}-2T_s+T_{s+1}+T_{N-2-s}-2T_{N-1-s}+T_{N-s}\cr
&\qquad
=(T_{s+1}-T_s)-(T_s-T_{s-1})+(T_{N-s}-T_{N-1-s})-(T_{N-1-s}-T_{N-2-s})\,,\cr}$$
which is nonnegative because $T_{n+1}-T_n=2(H_{n+1}-1)$ is an
increasing function of~$n$. It follows that (15.5) is at most
$$N-1+\sum_{s=0}^{N-1}\,{1\over N}\,(T_s+T_{N-1-s})\,,$$
which is just $T_N$. We have essentially proved that treesort makes
even fewer than $T_N$ comparisons, on the average, when it is
presented with a nontransitive tournament.

Now let's consider convex hulls instead of sorting. The simple hull
insertion algorithm of section~13 is easily seen to be parsimonious
with respect to Axioms 1--5; therefore it will always terminate with
something hull-like, even if the counterclockwise predicate is
implemented sloppily. But "hull insertion" has a bad worst-case running
time, so its parsimonious nature doesn't help us much. One of the
other algorithms proves to be more interesting:

\proclaim Theorem. The "treehull" algorithm of section 11 is
parsimonious with respect to the axioms of a "realizable CC system".

\noindent {\it Proof}.\quad
We must show that any computation path taken by the algorithm has a
model in the plane; some set of points should make it assume each of
its possible behaviors. We can construct such a set by running the
algorithm backwards, as we did for merge sorting.

Suppose the algorithm terminates with the $m$-point convex hull
$(t_1,\ldots,t_m)$, and with a given binary search tree on
$t_2,\ldots,t_m$. Then our model will contain the points
$t'_1,\ldots,t'_m$, chosen to lie on any convex $m$-gon; for
concreteness, we can let them be equally spaced points on a circle.
Now we move a step backward. If the last point~$p$ considered caused
the algorithm to enter Case~1, then $p$~was inserted into the convex hull
and it may also have replaced previous points $p_1,\ldots,p_r$, where
$r\geq 0$. To undo this step, we remove $p'$ from our $m$-gon, and
insert $p'_1,\ldots,p'_r$ between its two former neighbors in such a
way that the resulting polygon is still convex. This is clearly always
possible. We also restore the previous state of the binary search
tree. The algorithm would then take the prescribed path if we
reinserted~$p'$ and ran it forward. (Note that the algorithm does not
make the ``final'' counterclockwise test that would have eliminated
too much of the convex hull if it had succeeded; if Case~1 finds
$pt_1t_m$ and $pt_2t_1$ and $\cdots$ and $pt_{m-2}t_{m-1}$, it ``knows''
that $pt_{m-1}t_m$ must be false, so it does not make the test.)

On the other hand if the last point $p$ led the algorithm to Case~2,
point~$p$ may or may not have entered the hull. If not, it was found to lie
in $\Delta t_1t_{k-1}t_k$, and we can choose $p'$ to be any point in
that triangle. And if $p$ did join the hull in Case~2, then $p'$ is
one of the points $t'_2,\ldots,t'_m$. In this case we move backward as
in Case~1, by removing $p'$ and inserting $r\geq 0$ points
$p'_1,\ldots,p'_r$ inside the polygon between the former neighbors
of~$p'$; we must also do this in such a way that some of the
points~$p'_j$ lie to the left of~$t'_1p'$ and some lie to the right,
depending on the value of~$k$ found by the algorithm in its tree
search. Again, this is always possible, and it causes the algorithm to
take exactly the computation path desired. 

Therefore we can run the algorithm in reverse until all of its input
points have been modeled by points in the plane. Those points
$(x_k,y_k)$ will cause the algorithm to go through the same motions,
when running forward.\quad\pfbox

\bigskip
This theorem has a certain appeal for the ``"programmer on the
street".''
Treehull is a rather simple algorithm, and it can be implemented with
"splay trees" or "treaps" to obtain reasonably good worst-case or
average-case bounds on its running time. (We have observed that
randomization over input data does not automatically preserve
performance estimates of parsimonious algorithms; but "randomization"
within the data structure does.)

 The theorem suggests that a straightforward
"floating-point" implementation of the counterclockwise predicate will be
satisfactory for practical purposes, because deficiencies in
satisfying the axioms cannot cause the treehull algorithm to ``blow~up.''
Moreover, our intuition tells us that a slightly inaccurate implementation
should not be terribly misleading to the rest of the algorithm; any
mistakes should be essentially ``reasonable,'' in the sense that small
perturbations to the input data would probably be consistent with the
algorithm's behavior.

On the other hand, the knowledge that an algorithm is parsimonious is
only a weak indication of "robustness". The treehull algorithm might,
for example, produce a ``convex hull'' $(t_1,\ldots,t_m)$ that does
not actually form a convex polygon, if it is based on a potentially
unreliable counterclockwise test. One pass around $(t_1,\ldots,t_m)$
"!postprocessing"
to remove concave junctions will cure that problem, but still we would
prefer to have some sort of quantitative guarantee of stability within
a certain tolerance. And even if such a guarantee is found, the
resulting hull will not be uniquely determined; modifications to the
"!uniqueness of hull"
order in which points are processed, or changes in the internal
randomization of data structures, will produce different ``convex
hulls'' on different runs, when the counterclockwise predicate is
not a bona fide CC system, just as "treesort" will find different
paths of length~$N$ in a nontransitive tournament when it processes the
vertices in different orders.

From these considerations it appears that the degeneracy-breaking
methods of section~14 are preferable to the use of parsimonious
algorithms, even when quantitative estimates for the error inflation
of the parsimonious algorithms are available. If we start by "rounding"
all the data to some "fixed-point" range, thereby perturbing the input
points by at most a known, small percentage of their total range, we
can proceed from there to construct a totally rigorous CC system. The
resulting algorithm is substantially simpler than all other
"approximation-based algorithms" that have been proposed so far
\ref[22, 37, 42, 55], 
and it has the additional
advantage of uniqueness. The same convex hull will necessarily be
found by any algorithm that finds the convex hull of a CC system,
given a definite way to do the fixed-point rounding and to break ties
as explained at the end of section~14.

Incidentally, the "daghull" algorithm of section~12 is not parsimonious.
For example, consider the instructions (12.3) compiled in Step~H4. If
the very next point~$p'$ comes through these instructions and finds
first $p'sp$, then $p'tp$, the algorithm in Step~H3 will immediately make a
redundant test of $p'ps$. Alternatively, if we have $p'ps$ and $p'tp$,
any subsequent point~$p''$ might find $p''sp$ and $p''tp$, after which
the algorithm will make a test of $p''p's$ which it could have deduced
is false. There is no obvious modification that will make the
algorithm 
parsimonious without also making it substantially more complicated.

The results of section~6 above imply that the general task of taking an
arbitrary algorithm and making it parsimonious with respect to CC
systems is NP-complete; however, there may be a way to avoid this
complexity in specific algorithms such as daghull.

\eject\beginstarsection 16. Composition of CC systems. {This section is
independent of the remainder of the monograph and can be omitted
without hurting the author's feelings.}
It is possible to combine small CC systems into larger ones using
"!composition of CC systems" "!Knuth"
constructions that are analogous to "wreath products" and "Cartesian products"
of algebraic systems and graphs. The purpose of this section is to
outline one such construction, in case it should turn out some day that
CC systems have applications unrelated to orientations of points
in the plane.

These constructions are motivated by the "reflection networks"
considered in section~8 above. Let us say that a linear ordering
$p\succ q$ of the points of a CC system~$\cal C$ is a {\it"projective
order"\/} if it is one of the orderings that can occur in a sequence of
$\copy\ncht$ ordered pairs that defines~$\cal C$ and obeys the
betweenness rule (7.1). These are the orderings with the property that
we can extend~$\cal C$ to a CC system on one further point~$\infty$,
with the rule that $\infty pq$ holds iff $p\succ q$. In a realizable
CC system, they include the orderings that can occur if all points are
projected onto a straight line that is not perpendicular to the
direction between any two points. Projective orders are also the
orderings of points from top to bottom, at the left of the reflection
networks in section~8. They correspond to the "cutpaths" considered in
section~9, where we proved that at most $3^n$~projective orders are
possible in a CC system. It is not difficult to verify that a linear
ordering~$\succ$ is a projective order if and only if the following
laws hold:
$$\eqalignno{&\neg\,(p\succ t\;\wedge\; q\succ t\;\wedge\; r\succ t\;\wedge\;
t\in\Delta pqr)\,;&(16.1)\cr
&\neg\,(q\succ t\;\wedge\; t\succ s\;\wedge\; t\succ r\;\wedge\; tsq\;
\wedge\; tqr\;\wedge\; tsr)\,.&(16.2)\cr}$$
(Rule (16.1) is Axiom 5 with $s=\infty$; rule (16.2) is Axiom 5 with
$p=\infty$. Note that these rules are special cases of (14.11) and
(14.14), which we deduced for "lexicographic order" in the plane;
indeed, lexicographic order is a projective order.)

Now suppose $\cal C$ is a ``master'' CC system on a set of
points~$\cal C$, and suppose that there is a subsidiary CC
system~${\cal C}_p$ on disjoint sets of
 points~$C_p$ for each $p\in C$. Let $\succ$
be a projective order on~$\cal C$ and let $\succ_p$ be a projective order
on~${\cal C}_p$. Then we obtain a CC system on the set of all points
$$(p,p')\,,\quad p'\in C_p\eqno(16.3)$$
by saying that $(p,p')(q,q')(r,r')$ holds iff $\{p,q,r\}$ are distinct
and $pqr$ is true in~$\cal C$; or $p=q=r$ and $p'q'r'$ holds in~${\cal
C}_p$; or 
$$\eqalignno{&(p=q\succ r\ \wedge\ q'\succ_p p')\ \vee\ (r\succ p=q\
\wedge p'\succ_p q')\cr
&\qquad \vee\ (q=r\succ p\ \wedge\ r'\succ_q q')\ \vee \ (p\succ q=r\
\wedge \ q'\succ_q r')\cr
&\qquad \vee\ (r=p\succ q\ \wedge\ p'\succ_r r')\ \vee\ (q\succ r=p\
\wedge \ r'\succ_r p')\,.&(16.4)\cr}$$

The corresponding reflection network is obtained from a network
for~$\cal C$ and by first replacing each line containing a point~$p$
by a set of lines containing $(p,p')$ with $p'\in C_p$, and by
 replacing each transposition module by a sequence of
transpositions that interchanges two sets of lines. For example, the
sequence
$$\n=5 \unitlength=10pt
\def\\#1{#1\cr}
\vcenter{\hbox{\lower3pt\vbox{\baselineskip\unitlength
  \halign{\hfil$#$\hfil\cr\\a\\b\\c\\d\\e}}
\|0\|2\|3\|4\|1\|2\|3\|0
\lower3pt\vbox{\baselineskip\unitlength
  \halign{\hfil$#$\hfil\cr\\c\\d\\e\\a\\b}}}}
\eqno(16.5)$$
interchanges the two lines $(a,b)$ with the three lines $(c,d,e)$.
Then we append the reflection networks for~${\cal C}_p$ and~$\succ_p$
at the right, to reflect the points $(p,p')$. The resulting network
clearly reflects all points (16.3) by making adjacent transpositions, so
the corresponding ternary predicate must satisfy Axioms 1--5.

More general constructions are possible when the reflections of~${\cal
C}_p$ are interspersed with the interchange operations, instead of
being done at the end; but then the rules become even more complex
than (16.4). A~pleasant special case occurs when all the
systems~${\cal C}_p$ are isomorphic. When ${\cal C}$ and~${\cal C}_p$ 
are also realizable,  it
corresponds to replacing each point in the plane by a tiny cluster of
other points, something like satellites within galaxies.

\beginsection 17. The incircle predicate.
Suppose we are given a set of points in the plane such that no three
are collinear and no four lie on a circle. Then the {\it"Delaunay
triangulation"\/} \ref[13] is well-defined; this is the set of positively
oriented triangles~$pqr$ whose circumcircles contain no other points.
The Delaunay triangulation makes it easy to compute the {\it"Voronoi
diagram"\/} \ref[69, 59] of the points, the regions in which a given point
is closest, because the edges of the Voronoi diagram are perpendicular
bisectors of the edges of the Delaunay triangulation. The latter edges
may be said to connect ``neighboring'' points, in the sense that two
points are "neighbors" iff their Voronoi regions are adjacent.
"!adjacent points"

It is well known that the point~$s$ lies inside the circle passing
through the vertices $\{p,q,r\}$  if and only if the determinant
$$\det\pmatrix{x_p&y_p&x^2_p+y_p^2&1\cr
\noalign{\vskip2pt}
x_q&y_q&x^2_q+y_q^2&1\cr
\noalign{\vskip2pt}
x_r&y_r&x^2_r+y_r^2&1\cr
\noalign{\vskip2pt}
x_s&y_s&x^2_s+y_s^2&1\cr}\eqno(17.1)$$
has the same sign as the determinant $\vert pqr\vert$ of (1.1). We
shall write $\vert pqrs\vert$ for the determinant (17.1), and we will
"!notation $\vert pqr\vert$"
consider the quaternary predicate $pqrs$ to be true iff $\vert
pqrs\vert>0$; this is the ``"InCircle"'' predicate of "Guibas" and "Stolfi"
\ref[38].
The Delaunay triangulation consists of those triangles with~$pqr$ true
and with $pqrs$ false for all other points~$s$.

It is convenient to extend the plane by introducing a point~"$\infty$"
such that $\infty qrs=qrs$. This definition makes sense if we consider
the behavior of $\vert pqrs\vert$ as $x_p$ and/or~$y_p$ approach
infinity in (17.1), because the sign of the determinant will approach
the sign of the cofactor of $x_p^2+y_p^2$, which is $\vert qrs\vert$.
In these terms, $\Delta pqr$ belongs to the Delaunay triangulation iff
$spqr$ holds for all $s\notin\{p,q,r\}$, including $s=\infty$. 

\proclaim Lemma. If\/ $s$ is any point of the plane, there is a mapping\/
$p\mapsto p^s$ of all the other points such that\/ $spqr$ holds iff\/
$\vert p^sq^sr^s\vert>0$. 

\noindent{\it Proof}.\quad
If $p$ has coordinates $(x_p,y_p)$, let
$$p^s=\bigl((x_p-x_s)/\Delta^2_{ps}\,,\,(y_s-y_p)/\Delta^2_{ps}\bigr)\,,\qquad
\Delta^2_{ps}=(x_p-x_s)^2+(y_p-y_s)^2\,.\eqno(17.2)$$
Then we have "!notation $\Delta^2_{pq}$"
$$\eqalignno{\vert spqr\vert&=\det\pmatrix{x_s&y_s&x_s^2+y_s^2&1\cr
\noalign{\vskip2pt}
x_p&y_p&x_p^2+y_p^2&1\cr
\noalign{\vskip2pt}
x_q&y_q&x_q^2+y_q^2&1\cr
\noalign{\vskip2pt}
x_r&y_r&x_r^2+y_r^2&1\cr}\cr
\noalign{\bigskip}
&=\det\pmatrix{0&0&0&1\cr
\noalign{\vskip2pt}
x_p-x_s&y_p-y_s&(x_p-x_s)^2+(y_p-y_s)^2&1\cr
\noalign{\vskip2pt}
x_q-x_s&y_q-y_s&(x_q-x_s)^2+(y_q-y_s)^2&1\cr
\noalign{\vskip2pt}
x_r-x_s&y_r-y_s&(x_r-x_s)^2+(y_r-y_s)^2&1\cr}\cr
\noalign{\bigskip}
&=-\det\pmatrix{x_p-x_s&y_p-y_s&\Delta^2_{ps}\cr
\noalign{\vskip2pt}
x_q-x_s&y_q-y_s&\Delta^2_{qs}\cr
\noalign{\vskip2pt}
x_r-x_s&y_r-y_s&\Delta^2_{rs}\cr}
=\vert p^sq^sr^s\vert\Delta^2_{ps}\Delta^2_{qs}\Delta^2_{rs}&(17.3)\cr}$$
by column and row operations on determinants, and the lemma follows
since we are assuming that $\Delta^2_{ps}\Delta^2_{qs}\Delta^2_{rs}>0$.

If we let $\infty^s=0$, the stated result holds also when $p$, $q$,
or~$r$ is infinite. For $s\infty qr$ is true iff $\infty sqr$ is false
iff $\vert sqr\vert<0$, and we have
$$\vert\infty^sq^sr^s\vert=\det\pmatrix{x_q-x_s&y_s-y_q\cr
x_r-x_s&y_s-y_r\cr} \Delta^2_{qs}\Delta^2_{rs}=-\vert
sqr\vert\Delta^2_{qs}\Delta^2_{rs}$$
by (14.18).\quad\pfbox

\bigskip
Notice that if we represent the point $p=(x_p,y_p)$ by the "complex
number" $z_p=x_p+iy_p$, the image $p^s$ defined in (17.2) is simply
$$\overline{(z_p-z_s)}/\,\vert z_p-z_s\vert^2=1/(z_p-z_s)\,.$$
Thus $spqr$ is true if
and only if the points $1/(z_p-z_s)$, $1/(z_q-z_s)$, $1/(z_r-z_s)$
have a counterclockwise orientation.

The lemma reduces the incircle test for points in the plane to a
counterclockwise test. This property is, in fact, strong enough to
imply that an abstract set of points possesses  an analog of the
Delaunay triangulation. Let us define a {\it"CCC system"\/} to be any
quaternary predicate $spqr$ on distinct points, having the property
that for each point~$s$ the ternary predicate $spqr$ defined for all
distinct points $p,q,r\neq s$ is a CC system. We also require that
$spqr$ is true iff $pqrs$ is false. The {\it Delaunay triangulation\/}
of any CCC system can then be defined as the set of all ``triangles''
$\Delta pqr$ such that $spqr$ holds for all $s\notin\{p,q,r\}$.

The axioms for a CCC system are therefore a simple extension of the
axioms for a CC system. We can restate them as follows: "!Axioms C1--C5"

{\narrower\smallskip\noindent
{\bf Axiom C1.}\quad $pqrs\;\RA\;\neg spqr$.
\smallskip}

{\narrower\smallskip\noindent
{\bf Axiom C2.}\quad $pqrs\;\RA\;\neg pqsr$.
\smallskip}

{\narrower\smallskip\noindent
{\bf Axiom C3.}\quad $pqrs\;\vee\;pqsr$.
\smallskip}

{\narrower\smallskip\noindent
{\bf Axiom C4.}\quad $pqrt\wedge prst\wedge psqt\;\RA\;
pqrs$.
\smallskip}

{\narrower\smallskip\noindent
{\bf Axiom C5.}\quad $utsp\wedge utsq\wedge utsr\wedge utpq\wedge
utqr\;\RA\; utpr$.
\smallskip}

\noindent
Here Axioms C2, C3, C4, C5 are like Axioms 2, 3, 4, 5 but with another
point adjoined; Axiom~C1 is a modification of Axiom~1.

In section 20 we will consider an axiom that is weaker than~C4, leading to
a relation on quadruples that corresponds to convex hulls in three dimensions.
The stronger axiom~C4 stated here will turn out to represent the special case
of points in 3D that lie on the surface of a sphere.

We can prove as before that Axioms C1, C3, C4, and~C5 are "independent";
but it turns out that C2 is a consequence of~C1 and~C3. Indeed,
$pqrs\RA \neg spqr\RA sprq\RA\neg
qspr\RA qsrp\RA
\neg pqsr$ if we apply C1 and~C3 in alternation.
From C1 and~C3 we can in fact deduce that every transposition of two elements
negates the value of $pqrs$. For example, to show that $pqrs$ implies
$\neg psrq$, we have
$$\vcenter{\halign{$#\hfil\;$&$#\hfil\;$&$#$\hfil\cr
pqrs\;\RA\;\neg spqr&\RA\; sprq\cr
&\RA\;\neg prqs\;\RA\;
prsq\;\RA\;\neg qprs&\RA\;qpsr\cr
&&\RA\;\neg psrq\,;\cr}}$$
the third and seventh of these implications use the contrapositive of~C1,
which can be written
$$pqrs\;\RA\;\neg qrsp\,.\eqno(17.4)$$

In applications it is sometimes helpful to note that we can replace
$(p,q,r,s,t)$ by $(t,r,q,s,p)$ in~C4 and rearrange the order of
variables within quadruples to get
$$pqrt\wedge prst\wedge psqt\;\RA\; qrst\,.\eqno(17.5)$$
Thus, we can sometimes deduce the values of all five quadruples on
$\{p,q,r,s,t\}$ when we know only three of them. 
In the presence of Axioms~C1 and~C3, Axiom~C4 is equivalent to the
following cyclically symmetrical statement: ``Exactly two or three of
the quadruples $pqrs$, $qrst$, $rstp$, $stpq$, $tpqr$ are true.''

\proclaim Theorem. Every point of a CCC system on four or more points
is a vertex of at least three triangles of the Delaunay triangulation.
The triangles with vertex\/~$p$ form a cycle,
$$\Delta pt_1t_2\,,\;\Delta pt_2t_3\,,\;\ldots\,,\;\Delta
pt_{m-1}t_m\,,\;\Delta pt_mt_1\,.\eqno(17.6)$$

\noindent{\it Proof.}\quad
By definition, $\Delta pqr$ is part of the Delaunay triangulation iff
$\neg pqrs$ for all $s\notin\{p,q,r\}$. Let $\alpha_p(q,r,s)=\neg
pqrs$; this ternary relation~$\alpha_p$ defines a CC system on the
points other than~$p$, because it is obtained by complementing the 
triples of the CC system obtained by fixing~$p$. Therefore $\Delta
pqr$ is part of the Delaunay triangulation iff $qr$ is in the convex
hull of the CC system~$\alpha_p$, and the result follows immediately
from the theorem of section~11.\quad\pfbox

\bigskip
One consequence of this theorem is that every triangle $\Delta pqr$ in
the Delaunay triangulation of a CCC system has three neighboring
triangles of the forms $\Delta qpr'$, $\Delta rqp'$, and $\Delta
prq'$. In other words, every Delaunay edge is part of exactly two
Delaunay triangles. Therefore we can represent the triangulation with
a rather simple data structure, related to the "quad-edge" technique of
\ref[38].
Indeed, a slight extension of the proof above shows that even more is
true: The two-dimensional manifold defined by the Delaunay
triangulation of any CCC system is orientable, in fact homeomorphic to
a sphere. This will be a consequence of the incremental algorithm in
the following section.

From an intuitive standpoint it is perhaps easiest to visualize
triangulations on the surface of a sphere, rather than in the plane.
Consider the mapping that takes point $(x,y)$ into $(\xi,\eta,\zeta)$,
where "!stereographic projection"
$$\xi={2x\over x^2+y^2+1}\;,\quad\eta={2y\over
x^2+y^2+1}\;,\quad\zeta={x^2+y^2-1\over x^2+y^2+1}\;;\eqno(17.7)$$
then $\xi^2+\eta^2+\zeta^2=1$, so $(\xi,\eta,\zeta)$ is a point on the
unit sphere. Conversely, any such point has an inverse image $(x,y)$
given by
$$x={\xi\over 1-\zeta}\;,\qquad y={\eta\over 1-\zeta}\;,\eqno(17.8)$$
except for the ``"north pole"'' $(\xi,\eta,\zeta)=(0,0,1)$ which
corresponds to~"$\infty$". Elementary manipulation of determinants shows
that $\vert spqr\vert$ has the same sign as
$$\det\pmatrix{s_{\xi}&s_{\eta}&s_{\zeta}&1\cr
p_{\xi}&p_{\eta}&p_{\zeta}&1\cr
q_{\xi}&q_{\eta}&q_{\zeta}&1\cr
r_{\xi}&r_{\eta}&r_{\zeta}&1\cr}\;,\eqno(17.9)$$
where $p'=(p_{\xi},p_{\eta},p_{\zeta})$ corresponds to $(p_x,p_y)$;
this determinant is the volume of the tetrahedron whose vertices are
$p'$, $q'$, $r'$, and~$s'$, so it is positive for all~$s'$ and for
fixed $p',q',r'$ if and only if $p'q'r'$ is a face of the
"three-dimensional convex hull" when the given points have been
projected onto the unit sphere.

Any CC system might arise by fixing a point of a CCC system. The following
construction, due to G\"unter "Ziegler"~\ref[72], shows how to obtain a
CCC that extends an arbitrarily given CC system~$\cal C$:
Number the vertices of~$\cal C$ in such a way
that 1~is in the convex hull, then
2~is in the convex hull of the points remaining
when 1~is removed, and so on; thus vertex~$k$ will be an "extreme point" of
the CC system on $\{k,k+1,\ldots,n\}$. Also adjoin an additional point~0.
Then if $p<q<r<s$, let $pqrs=qrs$. (It follows that $pqrs=qrs$ whenever
$p=\min(p,q,r,s)$.)

Regardless of how we number the vertices,
we can show that the tournament obtained from this construction by fixing any
two points is vortex-free. Suppose we fix $\{a,b\}$, where $a<b$, and suppose
the corresponding tournament defined by $abxy$ contains a vortex on $\{p,q,r,
s\}$ where $p<q<r<s$. We cannot have such a vortex when $a<p$, because
$abxy=bxy$ for all $x,y\in\{p,q,r,s\}$ in that case. If $p<a<q$, then
$abpx=pabx=abx=b\bar ax$ and $abxy=bxy$ for all $x,y\in\{q,r,s\}$; so
a vortex on $\{p,q,r,s\}$ would imply a vortex on $\{\bar a,q,r,s\}$.
Therefore we must have $q<a$. But then $abpx=abqx$ for $x\in\{r,s\}$,
making a vortex impossible.

To complete the proof we must show that C4 holds. If it fails, we
have $pqrt$, $prst$, $psqt$, and $psrq$, for some vertices
$p$, $q$, $r$, $s$, and~$t$. Axiom~4 holds in $\cal C$, so
we cannot have $p=\min(p,q,r,s,t)$. By symmetry we can therefore assume that
$q=\min(p,q,r,s,t)$. This implies $ptr$, $pst$, and $prs$ in~$\cal C$;
hence the relation $prst$ implies that $p=\min(p,r,s,t)$. But this
contradicts the principle by which we numbered the vertices, since
$p\in\Delta rst$.

\beginsection 18. A generalized Delaunay algorithm.
Let us now consider an efficient way to find the Delaunay
triangulation of any given CCC system. Our approach will be
"incremental" as in the algorithms for convex hulls in sections 11--13
above. "!Delaunay, algorithm for" "!algorithm for Delaunay"

Suppose we have found the Delaunay triangulation of all points
except~$p$. Then it is easy to characterize the Delaunay edges~$pt_k$
of (17.6): A~point~$t$ is part of some Delaunay triangle $\Delta ptt'$
with respect to all points if and only if it is part of some Delaunay
triangle $\Delta tqr$ with respect to all points except~$p$, where
$tqrp$ holds. Consider the triangles $\Delta tqr$ involving~$t$ when
$p$~is excluded; these have the defining property $stqr$ for all
$s\notin\{t,q,r,p\}$. If $ptqr$ is true as well, triangle $\Delta tqr$
will be part of the overall triangulation; so the edge~$pt$ cannot be
Delaunay unless $tqrp$ holds for some $\Delta tqr$. And in the latter
case, $p$~must be an extreme point of the CC system we obtain by
fixing point~$t$, since $p$ lies outside the convex hull defined by
the other points of that CC system.

We can therefore formulate a na\"{\i}ve algorithm for Delaunay
triangulation in general. To add a new point~$p$, just run through all
triangles $\Delta tqr$ of an existing triangulation, and mark all the
triangles such that $tqrp$ holds. The new triangulation consists of
all unmarked triangles plus all edges~$pt$ where $t$ is a vertex of a
marked triangle. There will always be a way to arrange these
edges~$pt_k$ into a cycle like (17.6); the triangles $\Delta
pt_kt_{k+1}$ now take the place of the triangles previously marked.

In order to make this algorithm efficient, we need a good way to
locate a single marked triangle. Once we've found $\Delta tqr$ with
$tqrp$ true, we know that $pt$, $pq$, and~$pr$ will be part of the
cycle of new Delaunay edges, and it will be a simple matter to find
the full cycle by looking at triangles adjacent to triangles already
marked. 

The incircle predicate $spqr$ generally involves nontrivial
computation. So we will assume that one of the points of our CCC
system is called~"$\infty$", and we will design our algorithm so that
most of the incircle tests it makes have the form $\infty pqr$. Tests
of the latter kind are simply counterclockwise predicates in a CC
system, and we may assume that such tests are less expensive than the
evaluation of $spqr$ in general. The introduction of~$\infty$ makes
the algorithm less symmetric, hence more complicated, but it has
important practical consequences when we wish to compute the Delaunay
triangulation of points in the plane. Indeed, the algorithm to be
described may well be the fastest and most easily implemented of all
methods currently known for that problem. It is a simplification,
modification,  and generalization of the algorithm in section~3 
of~\ref[36].

We will call the algorithm {\it"dag triangulation"}, because it is
based on a binary branching structure that forms a directed acyclic
graph, similar to the ``compiled instructions'' in the daghull algorithm of
section~12 above. (The reader is advised to review daghull before
proceeding further.) Besides the instructions, there is a data structure
of {\it arcs}, representing the current triangulation. There will be
$6n-6$ arcs altogether when the algorithm has found the triangulation
of $n$~points besides~$\infty$. "!data structure for triangulation"
"!triangulation, data structure for"

 Each arc has a unique {\it "mate"}.
One convenient way to represent this inside a computer is to arrange
things so that the mate of the arc in position~$k$ appears in position
$6N-7-k$, for $0\leq k<6N-6$, using an array of $6N-6$ arcs when $N$
is the total number of noninfinite points. We will call these arcs
$a_1,a_2,\ldots,a_{3N-3}$, $b_{3N-3},\ldots,b_2,b_1$, respectively, so
that $a_j$ and~$b_j$ are always mates.
The noninfinite points are called {\it vertices\/}; if $p,q,r,s$ are
any distinct vertices, the algorithm is supposed to be able to compute the
counterclockwise predicate $pqr=\infty pqr$ and the incircle
predicate~$spqr$.

An arc~$a$ conceptually has a triangle on its left and a mate on its
right. It has three fields:

\smallskip\biba
${\sl vert\/}(a)$ points to the vertex this arc leads to, or is
$\Lambda$ (the null pointer) if the arc leads to~$\infty$;

\smallskip\biba
${\sl next\/}(a)$ points to the next arc having the same triangle at
its left;

\smallskip\biba
${\sl inst\/}(a)$ points to the ``terminal node'' for that triangle,
as explained below.

\smallskip\noindent
We have ${\sl next\/}\bigl({\sl next\/}\bigl({\sl
next\/}(a)\bigr)\bigr)=a$ and
${\sl inst\/}\bigl({\sl next\/}(a)\bigr)={\sl inst\/}(a)$ for all~$a$.
If arc~$a$ runs from vertex~$u$ to vertex~$v$, we have ${\sl
vert\/}(a)=v$ and ${\sl vert\/}\bigl({\sl mate\/}(a)\bigr)=u$.

The dag is an array of "instruction nodes", similar to the nodes in
section~12, but there are two differences: (1)~Each node now has four
fields $(p,q,\alpha,\beta)$ instead of two. (2)~The total number of
nodes is not known in advance, so nodes should be allocated
dynamically. The first two fields~$p,q$ usually point to vertices; the
other fields~$\alpha,\beta$ point to other nodes. The instruction
represented by node $(p,q,\alpha,\beta)$ means, intuitively, ``if
$v$~lies to the left of~$pq$ then goto~$\alpha$ else goto~$\beta$.''
By starting at the root of the dag and following instructions, we will
be able to find the triangle containing a vertex~$v$ that we wish to
insert. Eventually we will reach a {\it"terminal instruction"}, which
is a node having the special form $(\Lambda,a,-,-)$. There is
one terminal instruction node for each triangle in the current
triangulation. The first field is~$\Lambda$, to distinguish terminal
nodes from branch nodes. The second field,~$a$, points to one of the
arcs of the corresponding triangle; ${\it inst\/}(a)$ points back to
the terminal node $(\Lambda,a,-,-)$. The $\alpha$ and~$\beta$
fields of terminal nodes are not used, but they are present in case
the terminal node later becomes nonterminal. If the triangle has $\infty$ as
an endpoint, arc~$a$ will be the arc with ${\it vert\/}(a)=\Lambda$;
otherwise $a$ might be any one of the triangle's three arcs.

If ${\it vert\/}(a)\neq\Lambda$, the triangle $\Delta qrs$ represented
by a terminal node will be the set of points~$p$ such that we have
$\infty pqr\wedge\infty prs\wedge\infty psq$; if $p$ satisfies this
condition, we have $qrsp$ by (17.5). If ${\it vert\/}(a)=\Lambda$, the
``triangle'' $\Delta \infty rs$ represented by a terminal node will
actually be the ``"wedge"'' "!notation: angle$\bar qrs$"
$\angle \bar{r}'rs$ consisting of all points~$p$ such that $\infty
prs$ and $\infty prr'$ holds, where $r',r,s$ are consecutive elements
$t_{j+1},t_j,t_{j-1}$ of the current convex hull. Every point~$p$ seen
so far satisfies $\infty pt_{j-1}t_j$ for $1\leq j\leq m$, if we let
$t_0=t_m$; every point~$p$ to be inserted either lies inside one of
the triangles $\Delta qrs$ or in a unique wedge
$\angle\bar{t}_{j+1}t_jt_{j-1}$.

Initially we create a trivial triangulation for $\infty$ and the first
two vertices~$u$ and~$v$, by introducing three arcs $a_1,a_2,a_3$ and
their mates $b_1,b_2,b_3$, together with three instruction nodes
$\lambda_0,\lambda_1,\lambda_2$ that divide the universe into
``triangles'' $\Delta\infty uv$ and $\Delta\infty vu$ (actually
degenerate wedges $\angle \bar{v}uv$ and $\angle \bar{u}vu$):
$$\vcenter{\halign{$#$\hfil\qquad&$#$\hfil\qquad&$#$\hfil\cr
{\sl vert\/}(a_1)=v\,,&{\sl next\/}(a_1)=a_2\,,&{\sl
inst\/}(a_1)=\lambda_1\,;\cr
{\sl vert\/}(a_2)=\Lambda\,,&{\sl next\/}(a_2)=a_3\,,&{\sl
inst\/}(a_2)=\lambda_1\,;\cr
{\sl vert\/}(a_3)=u\,,&{\sl next\/}(a_3)=a_1\,,&{\sl
inst\/}(a_3)=\lambda_1\,;\cr
{\sl vert\/}(b_1)=u\,,&{\sl next\/}(b_1)=b_3\,,&{\sl
inst\/}(b_1)=\lambda_2\,;\cr
{\sl vert\/}(b_2)=v\,,&{\sl next\/}(b_2)=b_1\,,&{\sl
inst\/}(b_2)=\lambda_2\,;\cr
{\sl vert\/}(b_3)=\Lambda\,,&{\sl next\/}(b_3)=b_2\,,&{\sl
inst\/}(b_3)=\lambda_2\,;\cr}}$$
\vskip-10pt
$$\eqalignno{\lambda_0&=(u,v,\lambda_1,\lambda_2)\,;\cr
\lambda_1&=(\Lambda,a_2,-,-)\,;\cr
\lambda_2&=(\Lambda,b_3,-,-)\,.&(18.1)\cr}$$
There is a variable~$j$, initially~3, such that arcs
$a_1,\ldots,a_j,b_j,\ldots,b_1$ are in use. The algorithm now proceeds
as follows to add a new vertex~$p$ to the triangulation:

\smallskip
{\bf Step T1.}\quad
[Follow branch instructions.]\quad Set $\lambda$ to the root
node~$\lambda_0$. Then if node
$\lambda=(\rho_{\lambda},q_{\lambda},\alpha_{\lambda},\beta_{\lambda})$
is not a terminal node, set $\lambda$ to $\alpha_{\lambda}$
or~$\beta_{\lambda}$ according as $\infty pp_{\lambda}q_{\lambda}$ is
true or false. Repeat until $\lambda$ is a terminal node
$(\Lambda,a_{\lambda},-,-)$. 

\smallskip
{\bf Step T2.}\quad
[Subdivide a triangle or wedge.]\quad
Set $a\la a_{\lambda}$, $b\la{\sl next\/}(a)$, $c\la{\sl next\/}(b)$,
$q\la{\sl vert\/}(a)$, $r\la{\sl vert\/}(b)$, $s\la {\sl vert\/}(c)$.
(If $q\neq\Lambda$, we have located $p$ within a triangle $\Delta qrs$
of the existing triangulation; hence $qrsp$ holds, and $pq$, $pr$,
and~$ps$ must be edges of the new triangulation, as remarked above. If
$q=\Lambda$, point~$p$ lies in the wedge $\angle\bar{r}'rs$, and in
particular we have $\infty rsp$; hence $p\infty$, $pr$, and~$ps$ must
become Delaunay edges.) Increase $j$ by~3, thereby making three new
arcs $a_{j-2}$, $a_{j-1}$,~$a_j$ and their mates $b_{j-2},b_{j-1},b_j$
available for use.
Allocate three new terminal nodes $\lambda'=(\Lambda,a,-,-)$,
$\lambda''=(\Lambda,a_j,-,-)$, $\lambda'''=(\Lambda,c,-,-)$. Set
$$\vcenter{\halign{$#$\hfil\qquad&$#$\hfil\qquad&$#$\hfil\cr
{\sl vert\/}(a_j)=q\,,&{\sl next\/}(a_j)=b\,,&{\sl
inst\/}(a_j)=\lambda''\,,\cr
{\sl vert\/}(a_{j-1})=r\,,&{\sl next\/}(a_{j-1})=c\,,&{\sl
inst\/}(a_{j-1})=\lambda'''\,,\cr
{\sl vert\/}(a_{j-2})=s\,,&{\sl next\/}(a_{j-2})=a\,,&{\sl
inst\/}(a_{j-2})=\lambda'\,,\cr
{\sl vert\/}(b_j)=p\,,&{\sl next\/}(b_j)=a_{j-2}\,,&{\sl
inst\/}(b_j)=\lambda'\,,\cr
{\sl vert\/}(b_{j-1})=p\,,&{\sl next\/}(b_{j-1})=a_j\,,&{\sl
inst\/}(b_{j-1})=\lambda''\,,\cr
{\sl vert\/}(b_{j-2})=p\,,&{\sl next\/}(b_{j-2})=a_{j-1}\,,&{\sl
inst\/}(b_{j-2})=\lambda'''\,;\cr}}\eqno(18.2)$$
also change ${\sl next\/}(a)\la b_j$, ${\sl inst\/}(a)\la\lambda'$,
${\sl next\/}(b)\la b_{j-1}$, ${\sl inst\/}(b)\la\lambda''$, ${\sl
next\/}(c)\la b_{j-2}$, ${\sl inst\/}(c)\la\lambda'''$. (We have
subdivided $\Delta qrs$ into three triangles $\Delta qps$, $\Delta
qrp$, and $\Delta spr$, by changing the arc structure; see Figure~2.
We must still change the branching structure so that it will lead to the
corresponding terminal nodes $\lambda'$, $\lambda''$, $\lambda'''$ at
appropriate times.) If $q=\Lambda$, go to Step~T4, otherwise continue
with Step~T3.

\vskip.5in

{
\font\largemath=cmmi12 scaled \magstep1
\unitlength=1mm
\centerline{\beginpicture(60,45)(0,0)
\put(0,0){\disk1} \put(-5,-1){\makebox(0,0){\largemath r}}
\put(30,45){\disk1} \put(34.5,45.5){\makebox(0,0){\largemath q}}
\put(60,0){\disk1} \put(64.5,-1){\makebox(0,0){\largemath s}}
\put(30,15){\disk1} \put(29.5,10){\makebox(0,0){\largemath p}}
\put(59,1.5){\vector(-2,3){28}} \put(49,23){\makebox(0,0){\largemath a}}
\put(29,43.5){\vector(-2,-3){28}} \put(10,23){\makebox(0,0){\largemath b}}
\put(2,0){\vector(1,0){56}} \put(30,-3){\makebox(0,0){\largemath c}}
\put(29.3,17){\vector(0,1){24}} \put(26.5,30){\makebox(0,0){$a_j$}}
\put(30.7,41){\vector(0,-1){24}} \put(33.5,30){\makebox(0,0){$b_j$}}
\put(3.5,2.5){\vector(2,1){24}} \put(12,10.5){\makebox(0,0){$b_{j-1}$}}
\put(27.5,13){\vector(-2,-1){24}} \put(16,3){\makebox(0,0){$a_{j-1}$}}
\put(55.5,1.5){\vector(-2,1){24}} \put(42,5){\makebox(0,0){$b_{j-2}$}}
\put(32.5,14.5){\vector(2,-1){24}} \put(48,10){\makebox(0,0){$a_{j-2}$}}
\put(39,19){\makebox(0,0){$\lambda'$}}
\put(21,19){\makebox(0,0){$\lambda''$}}
\put(30,4){\makebox(0,0){$\lambda'''$}}
\endpicture}
}

\vskip.25in

\centerline{{\bf Figure 2.} "Trisection of a triangle" in step T2.}

\bigskip\smallskip
{\bf Step T3.}\quad
[Compile a three-way branch.]\quad
Allocate two new branch nodes $\nu=(q,p,\lambda',\lambda'')$ and
$\nu'=(s,p,\lambda''',\lambda')$; change node~$\lambda$ to
$(r,p,\nu,\nu')$. Go to Step~T5.
(The three instructions $\lambda$, $\nu$, $\nu'$ can be paraphrased as
follows:

\halign{\qquad\qquad#\hfil\cr
``Suppose you're in $\Delta qrs$; then\cr
\qquad {\bf if} left of $rp$,\cr
\qquad\quad {\bf if} left of $qp$, you're in $\Delta qps$, {\bf else}
you're in $\Delta qrp$;\cr
\qquad {\bf else if} left of $sp$, you're in $\Delta spr$, {\bf else}
you're in $\Delta qps$.''\cr}

\noindent
We have essentially replaced terminal node $\lambda$ by three terminal
nodes $\lambda'$, $\lambda''$, $\lambda'''$.)

\smallskip
{\bf Step T4.}\quad
[Compile two-way branches for affected wedges.]\quad
Allocate a new branch node $\nu=(s,p,\lambda''',\lambda')$ and change
node~$\lambda$ to $(r,p,\lambda'',\nu)$. (At this point we also want
to fix up the convex hull, which has just gained point~$p$ but it might
lose point~$s$ and other points clockwise from~$s$.) Set $\mu\la\nu$,
$d\la{\sl next\/}\bigl({\sl mate\/}(a)\bigr)$, $t\la{\sl vert\/}(d)$,
and repeat the following operations while $t\neq r$ and $\infty pst$:
Allocate a new terminal node $\nu=(\Lambda,d,-,-)$, change the fourth
component~$\beta_{\mu}$ of node~$\mu$ from~$\lambda'$ to ${\sl
inst\/}(d)$, set $\mu\la{\sl inst\/}(d)$, change terminal node~$\mu$
to $(t,p,\nu,\lambda')$, and perform the subroutine ${\sl
flip\/}\bigl(a,{\sl mate\/}(a),d,s,\Lambda,t,p,\nu,\lambda'\bigr)$
described below; then set $a\la{\sl next\/}\bigr({\sl
mate\/}(a)\bigr)$, $d\la{\sl next\/}\bigl({\sl mate\/}(a)\bigr)$,
$s\la t$, $t\la{\sl vert\/}(d)$, and set the second component of
terminal node~$\lambda'$ to~$a$. After finishing that loop, allocate
another new terminal node~$\nu=\bigl(\Lambda,{\sl
next\/}(d),-,-\bigr)$;  change terminal node ${\sl inst\/}(d)$ to
$(s,p,\nu,\lambda')$, and set ${\sl inst\/}(x)\la\nu$ for $x=d$, ${\sl
next\/}(d)$, and ${\sl next\/}\bigl({\sl next\/}(d)\bigr)$.
(Translation: Suppose $r=t_j$ and $s=t_{j-1}$ in the current convex
hull, and suppose that the point~$p$ satisfies $\infty pt_jt_{j+1}$,
$\infty pt_jt_{j-1}$, $\infty pt_{j-1}t_{j-2}$, $\ldots\,$, $\infty
pt_{k+1}t_k$, and $\infty pt_{k-1}t_k$, where $k\leq j-1$ and
subscripts are treated modulo~$m$. Then point~$p$ is being added to
the hull, and points $t_{j-1},\ldots,t_{k+1}$ are being deleted. The
new instructions can be paraphrased as follows, assuming that $l_i$~labels
 the instruction corresponding to former wedge
$\angle\bar{t}_{i+1}t_it_{i-1}$: 
$$\vcenter{\halign{#\hfil\quad&#\hfil\cr
$l_j$:&{\bf if} left of $t_jp$, you're in $\angle\bar{t}_{j+1}t_jp$;\cr
&{\bf else if} left of $t_{j-1}p$, you're in $\Delta t_jt_{j-1}p$;\cr
&{\bf else goto} $l_{j-1}$;\cr
$l_{j-1}$:&{\bf if} left of $t_{j-2}p$, you're in $\Delta
t_{j-1}t_{j-2}p$, {\bf else goto} $l_{j-2}$;\cr
&\quad$\vdots$\cr
$l_{k+1}$:&{\bf if} left of $t_kp$, you're in $\Delta t_{k+1}t_kp$,
{\bf else goto} $l_k$;\cr
$l_k$:&{\bf if} left of $t_kp$, you're in $\angle\bar{p}\,t_kt_{k-1}$,
{\bf else} you're in $\angle\bar{t}_jpt_k$.\cr}}$$
However, `{\bf goto} $l_k$' is actually simplified to `you're in
$\angle\bar{t}_jpt_k$', to avoid a redundant test. We will prove below
that these instructions correctly place a new point into a triangle or
wedge.)
Set $r\la s$. (This value of~$r$ will terminate Step~T5 at the
appropriate time.)

\smallskip{\bf Step T5.}\quad
[Find any remaining new triangles.]\quad
Set $d\la{\sl mate\/}(c)$, $e\la{\sl next\/}(d)$, $t\la{\sl
vert\/}(d)$, $t'\la{\sl vert\/}(c)$, and $t''\la{\sl vert\/}(e)$. (At
this point we know that $pt$ and~$pt'$ will be Delaunay edges, and we
wish to know whether there ought to be at least one more new Delaunay
edge between them. For this we must look at the triangle to the right
of arc~$c$, which is the triangle to the left of arc~$d$, namely
$\Delta t\,t''t'$.) If $t''\neq\Lambda$ and $t''t'tp$, allocate new
terminal nodes $\nu=(\Lambda,e,-,-)$, $\nu'=(\Lambda,d,-,-)$, change
both terminal nodes ${\sl inst\/}(c)$ and ${\sl inst\/}(d)$ to the
branch node $(t'',p,\nu,\nu')$, perform the subroutine ${\sl
flip\/}(c,d,e,t,t',t'',p,\nu,\nu')$ described below, set $c\la e$, and
go back to the beginning of Step~T5. Otherwise, if $t'\neq r$, set
$c\la{\sl next\/}\bigl({\sl mate\/}\bigl({\sl next\/}(c)\bigr)\bigr)$
and go back to the beginning of Step~T5. Otherwise terminate the
updating process. (We have gone all around the cycle surrounding~$p$
and returned to vertex~$r$.)\quad\pfbox

\bigskip
Steps T4 and T5 use a subroutine ${\sl
flip\/}(c,d,e,t,t',t'',p,\nu,\nu')$ with the following specifications.
We have $d={\sl mate\/}(c)$, $e={\sl next\/}(d)$, $t={\sl vert\/}(d)$,
$t'={\sl vert\/}(c)$, $t''={\sl vert\/}(e)$. The triangles $\Delta
t\,t'p$ and $\Delta t't\,t''$ to the left and right of arc~$c$ have
vertices satisfying the incircle predicate $t''t'tp$; we want to
replace them in the current triangulation by $\Delta pt@ t''$ and
$\Delta t''t'p$, corresponding to terminal nodes~$\nu$ and~$\nu'$. Thus
arc~$c$ from $t$ to $t'$ and its mate~$d$ from $t'$ to~$t$ are being
``flipped,'' i.e., replaced by a pair of arcs between $p$ and~$t''$. The
"!flipping in a triangulation"
necessary changes to the arc structure are straightforward: Set
$e'\la{\sl next\/}(e)$, $c'\la{\sl next\/}(c)$, $c''\la{\sl
next\/}(c')$; then set ${\sl next\/}(e)\la c$, ${\sl next\/}(c)\la
c''$, ${\sl next\/}(c'')\la e$, ${\sl inst\/}(e)\la{\sl
inst\/}(c)\la{\sl inst\/}(c'')\la\nu$, and ${\sl vert\/}(c)\la p$;
also set ${\sl next\/}(d)\la e'$, ${\sl next\/}(e')\la c'$, ${\sl
next\/}(c')\la d$, ${\sl inst\/}(d)\la{\sl inst\/}(e')\la{\sl
inst\/}(c')\la\nu'$, and ${\sl vert\/}(d)\la t''$. (Notice that
arcs~$c$ and~$d$ are still mates.)

Our description of dag triangulation has been rather lengthy because
we have spelled out all of the data structure operations. But in fact
the algorithm is shorter and simpler than the similar algorithm
sketched in high-level terms in \ref[36]. The main difference is that the
algorithm of \ref[36] requires three special points at infinity, two of
which can enter simultaneously into incircle tests; the implementation
of such an incircle test requires
a lengthy program based on a detailed case analysis of limiting
behavior, or with special provisions needed to combat degenerate
situations. The present algorithm avoids these complications by
requiring only a single ideal point~$\infty$, and we will prove that
it works in any CCC system. Incidentally, the maintenance of regions
outside the convex hull in terms of ``wedges''
$\angle\bar{t}_{j+1}t_jt_{j-1}$ turns out to be crucial; schemes that
allow more general subsets of the halfplanes to the left of
$t_jt_{j-1}$, analogous to the simple mechanism of daghull in
section~12 above, can fail when several points need to be deleted
simultaneously from the current convex hull. Any point lying in such a
halfplane will be a new extreme point, but the branching structure will
not continue to be correct unless the exterior regions are maintained
carefully.

Most of the dag triangulation algorithm is straightforward and easily
verified. For example, the instructions compiled in Step~T3 subdivide a
triangle properly in any CC system; only two cases are not quite
immediate:
$$\eqalignno{vqr\wedge vrs\wedge vsq\wedge vrp\wedge vqp\
&\RA\ vps\,,&(18.3)\cr
vqr\wedge vrs\wedge vsq\wedge vpr\wedge vps\ &\RA\
vqp\,.&(18.4)\cr}$$ 
These implications are needed to conclude that $v\in\Delta qps$; and
they are obviously equivalent to Axioms~$5'$ and~5, respectively. 

The instructions compiled during the splitting operation in Step~T5
also need to be validated. For this it suffices to show that
$$\eqalignno{(v\in\Delta pqr\vee v\in\Delta rqs)\wedge pqr\wedge
rqs\wedge vsp\ &\RA\ v\in\Delta pqs\,;&(18.5)\cr
(v\in\Delta pqr\vee v\in\Delta rqs)\wedge pqr\wedge rqs\wedge vps\
&\RA\ v\in\Delta psr\,.&(18.6)\cr}$$
(The additional hypothesis $pqrs$ is true when we do the splitting,
but we don't need it.) The mapping $(p,q,r,s)\ra(s,r,q,p)$ shows that
we can assume without loss of generality that $v\in\Delta pqr$; we
want to prove
$$\eqalignno{vpq\wedge vqr\wedge vrp\wedge rqs\wedge vsp\
&\RA \ vqs\,;&(18.7)\cr
vpq\wedge vqr\wedge vrp\wedge rqs\wedge vps\ &\RA\
vsr\,.&(18.8)\cr}$$ 
Both of these are easy. If $vrq\wedge vqr\wedge vrp$, then $vsp\wedge
vsq\RA vrs$ and $vps\wedge vrs\RA vsq$ by Axioms~5
and~$5'$; and $vsq\wedge vqr\wedge vrs\RA rsq$ by Axiom~4. 

The proof becomes more intricate when we try to validate the
instructions compiled in Step~T4. Suppose we have
$pt_jt_{j+1},pt_jt_{j-1},
pt_{j-1}t_{j-2},\ldots,pt_{k+1}t_k,pt_{k-1}t_k$, and
$k\leq j-1$, as in the comments on that step. We will prove that every
subsequent vertex~$v$ that comes through the newly compiled branch
instructions will lie in the triangle or wedge claimed.

If $v$ comes to label $l_j$, we have
$v\in\angle\bar{t}_{j+1}t_jt_{j-1}$, which means that
$vt_jt_{j+1}\wedge vt_jt_{j-1}$. Therefore if $vt_jp$ we have
$v\in\angle\bar{t}_{j+1}t_jp$ by definition. Otherwise if $vpt_j\wedge
vt_{j-1}p$ we have $v\in\Delta t_jt_{j-1}p$, again by definition.
Otherwise if $vpt_j\wedge vpt_{j-1}$, we have
$v\in\angle\bar{t}_jpt_{j-1}$, and the instructions continue at
label~$l_{j-1}$. 

Now suppose $j-1\geq i>k$ and $v$ comes to label $l_i$. There are two
ways this can happen. First, we might have
$v\in\angle\bar{t}_{i+1}t_it_{i-1}$; i.e., $vt_it_{i+1}$ and
$vt_it_{i-1}$. Then we must have $vpt_i$; otherwise there would be a
vortex from $t_{i+1}\ra t_{i-1}\ra p\ra t_{i+1}$ to~$v$ in the
tournament for~$t_i$, because $t_it_{i+1}t_{i-1}$ by definition of
convex hull. We must also have $vt_it_j$; otherwise $j>i+1$ and that
tournament would contain the vortex $v\ra t_j\ra t_{i-1}\ra v$ out
of~$t_{i+1}$. Hence $t_i\in\Delta vpt_j$, and we have $vpt_j$ by
Axiom~4. It follows that
$${\bf if}\ vt_{i-1}p\ {\bf then}\ v\in\Delta t_it_{i-1}p\ {\bf else}\
v\in\angle\bar{t}_jpt_{j-1}\,.\eqno(18.9)$$

The other way we can get to $l_i$ is from the program for $l_{i+1}$.
In this case, we will see by induction on $j-i$ that we must have
$v\in\angle\bar{t}_jpt_i$ and also $vt_{i+1}t_i$. Therefore we must
have $vt_it_{i-1}$, to avoid a vortex $t_{i+1}\ra t_{i-1}\ra p\ra
t_{i+1}$ out of~$v$ in the tournament for~$t_i$. And therefore (18.9)
holds in this case as well.

Finally, if $v$ comes to label $l_k$, we have
$v\in\angle\bar{t}_{k+1}t_kt_{k-1}$. We must now have $vt_kt_j$; this
is obvious if $j=k+1$, and otherwise the tournament for~$t_k$ would
contain $v\ra t_j\ra t_{k-1}\ra v$ out of~$t_{k+1}$. It follows that
the instruction `{\bf if}~$vt_kp$ {\bf then}
$v\in\angle\bar{p}\,t_kt_{k-1}$ {\bf else} $v\in\angle\bar{t}_jpt_k$'
is correct; for if $vpt_k$ we have $t_k\in\Delta vpt_j$, and $vpt_j$
must hold by Axiom~4.

This completes the proof that the algorithm's branching structure
correctly locates points in triangles or wedges as claimed. The
remaining logic, concerning the incircle test in Step~T5, is justified
by the remarks about incremental Delaunay triangulation that we stated
before describing the algorithm.

How fast is dag triangulation? Like the daghull algorithm of
section~12, it has a "worst-case running time" of order~$N^2$ if we
present it with an $N$-gon whose vertices are input in cyclic order.
But its expected behavior on randomized inputs is quite reasonable:
"!$n$-gon"

\proclaim Theorem. If the dag triangulation algorithm is applied to\/
$N$~points of any CCC system in random order, it will on the average
compute\/ $O(N)$ instructions and make\/ $O(N\log N)$ calls on the incircle
predicate, of which all but\/ $O(N)$ are simple counterclockwise tests
having the special form\/~$\infty pqr$.

\noindent{\it Proof}.\quad
First let's consider the total number of nodes. There are three after
initialization (18.1), and we add three more each time we perform Step~T2.
Step~T3 adds two whenever a triangle is deleted from the current
triangulation. (A~``triangle'' in this proof is a finite
triangle~$\Delta pqr$, not a wedge.) Triangles also leave the current
triangulation whenever Step~T3 is performed; this occurs a total of
$N-M-C$ times, where $M$ is the number of points in the final convex
hull and $C$ is the number of points that were in the current convex
hull at one time but not in the final convex hull. Therefore the total
number of nodes is $5N-7+C+2\bigl(T-(N-M-C)\bigr)=3N+3C+2M+2T-7$,
where $T$ is the number of triangles that were in the current
triangulation at one time but not in the final triangulation. We will
prove below that $T$ is $O(N)$ on the average.

Notice that $T-(N-M-C)$ is also the number of incircle tests in
Step~T5 that turn out to be true. The number of incircle tests that
turn out to be false in that step is always equal to the number that
turn out to be true, plus~3 if we came to~T5 through~T3, or plus $1+c$
if we came through~T4 with $c$~points deleted from the hull. (Actually
this is a slight overcounting: Step~T5 does not test $t''t'tp$
when $t''=\Lambda$, because the predicate $\infty t'tp$ is known to be
false in that case. So some of the ``false'' incircle tests counted
here are not actually performed.) We conclude that the total number of
incircle tests on finite points $t''t'tp$ is at most
$2\bigl(T-(N-M-C)\bigr)+3(N-M-C)+M+C-3+C=2T+N+C-3$.

The total execution time for Steps T2--T5 is therefore $O(N+T)$; the
``inner loop'' must be the counterclockwise tests $\infty
pp_{\lambda}q_{\lambda}$ made in Step~T1. Those tests are of the
following kinds, depending on when node~$\lambda$ became a branch
node: The initial node~$\lambda_0$ of (18.1) clearly leads to $N-2$
tests and we can ignore it. The three branch nodes $\lambda,\nu,\nu'$
of Step~T3 lead to instructions that are performed for all subsequent
points that lie inside a triangle $\Delta qrs$ that is leaving the
triangulation. Step~T4 is a bit more complicated and we will return to
it in a moment. The branch node ${\sl inst\/}(d)$ of Step~T5 leads to
an instruction that is performed for all subsequent points in the
triangle $\Delta tt''t'$ leaving the triangulation; and the branch
node ${\sl inst\/}(c)$ of that step leads to an instruction that is
performed for all subsequent points in $\Delta ptt'$. Triangle
$\Delta ptt'$ has not necessarily been part of any triangulation,
but any point $v\in\Delta ptt'$ does satisfy the incircle predicate
$tt''t'v$. (Proof: By (17.5) we have $v\in\Delta ptt'\RA
ptt'v$; i.e., $tt'pv$. We also have $tt'\infty v$, $tt'\infty
p$, $tt'pt''$, and $tt't''\infty$. So Axiom~$5'$ would fail in the
CC system fixing~$t$ if we had $tt't''v$.) Therefore we can
``charge'' the branch instruction ${\sl inst\/}(c)$ to $\Delta
tt''t'$, in the following argument.

The remainder of the proof is essentially identical to the analysis
of a similar algorithm in \ref[36], so it will only be sketched here;
complete details can be found in that paper. Let us say that a triple
of finite points~$qrs$ with counterclockwise orientation $\infty qrs$
has {\it"scope"\/}~$k$ if there are $k$ other points~$v$ such that $qrsv$
holds. Then $\Delta qrs$ is part of the Delaunay triangulation iff
$qrs$ has scope~0, and the triples with large scope are unlikely to
appear in the partial triangulations. The argument in the previous paragraph
shows that a triple with scope~$k$ will be charged for the execution
of at most $2k$~instructions in Step~T1, and only if its points
$\{q,r,s\}$ are entered before the other $k$~points in its scope. The
latter event occurs with probability
$3!\,k!/(k+3)!=6/(k+1)(k+2)(k+3)$.

If there are $T_k$ triples of scope~$k$, let $T_{<k}=T_0+T_1+\cdots
+T_{k-1}$.
The expected number of triangles~$T$ that enter the triangulation and
leave it again satisfies
$$\eqalignno{T+2N-M-2&=\sum_{k\geq 0}\;{6T_k\over (k+1)(k+2)(k+3)}\cr
\noalign{\smallskip}
&=\sum_{k\geq 1}\;{18T_{<k}\over k(k+1)(k+2)(k+3)}\;,&(18.10)\cr}$$
because there are $2N-M-2$ triangles (and $M$ wedges) in the final
triangulation on $N$~finite points. Similarly, the expected number of
branch instructions executed in~T1 after being generated in~T3 and~T5
is at most~$2B$, where
$$B=\sum_{k\geq 0}\;{6k\,T_k\over (k+1)(k+2)(k+3)}=\sum_{k\geq 1}\; 
{(12k-18)\,T_{<k}\over k(k+1)(k+2)(k+3)}\;.\eqno(18.11)$$
It will follow that $T=O(N)$ and $B=O(N\log N)$ if we can prove the
upper bound
$$T_{<k}=O(k^2N)\,.\eqno(18.12)$$
(Note that the tails of the sums for $k\geq N$ in (18.10) and (18.11)
are respectively $O(1)$ and $O(N)$, because $T_{<k}={N\choose 3}$
when $k\geq N$.)

The "Clarkson"-"Shor" probabilistic method \ref[12] can be used to establish
(18.12) as follows: The expected number~$E_r$ of triangles in the
triangulation of $r$~randomly chosen points satisfies
$$2r>E_r=\sum_{j\geq 0}\;{{N-j-3\choose r-3}\over {N\choose r}}\;T_j
\ \geq\ {{N-k-2\choose r-3}\over{N\choose r}}\;T_{<k}\,,$$
when $k\leq N-2$. Choosing $r=\lfloor 2N/(k+1)\rfloor+1$ gives the
desired bound, after some manipulation.

We still need to consider the branch instructions compiled in Step~T4.
We've seen that the instructions labeled~$l_i$ for $j\geq i\geq k$ are
performed only for vertices~$v$ that satisfy $\infty vt_it_{i-1}$; so
we can charge the execution of those instructions to the edge
$t_{i-1}t_i$ that was formerly in the convex hull. The total cost is
$O(N\log N)$, by the theorem in section~12 above.\quad\pfbox

\bigskip
Computational experiments with the same data used to test convex hull
algorithms in section~13 shows that dag triangulation makes about
three to fifteen times as many memory references as daghull, depending
on the type of input data. Here are the actual statistics:
"!empirical running times"

$$\vcenter{\halign{\hfil#\
&#\hfil\qquad&\hfil#\hfil\qquad&\hfil#\hfil\cr
&&{\sl daghull}&{\sl dag triangulation}\cr
\noalign{\vskip2pt}
\multispan2{\hfil\sl data\hfil\qquad}%
&{\sl mems\/}+{\sl ccs}&{\sl mems\/}+{\sl ccs\/}+{\sl incircles}\cr
\noalign{\smallskip}
128&cities&3543+1034&29853+2265+939\cr
100&uniform&2028+579&20260+1219+671\cr
1000&uniform&21078+6811&263344+22666+8659\cr
10000&uniform&210795+69806&2994832+337812+89233\cr
100&$n$-gon&4530+1079&17883+1311+343\cr
1000&$n$-gon&63204+16737&285263+21547+5530\cr
10000&$n$-gon&859311+243106&3308159+309298+59722\cr
100&nested&7544+2174&25045+3026+500\cr
1000&nested&151002+48855&455438+78955+8785\cr
10000&nested&2318715+769733&6135645+1349280+91992\cr}}$$
(The CCC system used in these "$n$-gon" tests was the degenerate case
when all coordinates are equal, as explained in section~19 below;
points were inserted in random order of their "serial numbers". The final
triangulation then contains all edges of the forms 
$a_0\mjm a_k$,
$a_k\mjm a_{k+1}$, 
and $a_k\mjm\infty$, 
where $a_k$ is the point with serial
number~$k$.) The program for dag triangulation was 167 statements
long, not including the code for the cc or incircle procedures, but
including the procedure that allocates space for a new node. (This
compares to 55~statements for daghull, the simplest of the randomized
$O(N\log N)$ algorithms for convex hull.)

The dag triangulation algorithm can be run without any artificial
infinite point by letting any real point play the role of~$\infty$.
The resulting triangulation will be the same as with
artificial~$\infty$, except that there will be additional edges joining
 certain vertices of the convex hull. These additional 
edges, together with the convex hull itself, 
define a triangulation that is dual to the "Voronoi diagram for
furthest points" instead of closest points. Of course the algorithm
runs more slowly when it has to make full incircle tests each time
instead of simpler counterclockwise tests most of the time; but this
observation can be useful when debugging. A~sample run on the 128-city
problem without an artificial~$\infty$ made 30199 memory references
and 3214 incircle tests. The additional edges it found between cities
of the convex hull ran from St.~Johnsbury to Regina, Vancouver, and
West Palm Beach; from Vancouver also to Salem, Santa Rosa, San
Francisco, and West Palm Beach; and from West Palm Beach also to
Salinas, Santa Barbara, and San Diego.

\beginsection 19. Incircle degeneracy.
Let us now return to the ideas of section~14, where we developed
methods to define CC systems on arbitrary sequences of points in the
plane, allowing two points to be coincident and three points to be
collinear. Now we want to extend those methods, so that CCC
systems can be defined when we also allow four points to be "cocircular".
"!degeneracy"

From a practical standpoint, our best rule in section~14 was derived
from the small perturbations defined in (14.16). The same
"perturbations" also give us a satisfactory way to define $pqrs$ when
the determinant $\vert pqrs\vert$ is zero. Suppose $p_1\prec
p_2\prec\cdots\prec p_n$ is any linear ordering of the points, not
necessarily related to lexicographic order, and define
$p'_1,\ldots,p'_n$ by (14.16). We will say that $pqrs$ is true iff the
first nonvanishing coefficient of the determinant $\vert
p'q'r's'\vert$ is positive when that determinant is expanded in
increasing powers of~$\epsilon$. We also say that $\infty pqr$ is true
iff the first nonvanishing coefficient of $\vert p'q'r'\vert$ is
positive; this gives the rule determined by the algorithm at the end
of section~14.

If $p\prec q\prec r\prec s$, we have
$$\eqalignno{\vert p'q'r's'\vert&=\vert
pqrs\vert+\epsilon_s\,f(p,q,r,s)+\delta_s\,g(p,q,r,s)\cr
\noalign{\smallskip}
&\qquad\null-\epsilon_r\,f(s,p,q,r)-\delta_r\,g(s,p,q,r)\cr
\noalign{\smallskip}
&\qquad\null+\epsilon_q\,f(r,s,p,q)+\delta_q\,g(r,s,p,q)\cr
\noalign{\smallskip}
&\qquad\null-\epsilon_p\,f(q,r,s,p)-\delta_p\,g(q,r,s,p)+O(\epsilon_s^2)\,,
&(19.1)\cr}$$
where the functions $f$ and $g$ are defined by
$$\vert pqrs'\vert=\vert pqrs\vert+\epsilon_s\,f(p,q,r,s)+\delta_s\,
g(p,q,r,s)+O(\epsilon_s^2)\,.\eqno(19.2)$$
Let $p^s$ and $\Delta^2_{ps}$ be defined by (17.2). An extension of
the trick by which we showed earlier that $\vert spqr\vert$ has the
same sign as $\vert p^sq^sr^s\vert$ can be used to find simple
formulas for $f(p,q,r,s)$ and $g(p,q,r,s)$: We have
$$\det\pmatrix{x_p&y_p&x_p^2+y_p^2&1\cr
\noalign{\vskip2pt}
x_q&y_q&x_q^2+y_q^2&1\cr
\noalign{\vskip2pt}
x_r&y_r&x_r^2+y_r^2&1\cr
\noalign{\vskip2pt}
x_s{-}\delta&y_s{+}\epsilon&(x_s{-}\delta)^2{+}(y_s{+}\epsilon)^2&1\cr}
 =
\det\pmatrix{%
x_p-x_s&y_p-y_s&\Delta^2_{ps}&1\cr
\noalign{\vskip2pt}
x_q-x_s&y_q-y_s&\Delta^2_{qs}&1\cr
\noalign{\vskip2pt}
x_r-x_s&y_r-y_s&\Delta^2_{rs}&1\cr
\noalign{\vskip2pt}
-\delta&\epsilon&\kern-3pt\delta^2+\epsilon^2\kern-3pt&1\cr}\,;\eqno(19.3)$$
hence
$$\eqalignno{f(p,q,r,s)&=\det\pmatrix{x_p-x_s&\Delta^2_{ps}&1\cr
\noalign{\smallskip}
x_q-x_s&\Delta^2_{qs}&1\cr
\noalign{\smallskip}
x_r-x_s&\Delta^2_{rs}&1\cr}\,,&(19.4)\cr
\noalign{\medskip}
g(p,q,r,s)&=\det\pmatrix{y_p-y_s&\Delta^2_{ps}&1\cr
\noalign{\smallskip}
y_q-y_s&\Delta^2_{qs}&1\cr
\noalign{\smallskip}
y_r-y_s&\Delta^2_{rs}&1\cr}\,.&(19.5)\cr}$$

\proclaim
Lemma. If\/ $\vert pqrs\vert=0$ and if\/ $p,q,r$ are distinct, then either\/
$f(p,q,r,s)\neq 0$ or\/ $g(p,q,r,s)\neq 0$.

\noindent
{\it Proof}.\quad
Without loss of generality, we can assume that $s=(0,0)$. Suppose
first that $p=(0,0)$ and that $f(p,q,r,s)=g(p,q,r,s)=0$; this means
$$\det\pmatrix{x_q&x_q^2+y_q^2\cr
\noalign{\smallskip}
x_r&x_r^2+y_r^2\cr}=\det\pmatrix{y_q&x_q^2+y_q^2\cr
\noalign{\smallskip}
y_r&x_r^2+y_r^2\cr}=0\,,$$
while $x_q^2+y_q^2$ and $x_r^2+y_r^2$ are nonzero. So
$${x_q\over x_q^2+y_q^2}={x_r\over x_r^2+y_r^2}\,,\qquad
{y_q\over x_q^2+y_q^2}={y_r\over x_r^2+y_r^2}\,,\qquad
{x_q^2+y_q^2\over (x_q^2+y_q^2)^2}={x_r^2+y_r^2\over
(x_r^2+y_r^2)^2}\,,$$
and we must have $x_q^2+y_q^2=x_r^2+y_r^2$; hence $x_q=x_r$ and
$y_q=y_r$, a~contradiction.

If $s=(0,0)$ and none of $p,q,r$ is $(0,0)$, we have $\vert
pqrs\vert=0$ iff the points $1/z_p$, $1/z_q$, and $1/z_r$ are
collinear in the complex plane, where $z_p=x_p+i@ y_p$. 
Let $1/z_p=u_p+i@ v_p=(x_p-i@
y_p)/(x_p^2+y_p^2)$, and define $u_q$,
$v_q$, $u_r$, and $v_r$ similarly.
Then
$$\eqalignno{f(p,q,r,0)&=
\vert z_p\vert^2\vert z_q\vert^2\vert z_r\vert^2\,\det
\pmatrix{u_p&1&u_p^2+v_p^2\cr
\noalign{\smallskip}
u_q&1&u_q^2+v_q^2\cr
\noalign{\smallskip}
u_r&1&u_r^2+v_r^2\cr}\,,&(19.6)\cr
\noalign{\medskip}
g(p,q,r,0)&=
\vert z_p\vert^2\vert z_q\vert^2\vert z_r\vert^2\,\det
\pmatrix{-v_p&1&u_p^2+v_p^2\cr
\noalign{\smallskip}
-v_q&1&u_q^2+v_q^2\cr
\noalign{\smallskip}
-v_r&1&u_r^2+v_r^2\cr}\,.&(19.7)\cr}$$
So the lemma boils down to proving that we cannot have
$$\det\pmatrix{u_p&u_p^2+v_p^2&1\cr
\noalign{\smallskip}
u_q&u_q^2+v_q^2&1\cr
\noalign{\smallskip}
u_r&u_r^2+v_r^2&1\cr}=
\det\pmatrix{v_p&u_p^2+v_p^2&1\cr
\noalign{\smallskip}
v_q&u_q^2+v_q^2&1\cr
\noalign{\smallskip}
v_r&u_r^2+v_r^2&1\cr}=0\eqno(19.8)$$
when $(u_p,v_p)$, $(u_q,v_q)$, and $(u_r,v_r)$ are distinct,
collinear points. 

We have $(u_r,v_r)-(u_p,v_p)=\lambda\bigl((u_q,v_q)-(u_p,v_p)\bigr)$
for some $\lambda\neq 0,1$. Consequently, letting
$\Delta^2=(u_q-u_p)^2+(v_q-v_p)^2$, we have
$$\eqalignno{\det\pmatrix{u_p&u_p^2+v_p^2&1\cr
\noalign{\smallskip}
u_q&u_q^2+v_q^2&1\cr
\noalign{\smallskip}
u_r&u_r^2+v_r^2&1\cr}
&=\det\pmatrix{0&v_p^2&1\cr
\noalign{\smallskip}
u_q-u_p&(u_q-u_p)^2+v_q^2&1\cr
\noalign{\smallskip}
u_r-u_p&(u_r-u_p)^2+v_r^2&1\cr}\cr
\noalign{\bigskip}
&=(u_q-u_p)\,\det\pmatrix{0&v_p^2&1\cr
\noalign{\smallskip}
1&v_p^2+2v_p(v_q-v_p)+\Delta^2&1\cr
\noalign{\smallskip}
\lambda&v_p^2+2\lambda v_p(v_q-v_p)+\lambda^2\Delta^2&1\cr}\cr
\noalign{\bigskip}
&=(u_q-u_p)\,\det\pmatrix{0&0&1\cr
\noalign{\smallskip}
1&1&1\cr
\noalign{\smallskip}
\lambda&\lambda^2&1\cr}
=(u_q-u_p)(\lambda^2-\lambda)\,\Delta^2\,.\cr}$$
Consequently the first determinant of (19.8) is zero iff
$u_p=u_q=u_r$, and the second is zero iff $v_p=v_q=v_r$.\quad\pfbox

\bigskip
The lemma tells us that the first seven terms of (19.1) will define
$pqrs$ whenever the set $\{p,q,r,s\}$ contains at least three distinct
points. Conversely, it is easy to see that $f(p,q,r,s)=g(p,q,r,s)=0$
whenever $p,q,r$ are not distinct; hence the first nine terms of
(19.1) are zero whenever $\{p,q,r,s\}$ contains at most two distinct
points. Equation (19.3) shows that the coefficients of $\epsilon_s^2$,
$\delta_s^2$, $\epsilon_r^2$, $\delta_r^2$, $\epsilon_q^2$,
$\delta_q^2$, $\epsilon_p^2$, and~$\delta_p^2$ will also be zero in
that case.

To break ties in cases of extreme degeneracy, the first possibly
nonvanishing coefficient will therefore be the coefficient
of~$\epsilon_s\epsilon_r$, which is the coefficient of~$\epsilon_r$ in
$f(p,q,r',s)$, namely
$2(y_r-y_s)(x_q-x_p)$. If this too is zero, we
turn to the coefficient of~$\epsilon_s\delta_r$, which is
$(x_q-x_r)^2+\allowbreak
(y_q-y_s)^2-(x_p-x_r)^2-(y_p-y_s)^2$. 
One of these two is bound to be nonzero unless $p=q$. For if $p\neq q$
there are two cases: Either $r=s$, in which case we must have $r=p$ or
$r=q$, and the coefficient of $\epsilon_s\delta_r$ is
$\pm\Delta^2_{pq}$; or $r\neq s$ and we must have $\{r,s\}=\{p,q\}$.
In the latter case the coefficient of $\epsilon_s\delta_r$ can be zero
only if $(x_q-x_p)^2=(y_q-y_p)^2$; and then $x_q-x_p$ and
$y_q-y_p$ must both be nonzero, so the coefficient
of~$\epsilon_s\epsilon_r$ will not vanish.

If the coefficients of $\epsilon_s\epsilon_r$ and $\epsilon_s\delta_r$
are zero, we try the (similar) coefficients of~$\epsilon_s\epsilon_q$
and $\epsilon_s\delta_q$. Those will both turn out to be zero only
if $p=q=r$, in which case the coefficients of~$\epsilon_s\epsilon_p$
and~$\epsilon_s\delta_p$ will vanish too, as will the coefficient
of~$\epsilon_r\epsilon_q$. We will, however, find a term
in~$\epsilon_r\delta_q$ if $r\neq s$.

Finally, if $p\prec q\prec r\prec s$ but $p=q=r=s$, 
we can assume without loss of generality that
$x_p=y_p=\cdots=x_s=y_s=0$. Now it is clear that the first nonzero
term of $\vert p'q'r's'\vert$ is $\epsilon_s^2\epsilon_r\delta_q$; we
therefore consider $pqrs$ to be true, in this maximally degenerate
case. 

Our rule for defining
$pqrs$ in general, given arbitrary points
$p=(x_p,y_p)$, \dots, $s=(x_s,y_s)$ in the plane, therefore boils down to
the following. As in section~14, we attach a unique "serial
number"~$l_p$ to each point~$p$.

{\narrower\smallskip\noindent
{\bf Step 1.}\quad 
Evaluate the determinant
$$\vert pqrs\vert=\det\pmatrix{x_p-x_s&y_p-y_s&\Delta^2_{ps}\cr
\noalign{\smallskip}
x_q-x_s&y_q-y_s&\Delta^2_{qs}\cr
\noalign{\smallskip}
x_r-x_s&y_r-y_s&\Delta^2_{rs}\cr}
\eqno(19.9)$$
with perfect accuracy, where $\Delta^2_{ps}=(x_p-x_s)^2+(y_p-y_s)^2$.
If the result is nonzero, return `true' if it is positive, `false' if
it is negative. Otherwise set $b=$ `true' and proceed to Step~2.
\smallskip}

{\narrower\smallskip\noindent
{\bf Step 2.}\quad
If $l_p>l_q$, interchange $p\leftrightarrow q$ and complement the value
of~$b$; if $l_q>l_r$, interchange $q\leftrightarrow r$ and complement
the value of~$b$; if $l_r>l_s$, interchange $r\leftrightarrow s$ and
complement the value of~$b$; repeat until $l_p<l_q<l_r<l_s$.
\smallskip}

{\narrower\smallskip\noindent
{\bf Step 3.}\quad
Compute the following quantities exactly, until finding the first
nonzero result, then complement~$b$ if that result is negative:
$$\eqalignno{&f(p,q,r,s)\,,\;g(p,q,r,s)\,,\;f(q,p,s,r)\,,\;g(q,p,s,r)\,,\cr
&f(r,s,p,q)\,,\;g(r,s,p,q)\,,\;h(p,q,r,s)\,,\;j(p,q,r,s)\,,\cr
&h(r,p,q,s)\,,\;j(r,p,q,s)\,,\;j(p,s,q,r)\,,\;\null+1\,.&(19.10)\cr}$$
Here
$$\eqalignno{f(p,q,r,s)
&=\det\pmatrix{x_p-x_r&\Delta^2_{ps}-\Delta^2_{rs}\cr
\noalign{\smallskip}
x_q-x_r&\Delta^2_{qs}-\Delta^2_{rs}\cr}\,,&(19.11)\cr
\noalign{\medskip}
g(p,q,r,s)
&=\det\pmatrix{y_p-y_r&\Delta^2_{ps}-\Delta^2_{rs}\cr
\noalign{\smallskip}
y_q-y_r&\Delta^2_{qs}-\Delta^2_{rs}\cr}\,,&(19.12)\cr
\noalign{\medskip}
h(p,q,r,s)&=(x_q-x_p)(y_r-y_s)\,,&(19.13)\cr
\noalign{\medskip}
j(p,q,r,s)&=(x_q-x_r)^2+(y_q-y_s)^2-(x_p-x_r)^2-(y_p-y_s)^2\,.&(19.14)\cr}$$
\smallskip}

{\narrower\smallskip\noindent
{\bf Step 4.}\quad
Return the value of $b$.
\smallskip}

\bn
Examples exist in which each of the 12~quantities in (19.10) will be
the first nonzero number of the sequence.

As in section 14, we can use this approach to obtain a highly "robust
algorithm" for Delaunay triangulation, producing a unique answer (once
the serial numbers are assigned) that agrees with data that has been
perturbed at most a small percentage of the total range. However, in
"!uniqueness of Delaunay triangulation"
this case the conversion to "fixed-point arithmetic" must use the same
scale factor in both dimensions: The $x$ and~$y$ coordinates should be
rounded respectively to the nearest values of the form $x/2^d$
and~$y/2^d$, where $x$ and~$y$ are integers in the ranges $x_0\leq
x_0+2^{b_x}$ and $y_0\leq y<y_0+2^{b_y}$ and where all input data lies
in the rectangle with corners $(x_0,y_0)/2^d$ and
$(x_0+2^{b_x},y_0+2^{b_y})/2^d$. Then we need to do exact arithmetic
on integers with $3\max(b_x,b_y)+\min(b_x,b_y)+3$ bits of precision
and a sign bit; with floating point arithmetic it is also possible to
get the correct sign of the determinant with one less bit of
precision. Thus, for example,
 we can go up to $b_x=13$, $b_y=12$, if
we evaluate (19.9) with "IEEE" standard double precision arithmetic. We
found earlier that 26-bit input data could be handled by the IEEE
standard when we were simply finding convex hulls; we
need about twice as many bits to compute $\vert pqrs\vert$ as to
compute~$\vert pqr\vert$.

Fixed-point arithmetic is not the only available option. We can also
compute robust Delaunay triangulations with a suitable floating-point
"!floating-point scheme that works"
scheme: Suppose each $x$ and~$y$ coordinate is rounded to the nearest
value that is either~0 or has the form
$$\pm(1+m2^{-b})2^k\,,\hbox{ where $0\leq m<2^b$ and $\vert k\vert
<K$}\,. \eqno(19.15)$$
Then the determinant $\vert pqrs\vert$ will be the sum of at most
12~numbers of the form $\pm(1+m2^{-4b-3})2^k$, where $0\leq
m<2^{4b+3}$ and $\vert k\vert <4K$. The sum of such numbers is not
generally representable in the same form, but we can readily determine
the sign of such a sum with no loss of accuracy. This form of
representation would be appropriate when calculating the Delaunay
triangulation for points $(\xi,\eta,\zeta)$ on the unit sphere,
possibly defined for latitude~$\theta$ and longitude~$\phi$ by the formulas
"!latitude and longitude" "!spherical coordinates, robust"
"!Delaunay triangulation, on the sphere"
$$\xi=\sin\phi\cos\theta\,,\;\eta=\cos\phi\cos\theta\,,
\;\zeta=\sin\theta\,.\eqno(19.16)$$
Projecting this point onto the plane via (17.8), when $\theta\neq\pi/2$,
gives
$$x=\sin\phi\;{\rm cot}\,\left(\,{\pi\over 4}-{\theta\over
2}\,\right)\,,\quad
y=\cos\theta\;{\rm cot}\,\left(\,{\pi\over 4}-{\theta\over
2}\,\right)\,;\eqno(19.17)$$ 
floating-point approximations near these true values can then be
found, having errors that correspond to small changes in~$\theta$
and~$\phi$.
(Note that the ``obvious'' approach, in which $\xi$, $\eta$,
and~$\zeta$ are rounded to points that are ``nearly'' on the sphere,
is not valid; it does not lead to determinants whose signs obey Axioms
C1--C5.)

\beginsection 20. Generalization to higher dimensions.
A {\it hypertournament of "rank"\/}~$r$ is an $r$-ary predicate defined on
all ordered $r$-tuples of distinct points, with the property that
interchanging any two points complements the relation. Thus, a~set of
triples satisfying Axioms 1--3 of section~1 is a hypertournament of
rank~3; a~set of quadruples satisfying Axioms C1--C3 of section~17 is
a hypertournament of rank~4; and an ordinary "tournament" is a
"hypertournament" of rank~2.

There are $2^{n\choose r}$ ways to define a hypertournament of
rank~$r$ on $n$~labelled points, because we can independently choose
truth values for a particular ordering of each $r$-element subset. The
{\it"transitive hypertournament"\/} of rank~$r$ on the points
$\{1,\ldots,n\}$ is defined by the condition that $p_1\,\ldots\,p_r$
is true whenever $1\leq p_1<\cdots<p_r\leq n$; thus, in general,
$p_1\,\ldots\,p_r$ is true in the transitive hypertournament if and
only if the number of pairs of indices $i<j$ with $p_i>p_j$ is even. The
transitive hypertournament of rank~3 on $n$~points is the CC system
corresponding to an "$n$-gon". The transitive hypertournament of rank~4
on $n$~points is the CCC system corresponding to $n$~coincident points
in the plane, under our rule for eliminating degeneracy in section~19.

Given a hypertournament of rank $r\geq 1$ on $n$ points, the
hypertournament of rank $r-1$ on $n-1$ points formed by {\it "fixing"
point\/}~$p$ is obtained by saying that $q_1\,\ldots\,q_{r-1}$ is true
in the latter iff $pq_1\,\ldots\,q_{r-1}$ is true in the former. (We
have already used this idea to associate tournaments on $n-1$
points with every point of a CC system.) A~sequence of $k$~points
$p_1\,\ldots\,p_k$ can also be fixed, when $r\geq k$, thereby obtaining a
hypertournament of rank $r-k$ on $n-k$ points. 

Every hypertournament~$H$ of rank~$r$ on $n$~labelled points, where
those points are  subject
to a linear ordering $a_1<a_2<\cdots <a_n$, has a {\it"dual
hypertournament"\/}~$H^{\ast}$ of rank $n-r$ on those same points, defined
as follows: Let
$\{p_1,\ldots,p_r\}\cup\{q_1,\ldots,q_{n-r}\}=\{a_1,\ldots,a_n\}$ be a
partition of the points, where $p_1<\cdots <p_r$ and $q_1<\cdots
<q_{n-r}$. Then $p_1\,\ldots\,p_r$ is true in~$H$ iff
$q_1\,\ldots\,q_{n-r}$  is true in~$H^{\ast}$.
For example, suppose the points are $\{1,2,3,4,5\}$ with the natural
ordering. Then the two CC systems in which we have $4\in\Delta 123$
and $5\in\Delta 124$ have the triples
$$123,\;124,\;125,\;\neg 134,\;\neg 135,\;\neg
145,\;234,\;235,\;245,\;345 \;{\rm or}\;\neg 345\,,\eqno(20.1)$$ 
and their duals are the tournaments
$$45,\;35,\;34,\;\neg 25,\;\neg 24,\;\neg
23,\;15,\;14,\;13,\;12\;{\rm or}\;\neg 12\,.\eqno(20.2)$$

"Negating a point" $p$ has the effect of complementing every $r$-tuple
containing~$p$ in a hypertournament. The {\it complement\/} of a
"!complement of a hypertournament"
hypertournament is obtained by complementing the value of every
$r$-tuple. If $r$ is odd, we obtain the complement of a
hypertournament by negating all its points; if $r$ is even, however,
we cannot in general obtain a hypertournament isomorphic to the
complementary hypertournament by negating points. 
For example, the pairs 
$$\eqalignno{&\hbox{12, 31, 41, 51, 16, 71, 18, 23, 24, 25, 62, 72,
34, 53, 63, 73,}\cr
&\qquad \hbox{38, 45, 64, 74, 84, 56, 75, 85, 67, 86, 87}&(20.3)\cr}$$
define a tournament on 8~elements that is not taken into its
complement by any signed permutation.

Two hypertournaments $H$ and $H'$ are called {\it"preisomorphic"\/} if
there is a signed bijection $p\mapsto p'$ between their points such
that we have either $p_1\,\ldots\,p_r$ in $H\Leftrightarrow
p'_1\,\ldots\,p'_r$ in~$H'$ or $p_1\,\ldots\,p_r$ in
$H\Leftrightarrow\neg p'_1\,\ldots\,p'_r$ in~$H'$. In section~5 above,
we called CC systems preisomorphic iff there was a signed bijection
with $p_1p_2p_3\Leftrightarrow p'_1p'_2p'_3$; this simplified
definition can be used whenever $r$ is odd, but example (20.3) shows that
it cannot be used when $r=2$. If $a_n$ and~$b_n$ denote the
number of equivalence classes of ordinary "tournaments" under signed bijection
and under preisomorphism, respectively, we have the following values
for small~$n$: "!enumeration, numerical results"
$$\eqalignno{n&=\ 1\quad 2\quad 3\quad 4\quad 5\quad
6\quad\phantom{1}7\quad \phantom{1}8\cr
a_n&=\ 1\quad 1\quad 1\quad 2\quad 2\quad
6\quad 17\quad 79\cr
b_n&=\ 1\quad 1\quad 1\quad 2\quad 2\quad
6\quad 17\quad 69\,.&(20.4)\cr}$$


The dual of a hypertournament, as we have defined it, depends on the
linear ordering $a_1<a_2<\cdots <a_n$. But all duals obtained from
different linear orderings are preisomorphic to each other. For if we
decide to interchange, say, the relative order of~$a_k$ and~$a_{k+1}$,
the $(n-r)$-tuples $q_1\,\ldots\,q_{n-r}$ in the new dual agree with
those in the former one except when $a_k$ and~$a_{k+1}$ are both
present or both absent. Thus we obtain the same effect by
negating~$a_k$ and~$a_{k+1}$, then complementing the entire dual
hypertournament. All orderings can be obtained by repeatedly
interchanging adjacent elements. This argument shows, in fact, that
all duals obtained from different orderings are obtainable from each
other by negating an even number of points and possibly complementing
everything; no signed permutations other than ``signed identity
permutations'' are needed.

Negating a point of a hypertournament negates every tuple {\it not\/}
containing that point, in the dual hypertournament; the same effect is
achieved in the dual by negating the point and then complementing
everything. Hence, if $H$ is preisomorphic to~$H'$, and if $H^{\ast}$
and $H'^{\ast}$ are duals respectively of~$H$ and~$H'$, then
$H^{\ast}$ is preisomorphic to~$H'^{\ast}$.

Let us say that a hypertournament of rank $r$ on $n$ points is {\it
geometric\/} if each tournament obtained by fixing $r-2$ of its
points is vortex-free. Thus, every hypertournament of rank~1 is
trivially geometric; a~"geometric hypertournament" of rank~2 is a
vortex-free tournament; a~geometric hypertournament of rank~3 is a
pre-CC system. Any hypertournament that is preisomorphic to a
geometric hypertournament is itself geometric.

\proclaim Lemma. The dual of a geometric hypertournament is geometric.

\noindent {\it Proof}.\quad
Let $H$ be a hypertournament of rank~$r$ on $n$~points, and let
$H^{\ast}$ be its dual. If $H^{\ast}$ is not geometric, there are
points $p_1,\ldots,p_{n-r-2}$ and $q_1,q_2,q_3,q_4$ such that the
tournament obtained from~$H^{\ast}$ by fixing $p_1\,\ldots\,p_{n-r-2}$
contains a vortex~$V$ on $q_1,q_2,q_3,q_4$. Let the other $r-2$ points
be $p'_1,\ldots,p'_{r-2}$, and let $H'$ be $H$ restricted to the
points $\{p'_1,\ldots,p'_{r-2},q_1,q_2,q_3,q_4\}$. Then the tournament
obtained from~$H'$ by fixing $p'_1\,\ldots\,p'_{r-2}$ is the dual
of~$V$.

But the dual of a vortex is a vortex. For example, if $V$ is a vortex
from $q_1\ra q_2\ra q_3\ra q_1$ to~$v_4$, then the true pairs of~$V$
are $q_1q_2$, $q_2q_3$, $q_3q_1$, $q_1q_4$, $q_2q_4$, $q_3q_4$ and
$q_1<q_2<q_3<q_4$; and the true pairs of~$V^{\ast}$ are $q_3q_4$,
$q_1q_4$, $q_4q_2$, $q_2q_3$, $q_1q_3$, $q_1q_2$, defining a vortex
from~$q_1$ into $q_2\ra q_3\ra q_4\ra q_2$. 
Preisomorphism also takes vortices into vortices.
Therefore $H'$ is not
geometric, and neither is~$H$.\quad\pfbox

\proclaim Corollary. Every geometric hypertournament of rank\/ $r$
on\/ $r+2$ points is preisomorphic to the transitive hypertournament
of rank\/~$r$ on those points.

\noindent{\it Proof}.\quad
We know from the lemma in section~4 that every vortex-free tournament
is preisomorphic to a transitive tournament. Take the dual of that
statement.\quad\pfbox

\bigskip
We have defined a CCC system to be a hypertournament of rank~4 such
that fixing any point yields a CC system. Thus, a~CCC system is not
only geometric, its associated rank-3 hypertournaments also satisfy
Axiom~4. Let's pursue this idea and define a {\it"CCCC system"\/} to be
a hypertournament of rank~5 such that fixing any point yields a CCC
system.

It turns out that "transitive hypertournaments" of rank~5 are CCCC
systems. Suppose, for example, that $n=9$, and consider the quadruples
that we get by fixing a point, say~3. The resulting hypertournament of
rank~4 is precisely what we get from the transitive hypertournament on
$\{1,2,4,5,6,7,8,9\}$ by negating points~1 and~2; this follows
because, for example, $13458=3\bar{1}458$. If we now fix another
point, say~7, we obtain the hypertournament of rank~3 that results
when points $\bar{1}$, $\bar{2}$, 4, 5, and~6 are negated in the
transitive CC system on $\{\bar{1},\bar{2},4,5,6,8,9\}$; in other
words, it is the result of negating~4, 5, and~6 in the transitive
system on $\{1,2,4,5,6,8,9\}$. This is a CC system, because we
observed in section~5 that consecutive points of an $n$-gon can be
negated without violating Axiom~4. 

We might suppose that CCCC systems correspond somehow to the signs of
$5\times 5$ determinants whose rows are something like
$$x_p\qquad y_p\qquad x_p^2+y_p^2\qquad (x_p^2+y_p^2)^2\qquad 1\,;$$
but the manipulations that worked in section~17 above do not generalize
sufficiently. 

In fact, CCCC systems are ``the end of the line.'' If we attempt to
define CCCCC systems as hypertournaments with the property that fixing
any point yields a CCCC system, we soon find that there is no such
thing as a CCCCC system (except in cases on $n\leq 6$ points, when the
condition is vacuous). For it is easy to see that any hypertournament
of rank~6 on $\{1,2,\ldots,7\}$ is obtained from the transitive
hypertournament by negating points and possibly complementing; let's
call this a pretransitive hypertournament. Say that the {\it weight\/}
of a point is the number of smaller points, plus~1 if that point is
negated. Fixing any point of a pretransitive hypertournament yields
another pretransitive hypertournament in which the weights of all
remaining points change parity. Therefore we can always fix three
points so that the weights of the remaining four points are all even
or all odd. Those four points violate Axiom~4. (For example, suppose
the given sextuples are $123\bar{4}\bar{5}6$,
$123\bar{4}\bar{5}7$, $123\bar{4}67$, 
$123\bar{5}67$,
$12\bar{4}\bar{5}67$, $13\bar{4}\bar{5}67$,
$23\bar{4}\bar{5}67$; this is the pretransitive hypertournament
of rank~6 on $\{1,2,3,\bar{4},\bar{5},6,7\}$. The respective weights
of 1, 2, 3, 4, 5, 6,~7 are 0, 1, 2, 4, 5, 5,~6, so we have four even
weights and three odd weights. Fixing the three points of odd weight,
namely $\{2,5,6\}$, will leave us with
$2\bar{5}6\bar{1}3\bar{4}= 256143$,
$2\bar{5}6\bar{1}37=256137$,
$2\bar{5}6\bar{1}\bar{4}7=256174$, and
$2\bar{5}63\bar{4}7=256347$; the triples 143, 137, 174, 347
violate Axiom~4. Fixing any other three points in this example would,
however, produce a CC system.)

What about convex hulls in three dimensions? If we are given a set of
"!convex hulls, in 3D"
points $p=(x_p,y_p,z_p)$, with no four coplanar, we can define a
hypertournament by the rule
$$pqrs\Longleftrightarrow\det\pmatrix{x_p&y_p&z_p&1\cr
\noalign{\smallskip}
x_q&y_q&z_q&1\cr
\noalign{\smallskip}
x_r&y_r&z_r&1\cr
\noalign{\smallskip}
x_s&y_s&z_s&1\cr}>0\,.\eqno(20.5)$$
Then the convex hull consists of all triangular faces $\Delta pqr$
such that $spqr$ holds for all $s\notin\{p,q,r\}$. In the remainder of
this section we shall let $\vert pqrs\vert$ denote the determinants in
"!notation" $\vert pqrs\vert$
(20.5), instead of considering the special case $z_p=x_p^2+y_p^2$ that
we used in (17.1) for the incircle test. 

The quadruples $pqrs$ defined by (20.5) satisfy Axiom~C5; hence they
form a geometric hypertournament, and the triples obtained by fixing
any point $u$ form a pre-CC system. To verify this it is sufficient to
consider the case $x_u=y_u=z_u=0$, and to use the fact that we have
$$\vert tpq\vert\;\vert tsr\vert+\vert tqr\vert\;\vert tsp\vert+\vert
trp\vert\;\vert tsq\vert =0\eqno(20.6)$$
even when $\vert pqr\vert$ has the general form
$$\det\pmatrix{x_p&y_p&z_p\cr
\noalign{\smallskip}
x_q&y_q&z_q\cr
\noalign{\smallskip}
x_r&y_r&z_r\cr}\,.\eqno(20.7)$$
(The left side of (20.6) is a polynomial, and we know that it is zero
for all positive values of $z_p,z_q,z_r,z_s,z_t$; hence it must be
identically zero.)

But the quadruples $pqrs$ of (20.5) do not form a CCC system in
general, because they do not necessarily obey Axiom~C4. Indeed, we
obtain a violation of~C4---a~set of points such that
$$pqrt\,,\quad sprt\,,\quad sqpt\,,\quad{\rm and}\quad
sqrp\eqno(20.8)$$
all are true---if and only if $p$ is interior to the tetrahedron
formed by~$sqrt$, because
$$\vert pqrt\vert+\vert sprt\vert+\vert sqpt\vert+\vert
sqrp\vert=\vert sqrt\vert\eqno(20.9)$$
and "Cramer's rule" tells us that "!determinant identities"
$$p={\vert pqrt\vert\over\vert sqrt\vert}\;s+{\vert
sprt\vert\over\vert sqrt\vert}\; q+{\vert sqpt\vert\over \vert
sqrt\vert}\;r+{\vert sqrp\vert\over\vert
sqrt\vert}\;t\,.\eqno(20.10)$$
(Identities (20.8) and (20.9) follow from the argument we used to
derive (1.2) and (1.3).
Points that make the determinant $\vert pqrs\vert$ positive form
tetrahedrons that traditionally have a negative orientation, in
classical treatments; our definition of $pqrs$ was chosen for
consistency with the usual definitions of the counterclockwise and
incircle predicates.)

The quadruples $pqrs$ do satisfy an axiom that is weaker than C4 but
not deducible from~C5: "!Axiom C$4'$"

\bigskip
{\bf Axiom C4\bfprime.}\quad
$pqrt\wedge prst\wedge psqt\wedge srqt\RA pqrs$.

\bn This law follows from (20.9) if we replace $(p,q,r,s,t)$
respectively by $(t,r,q,s,p)$. Let us say that a set of quadruples
forms a {\it"weak CCC system"\/} if it satisfies C1, C2, C3, C$4'$,
and~C5.

It turns out that every weak CCC system has a "3D convex hull", i.e.,
"!convex hull, in 3D"
a~set of triangular faces $\Delta pqr$ such that $spqr$ holds for all
$s\notin\{p,q,r\}$. Notice that $pq$ is an edge of such a triangle if
and only if we have $sr$ for all~$s$ in the vortex-free tournament
obtained by fixing~$pq$; this happens iff $pq$ has a transitive
tournament, with $r$ the ``champion'' of that tournament. The tournament
obtained by fixing~$pq$ is the complement of the tournament
fixing~$qp$; hence both are transitive or both are nontransitive.
Therefore every edge~$pq$ of a 3D convex hull is part of exactly two
triangles; every triangle $\Delta pqr$ has three neighbors of the
form $\Delta qpr'$, $\Delta rqp'$, and $\Delta prq'$, just as we have
observed in Delaunay triangulations. In fact, the main difference
between the Delaunay triangulation of  a CCC system and the 3D convex
hull of a weak CCC system is the fact that all points~$p$ participate
in the Delaunay triangulation, while the points~$p$ of the 3D hull
are those whose associated pre-CC system is a genuine CC system.

\proclaim Theorem.
Every weak CCC system on 3 or more points has a 3D convex hull, which
is a set of triangles topologically equivalent to the surface of a
sphere. A~point\/~$p$ is part of the 3D hull if and only if we get a
CC system when we fix\/~$p$; this happens iff\/ $p$ does not satisfy
(20.8) for any other points\/ $q$, $r$, $s$, and\/~$t$.

\noindent{\it Proof}.\quad
We proceed by induction on the total number of points,~$n$. If $n=3$,
there is trivially a convex hull consisting of two triangles $\Delta
pqr$ and $\Delta prq$; hence we assume that $n>3$. Let $p$ be one
of the points, and suppose the 3D hull of the other $n-1$ points has
been found.

If the triples obtained by fixing $p$ form a CC system, then they have
a convex hull $t_1t_2$, \dots, $t_{m-1}t_m,t_mt_1$; hence the triangles
$\Delta pt_2t_1,\ldots,\Delta pt_mt_{m-1},\Delta pt_1t_m$ are part of
the 3D convex hull. Each of these triangles $\Delta pt_jt_{j-1}$ is
adjacent to a triangle $\Delta t_{j-1}t_jq_j$ of the 3D convex hull
on the remaining $n-1$ points. Since each edge of a 3D hull is part
of exactly two triangles, the new triangles must replace all triangles
previously interior to the polygon $(t_m,t_{m-1},\ldots,t_1)$, and we
must have $qrsp$ true for every such triangle. Thus the new convex
hull remains topologically equivalent to a sphere.

Suppose the pre-CC system obtained by fixing $p$ do not form a CC
system, and let ${\cal H}$ be the 3D hull of the other $n-1$ points.
We want to prove that ${\cal H}$ is also the 3D hull of all
$n$~points; in other words, if $\Delta qrs$ is any triangle of~${\cal
H}$ we want to prove that $pqrs$ holds. If not, we have $qrsp$, and we
also have $rqtp$ where $\Delta rqt$ is any triangle adjacent to
$\Delta qrs$ in~${\cal H}$. Since ${\cal H}$ is connected, we must in
fact have $qrsp$ for {\it all\/} $\Delta qrs\in{\cal H}$. Therefore if
we negate~$p$, we obtain a geometric hypertournament~$H'$ in which
${\cal H}$ is the convex hull.

We will prove below that every geometric hypertournament of rank~4
having a nonempty 3D convex hull is a weak CCC system, i.e.,
satisfies Axiom~C$4'$. This will lead to the desired contradiction.
For we have assumed that the pre-CC system fixing~$p$ violates
Axiom~4; hence there are points $q,r,s,t$ satisfying (20.8). But
Axiom~C4 holds by assumption, hence we have
$$pqrt\ \wedge\  prst\ \wedge\  psqt\ \wedge\  psrq\ \wedge\  tsrq\,.$$
Therefore, negating $p$, we have 
$$\bar{p}rqt\ \wedge\ \bar{p}srt\ \wedge\ \bar{p}qst\ \wedge\ 
\bar{p}qrs\ \wedge\ tsrq\,.$$
But this is a counterexample to C$4'$ in~$H'$.

Therefore the proof of the theorem has been reduced to proving a sort
of converse: Let $H$ be any geometric hypertournament of rank~4 having
a nonempty 3D convex hull. We will show that Axiom~C$4'$ holds
in~$H$. Fix $ab$ in~$H$, where $\Delta abc$ is part of that hull,
thereby obtaining a transitive tournament. The corollary in section~5
now tells us that the pre-CC systems obtained by fixing points~$a$ and~$b$
are in fact CC systems. Therefore if Axiom~C$4'$ fails for some points
$p$, $q$, $r$, $s$, and~$t$, we have 
$$pqrt\ \wedge\ prst\ \wedge\ psqt\ \wedge\ srqt\ \wedge\
spqr\,,\eqno(20.11)$$
and $a$ or $b$ cannot be in $\{p,q,r,s,t\}$.

Suppose $t$ is the maximum element among $\{p,q,r,s,t\}$ in the
transitive tournament for~$ab$. Then we have $atbp$, $atbq$, $atbr$,
and $atbs$; so if we consider the string of signed points
$\alpha_1\,\ldots\,\alpha_{n-2}$ that defines the vortex-free
tournament for~$at$, where $\alpha_1=b$, we see that points $p,q,r,s$
must occur in that string with a positive sign. This means
edge~$at$ is part of the 3D convex hull if we restrict consideration
to the six points $\{a,p,q,r,s,t\}$. But that cannot be, because the
pre-CC system fixing~$t$ on those points includes either the triples
$rqp\wedge srp\wedge qsp\wedge qrs$ or $pqr\wedge prs\wedge psq\wedge
srq$. (We have used the fact that (20.11) has 60-fold "symmetry":
Interchanging any two points complements all the
quadruples.)\quad\pfbox

\bigskip
Our proof shows, in fact, that it is possible to take any geometric
hypertournament of rank~4 and negate a subset of points so as to
obtain a weak CCC system. Let $p,q,r$ be arbitrary points, and negate
the other points if necessary so that the tournament for~$pq$ is
transitive with maximum point~$r$. Then $\Delta pqr$ is in the 3D
hull, so Axiom~C$4'$ must hold in the resulting system.

From these observations we can modify the "dag triangulation" algorithm of
section~18 to obtain a general algorithm for 3D convex hulls in any
weak CCC system. Whenever we find a point satisfying $qrsp$ for some
$\Delta qrs$ in the current triangulation, we know that $p$ will be
part of the convex hull of the points seen so far. Whenever we find a
point~$p$ not satisfying Axiom~C4, therefore satisfying (20.8) for
some $q$, $r$, $s$, and~$t$, we know that $p$ does not affect the
convex hull so we can simply drop~it. Complications arise when the
starting~`"$\infty$"' is dropped; then we need to use a new point in
its place. But in practice if we are using coordinates we can run the
algorithm twice, once with $\infty=(0,0,+\infty)$ and once with
$\infty=(0,0,-\infty)$; these infinite points will not be dropped, and
we can piece together the overall convex hull from the two half-hulls
if no two points have the same~$x$ and~$y$ coordinates. Further
details are left to the reader.

To complete our study we will show that "geometric hypertournaments" of
rank~$r$ are essentially equivalent to "uniform oriented matroids"
of rank~$r$, just as we showed in section~10 that
pre-CC systems are in two-to-one correspondence with 4M~systems.
Indeed, we need not repeat the proofs of section~10, because the same
arguments carry through in general. It will suffice to indicate how
the basic definitions are modified to cover geometric hypertournaments
of arbitrary rank.

An $(r+1)$M system is like a 4M system, except that each circuit has
$r+1$ signed points instead of~4.
Our main connecting link between CC systems and 4-element circuits of
oriented matroids was equation~(10.1), which said that $\{p,q,r,s\}$
is a circuit if and only if
$$sqp=srq=spr=pqr\,.$$
The corresponding equation for 3-element circuits $\{p,q,r\}$ is simply 
$$pq=qr=rp\,;$$
and for 5-element circuits $\{p,q,r,s,t\}$ it is
$$pqrs=qrst=rstp=stpq=tpqr\,.$$
In general for $(r+1)$M systems, $\{p_0,\ldots,p_r\}$ will be a
circuit if and only if we have
$$p_1\,\ldots\,p_r=\neg
p_0p_2\,\ldots\,p_r=p_0p_1p_3\,\ldots\,p_r=\cdots
=(\neg)^rp_0\,\ldots\, p_{r-1}\eqno(20.12)$$
in the corresponding geometric hypertournament. (These $r$-tuples are
the respective duals of the rank~1 hypertournament on
$\{p_0,\ldots,p_r\}$ with $p_k$ true iff $k$ is even.)

The operation of "fixing a point"~$p$ in an $(r+1)$M system consists simply
of deleting all circuits that do not contain~$p$ or~$\bar{p}$,
then removing~$p$ or~$\bar{p}$ from the
remaining circuits. This is easily seen to correspond to the operation
of fixing~$p$ in the associated hypertournament. 
To show that every $(r+1)$M system defines two complementary
hypertournaments, we argue as in section~10 that the definition is
unambiguous except for the truth value of a single $r$-tuple.
Conversely, to prove that a 
geometric hypertournament of rank~$r$ yields an $(r+1)$M
system, we prove as before that it yields an $(r+1)$L system.
Axiom~L3 holds because we know that every geometric hypertournament of
rank~$r$ on $r+2$ elements is preisomorphic to the transitive
hypertournament of rank~$r$.

A "CCC system" is a "5M system" (i.e., a uniform oriented matroid of rank~4)
in which all circuits contain two elements of
one sign and three elements of the other sign. A~"weak CCC system" is an
acyclic 5M system; this means that the circuits each contain at least
one positive and one negative element. A~"CCCC system" is a 6M system in
which every circuit contains three elements of each sign. It is well
known that "acyclic" $(r+1)$M systems correspond to "convex sets" in $r-1$
dimensions with vertices in ``general position.''
The definitions given here, via hypertournaments satisfying
the vortex-free property under projections, seem to be the simplest
way to characterize the properties of those~sets.

\beginsection 21. Historical remarks.
The issues discussed above have been investigated by many authors, and
the beautiful properties enjoyed by configurations of points have been
expressed in a variety of interesting ways. The first paper on the subject,
as far as we know today, was the remarkably prescient 19th-century work
by R. "Perrin" \ref[60], who described sequences of permutations that are
equivalent to the notion of "reflection networks". The next step was taken
independently by Friedrich~W. "Levi" in the 1920s \ref[52], who
analyzed the properties of what he called
Pseudogerade (in German). An excellent summary of related work on "arrangements
of lines" and "pseudolines" during the next 40~years appeared
in books by Branko "Gr\"unbaum" \ref[34, 35], whose research and
teaching stimulated considerable activity in the 70s and~80s.

"Goodman" and "Pollack" \ref[26] resurrected Perrin's permutations
and called them {\it"allowable sequences"\/}; they pointed out that
nonoverlapping transpositions cannot always be interchanged without
affecting realizability.
Shortly afterwards \ref[27, 28] they discovered that allowable sequences
could be used to characterize arrangements of lines and pseudolines as well
as counterclockwise orientations; and they generalized
allowable sequences to account for "degenerate cases", by permitting
more than two adjacent elements to be flipped and by allowing several
nonoverlapping flips to be performed simultaneously.
They noted that the ``"betweenness" rule'' (7.1) was
necessary \ref[27, Proposition 2.16(c)], but they did not at first observe
that it was also sufficient.
In \ref[30] they studied several other equivalent formulations of
arrangements, notably {\it"semispaces"\/} (i.e., the sets of points that can
occupy the top $k$~lines of a reflection network, for some~$k$), and
what they called {\it"generalized configurations of points"\/} (which
are essentially dual to pseudolines). Many of the results in sections
5--8 above are equivalent to theorems proved in \ref[30]. In particular,
transformations that preserve isomorphism, as discussed in section~8,
are the subject of their Theorem~1.7; the fact that we can obtain all
preisomorphic CC systems by a sequence of local transformations, as
discussed at the end of section~5, is their Theorem~3.8.
The lemma of section~9, which establishes the asymptotic formula
$B_n=2^{\Omega(n^2)}$, is essentially equivalent to a construction
given in \ref[29, Proposition 6.2]. A comprehensive survey of the theory of
allowable sequences has just been published~\ref[32].

%Temporary note: While looking for something else in {\sl Math
%Reviews\/}, I~happened to see a reference to \ref[L5] \dots fromthe
%review it appears likely that Levi himself may have anticipated the
%idea of oriented matroids, or at least their duals in the rank~3 case.
%Our library doesn't have that book but I~have requested a copy of the
%article and I'll revise this paragraph when I~see what it says.]
%LATER: No, it is not strongly related.

Axioms more closely related
 to the axioms for CC systems and pre-CC systems in
section~1 were first proposed by L.~"Gutierrez Novoa" in 1965 \ref[39], who
called his systems {\it"$n$-ordered sets"}.
An $(r-1)$-ordered set is a mapping of $r$-tuples $p_1\,\ldots\,p_r$
into $\{-1,0,+1\}$ having two properties:

{\narrower\medskip\noindent
{\bf G1.}\quad
Any interchange of two points $p_j\leftrightarrow p_k$ negates the
value of $p_1\,\ldots\,p_r$.
\smallskip}

{\narrower\smallskip\noindent
\setbox0=\hbox{{\bf G2.}\quad}\hangindent\wd0
\box0 If $q_1p_2\,\ldots\,p_r\cdot p_1q_2\,\ldots\,q_r\geq 0$ and
 $q_2p_2\,\ldots\,p_r\cdot q_1p_1q_3\,\ldots\,q_r\geq 0$ and
$\cdots$ and $q_rp_2\,\ldots\,p_r\cdot q_1\,\ldots\,q_{r-1}p_1\geq 0$,
then $p_1p_2\,\ldots\,p_r\cdot q_1q_2\,\ldots\,q_r\geq 0$.
\par}

\bn For example, a 1-ordered set is a mapping from ordered pairs to
$\{-1,0,1\}$ with $pq=-qp$, such that
$$qp'\cdot pq'\geq 0\quad \wedge\quad q'p'\cdot qp\geq 0\quad 
\RA\quad pp'\cdot qq'\geq 0\,.\eqno(21.1)$$
In particular, if we have $pq\neq 0$ whenever $p\neq q$, this axiom is
equivalent to saying that the elements form a "vortex-free tournament".
(To prove this, it suffices to consider a 4-point subset.) The general
solution to (21.1) is slightly more complicated: If we say that
$p\equiv q$ whenever we have either
$px=qx$ for all~$x$ or $px=-qx$ for all~$x$, then the
equivalence classes form a vortex-free tournament, with the possible
addition of one class having $px=0$ for all~$x$.

 A~2-ordered
set is a mapping from triples that satisfies
$$\eqalignno{qp'p''\cdot pq'q''\ \geq\ 0\quad \wedge\quad
 q'p'p''\cdot qpq''\ 
&\geq 0\quad \wedge\quad q''p'p''\cdot qq'p\ \geq\ 0\cr
&\RA\  pp'p''\cdot qq'q''\ \geq\ 0\,.&(21.2)\cr}$$
Setting $q''=p''$ shows that we obtain a 1-ordered set if we fix the
point~$p''$; thus, if $pqr\neq 0$ for all distinct points $\{p,q,r\}$,
we obtain the equivalent of Axiom~5. If we assume that there are
points $p'p''$ such that $xp'p''>0$ for all $x\notin
\{p',p''\}$---this says that the convex hull is nonempty---then (21.2)
also yields Axiom~4. It can be shown that $(r-1)$-ordered sets are
equivalent to oriented matroids of "rank"~$r$ \ref[48, 51].

Related ideas were developed independently about 15~years later by
stereochemists at the University of Zurich, where Andr\'e "Dreiding"
proposed the name {\it"chirotope"\/} to describe arrangements of
molecules in space; this name is suggestive because molecules without
reflective symmetry have traditionally been called ``chiral.'' The term
{\it"hypertournament"\/} was also coined by members of the same group
\ref[71]. An early form of their definition was published on page~53 of
\ref[15], where the authors gave conditions approximately equivalent to
Axioms~C1, C2, C3, C4$'$, and~C5 in section~20 above, but the rules
were stated in "!Axiom C$4'$"
terms of the signs of determinant-like functions. A~more refined
definition of chirotope was subsequently published by "Bokowski"
and "Sturmfels" \ref[9]: A~chirotope of rank~$r$ is a mapping from
$r$-tuples $p_1\ldots p_r$ to $\{-1,0,1\}$ satisfying Axiom~G1 above
and the following property in place of~G2: If we fix the values of any
$r-2$ points $t_1,\ldots,t_{r-2}$, the resulting pair function
$pq=t_1\ldots t_{r-2}pq$ satisfies
$$\{sp\cdot qr,sq\cdot rp,sr\cdot pq\}=\{0\}\ {\rm or}\ \{-1,+1\}\
{\rm or}\ \{-1,0,+1\}\eqno(21.3)$$
for all $p,q,r,s$. A~{\it"simplicial chirotope"}, which has the
additional property that $p_1\,\ldots\,p_r$ is never~0 when the
points~$p_j$ are distinct, is therefore precisely equivalent to what
we have called a "geometric hypertournament". In general, when
$p_1\,\ldots\,p_r$ can be~0, chirotopes define systems slightly more
general than $(r-1)$-ordered sets; 
if a chirotope is not an $(r-1)$-ordered set, we
can remove some subset of its points and fix another subset so as to
obtain $k$-tuples on a set of $2k$~elements
$\{p_1,\ldots,p_k,q_1,\ldots,q_k\}$ for some $k\geq 3$, such that
$p_1\ldots p_k=q_1\ldots q_k=1$ and the value of all other
$k$-tuples is zero. Such systems, discussed by Dress \ref[14], violate
G2 but satisfy (21.3).

"Oriented matroids" are based on the theory of ordinary "matroids",
introduced by Hassler "Whitney" in 1935 as an abstraction of the common
notion of linear dependence \ref[70]. Where Whitney retained only the
zero/nonzero aspect of coefficients in vector equations, the oriented
theory went a bit further and retained the sign of each coefficient.
R.~T. "Rockafellar" suggested in 1967 that such an approach 
might be fruitful \ref[63],
and oriented matroids were discovered a few years later, independently
by Jon "Folkman", Robert~G. "Bland", and Michel "Las Vergnas". Folkman died
tragically before being able to complete a paper on the subject; Bland
and Las Vergnas learned of each other's work in 1975 and published a
joint paper \ref[6]. Meanwhile Jim "Lawrence" was preparing Folkman's
notes for publication, and he extended them in several ways \ref[21],
notably by showing that oriented matroids of rank~3 correspond to
"arrangements of pseudolines" and that oriented matroids of arbitrary
rank correspond to arrangements of what he called
``pseudo-hemispheres.'' Lawrence also introduced the notion  of a {\it
"gatroid"}, in which some elements are signed and others are signless.

Oriented matroids of rank $r$ in which all $r$-element sets are
independent have been called {\it free\/} \ref[6], {\it simple\/} \ref[21],
or {\it"uniform"\/} \ref[41]; of these three terms, ``simple'' might seem
best, because it corresponds to "simple arrangements" and to simplicial
chirotopes, but unfortunately it has already been used to describe
oriented matroids whose circuits all have size 3~or more. Therefore
``uniform'' is currently the adjective of choice.
Uniform oriented matroids, like the simplicial chirotopes,
are completely characterized by the excluded-minor property
that we have called vortex-freeness; in other words, they correspond
to our Axiom~5. The other key ingredient of CC systems, Axiom~4, is
equivalent to a special class of uniform oriented matroids that "Las
Vergnas" \ref[49] called {\it"acyclic"}, as defined in section~10 above.
 Las Vergnas showed that every
oriented matroid can be made acyclic by suitable negation of points;
we have seen special cases of this general result in sections~5
and~20. He developed a general theory of convexity for acyclic
oriented matroids, and A.~"Mandel" \ref[53] extended this theory by proving
(among other things)  that the face lattice
of any acyclic rank~$r$ oriented matroid, realizable or not, is
isomorphic to the lattice of faces of a piecewise linear
$(r-2)$-sphere. The theorems in sections~11 and~20 about the existence
of convex hulls in CC systems and 3D convex hulls in weak CCC systems
are simple special cases of this much more general theory.

Substantial research has been done on the question of deciding when an
arrangement of pseudolines is ``"stretchable"'' to an isomorphic
arrangement of straight lines; this is equivalent to deciding when a
CC system is "realizable" by points in the Cartesian plane. "Levi" \ref[52]
observed that non-stretchable arrangements exist, if we allow three
pseudolines to intersect at the same point; such arrangements
correspond to nonrealizable oriented matroids of rank~3 in which some
3-element subsets are dependent. 
"Ringel" \ref[62] exhibited 9~pseudolines in a nonstretchable {\it
simple\/} arrangement, i.e., an arrangement in which all intersections
between pairs of pseudolines are distinct. Ringel's example is
equivalent to a nonrealizable CC system on 9~points. "Goodman" and
"Pollack" \ref[27] proved that all CC systems on 8 or fewer points are
realizable; but they proved a few years later \ref[31] that almost all
CC systems on $n$~points are unrealizable, in the limit as
$n\ra\infty$. "Bokowski" and "Sturmfels" \ref[10] constructed
nonrealizable CC systems on $10,12,14,\ldots$ points with the property
that a realizable system is obtained when any point is deleted. Hence
there can be no finite set of axioms analogous to Axioms 1--5 that
characterize precisely the realizable systems.

The upper bound $2^{O(n^2)}$ on the total number of CC systems was
known to researchers in computational geometry because of ``"horizon
theorems"'' discovered independently by "Chazelle", "Guibas", and "Lee"
\ref[11, Lemma~1] and by "Edelsbrunner", "O'Rourke", and "Seidel"
\ref[18, Theorem~2.7].
The latter paper also claimed, in essence, that there are $2^{O(n^{r-1})}$
isomorphism classes of oriented matroids of rank~$r$, for
arbitrary~$r$, and a proof of this claim was discovered in 1991~\ref[19].
A~recent paper of "Bern", "Eppstein", "Plassman", and "Yao"
\ref[3] has established a sharper horizon theorem in the plane, namely
that the total number of sides in all cells cut by an $(n+1)$st
pseudoline is at most $9.5n-1$. We can restate this in the terminology
of section~9 above by considering the "dag" of all "cutpaths" defined in
connection with the theorem of that section: The total of indegrees
plus outdegrees of all vertices on any path from the source to the
sink in that dag is at most $5.5n+m-5$, where $m$ is the number of
extreme points (i.e., the outdegree of the source vertex, also the
indegree of the sink vertex). Marshall "Bern" \ref[4] has observed
that the constant~3 in the theorem of section~9 
can therefore be
improved to $\root 4 \of {54}$, which is approximately 2.711. On the
other hand, as noted in that section, the best possible constant may well
be~2, because no examples are yet known of reflection networks for
which the total number of cutpaths exceeds~$n2^{n-2}$. 

The numbers $E_n$ in section 9 have been widely studied, and
calculated by methods independent of those in section~8. "Halsey" found
$E_8=135$ in 1971~\ref[40]; this value was confirmed by computer
calculations carried out by "Richter" in 1987 (see~\ref[61]) and
independently by "Gonzales-Sprinberg" and "Laffaille" in 1989~\ref[25].
Richter and Laffaille continued the calculations to obtain $E_9=4382$,
and Laffaille obtained also the value $E_{10}=312356$. Richter-Gebert
showed that all but~1 of the 4382 equivalence classes on 9~points are
realizable; the unique unrealizable 9-point arrangement of pseudolines,
is in fact the only one whose "premutations" are independent, in the
sense discussed at the end of section~7 above.
Bokowski and Richter-Gebert subsequently determined that
precisely 242 of the classes on 10~points are unrealizable~\ref[7].

Hypertournaments of rank $r$ are called ``abstract binary
$(r-1)$D-configurations'' by "Klin", "Tratch", and "Zefirov"~\ref[44], who
use "P\'olya"'s enumeration theorem to count the number of "nonisomorphic"
hypertournaments of rank~3 on $n$ vertices.

"CCC systems" are called {\sl uniform "matroid polytopes" of rank~4\/}
in the literature of oriented matroids; "CCCC systems" are called {\sl
"neighborly matroid polytopes" of rank~5}.
"Preisomorphism" is called {\sl "reorientation equivalence"}.

A definitive reference book covering almost all that is currently known
about "oriented matroids" is scheduled to be published shortly~\ref[5].

\beginsection 22. Open problems.
Several natural questions are suggested by the topics
discussed above, and it may be worthwhile to list here some of
the more interesting issues that the author has not had time to
resolve:

\smallskip
1.\quad This monograph was originally motivated by the work of "Guibas" and
"Stolfi" \ref[38], who presented an algorithm for Delaunay triangulation
written entirely in terms of the CC and InCircle predicates. 
After reading that paper, the author developed a craving for
 a firm understanding of those predicates, so that
formal proofs of such algorithms could be given. "!Knuth"

Further investigation
revealed that the algorithm of \ref[38] also has a hidden dependence on
the coordinates of the points, because it relies on a procedure for
dividing a set of points into two approximately equal halves.
"!divide and conquer"
We have seen in section~14 that other concepts like "lexicographic
order" can interact with the CC predicate in interesting ways; yet it
remains interesting to ponder algorithms that do not use anything more
than counterclockwise tests $pqr$ to make all of their decisions. Therefore it
is natural to wonder if there is an $O(N)$ algorithm to partition an
arbitrary CC system into approximately equal "semispaces".

Related questions can also be posed: Is it
possible to find an "extreme point" of an arbitrary CC system in $O(N)$
time? How long does it take to test whether or not a given pre-CC
system is a CC system?

\smallskip 2.\quad The "treehull algorithm" in section 11 finds the
convex hull of any given CC system in $O(N\log N)$ steps. Is there an
analogous "incremental algorithm" that will find the 
Delaunay triangulation of any
given CCC system, with worst-case time $O(N\log N)$? Of particular
interest would be a data structure that allows ``amortized binary
search'' in an evolving triangulation. "!data structure for triangulation"

\smallskip 3.\quad The "dag triangulation" algorithm of section 18 runs
in time $O(N\log N)$, on the average, but the upper bound derived in (18.12)
is much larger than observed in practice. Is it possible to prove
sharper estimates, more like those in section~12?

\smallskip 4.\quad The dag triangulation algorithm is not
"parsimonious", in the sense of section~15. For example, it sometimes tests
twice whether the new point~$p$ falls in the scope of a certain
triangle, if that triangle is adjacent to two of the edges of the
polygon surrounding~$p$. Is there an efficient, parsimonious algorithm
for Delaunay triangulation in a given CCC system?

\smallskip 5.\quad What is the asymptotic number of CCC systems and
"CCCC systems" definable on $n$~points, as $n\ra \infty$? ("Gr\"unbaum"
\ref[34, \S7.2.4] constructed three nonisomorphic CCCC systems on 8~points;
"Bland" and "Las Vergnas" \ref[6, Proposition~3.9] demonstrated the
existence of ``alternating orientations'' that are not transitive.
"Shemer" \ref[65] showed that
the number of CCCC systems realizable in Euclidean 4-space is
$2^{\Omega(n\log n)}$, and he also observed that the total
number of CCCC systems on $n$~points is $2^{O(n^2)}$.)

\smallskip 6.\quad Is every CCC system embeddable in a CCCC system?
"!embedding"

\smallskip 7.\quad Is there a simple relation between the Delaunay
triangulation of a CCC system, as defined in section~17, and the
``${\cal D}$-Delaunay triangulations of a family~${\cal D}$ of
"pseudo-disks",'' as defined in~\ref[54]?

\smallskip 8.\quad Is there a system of axioms on $r$-ary relations that
can be satisfied over $n$ points in a total of, say,
$2^{\Theta(n\log n\log\log n)}$ ways? What orders of growth are possible
in asymptotic enumeration formulas analogous to (4.11) and to the corollary
that follows~(9.7)?

\smallskip 9.\quad What is a good algorithm to find the generalized
convex hull of an $(r+1)$M system, i.e., a uniform acyclic oriented
matroid of rank~$r$? (When $r=3$ this is the convex hull of a CC system,
so we know the answer. When $r=4$ it is the convex hull of a weak
CCC system, generalizing the 3D convex hull; the algorithm sketched
after the theorem in section 20 is incomplete.)

\beginspecsection Acknowledgments.

\noindent
{\sc Many people} provided considerable help to the author as these
notes were being prepared, notably Eli "Goodman", Leo "Guibas",
Ricky "Pollack", J\"urgen "Richter-Gebert", David "Salesin",
Raimund "Seidel", Bernd "Sturmfels", Frances "Yao", and G\"unter "Ziegler".
Special thanks are also due to Phyllis "Winkler", who transformed more
than 150~pages of scribbled manuscript into a respectable-looking
scientific document.
Some of the research was done during a visit to the Institute of
Systems Science at the University of Singapore; the work was completed
during a visit to Institut Mittag-Leffler in Djursholm, Sweden.
"!$n$-cube"

\vfill
\font\manfnt=manfnt
\newbox\starbox \setbox\starbox=\hbox{\raise2pt\hbox{\manfnt\char'36}}
\chardef\2='34 \chardef\3='35 \def\4{\copy\starbox}
\centerline{\manfnt \4}
\centerline{\manfnt \4\ \2\ \4}
\centerline{\manfnt \4\ \3\ \4\ \2\ \4}
\centerline{\manfnt \4\ \2\ \4\ \3\ \4\ \2\ \4}
\centerline{\manfnt \4\ \3\ \4\ \2\ \4\ \3\ \4\ \2\ \4}
\centerline{\manfnt \4\ \2\ \4\ \3\ \4\ \2\ \4\ \3\ \4\ \2\ \4}
\centerline{\manfnt \4\ \3\ \4\ \2\ \4\ \3\ \4\ \2\ \4}
\centerline{\manfnt \4\ \2\ \4\ \3\ \4\ \2\ \4}
\centerline{\manfnt \4\ \3\ \4\ \2\ \4}
\centerline{\manfnt \4\ \2\ \4}
\centerline{\manfnt \4}

\beginspecsection Bibliography.

\tolerance=1000
\def\>#1.{\unskip{\eightrm\quad Cited on page#1.}}
\advance\smallskipamount 1pt

\bib[1]
E. "al-Aamily", A. O. "Morris", and M. H. "Peel", ``The representations of
the Weyl groups of type~$B_n$,'' {\sl Journal of Algebra\/ \bf 68}
(1981), 298--305.
\> 17.

\bib[2]
Cecilia R. "Aragon" and Raimund G. "Seidel", ``Randomized search trees''
(extended abstract), {\sl 30th IEEE Symposium on Foundations of
Computer Science\/} (1989), 540--546.
\> 53.

\bib[3]
Marshall "Bern", David "Eppstein", Paul "Plassman", and Frances "Yao",
``Horizon theorems for lines and polygons,'' in {\sl Discrete and
Computational Geometry:\/} Papers from the DIMACS Special Year, edited
by Jacob E. "Goodman", Richard "Pollack", and William "Steiger",
{\sl DIMACS Series in Discrete Mathematics and Theoretical Computer
Science\/ \bf6} (1991), 45--66.
\>~96.

\bib[4]
Marshall "Bern", personal communication, January 1991.
\> 97.

\bib[5]
Anders "Bj\"orner", Michel "Las Vergnas", Bernd "Sturmfels",
Neil "White", and G\"unter M. "Ziegler", {\sl Oriented Matroids},
Encyclopedia of Mathematics Series, Cambridge University Press (1992).
\> 97.

\bib[6]
Robert G. "Bland" and Michel "Las Vergnas", ``Orientability of matroids,''
{\sl Journal of Combinatorial Theory\/ \bf B24} (1978), 94--123.
\>s 40, 95, 96, and 98.

\bib[7]
J. "Bokowski", G. "Laffaille", and J. "Richter-Gebert", ``10 point
oriented matroids and projective incidence theorems,'' in preparation.
\> 97.

\bib[8]
J\"urgen "Bokowski", J\"urgen "Richter", and Bernd "Sturmfels",
``Nonrealizability proofs in computational geometry,''
{\sl Discrete \& Computational Geometry\/ \bf 5} (1990), 333--350.
\> 6.

\bib[9]
J\"urgen "Bokowski" and Bernd "Sturmfels", ``On the coordinatization of
oriented matroids,'' {\sl Discrete \& Computational Geometry\/ \bf 1}
(1986), 293--306.
\> 95.

\bib[10]
J\"urgen "Bokowski" and Bernd "Sturmfels", ``An infinite family of
minor-minimal non\-realizable 3-chirotopes,'' {\sl Mathematische
Zeitschrift\/ \bf 200} (1989), 583--589.
\> 96.

\bib[11]
Bernard "Chazelle", Leonidas J. "Guibas", and D. T. "Lee", ``The power of
geometric duality,'' {\sl BIT\/ \bf 25} (1985), 76--90.
\> 96.

\bib[12]
Kenneth L. "Clarkson" and Peter W. "Shor", ``Applications of random
sampling in computational geometry, II,'' {\sl Discrete \&
Computational Geometry\/ \bf 4} (1989), 387--421.
\> 81.

\bib[13]
B. "Delaunay", ``Neue Darstellung der geometrischen Krystallographie,''
{\sl Zeit\-schrift f\"ur Kristallographie\/ \bf 84} (1932), 109--149;
errata, {\bf 85}  (1933), 332.
\> 69.

\bib[14]
Andreas "Dress", ``Chirotops and oriented matroids: Diskrete Strukturen,
algebraische Methoden und Anwendungen,'' {\sl Bayreuther Mathematische
Schriften\/ \bf 21} (1986), 14--68.
\> 95.

\bib[15]
Andreas "Dress", Andr\'e "Dreiding", and Hans "Haegi", ``Classification of
mobile molecules by category theory,'' in {\sl Symmetries and
Properties of Non-Rigid Molecules}, Proceedings of an International
Symposium in Paris, France, 1--7 July 1982, edited by J.~"Maruani" and
J.~"Serre"; {\sl Studies in Physical and Theoretical Chemistry\/ \bf 23}
(1983), 39--58.
\> 95.

\bib[16]
P. H. "Edelman" and C. "Greene", ``Balanced tableaux,'' {\sl Advances in
Mathematics\/ \bf 63} (1987), 42--99.
\> 35.

\bib[17]
Herbert "Edelsbrunner" and Ernst Peter "M\"ucke", ``Simulation of Simplicity:
A technique to cope with degenerate cases in geometric algorithms,''
{\sl Fourth Annual ACM Symposium on Computational Geometry} (1988),
118--133. 
\> 59.

\bib[18]
H. "Edelsbrunner", J. "O'Rourke", and R. "Seidel", ``Constructing
arrangements of lines and hyperplanes with applications,'' {\sl SIAM
Journal on Computing\/ \bf 15} (1986), 341-- 363.
\> 96.

\bib[19]
H. "Edelsbrunner", R. "Seidel", and M. "Sharir", ``On the zone theorem
for hyperplane arrangements,'' {\sl SIAM Journal of Computing\/}, to
appear. Preprint in
{\sl New Results and New Trends in Computer Science}, edited
by Hermann "Maurer", {\sl Lecture Notes in Computer Science\/ \bf555}
(1991), 108--123.
\>~96.

\bib[20]
Robert W "Floyd", personal communication, February 1964.
\> 29.

\bib[21]
Jon "Folkman" and Jim "Lawrence", ``Oriented matroids,'' {\sl Journal of
Combinatorial Theory\/ \bf B25} (1978), 199--236.
\>s 40, 43, and 96.

\bib[22]
Steven "Fortune", ``Stable maintenance of point set triangulations in
two dimensions,'' {\sl 30th IEEE Symposium on Foundations of Computer
Science\/} (1989), 494--499.
\>s 62 and 67.

\bib[23]
Fred "Galvin", personal communications, November 1991 and January 1992.
\> 15.

\bib[24]
Michael R. "Garey" and David S. "Johnson", {\sl Computers and
Intractability\/} (San Francisco: W.~H. Freeman, 1979).
\> 20.

\bib[25]
G\'erard "Gonzales-Sprinberg" and Guy "Laffaille", ``Sur les
arrangements simples de huit droites dans $\rm RP^2$,'' {\sl Comptes
Rendus de l'Acad\'emie des Sciences}, S\'erie~I, {\bf309} (1989), 341--344.
\> 97.

\bib[26]
Jacob E. Goodman and Richard Pollack,
``On the combinatorial classification of nondegenerate configurations
in the plane,'' {\sl Journal of Combinatorial Theory\/ \bf A29}
(1980), 220--235.
\> 94.

\bib[27]
Jacob E. "Goodman" and Richard "Pollack",
``Proof of "Gr\"unbaum"'s conjecture on the stretchability of certain
arrangements of pseudolines,''
{\sl Journal of Combinatorial Theory\/ \bf A29} (1980), 385--390.
\>s 94 and 96.

\bib[28]
Jacob E. Goodman and Richard Pollack, ``A theorem of ordered
duality,''
{\sl Geometri{\ae} Dedicata\/ \bf 12} (1982), 63--74.
\> 94.

\bib[29]
Jacob E. Goodman and Richard Pollack,
``Multidimensional sorting,'' {\sl SIAM Journal on Computing\/ \bf 12}
(1983), 484--507.
\>s 46 and 94.

\bib[30]
 Jacob E. Goodman and Richard Pollack,
``Semispaces of configurations, cell complexes of arrangements,''
{\sl Journal of Combinatorial Theory\/ \bf A37} (1984), 257--293.
\>s 35 and 94.

\bib[31]
 Jacob E. Goodman and Richard Pollack,
``Upper bounds for configurations and polytopes in~$R^{@d}$,'' {\sl
Discrete \& Computational Geometry\/ \bf 1} (1986), 219--227.
\>s 40 and 96.

\bib[32]
Jacob E. "Goodman" and Richard "Pollack", ``Allowable sequences and
order types in discrete and computational geometry,''
{\sl New Trends in Discrete and Computational Geometry}, edited by
J.~"Pach" (Springer-Verlag, 1992), to appear.
\> 94.

\bib[33]
Ronald L. "Graham", Donald E. "Knuth", Oren "Patashnik", {\sl Concrete
Mathematics\/} (Reading, Mass.: Addison\kern.1em--Wesley, 1989).
\> 14.

\bib[34]
Branko "Gr\"unbaum", {\sl Convex Polytopes\/} (London Interscience, 1967).
\>s 94 and 98.

\bib[35]
Branko "Gr\"unbaum", {\sl Arrangements and Spreads}. Conference Board of
the Math\-e\-matical Sciences, Regional Conference Series in Mathematics,
Volume~10 (Prov\-i\-dence, {\ninerm RI}: American Mathematical Society, 1972).
\>s 34 and~94.

\bib[36]
Leonidas J. "Guibas", Donald E. "Knuth", and Micha "Sharir", ``Randomized
incremental construction of Delaunay and Voronoi diagrams,''
 {\sl Algorithmica\/ \bf7} (1992), 381--413.
Abbreviated version in {\sl Automata, Languages and Programming},
 edited by M.~S. "Paterson", {\sl Lecture Notes in Computer Science\/ \bf443}
 (1990), 414--431.
\>s 2, 3, 74, 77, and 80.

\bib[37]
Leonidas "Guibas", David "Salesin", and Jorge "Stolfi", ``Constructing
strongly convex approximate hulls with inaccurate primitives,''
{\sl Algorithmica}, to appear. Abbreviated version in
{\sl Proceedings of the International Symposium on Algorithms SIGAL~90},
edited by T.~"Asano", T.~"Ibaraki", H.~"Imai", and T.~"Nishizeki",
{\sl Lecture Notes in Computer Science\/ \bf 450} (1990), 261--270.
\> 67.

\bib[38]
Leonidas "Guibas" and Jorge "Stolfi", ``Primitives for the manipulation of
general subdivisions and the computation of Voronoi diagrams,'' {\sl
ACM Transactions on Graphics\/ \bf 4} (1985), 74--123.
\>s v, 69, 72, and 97.

\bib[39]
Lino "Gutierrez Novoa", ``On $n$-ordered sets and order completeness,''
{\sl Pacific Journal of Mathematics\/ \bf 15} (1965), 1337--1345.
\> 94.

\bib[40]
Eric Richard "Halsey", {\sl Zonotopal complexes on the $d$-cube},
Ph.D. dissertation, University of Washington, Seattle, {\sl WA} (1972).
\> 97.

\bib[41]
Beat "Jaggi", Peter "Mani-Levitska", Bernd "Sturmfels", and Neil "White",
``Uniform oriented matroids without the isotopy property,'' {\sl
Discrete \& Computational Geometry\/ \bf 4} (1989), 97--100.
\> 96.

\bib[42]
J. W. "Jaromczyk" and G. W. "Wasilkowski", ``Numerical stability of a
convex hull algorithm for simple polygons,'' University of Kentucky
technical report 177--90 (1990), 18~pp.
\> 67.

\bib[43]
Arne "Jonassen" and Donald E. "Knuth", ``A trivial algorithm whose
analysis isn't,''
{\sl Journal of Computer and System Sciences\/ \bf 16} (1978), 301--322.
\> 55.

\bib[44]
Mikhail H. "Klin", Serge S. "Tratch", and Nikolai S. "Zefirov",
``2D-configurations
and clique-cyclic orientations of the graphs $L(K_p)$,'' {\sl Reports
in Molecular Theory\/ \bf1} (1990), 149--163.
\> 97.

\bib[45]
Donald E. "Knuth", 
{\sl The Art of Computer Programming}, Volume~3:  {\sl Sorting and Searching}
(Reading, {\ninerm MA}: Addison\kern.1em--Wesley, 1973).
\>s 29 and 47.

\bib[46]
Donald E. Knuth, ``Two notes on notation,'' {\sl American Mathematical
Monthly\/ \bf99} (1992), 403--422.
\> 14.

\bib[47]
Donald E. "Knuth", {\sl The Stanford GraphBase\/} (New York:\ ACM Press, 1993), $\rm viii+576$~pp.
\> 53.

\bib[48]
Michel Las Vergnas, ``Bases in oriented matroids,'' {\sl Journal
of Combinatorial Theory\/ \bf B25} (1978), 283--289.
\>s 3, 40, and 95.

\bib[49]
Michel "Las Vergnas", ``Convexity in oriented matroids,'' {\sl Journal
of Combinatorial Theory\/ \bf B29} (1980), 231--243.
\> 96.

\bib[50]
Alain Lascoux and Marcel-Paul "Sch\"utzenberger",
``Structure de Hopf de l'anneau de cohomologie et de l'anneau de
Grothendieck d'une vari\'et\'e de drapeaux,''
{\sl Comptes Rendus des s\'eances de l'Acad\'emie des Sciences},
 S\'erie~I, {\bf295} (1982), 629--633.
\> 35.

\bib[51]
Jim "Lawrence", ``Oriented matroids and multiply ordered sets,'' {\sl
Linear Algebra and Its Applications\/ \bf 48} (1982), 1--12.
\>s 3 and 95.

\bib[52]
F. "Levi", ``Die Teilung der projektiven Ebene durch Gerade oder
Pseudo\-gerade,''
Berichte \"uber die Verhandlungen der s\"achsischen Akademie der
Wissenschaften, Leipzig, Mathema\-tisch-physische Klasse~{\bf 78}
(1926), 256--267.
\>s 34, 94, and 96.

%\bib%[L5-Levi58]
%F. W. Levy, ``Order in projective planes,'' {\sl Calcutta Mathematical
%Society Golden Jubilee Commemoration Volume\/} (1958--2959), Part~II
%{\sl Calcutta Mathematical Society\/}. 389--396.

\bib[53]
Arnaldo  "Mandel", {\sl Topology of Oriented Matroids}. Ph.D. thesis,
University of Waterloo, Ontario, 1982.
\> 96.

\bib[54]
Ji\v r\'\i\  "Matou\v sek", Raimund "Seidel", and Emo "Welzl", ``How to net a
lot with little: Small $\epsilon$-nets for disks and halfspaces,''
{\sl Discrete \& Computational Geometry}, to appear. Preprint B90--04,
Freie Universit\"at Berlin, Fachbereich Mathematik, August 1990.
\> 98.

\bib[55]
Victor J. "Milenkovic" and Zhenyu "Li", ``Constructing strongly convex
hulls using exact or rounded arithmetic,'' {\sl Sixth
Annual ACM Symposium on Computational Geometry\/} (1990), 235--243.
\> 67.

\bib[56]
John W. "Moon", {\sl Topics on Tournaments\/} (New York: Holt, Rinehart
and Winston, 1968).
\>s 7 and 15.

\bib[57]
J. W. "Moon", ``Tournaments whose subtournaments are irreducible or
transitive,'' {\sl Canadian Mathematical Bulletin\/ \bf 21} (1979),
75--79.
\> 15.

\bib[58]
Ernest "Morris", {\sl The History and Art of Change Ringing\/} (London:
Chapman \& Hall, 1931).
\> 29.

\bib[59]
W. "Nowacki", ``Der Begriff `Voronoischer Bereich','' {\sl Zeitschrift
f\"ur Kristallographie\/ \bf 85} (1933), 331--332.
\> 69.

\bib[60]
R. "Perrin", ``Sur le probl\'eme des aspects,'' {\sl Bulletin
de la Soci\'et\'e Math\'ematique de France\/ \bf10} (1882), 103--127.
\> 94.

\bib[61]
J. "Richter", ``Kombinatorische realisierbarkeitskriterien f\"ur
orientierte Ma\-troide,'' {\sl Mitteil\-ungen aus dem Mathematischen Seminar
Gie{\ss}en\/ \bf194} (1989), 113~pp.
\> 97.

\bib[62]
G. "Ringel", ``\"Uber Geraden in allgemeiner Lage,'' {\sl Elemente der
Mathematik\/ \bf 12} (1957), 75--82.
\> 96.

\bib[63]
R. T. "Rockafellar", ``The elementary vectors of a subspace of~$R^{@n}$,''
in {\sl Combinatorial Mathematics and Its Applications}, edited by
R.~C. "Bose" and T.~A. "Dowling", Proceedings of a conference in Chapel
Hill, North Carolina, April 10--14, 1967 (University of North Carolina
Press, 1969), 104--127.
\> 95.

\bib[64]
T. J. "Schaefer", ``The complexity of satisfiability problems,'' {\sl
Tenth Annual ACM Symposium on Theory of Computing\/} (1978),
216--226.
\> 20.

\bib[65]
Ido "Shemer", ``Neighborly polytopes,'' {\sl Israel Journal
of Mathematics\/ \bf43} (1982), 291--314.
\> 98.

\bib[66]
Daniel Dominique "Sleator" and Robert Endre "Tarjan", ``Self-adjusting
binary search trees,'' {\sl Journal of the ACM\/ \bf 32} (1985), 652--686.
\> 53.

\bib[67]
Richard P. "Stanley", ``On the number of reduced decompositions of
elements of Coxeter groups,'' {\sl European Journal of Combinatorics\/
\bf 5} (1984), 359--372.
\> 35.

\bib[68]
Alfred "Tarski", {\sl A Decision Method for Elementary Algebra and
Geometry}, second revised edition (Berkeley and Los Angeles:
University of California Press, 1951).
\> 23.

\bib[69]
Georges "Vorono\"{\i}", ``Nouvelles applications des param\`etres continus \`a
la th\'eorie des formes quadratiques,'' {\sl Journal f\"ur die reine
und angewandte Mathe\-matik\/ \bf 133} (1907), 97--178; {\bf 134}
(1908), 198--287; {\bf 136} (1909), 67--181.
\>~69.

\bib[70]
Hassler "Whitney", ``On the abstract properties of linear dependence,''
{\sl American Journal of Mathematics\/ \bf 57} (1935), 509--533.
\> 95.

\bib[71]
Karl "Wirth", {\sl Endliche Hyperturniere}. Dissertation, Eidgen\"ossische
Technische Hoch\-schule, Z\"urich, 1978.
\> 95.

\bib[72]
G\"unter M. "Ziegler", personal communication, December 1991."!Ziegler circ"
\> 72.

\beginspecsection Index.

\noindent {\sl[\thinspace Several special notations needed in this volume are
indexed under `notation'.\thinspace]}

\newbox\partialpage
\output={\global\setbox\partialpage=\vbox{\unvbox255\bigskip}}\eject
\advance\vsize-\ht\partialpage

\rightskip0pt plus4em \spaceskip.3333em \xspaceskip.5em
\baselineskip 12pt plus.2pt minus.2pt
\parindent=0pt
\everypar{\hangindent=20pt}
\def\sub{{\penalty50\parskip=0pt\leavevmode}\kern10pt\hangindent=30pt}
\def\subsub{{\penalty100\parskip=0pt\leavevmode}\kern15pt\hangindent=35pt}
\hsize=62mm
\newif\ifright \newbox\leftcol
\output{\ifright\twocolumnout\global\rightfalse
  \else\leftcolumnsave\global\righttrue\fi}
\def\leftcolumnsave{\global\setbox\leftcol=\box255}
\def\twocolumnout{\shipout\vbox{ % here we define one page of output
  \hsize=130mm\makeheadline
  \ifvoid\partialpage\else\global\advance\vsize\ht\partialpage
    \box\partialpage\fi
  \hbox to\hsize{\box\leftcol\hss\box255}
  \vfill
  \ifpreprint\ifinxmode\makeinxfooter\fi\fi}
  \advancepageno}
\exhyphenpenalty=10000
\def\=#1{{\accent22 #1}}
\def\see{{\sl\kern1pt see\/} }
\def\also{{\sl\kern1pt see also\/} }
\obeylines
absolute value of signed points, 12.
acyclic oriented matroids, 35, 40, 55, 93, 96.
adjacent circuits, 44.
adjacent points, v, 69.
\sub in vortex-free tournament, 28.
adjacent pre-CC systems, 19.
adjacent transpositions, 29.
al-Aamily, E., 100.
algorithms, for convex hulls, 47, 48, 52.
\sub for Delaunay triangulation, 73.
\sub for sorting, 29, 62--65.
\sub incremental,  47, 48, 52, 73, 98.
\sub parsimonious, 2, 62--67, 98.
\sub verification of, 49, 78--79.
allowable sequences, 94.
almost-canonical form, 32.
alternating group, 10.
anti-isomorphism, 33.
antisymmetry, 4, 62.
approximation-based algorithms, 67.
Aragon, Cecilia Rodriguez, 53, 100.
arrangements of lines and pseudolines, 34--35, 94, 96.
Asano, Tetsuo, 102.
asymmetry, 64.
average-case analysis, 50--51, 65, 80--81.
Axiom 1, 4, 6, 16, 36.
Axiom 2, 4, 6.
Axiom 3, 4, 6.
Axiom 4, 4, 7, 10, 29, 36, 42, 45, 56.
Axiom 5, 4, 7--9, 11, 29, 42, 45, 56.
Axiom $5'$, 5, 7, 8, 11.
Axiom 6, 42.
Axiom C1--C5, 71.
Axiom C$4'$, 90, 95.
Axiom L1--L3, 43.
Axiom M1--M4, 40, 93.
Axiom R1--R2, 62, 64--65.
Axiom R$1'$--R$2'$, 64--65.
axiomatic methods, value of, v--vi, 1--3, 62.
\medskip
balanced trees, 55.
Bern, Marshall Wayne, 96, 97, 100.
betweenness, 25, 30, 94.
binary search trees, 47, 55.
binary trees, 62.
Bj\"orner, Anders, 100.
Bland, Robert Gary, 95, 98, 100.
Bokowski, J\"urgen, 95, 96, 100.
Bose, Raj Chandra, 103.
branch instructions in a data structure, 48, 74.
bubblesort, 29--32.
\medskip
{\ninerm C}, 52, 53, 60.
Cartesian products, 68.
Catalan, Eug\`ene Charles,  numbers, 36.
CC systems, defined, 1, 5, 9.
CCC systems, defined, 2, 70, 93, 97.
CCCC systems, 89, 93, 97, 98.
change-ringing, 29.
Chazelle, Bernard Marie, 96, 100.
chirotopes, 95.
circuits, 40.
Clarkson, Kenneth Lee, 81, 100.
clauses, 20.
cocircuits, 45.
cocircular points, 82.
cocktail-shaker sort, 29--32.
collinear points, 4, 6, 55.
comparators, 29.
comparison of algorithms, 52.
comparison of keys, 62--64.
complement, of a CC system, 41.
\sub of a hypertournament, 87.
\sub of a point, 12.
\sub of a variable, 20.
complementary satisfiability, 20.
complex numbers, 70.
composition of CC systems, 68.
Computer Modern, vii.
convex combinations, 4, 58.
convex hulls, 1, 2, 45.
\sub algorithms for, 47, 48, 52.
\sub in 3D, 72, 89--92.
convex sets, 93.
coordinates, 56, 97.
correctness, 49, 78--79.
cotransitivity, 64.
counterclockwise predicate, 1, 3.
counterclockwise queries, 16.
counterclockwise systems, 5.
Cramer, Gabriel, rule, 4, 90.
crossovers, 34.
{\tt CSAT} problem, 20.
cutpaths, 38, 68, 97.
cycles, 7, 12.
cyclic symmetry, 4, 25--26.
\medskip
dag triangulation algorithm, 74, 92, 98.
daghull algorithm, 47--51, 52, 55, 67.
dags, 38, 47, 97.
data structure for triangulations, 74, 98.
degeneracy, 55--61, 82--86, 94.
Delaunay [Delone], Boris Nikolaevich, 100.
\sub triangulations, 1, 2, 69.
\subsub algorithm for, 73--77.
\subsub on the sphere, 86.
determinant identities, 4, 5, 70, 90.
digraphs, 7.
directed acyclic graphs, 38.
directed graphs, 7, 19.
divide and conquer, 62, 97.
Dowling, Thomas Allan, 103.
Dreiding, Andr\'e, 95, 101.
Dress, Andreas, 100, 101.
dual axioms, 5, 8, 9.
dual hypertournaments, 87.
dual matroids, 45.
\medskip
Edelman, Paul Henry, 35, 101.
Edelsbrunner, Herbert, 96, 101.
embedding, 10, 22, 98.
empirical running times, 54, 81.
enumeration, 13, 35--40.
\sub numerical results, 35, 87.
Eppstein, David Arthur, 96, 100.
equivalent reflection networks, 31.
Euclid, 1.
extreme points, 17, 32, 39, 45, 72, 98.
\medskip
fixed-point arithmetic, 60, 67, 85.
fixing a point, 43, 70, 87, 93.
flipping a reflection network, 34.
flipping edges in a triangulation, 77.
floating-point arithmetic, 1, 56, 60, 67.
\sub rigorous use of, 86.
Floyd, Robert W, 29, 101.
Folkman, Jon, 43, 44, 95, 101.
{\ninerm FORTRAN}, 60.
Fortune, Steven Jonathon, 62, 101.
\medskip
Galvin, Frederick William, 15, 101.
Garey, Michael Randolph, 20, 101.
gatroids, 96.
generalized configurations of points, 94.
geometric hypertournaments, 88, 92, 95.
Gonzales-Sprinberg, G\'erard, 97, 101.
Goodman, Jacob Eli, 35, 40, 46, 94, 96, 99, 100, 101, 102.
Graham, Ronald Lewis, 102.
Greene, Curtis, 35, 101.
Gr\"unbaum, Branko, 34, 94, 98, 101, 102.
Guibas, Leonidas Ioannis, v, vi, 69, 96, 97, 99, 100, 102.
Gutierrez Novoa, Lino, 94, 102.
\medskip
Haegi, Hans, 101.
Halsey, Eric Richard, 97, 102.
horizon theorems, 36, 96.
hull insertion algorithm, 52--55, 66.
hulls, \see convex hulls.
hyperoctahedral group, 17.
hypertournaments, 86--89, 95
\medskip
Ibaraki, Toshihide, 102.
IEEE standard floating-point, 60, 61, 86.
Imai, Hiroshi, 102.
in-vortex, 12.
incircle predicate, 1, 2, 69--71.
incremental algorithms, 47, 48, 52, 73, 98.
independent axioms, 6, 71.
independent mutations, 29, 97.
instruction nodes, 48, 74.
interior transitivity, 8, 42.
interior triple systems, 9--11.
interiority, 4.
intersection of line segments, 1.
inversions, 24, 29.
Iverson, Kenneth Eugene, convention, 14.
\medskip
Jaggi, Beat, 102.
Jaromczyk, Jerzy W., 102.
Johnson, David Stifler, 20, 101.
Jonassen, Arne, 103.
\medskip
Klin, Mikhail H., 97, 103.
Knuth, Donald Ervin, iii, vii, 2, 3, 53, 68, 97, 102, 103.
\medskip
Laffaille, Guy, 97, 100, 101.
Las Vergnas, Michel, 95, 96, 98, 100, 103.
Lascoux, Alain, 35, 103.
latitude and longitude, 86.
Lawrence, James Franklin, 95--96, 101, 103.
Lee, Der-Tsai, 96, 100.
Levi, Friedrich Wilhelm Daniel, 34, 94, 96, 103.
lexicographic order, 57, 58, 68, 97.
Li, Zhenyu, 103.
linear dependence, 41.
linear ordering, 10, 26, 30, 56.
\medskip
MacMahon, Major Percy Alexander, 14.
Mandel, Arnaldo, 96, 103.
Mani-Levitska, Peter, 102.
Maruani, J., 101.
mates, 74.
Matou\v{s}ek, Ji\v{r}\'\i, 103.
matroid polytopes, 97.
matroids, 95.
\sub oriented, vii, 35, 40--45, 92--93, 95--97.
Maurer, Hermann, 101.
mems, 52.
merge sorting, 62--63.
middle arcs, 38.
Milenkovic, Victor Joseph, 103.
Milnor, John Willard, 40.
Moon, John Wesley, 15, 103.
Morris, Alun O., 100.
Morris, Ernest, 103.
mutations, 28--29.
M\"ucke, Ernst Peter, 101.
\medskip
$n$-cubes, 17, 99.
$n$-gons, 11, 18, 30, 32, 39, 43, 46, 50, 53, 79, 81, 87.
$n$-ordered sets, 94.
necklace patterns, 14.
negating a point, 12, 17--19, 87.
neighborly matroid polytopes, 97.
neighboring, \see adjacent.
Nishizeki, Takao, 102.
nondegeneracy, 4.
nonisomorphic systems, enumeration of, 13, 97.
north pole, 35, 38, 72.
not-all-equal {\tt 3SAT}, 20.
notation: $pqr$, 1, 3.
\sub $\vert pqr\vert$, 3.
\sub $pqrs$, 1, 69.
\sub $\vert pqrs\vert$, 69, 90.
\sub $\sqbox pqrs$, 9, 58.
\sub $\angle\bar qrs$, 75.
\sub $t\in \Delta pqr$, 4, 58.
\sub $\Delta^2_{pq}$, 70.
Nowacki, Werner, 104.
NP-complete, 19.
NP-hard, 23.
\medskip
odd-even transposition sort, 29--31, 36.
open problems, 11, 55, 63, 97--98.
oriented matroids, vii, 35, 40--45, 92--93, 95--97.
O'Rourke, Joseph, 96, 101.
out-vortex, 12.
\medskip
Pach, J\'anos, 102.
Pappus of Alexandria, theorem, 6.
parallel sweep lines, 24--27.
parentheses, 36.
parsimonious algorithms, vii, 2, 62--67, 98.
Patashnik, Oren, 102.
Paterson, Michael Stewart, 102.
Peel, Michael Harry, 100.
permutations, 10, 23, 24.
Perrin, R., 94, 104.
perturbations, 59--60, 82--85.
Plassman, Paul Eugene, 96, 100.
Pollack, Richard, 35, 40, 46, 94, 96, 99, 100, 101, 102.
postprocessing, 55, 67.
pre-CC systems, 1, 11, 17, 42.
preautomorphisms, 18.
preisomorphisms, 17, 34, 35, 87, 97.
preprocessing, 16.
premutations, 28--29, 97.
preweak equivalence, 34.
primitive sorting networks, 2, 29.
programmer on the street, 66.
projective ordering, 68.
projective plane, 34.
pseudo-disks, 98.
pseudo-hemispheres, 96.
pseudolines, 34--35, 94, 96.
P\'olya, George, 97.
\medskip
quad-edge structure, 72.
quicksort, 51.
\medskip
randomization, 50, 61, 65, 67.
rank, 40, 86, 95.
realizable CC systems, 6, 29, 35, 40, 60, 66, 96.
reducible tournaments, 15.
reflection networks, 29--35, 68--69, 94.
reorientation equivalence, 97.
Richter-Gebert [formerly Richter], J\"urgen, 97, 99, 100, 104.
Ringel, Gerhard, 96, 104.
robust algorithms, 2, 67, 85--86.
Rockafellar, Ralph Tyrell, 95, 104.
rounding, 60, 67.
\medskip
Salesin, David Henry, 99, 102.
{\tt SAT} (satisfiability) problem, 20.
Schaefer, Thomas Jerome, 20, 104.
Sch\"utzenberger, Marcel Paul, 35, 103.
scope of vertex in a CCC system, 80.
scores in tournaments, 51, 65.
\sub vectors, 15, 46.
Seidel, Raimund, 53, 96, 99, 100, 101.
semispaces, 94, 98.
Senatus Populusque Romanus, 1.
serial numbers, 61, 81, 84.
Serre, J., 101.
Sharir, Micha, 101, 102.
Shemer, Ido, 98, 104.
Shor, Peter Williston, 81, 100.
signed bijections, 17.
signed permutations, 17.
signed points, 12, 16, 40.
simple arrangements, 34, 96.
simplicial chirotopes, 95.
simulation of simplicity, 59.
sinks, 7.
Sleator, Daniel Dominic Kaplan, 53, 103.
sorting, 47, 62--65.
\sub networks, 29.
sources, 7.
spherical coordinates, robust, 86.
splay trees, 53, 55, 66.
splayhull algorithm, 53--55.
Stanford GraphBase, 53.
Stanley, Richard Peter, 35, 104.
Steiger, William Lee, 100.
stereographic projection, 72.
Stolfi, Jorge, 69, 97, 102.
stretchable arrangements, 35, 96.
strings that define vortex-free tournaments, 12.
stupid questions, 62.
Sturmfels, Bernd, 95, 96, 99, 100, 102.
sweep lines, 16, 24--26.
symmetry, 6, 10, 42, 92.
syzygy, 5.
\medskip
Tarjan, Robert Endre, 53, 103.
Tarski, Alfred, 104.
\sub decision procedure, 23.
terminal instructions! 74.
three-dimensional convex hull, 72, 89--92.
topological sorting, 19, 25.
tournaments, 1, 7, 10--12, 64, 65, 86, 87.
\sub transitive, 7, 12, 15, 17, 19, 25, 62.
\sub vortex-free, 1, 11--16, 19, 94.
transitive hypertournaments, 86, 89.
transitive interior triple systems, 11.
transitive tournaments, 7, 12, 15, 17, 19, 25, 62.
transitivity axiom, 4, 62.
transpositions, 29.
Tratch, Serge S., 97, 103.
treaphull algorithm, 53--55.
treaps, 53, 55, 66.
treehull algorithm, 52--55, 66, 98.
treesort, 62--63, 65--67.
triangulation, data structure for, 74.
trisection of a triangle, 76.
\medskip
uniform oriented matroids, 2, 35, 40--45, 92--93, 95--97.
uniqueness of Delaunay triangulation, 85.
uniqueness of convex hull, 67.
unrealizable CC systems, 6, 25--27, 30, 96.
\medskip
{\tt VFC} problem, 20.
Vorono\"\i, Georges, 104.
\sub regions, 1, 2, 69.
\subsub for furthest points, 82.
vortex-free completion problem, 20.
vortex-free tournaments, 1, 11--16, 19, 94.
\medskip
Wasilkowski, Grzeaorzw W., 102.
weak CCC systems, 90--93.
weak pre-CC systems, 16.
weakly equivalent networks, 31.
wedges, 75.
Welzl, Emmerich Oskar Roman, 103.
White, Neil Lawrence, 100, 102.
Whitney, Hassler, 95, 104.
Winkler, Phyllis Astrid Benson, 99.
Wirth, Karl, 104.
worst-case guarantees, 47, 53, 65--66.
worst-case running time, 47, 50, 79.
wreath products, 68.
\medskip
Yao, Frances Foong Chu, 96, 99, 100.
\medskip
Zefirov, Nikolai S., 97, 103.
Ziegler, G\"unter Matthias, 72, 99, 100, 104, 109.
\medskip
3D convex hulls, 72, 89--92.
{\tt 3SAT} problem, 20.
\medskip
4L systems, 43.
4M systems, 41.
\medskip
5M systems, 93.
\medskip
$\infty$, 69, 72, 73, 92.

\bye
