Points on a Circle

5 min read Original article ↗

Thinking about my undergrad days studying math, I wish more problems were visualized like this

Here's a problem that shows up in math competitions and quant interviews:

Drop 4 points randomly on a circle. What are the chances they all land in the same half?

Try it a few times. Sometimes all four cluster into one semicircle, sometimes they spread out. What probability would you guess?

The obvious (wrong) answer

The circle is symmetric, so place one point anywhere and ask whether the other three land in the same semicircle. Each of those 3 points independently has a 1/21/2 chance of landing in that half, so the probability should be (1/2)3=1/8=12.5%(1/2)^3 = 1/8 = 12.5\%.

Test that reasoning here. Click on the circle to fix your point, then drop 3 more and see whether they land in your semicircle. Repeat it many times and watch the rate:

The rate hovers around 12.5%. The reasoning checks out for a fixed semicircle. But go back to the first demo and drop 4 points a bunch of times. The rate there is closer to 50%, not 12.5%. Something is off.

The semicircle is not fixed

We are not asking "do the points fit in this particular semicircle?" We are asking "do the points fit in any semicircle?" The semicircle gets to move. It can be anchored at whichever point makes it work.

Drop 4 points below and click each one to try anchoring a semicircle there. Notice that at most one anchor ever works:

Fixing the semicircle in advance ignores configurations where the points do cluster together, just not around the chosen anchor. The real question is whether some point is a valid anchor. That is a much more generous condition.

Anchoring at each point

Label the 4 points 1,2,3,41, 2, 3, 4 in clockwise order around the circle. For each point ii, define the event:

Ei="all other points lie in the clockwise semicircle starting at point i"E_i = \text{"all other points lie in the clockwise semicircle starting at point } i\text{"}

We already know the probability of each individual event. Once point ii is the anchor, each of the other N1N - 1 points independently has a 1/21/2 chance of landing in that semicircle:

P(Ei)=(12)N1P(E_i) = \left(\frac{1}{2}\right)^{N-1}

For 4 points, that is (1/2)3=1/8(1/2)^3 = 1/8, the same 12.5% we measured earlier. There is one such event for each of the NN points, so we have NN events each with probability 1/2N11/2^{N-1}.

The points all fit in some semicircle exactly when at least one of these events occurs. We want the probability of the union E1E2ENE_1 \cup E_2 \cup \cdots \cup E_N. If we could just add them, we would get:

N×12N1N \times \frac{1}{2^{N-1}}

For N=4N = 4: 4×1/8=1/24 \times 1/8 = 1/2. That matches our simulation. But we can only add probabilities when the events are mutually exclusive (no two can happen at the same time). Can two of these events overlap?

Only one anchor ever works

Go back to the anchor picker and try clicking different points. Whichever anchor's semicircle contains all the others, click the remaining points. Their semicircles always miss somebody.

Place points below and click one to see its semicircle. Watch the gap (the empty arc going counterclockwise from the farthest point back to the anchor):

When EiE_i occurs, all the points are packed into a 180° arc starting at point ii. The remaining arc (the gap going counterclockwise back to ii) is at least 180°. Now suppose some other point jj also tried to be an anchor. Point jj's clockwise semicircle is exactly 180°. But to contain all the points, it would need to bridge that gap of 180° or more while simultaneously containing point ii on the other side. A 180° arc cannot straddle a 180° gap. So EjE_j cannot hold.

Step through this argument on concrete points:

At most one EiE_i can occur at a time. The events are mutually exclusive, so we can add:

P(all in some semicircle)=i=1NP(Ei)=N12N1=N2N1P(\text{all in some semicircle}) = \sum_{i=1}^{N} P(E_i) = N \cdot \frac{1}{2^{N-1}} = \frac{N}{2^{N-1}}

For 4 points: 4/8=1/24/8 = 1/2. Exactly 50%.

Checking the formula

The formula predicts that any two points always fit in a semicircle (N=2N = 2: 2/2=100%2/2 = 100\%), three points fit 75% of the time, and the probability drops sharply as NN grows:

NNP(all in semicircle)P(\text{all in semicircle})Decimal
22/2=12/2 = 1100%
33/43/475%
44/8=1/24/8 = 1/250%
55/165/1631.25%
66/32=3/166/32 = 3/1618.75%
1010/51210/5121.95%

Adjust NN and run batches. The simulated rate converges to the prediction:

Smaller arcs

Nothing in the argument required the arc to be a semicircle. If the arc has length xx times the circumference (where x1/2x \leq 1/2), each anchor's event has probability xN1x^{N-1} instead of (1/2)N1(1/2)^{N-1}. Mutual exclusivity still holds because the gap is at least 1x1/21 - x \geq 1/2 of the circumference, too large for any other anchor's arc to bridge:

P(all N points in some arc of length x)=NxN1P(\text{all } N \text{ points in some arc of length } x) = N \cdot x^{N-1}

Adjust the arc size and number of points:

For example, 5 points all fitting in an arc covering 1/31/3 of the circumference: 5×(1/3)4=5/816.2%5 \times (1/3)^4 = 5/81 \approx 6.2\%.

Beyond the circle

The same decomposition works in higher dimensions. For NN random points on a sphere, the probability they all lie in a hemisphere is also N/2N1N / 2^{N-1}. The argument is identical: anchor a hemisphere at each point, observe that each event has probability 1/2N11/2^{N-1}, and verify that at most one anchor can work (the complementary cap is at least a full hemisphere, so no other anchor's hemisphere can straddle it). TODO: If I figure out how to add 3d visualizations to this website, I'll cover the 3D case