Can You Spot the Sheep?¶

Fiddler¶

Two sheep are at two random points inside a square pen. They are munching grass and staring in two random directions. Each sheep has a field of view that’s 180 degrees.

What is the probability that they both see each other?

Solution¶

The sheep make a straight line. The probability that one sheep sees the other is $\frac{1}{2}$.

Answer¶

The probability that both sheep see each other is

$$\boxed{\frac{1}{4}}$$

Extra Credit¶

Now, three sheep are at three random points inside a square pen. They are munching grass and staring in three random directions. As before, each sheep has a field of view that’s 180 degrees.

What is the probability that all three sheep see each other?

Solution¶

The three sheep make a triangle.

The probability that a sheep sees the two other sheep is
$$\dfrac{\pi-\alpha}{2\pi},$$
where $\alpha$ is the angle between the two other sheep.

The probability all three sheep see each other is
$$\dfrac{(\alpha+\beta)(\beta+\gamma)(\gamma+\alpha)}{8\pi^3},$$
I ran code that

  1. Randomizes three coordinates, $0 \le (x,y) \le 1$.
  2. Calculates the sides lengths, and then angles of the triangle.
  3. Calculates the probability.

I ran the above 10 million times.

Answer¶

The probability the three sheep can see each other is

$$\boxed{N \approx 2.720}$$

Rohan Lewis¶

2026.06.01¶

Code can be found here.