Professional Documents
Culture Documents
G r a h a m
Techniques Editors
4. Bobrow, D.G., Burchfiel, J.D., Murphy, D.L., and Tomlinson,
R.S. TENEX, a paged time sharing system for the PDP-10. Comm.
ACM15, 3 (March 1972), 135-143.
Convex Hulls of Finite
5. Bobrow, D.G., and Murphy, D.L. The structure of a LISP
system using two level storage. Comm. ACM 10, 3 (March 1967).
155-159.
Sets of Points in Two
6. Cheney, C.J. A nonrecursive list compacting algorithm.
Comm. ACM 13, 11 (Nov. 1970), 677-678.
7. Deutsch, L.P. An interactive program verifier. Ph.D. Th.,
and Three Dimensions
Comptr. Sci. Dep., U. of California, Berkeley, Calif., May 1973.
8. Deutsch, L.P. A LISP machine with very compact programs. F. P. Preparata and S. J. Hong
Third Int. Joint Conf. on Artificial Intelligence, Stanford, Calif., University of Illinois at Urbana-Champaign
1973, pp. 697-703.
9. Fenichel, R.R., and Yochelson, J.C. A LISP garbage-collector
for virtual-memory computer systems. Comm. ACM 12, 11 (Nov.
1969), 611-612.
10. Hansen, W.J. Compact list representation: Definition, garbage
collection, and system implementation. Comm. ACM 12, 9
(Sept. 1969), 499-507.
U . Hehner, E.C.R. Matching program and data representations The convex hulls of sets of n points in two and three
to a computing environment. Ph.D. Th., Comp.tr. Systems Res. dimensions can be determined with O(n log n) opera-
Group, U. of Toronto, Toronto, Canada, Nov. 1974.
12, McCarthy, J., et al. LISP 1.5 Programmer's Manual. M.I.T. tions. The presented algorithms use the "divide and
Press, Cambridge, Mass., 1962. conquer" technique and reeursively apply a merge
13. Minsky, M.L. A LISP garbage collector algorithm using procedure for two nonintersecting convex hulls. Since
serial secondary storage. Artificial Intelligence Proj. Memo 58
(rev.), Project MAC, M.I.T., Cambridge, Mass., Dec. 1963. any convex hull algorithm requires at least O(n log n)
14. Quam, L.H. Stanford LISP 1.6 manual. Artificial Intelligence operations, the time complexity of the proposed
Proj., Stanford University, Stanford, Calif., Sept. 1969. algorithms is optimal within a multiplicative constant.
15. Reboh, R., and Sacerdoti, E. A preliminary QLISP manual.
Tech. Note 81, Stanford Res. Inst. AI Center, Menlo Park, Calif., Key Words and Phrases: computational com-
Aug. 1973. plexity, convex hull, optimal algorithms, planar set of
16. Sacerdoti, E. The nonlinear nature of plans. Fourth Int. points, spatial set of points
Joint Conf. on Artificial Intelligence, Tbilisi, Georgia, U.S.S.R.,
1975, pp. 206-214. CR Categories: 4.49, 5.25, 5.32
17. Shannon, C.E. A mathematic theory of communication.
Bell System Tech. J. 27 (July 1948), 379-423.
18. Smith, D.H., Masinter, L.M., and Sridharan, N.S. Heuristic
DENDRAL: Analysis of molecular structure. In Computer Repre-
sentation and Manipulation of Chemical Information, W.T. Wipke,
S. Heller, R. Feldman, and E. Hyde, Eds., Wiley, New York,
1974.
19. Teitelman, W. INTERLISP Reference manual. Xerox Palo
Alto Res. Center, Palo Alto, Calif., 1974.
20. Van der Poel, W.L. A Manual of HISP for the PDP-9. Tech- 1. Introduction
nical U., Delft, Netherlands.
21. Weissman, C. LISP 1.5 Primer. Dickenson Pub. Co.,
Belmont, Calif., 1967. T h e d e t e r m i n a t i o n o f the c o n v e x hull o f a finite
22. Wilner, W.T. Design of the BI700. Proc. AFIPS 1972 FJCC, set o f p o i n t s is r e l e v a n t to several p r o b l e m s in c o m -
Vol. 41, AFIPS Press, Montvale, N.J., pp. 579-586. p u t e r graphics, design a u t o m a t i o n , p a t t e r n r e c o g n i t i o n
23. Zipf, G.K. Human Behavior and the Prhwiple of Least Effort.
Addison-Wesley, Reading, Mass., 1949. a n d o p e r a t i o n s r e s e a r c h : references [3, 4, 1 0 J - - j u s t
to cite a f e w - - d i s c u s s s o m e interesting a p p l i c a t i o n s in
these areas, which require c o n v e x hull c o m p u t a t i o n .
Copyright (~) 1977, Association for Computing Machinery, Inc.
General permission to republish, but not for profit, all or part
of this material is granted provided that ACM's copyright notice
is given and that reference is made to the publication, to its date
of issue, and to the fact that reprinting privileges were granted
by permission of the Association for Computing Machinery.
This work was supported in part by the Joint Services Elec-
tronics Program (U.S. Army, U.S. Navy, and U.S. Air Force)
under Contract DAAB-07-72-C-0259.
Authors' addresses: F.P. Preparata, Coordinated Science
Laboratory, University of Illinois, Urbana, IL 61801; S.J. Hong,
IBM Systems Product Division, Poughkeepsie, NY 12602. This
work was completed while the second author was on leave at the
University of Illinois.
~ °j 3
ejo the following lemma.
LEMMA 2. [8]. M2(n) >_ O(n log n).
We can now establish the result:
LEMMA 3. C2(n) >_ O(n log n) for n >_ 3.
PROOF. Let A = {Hi, " ' ' , an} be a planar set of
points, and assume that CH(A) = A: this means
that the points a l , . . . , a~ are the vertices of a convex
polygon and may be thought of as forming a circuit.
There are four points in A, ajo , a h , a h , and ah such
that x2(ajo ) = maxlx2(al), xl(ah) = m a x l x l ( a 0 ,
Fig. 2. Illustrationoftheplanar merge procedure. x2(ah) = mint x2(al), and xl(ai3) = mint xl(aO (see
Figure 1). These four points identify four "quadrants,"
x. -'~B and there is a quadrant which contains at least I]n]
/xO¢,
~ rB points. Without loss of generality, let the quadrant
determined by aj0 and a h contain s _> [¼n] points. All
~e_,~ ~----~bj* of these points are maxima in the sense defined above
and their identification, by L e m m a 2, requires time at
least O(s log s) = O(¼n log ¼n) = O(n log n). []
Thus we reach the following conclusion.
THEOREM. Ca(n) >_ Ca-l(n) >_ . . . >_ C2(n) >__
~hj* O(n log n).
~. x2
3. Merge Algorithm for Two-Dimensional Sets
the same computation model was adopted in [8] and The algorithm presented in this section finds the
[11]. ordered convex hull of a set of two-dimensional points. 1
We begin with a straightforward result. The ordered convex hull in two dimensions is not
LEMMA 1. Ca-l(n) < Ca(n) for d >_ 3. just the set of the vertices of the convex polygon repre-
PROOF. Let Aa-1 be a set of n (d -- 1)-dimensional senting the hull, but the sequence of the vertices on
points for d _> 3, and let Ad be the set of d-dimensional the b o u n d a r y of this polygon.
points obtained by extending each point v E Aa-1 Let A = ( a l , - . . , ap) and B = ( b l , . . . , bq)
with the same component va. Let CH(Aa) and CH(Aa_O be two convex polygons in the plane where (al, . . . ,
be the convex hulls of Aa and Aa-1. Clearly the pro- ap) is the (clockwise) sequence of the vertices in the
jection of CH(Ad) on the coordinates x ~ , . . . , xa-1 boundary of A, and similarly is (bl, . . . , bq) for B.
is CH(Aa-O. Thus to find CH(Ad-I), it suffices to We assume that xl(aO < X l ( b . / ) for i = 1 , . . . , p
find CH(Aa), whence Ca-l(n) <_ Ca(n). [] a n d j = 1, • • • , q, so that A and B are nonintersecting.
The next objective is to establish a lower bound By merging A and B we mean the determination
to the n u m b e r of operations C2(n) required by any of the convex hull CH(A, B) of A and B. The convex
algorithm for finding the convex hull of n points in polygon CH(A, B) is obtained by tracing the two
two dimensions. All known convex hull algorithms in tangents c o m m o n to A and B and by eliminating the
two dimensions obtain the so-called "ordered convex points of A and B which become internal to the re-
hull," i.e. the sequence of the vertices of the polygon suiting polygon (see Figure 2).
coinciding with the convex hull. However, the follow- We let la and ra be two points of A such that
ing result applies also to algorithms which simply x2(IA) = mint x2(aO and x2(rA) = maxix2(al); simi-
provide the identification of the hull points. The larly lB and rn are defined in B. F o r easy reference, we
bound is based on a previous result concerning maxima shall call the two tangents to A and B as left and right
of vectors [8, 11] and on a connection between the
two problems which Shamos attributes to A.C. Yao 1As mentioned in the Introduction, Shamos independently
([9, problem P35)]. It is therefore convenient to recall discovered several planar convex hull algorithms exhibiting the
the result on the maxima of two dimensional vectors. same worst-case time bound as ours [7]. Our algorithm is some-
Let A be a set of n two-dimensional vectors with real what more complicated to describe than those of Shamos; how-
ever, since it employs a different technique, it is in our opinion
components. A partial ordering is defined on A in a worth reporting.