rec.puzzles Archive

Points are chosen uniformly at random on a circle until their convex hull contains the center.

probability/random.polygon.center New

New entry, edited from material collected for the archive and not yet in a released version.

Problem

Points are chosen uniformly at random on a circle until their convex
hull contains the center.  What is the expected number of sides of the
resulting polygon?

A process generates points randomly around the circumference of a
circle. The points are uniform on the circumference. The process stops
when the polygon with vertices defined by the points encloses the
center of the circle. How many sides does the expected polygon have?

No tricks here. The polygons are all convex.

-- Tony <ttw@lanl.gov>
Show solution
Neat puzzle.  I didn't find an elementary solution, or one that
generalizes nicely to random points on a sphere or higher dimension;
but the following, though not elementary (it uses calculus), is at
least simple:

To find the expected number of points (which is of course the same as
the number of sides), we determine for each n the probability that the
polygon has at least n points, and sum this from n=1 to infinity.  That
probability, in turn, is the probability that the first n-1 points do
*not* enclose the center in their convex hull.

For that to happen, the n-1 points must be contained in an arc of
length 2*pi*t for some t<1/2.  Let 2*pi*x be the shortest arc
containing the points.  We assume that n>2, else the probability is 1;
we also assume that the 1st and 2nd points are the left and right
endpoints of the arc -- since in fact any pair of points can play this
role we'll multiply at the end by (n-1)(n-2) to obtain the correct
probability.

Now the chance that the 1st and 2nd point form an arc of length between
x and x+dx is dx, and the chance that a further point falls in that arc
is x+c for 0<c<dx.  Thus the probability we're after is the integral
from 0 to 1/2 of (n-1)(n-2)x^(n-3) or (n-1)/2^(n-2).  Note that this
formula also holds in the excluded case n=2 (but not for n=1).

Therefore our sum is 1 + (1/1 + 2/2 + 3/4 + 4/8 + 5/16 + 6/32 + ...)
= 1 + (1+1/2+1/4+1/8+1/16+...)^2 = 1 + 2^2 = 5.

-- Noam D. Elkies <elkies@math.harvard.edu>

The analysis of Noam Elkies can be simplified in the following way.
Let c(n,t) be the probability that at least n points are needed that
are not contained in an arc of length 2*pi*t. So the first n-1 points
are contained in an arc of length 2*pi*t. Lets call this probability
p(n-1,t).

For t<=1/2 we have:
  p(n,t) = p(n,t|1) + p(n,t|2) + ... + p(n,t|n) = n*p(n,t|1)
where p(n,t|i) is the probability that the first n points are
contained in an arc of length 2*pi*t with the left endpoint is the
i-th point. This is the case as
  p(n,t|i,j) = 0    (for i != j)
which is the probability that the first n points are in an arc
beginning at the i-th and at the j-th point. This is not the case for
t>1/2. We see that
  p(n,t|1) = t^(n-1)   for 0<=t<=1 and n>=1.
Therefore we have
  p(n,t) = n t^(n-1) = d/dt t^n    for t<=1/2 and n>=1
  p(0,t) = 1.

The Expectation for the number of points that are not contained in an
arc of length 2*pi*t (for t<=1/2) is:

E(t) = c(1,t) + c(2,t) + c(3,t) + c(4,t) + ...
     = p(0,t) + p(1,t) + p(2,t) + p(3,t) + ...
     = 1 + (t^0 + 2t^1 + 3t^2 + 4t^3 + ...)
     = 1 + d/dt (t^1 + t^2 + t^3 + t^4 ...)
     = 1 + d/dt 1/(1-t)
     = 1 + 1/(1-t)^2

The special case t=1/2 gives E(1/2) = 5.

Question: What is E(t) for t>1/2?
  E.g. E(2/3) is the expected waiting time until the polygon contains
  the central circle of half the diameter.

Discrete Version:
-----------------
The random process generates points at the vertices of a regular
k-gon.  Let p(n,k,t) be the probability that the first n points
generated for the k-gon are contained in t vertices in a series.  If we
define p(n,k,t|i) in the same way we will have more complicated
formulas as p(n,k,t|i,j) is not zero as the probability that the i-th
and the j-th point are equal is not zero.  Therefore define p(n,k,t|i)
as the probability that the first n points generated for k-gon are
contained in set of vertices {i, i+1, ..., i+t-1} (cyclic numbering)
and vertex i is selected.
  p(n,k,t|i) = (t/k)^n - ((t-1)/k)^n   independent of i.
Then we have for 2t - 1 <= k and n>=1
  p(n,k,t) = k p(n,k,t|1) = k ((t/k)^n - ((t-1)/k)^n)
  p(0,k,t) = 1.

The expected waiting time for 2*t - 1 <= k is therefore:

E(k,t) = p(0,k,t) + p(1,k,t) + p(2,k,t) + p(3,k,t) + ...
       = 1 + k \Sigma_{n>=1} (t/k)^n - ((t-1)/k)^n
       = 1 + k \Sigma_{n>=0} (t/k)^n - ((t-1)/k)^n
       = 1 + k ( \Sigma_{n>=0} (t/k)^n - \Sigma_{n>=0} ((t-1)/k)^n )
       = 1 + k ( 1/(1 - t/k) - 1/(1 - (t-1)/k) )
       = 1 + k^2/((k-t)(k-t+1))

[Editor: the summation index was written k instead of n in the four
sums above]

Now evaluate the special cases:

case k odd:
  E(2m + 1, m + 1) = 5 + 1/(m(m+1))

case k even: (the border is allowed)
  E(2m, m) = 5 - 4/(m+1)

case k even: (the border is not allowed)
  As in this case 2t - 1 <= k is not satisfied, the p(n,k,t|i,j) have
  to taken into account. In this case p(n,2m,m+1|i,i+m) have to be
  subtracted to get p(n,2m,m+1).  The final result is
  E(2m, m+1) = 5 + 7/(2m-2) - 1/((2m-2)(2m-1))

The special case E(k, k-1) is covered by the coupon collector problem
and can be checked in this way. (E(k,k) is infinity by definition.)

  E(2,1) = 2*H(2) = 3
  E(3,2) = 3*H(3) = 5 1/2
  E(4,3) = 4*H(4) = 8 1/3

where H(n) is the harmonic series 1 + 1/2 + 1/3 + ... + 1/n.

Question: What is E(k,t) for 2t - 1 > k?

-- Torsten Sillke <Sillke@mathematik.uni-bielefeld.de>