On the modality of convex polygons
Discrete Comput Geom
On the Modality of Convex Polygons
0 Computer Science Department, Washington State University , Pullman, WA 99164-1210 , USA
Under two definitions of random convex polygons, the expected modality of a random convex polygon grows without bound as the number of vertices grows. This refutes a conjecture of Aggarwal and Melville.
Algorithms in computational geometry tend to be quite difficult, and to involve
a large n u m b e r o f special cases. Some o f the cases might be very rare. Algorithm
design can be simplified by either excluding rare and difficult cases, o r b y designing
an efficient algorithm for the c o m m o n cases, and combining it with a less efficient
algorithm for the rare cases. The problem is to recognize the rare cases.
For algorithms which operate on convex polygons, one useful condition on
the input is unimodality. The modality of a vertex o f a polygon is the n u m b e r of
local m a x i m a in the sequence o f distances from that vertex to the other vertices,
in their natural order around the polygon. The modality of a polygon is the
m a x i m u m of the modalities of its vertices. A polygon is unimodai if its modality
is 1; otherwise, it is multimodai. Figure 1 shows polygons o f modality 1 and 2.
When drawing a " r a n d o m " convex polygon, it is quite c o m m o n to find that
the selected polygon is unimodal. In fact, Dobkin and Snyder [
] and Snyder
and Tang [
] each assume that all convex polygons are unimodal in designing
algorithms to find the diameter o f a convex polygon. The fact that there exist
multimodal convex polygons, pointed out by Avis et al. [
], thus at least initially
seems counterintuitive. Aggarwal and Melville [
] conjecture that, under any
reasonable definition o f a r a n d o m convex polygon, the probability that a r a n d o m
convex n-gon is unimodal tends to 1 as n ~ oo. (They do not say just what a
reasonable definition would be.) I f true, the conjecture would imply that
multimodality is one o f those rare features which it might pay to ignore.
Aggarwal and Melville [
] also give a linear-time algorithm to determine the
modality o f a convex polygon. Using that algorithm, an algorithm which runs in
linear time, but assumes a unimodal input, can be used to construct an algorithm
which is correct for any convex polygon, but runs in linear time on unimodal
inputs. An example is the linear-time all-furthest-neighbors algorithm o f Toussaint
] for unimodal convex polygons. The conjecture o f Aggarwal and Melville, if
true, would suggest that all-furthest-neighbors for convex polygons can be solved
in linear time for the expected case input. (In fact, it can be solved in linear time
for any convex polygon, by the algorithm o f Aggarwal et al. [
This paper refutes the conjecture for two definitions of random convex
polygons, and in fact shows that the probability that a random convex polygon is
unimodal approaches zero quite rapidly. Thus, algorithms which perform well
on unimodal convex polygons can, unfortunately, be expected to be weak. On
the other hand, the expected modality is not large. It may be that algorithms can
exploit the fact that an input has a small modality.
The two chosen definitions o f a random convex polygon are (1) the convex
hull o f n points drawn uniformly from a disk in the plane, and (2) the convex
hull of n points drawn from a two-dimensional normal distribution. The expected
modality is O(log n / l o g log n) in case (1) and O(log log n/log log log n) in case
(2). Interestingly, the expected number of vertices on the convex hull is O(n I/3)
in case (1) and O(log ~/2 n) in case (2) [
]. So in the cases studied here, the
expected modality is 19(1og h / l o g log h), where h is the expected number of hull
The proofs of our results apply only to very large n. What of moderate size
n? Table 1 was computed using a nonlinear additive feedback pseudorandom
number generator, with 1000 samples generated for each n. Note that n is the
number o f randomly selected points. The convex hulls generally had considerably
fewer than n vertices. For n = 1024, the convex hulls averaged 34 vertices in the
uniform case, and 11 vertices in the normal case. The table indicates that convex
hulls of modality 2 (which tend to be somewhat oblong) are prevalent for moderate
size point sets. No convex hulls of modality exceeding 3 were generated.
2. Lower Bounds on Expected Modality
This section introduces the basic techniques, and establishes lower bounds on
the expected modality. The proofs are fairly crude, but relatively simple. All
logarithms are base e, and all angles in radians.
Theorem 1. When n points are drawn at random uniformly from a disk in the
plane, the expected modality of their convex hull is f](log n/log log n) and the
probability that their convex hull is unimodal approaches 0 as n --)oo.
Proof Assume that n is very large. Write x ~ y when l i m , ~ y / x = 1. Assume
for convenience that the disk is centered at the origin o f a Cartesian coordinate
system, and has unit radius. The measure o f a region is the probability that a
random point falls in that region, which in the present case is the area divided
Let m ~ n 1/3 be an even integer. As will become apparent, it is no coincidence
that the expected number o f vertices on the convex hull o f the n points is O(m)
]. Inscribe a regular m-gon in the boundary o f the disk, as illustrated in
Fig. 2(a). Call each connected region of the disk strictly outside the m-gon an
ear. Let ~o= 2 r r / m be the angle defined by an ear. The dimensions o f an ear are
approximately ~ox ~02/8. For future reference, note that if the disk has radius R,
then each ear has area ~oR2/2- R ~cos(~o/2) sin(~o/2) = tp3R2/12+ O(~S). For the
unit disk, each ear has area A e~r- ~o3/12 = t9( 1 / n ) and measure ~ 3/12 ¢r = 6.6/n.
b l u ~ ~ ~
~ a r c
Fig. 3. (a) Angle c~,(b) the right-handear.
Intuitively, with fairly high likelihood points in an ear will be hull vertices which
are local m a x i m a for points in the ear on the opposite side o f the disk.
We will bound the probability that the modality is > k - 1 for arbitrary k,
1 < k < m. Choose two ears on opposite sides o f the disk. Rotate the disk so that
the two ears are at the left and right sides. C o l o r a region near the center o f the
left-hand ear blue, as indicated in Fig. 2(b). The blue region has depth d = ~p/12k 3,
width w = 1 - c o s ( q f f 2 ) = ~p2/8+ O0p4), and area - w d = O(1/nk3).
Cut the right-hand ear with an arc A o f radius r ~ 2, centered on the point
( - 1 , 0), as illustrated in Fig. 2(b). Arc A defines an angle o f 0 = q~/2+ O(~03).
Cut angle 0 into k equal sectors, as shown in Fig. 3(a) for k = 3, each sector an
angle o f a ~ ~o/2k. In Fig. 3 angle a is greatly exaggerated for clarity. The plan
is to b o u n d below the probability that there is a single hull vertex in the blue
region, a n d between each two adjacent sectors there is a single hull point which
is a local m a x i m u m for the blue point. To that end, we will define green and
yellow regions in the right-hand ear, as illustrated in Fig. 3(b) for k = 2, where
the green regions will hold local minima and the yellow regions will hold local
m a x i m a for a point in the blue region.
Cut each angle a into six parts, as illustrated in Fig. 4(b). The region marked
green is delimited by a section of arc A o f angle a / 3 and its chord, and excludes
its boundary. In all, there are k green regions, and each has area ~(a/3)3(r2/12) =
arc A t ~ "
Fig. 4. (a) Proof of Claim 1, (b) yellowand greenregions.
The arc A' drawn outside arc A in Fig. 4(b) is concentric with A, and passes
through the intersection of lines l~ and /2. We easily compute the separation a
o f the two arcs from r c o s ( a / 6 ) = ( r + a ) c o s ( a / 3 ) , or a ~ ot2/12 ~ kd~o/4. There
are k - 1 yellow regions, one of which is illustrated in Fig. 4(b). I f the arc boundary
o f a yellow region is replaced by its chord, a yellow region has area
~ ( r s i n ( a / 6 ) ) ( r s i n ( a / 6 ) t a n ( a / 2 ) ) ~ a3/18.
The actual yellow region has area ~cr3118 - ot 3 / 8 1 = (c¢3). Although the diagram
is badly distorted, it is easy to see that the green and yellow regions must lie
entirely within the ear. 
Claim I. Let B, G, and Y be points in the blue, green, and yellow regions,
respectively. Then distance B G is less than distance BY.
Proof. Let B = (x, y) and let Q = (x, 0) be the projection o f B onto the x-axis.
See Fig. 4(a), Let s = 1 - x be the distance from Q to arc A along the x-axis. Arc
A is very nearly centered on Q, and it is easy to show that for any point P on
arc A, distance Q P < s + o(~o4). But B P - QP <-( d / 2 ) sin 3' = d ¢ / 8 + O(~p4),
where y = t p / 4 + O ( ~ o 3 ) . Since the green regions are inside arc A, B G -<
s + d~o/8 + O(~4). Since the yellow regions are outside arc A', similar reasoning
gives B Y > - s + a - d ~ o / 8 - O ( ~ o 4 ) . But a~kdq~/4>-dq~/2. So B Y - B G >
a - d~o/4 - 0(~o') > O. 
Say that a collection o f n points in the disk is bad if exactly one point falls
in each o f the blue, green, and yellow regions, and no other points fall in either
o f the two ears under consideration. Notice that each o f the 2k points in the
green, yellow, and blue regions of a bad set o f points must be vertices of the
convex hull. By Claim 1, each o f the yellow points must be local m a x i m a for the
blue point, and the convex hull has modality at least k - 1.
Since each ear has measure O ( 1 / n ) , and each of the blue, green, and yellow
regions has measure @(a 3) = O(1/nk3), the probability that a random set of points
in the disk is bad is asymptotically
for some positive constants ct, c2, and c3. Let Bi be the event that a r a n d o m set
o f n points is bad for the ith pair o f ears, i = 1 , . . . , m / 2 , and let Pk=
Pr(/~ r~. • • n/~,,/2) > Pr(the convex hull has modality < k - 1). Since m <<n,
Bt . . . . , Br,/2 are very nearly independent. So Pk <(1--(c4/k4)2k) ra/2 for some
constant c4 > O. For any fixed k, pk ~ 0 as n --*oo. In fact, Pk ~ 0 provided
- 2 / \ F ]
-~oo as n ~ o o .
That happens for k ~ log m / 9 log log m, so Theorem 1 is established.
In the case o f a two-dimensional normal distribution, the expected n u m b e r o f
points on the convex hull is only O(log ~/2 n) [
], so the expected modality
must be lower than in the uniform case. Nevertheless, a very similar p r o o f applies.
Theorem 2. When n points are drawn from a two-dimensional normal distribution,
the expected modality o f their convex hull is l)(log log n / l o g log log n) and the
probability that their convex hull is unimodal approaches 0 as n ->oo.
Proof Let ~ p ( x , y ) = ( 1 / 2 7 r ) e -(x2+y2)/2 be the normal density function, and
~p(r) = (1/2~r) e -r2/2 be its polar version. Let b ~ (2 log n) 1/2 be the solution to
( l / b ) e -b2/2 = 1/n, and let Ph = V-~ ~cbo ~(X, y) dx dy be the measure of the
halfplane to the fight of the line x = b. It is important that Ph be quite small.
Claim 2. Ph = O ( 1 / n ) .
Proof Let z = (2 log n) 1/2. We can ignore those points at a distance more than
z from the origin, since their total measure is J~ 27rnp(r) dr = 1/n. The remainder
p~, of Ph can be expressed as an integral in polar coordinates as p ~,< S~ 2 rO¢(r) dr,
where 0 = c o s - l ( b / r ) . For r < z and n large, 0 is small. Let t = r2/b 2= 1/cos 2 0 >
1 + 02. The integral becomes
But b( t - 1 ) l / 2 <- k for t <- l + k2/ b 2, so
Ph <2~r 1
e-b2'/2(t--1) 1/2 dt.
y, -b-k fl+k2/b2 e -b2t/2 dt
P~' < k~l 2Ir .; t+(k_l)2/b2
< ~ 1 e-b2/2 ~ k e -(k-1)2/2
b'rr k ~ l
for some positive constant c. That establishes the claim.
N o w consider a circle C, centered at the origin, o f radius R = b + 1/b. Those
parts o f the interior o f C which lie to the fight of the line x = b and to the left
o f line x = - b will play the role o f an ear, as in the preceding proof. Let Pear be
the measure o f an ear.
Claim 3. p e . r = f l ( 1 / n ) .
Proof. On the circle of radius R, the probability density is ¢ ( R ) >
(1/2~r) e-b2/2-2=O(b/n), by the choice of b, and the density over the ear is
greater than that. The ear subtends an angle of 0 - v ~ / b , so the ear has area
03R2/12 = O ( 1 / b ) , and measure at least (03R2/12)~p(R) = f l ( 1 / n ) . 
Now choose m to satisfy 27r/m = 0 - ~/2/b, which implies that m = O(log I/2 n).
Round m to the nearest even integer.
The remainder of the p r o o f is almost identical to that of Theorem 1. I f the
two ears under consideration are aligned so that their chords are vertical, then
in addition to the previous conditions, a bad set o f points must have no points
to the right o f the line x = b, or to the left o f the line x = - b , so that the points
in the green, yellow, and blue regions must be on the convex hull. By Claim 2,
that happens with constant positive probability. The previous p r o o f assumed that
the probability density was uniform. Here, the density varies only by a constant
factor over an ear, which is sufficient for the p r o o f to carry through. The blue,
green, and yellow regions occupy the same fraction of the ear as before, and
have measure ft(1/nk3), by Claim 3.
As before, the result is that the expected modality is lI(log m / l o g log m).
However, in this case that is II(log log n / l o g log log n). 
Upper Bounds on Expected Modality
Theorem 3. When n points are drawn at random uniformly f r o m a disk in the
plane, the expected modality o f their convex hull is O(tog n / l o g log n).
Proof. The p r o o f is similar in spirit to that o f the lower bound; it shows that
the lower bound construction is nearly optimal. Let m = (~r2n/4 log n) I/3 and
a =2Trim, and assume that the disk has radius 1. An a - e a r is a region o f the
disk outside some chord subtending angle a. Figure 5(a) shows an a-ear, to the
right o f line i.
With probability approaching 1 as n -->oo, no a-ear is empty.
Proof. I f any a - e a r is empty, then one of the ears associated with some fixed
inscribed regular 2m-gon must also be empty. Each ear associated with a 2m-gon
has measure - ( a / 2 ) 2 / 1 2 ~ r ~ log n/3n. So the probability that any a - e a r is empty
is asymptotically less than 2 r e ( l - l o g n / 3 n ) " < 2m e -1°8~/3 = (2zr2/log n)l/3,
which a p p r o a c h e s 0 as n -->co. 
We p r e s u m e that no a - e a r is empty. Hence, every hull point lies within a b a n d
between circles o f radius R = c o s ( a / 2 ) and radius 1. Let Pb~,~d= 1 -- R 2~ a 2 / 4 =
O(log 2/3 n / n 2/3) be the measure o f that band.
Let P be an arbitrary hull point. Let Q be another hull point which is a local
m a x i m u m for P, and let I be the line through Q perpendicular to line PQ, as
shown in Fig. 5(a). In the figure, P is shown to lie on the boundary, which for
the present purposes is accurate. The part o f the disk on the opposite side o f 1
from P must be empty, since otherwise Q could not be a local m a x i m u m for P.
So if Q does not lie in the 2 a - e a r directly opposite P, then there must be an
empty a - e a r , as shown in Fig. 5(a), which is presumed not the case. The measure
o f a 2 a - e a r is Pe~r~ (2a)3/12 = O(log n / n ) .
Suppose a point P has been chosen, along with k other points Q~ . . . . , Qk.
Those k points can only be local maxima for P if there is a local m i n i m u m hull
point between adjacent pairs o f local maxima. The probability o f getting the
necessary local minima is maximized when Q~ . . . . , Qk lie equally spaced on an
arc A centered at P, as shown in Fig. 5(b) for k = 3. Between each adjacent pair
Qi and Qi+~ is a red region, where a local m i n i m u m point for P should lie. Since
Q ~ , . . . , Qk all lie in the 2 a - e a r opposite P, and P is near the boundary, the angle
fl at P subtended by the portion of arc A between adjacent local m a x i m a is
fl ~ a / ( k - 1), and the area of each red region is ~fl3/3. The measure of each
red region is thus Pmln~f13/3~r = ® ( m - 3 ( k - 1) -3) = O(log n / n k 3 ) . Considering
all possibilities, the probability Pk that, for some hull point P, there are points
Q~ . . . . , Qk in the opposite 2 a - e a r , with a local m i n i m u m between each adjacent
Pk < npband n -k 1) pk~r(n -- k - .1,)k - I P mk-i~n
cknl/a(log n) :k
( k -- 1) 4k-3
for s o m e constant c > 0. Choosing k = c' log n / l o g log n for c ' > ~ causes Pk to
a p p r o a c h 0 as n ~ oo, a n d to do so at a superexponential rate in k. It follows that
the expected modality is O(log n / l o g log n). 
Again, the p r o o f for points drawn from a normal distribution is very similar
to the case o f uniformly distributed points in a disk.
Theorem 4. W h e n n points are drawn at random f r o m a two-dimensional normal
distribution, the expected modality o f their convex hull is O(log log n / l o g log log n).
Proof. This p r o o f is similar to the preceding one, but is complicated slightly by
the fact that the probability density is no longer uniform over an ear. Let
A = 2~re log ~/2 n log log n and R = (2 l o g ( n / A ) ) t/2. Let C be the circle of radius
On the Modalityof ConvexPolygons
R, centered at the origin. An R-half-plane is any half-plane not including the
origin whose boundary line is tangent to circle C.
With probability approaching 1 as n ~ oo, no R-half-plane is empty.
Proof. Let r = ( 2 1 o g ( n / A ) + 2 ) 1/2, and let C ' be a circle o f radius r, concentric
with C. Let a be the angle subtended by a chord o f circle C', tangent to circle
C, as shown in Fig. 6(a). One o f 2~r/a f a n s is shaded in Fig. 6(a). If any
R-half-plane is empty, then one o f those fans is empty. Note that cos a = R / r
1 - 1/2(log n - l o g A), from which it follows that a ~ 1/log~/2n. The measure of
the region outside circle C ' is S~ 21rs~o(s)ds = e -r2/2= A/en. So the measure of
each fan is aA/2~ren, and the probability that any fan is empty is less than
( 2 ~ r / a ) ( 1 - a A / 2 z r e n ) " < (2~r/a) e -'~x/2~e, which approaches 0 as n ~ co. 
Claim 6. With probability approaching 1 as n ~, oo, all hull points lie in a band
whose boundaries are circles C and C", where C" has radius S = (2 log(An)) 1/2,
a n d is concentric with C. That band has measure Pband< e -R 2/2 = A / n.
Proof. If any hull point lies inside circle C, then some R-half-plane must be
empty, which is presumed not the case. The probability that any point at all lies
outside circle C" is < n e -s2/2= l/A, which approaches 0 as n-->oo. 
Let P be an arbitrary hull point, without loss o f generality on the x-axis, and
let Q be a local maximum hull point for P. Then Q must lie within the shaded
area of Fig. 6(b), which we call an ear. The ear consists o f all points Q in the
band such that a line through Q, perpendicular to PQ, does not intersect circle
C. Otherwise, either Q could not be a local maximum for P, or there would be
an empty R-half-plane. As illustrated, the angle subtended by the ear is 48.
Approximately solving cos/3 = R / S = ((log n - l o g A)/(log n + log A))1/2 gives
/3 ~ (2 log A/log n) ~/2.
The measure of an ear is p~a,= O( A/ n l o g I/2 n ) .
Proof. At an angle o f ot above horizontal, the inner boundary o f the ear is at a
distance o f R + x from the origin, where R / ( R + x ) = c o s 0 and 0 ~ o t / 2 , from
which it follows that x > Ra2/lO. So
P~ar< 2 ~ 0 t3 f r_f_e-'2/2 dr dot
3 ~+x 2~r
e -(R+x)2/2 dc~
< 27rn I:
<(-~ e -R2/2
e - R ~ / l ° da
e -s2a2/lO da
N o w we give something away• Suppose that the probability density is uniform
over the ear, taki•ng on a value o f e --R2 /2= A/n. Then the best way to place k
points in the ear, in the hope that they might be local maxima for P, is to distribute
them evenly on an arc centered on P. Assuming that the arc can span the entire
length o f the ear, which is optimistic, each region where a local minimum hull
point must fall has measure Pmin~ ( 2 f l / ( k - 1))3(4R2/12)(A/n). Substituting/3
(2 log A/log n) 1/2, A = 27re log ~/2 n log log n and R ~ (2 log n) 1/2 gives Pmin=
O((Iog log n ) 5 / 2 / n ( k - 1)a). As in the case o f a uniform distribution, the
probability Pk that the modality is at least k satisfies
/ n - l \ k
Pk <nPband~ k ) p e a r ( n - k -- .I,)k - , Pmk-i n,
< (log n)I/2ck(log log n) 3"Sk-L5
( k - 1)"k-a
for some constant c. But Pk ~ 0 as n ~ oo provided k -> a log log n / l o g log log n,
and a > 1. Moreover, Pk decreases superexponentially in k, so the expected value
of k is O(log log n / l o g log log n), and Theorem 4 is established. 
1. A. Aggarwai , M. Klaw¢, S• Moran, D. Shor , and R. Wiiber . Geometric applications of a matrix searching algorithm• In Proc. 2nd ACM Symposium on Computational Geometry , pp. 285 - 292 , 1986 .
2. A. Aggarwal and R. C. Melville . Fast computation of the modality of polygons . J. Algorithms , 7 : 369 - 381 , 1986 .
3. D. Avis , G. T. Toussaint , and B. K. Bhattacharya . On the multimodality of distance in convex polygons . Comput. Math. AppL , 8 ( 2 ): 153 - 156 , 1982 .
4. D.P. Dobkin and L. Snyder . On a general method for maximizing and minimizing among geometric problems . In Proc. 20th Annual Symposium on Foundations of Computer Science , pp. 7 - 19 , 1979 .
5. F. P. Preparata and M. I. Shamos. Computational Geometry . Spdnger-Verlag, New York, 1985 .
6. H. Raynaud , Sur I'enveloppe convexe des nuages des points al6atoires darts R" . Z AppL Probab ., 7 : 35 - 58 , 1970 .
7. W. E. Snyder and D. A. Tang . Finding the extrema of a region . IEEE Trans. Pattern Anal Mach. Intell. , 2 : 266 - 269 , 1980 .
8. G. T. Toussaint . Complexity, convexity, and unimodality, lnternat. Z Comput. Inform. Sci. , 13 ( 3 ): 197 - 217 , 1984 .