# Difference between revisions of "2015 AMC 12A Problems/Problem 23"

## Problem

Let $S$ be a square of side length 1. Two points are chosen independently at random on the sides of $S$. The probability that the straight-line distance between the points is at least $\frac12$ is $\frac{a-b\pi}{c}$, where $a,b,$ and $c$ are positive integers and $\text{gcd}(a,b,c) = 1$. What is $a+b+c$?

$\textbf{(A)}\ 59 \qquad\textbf{(B)}\ 60 \qquad\textbf{(C)}\ 61 \qquad\textbf{(D)}\ 62 \qquad\textbf{(E)}\ 63$

## Solution

Divide the boundary of the square into halves, thereby forming 8 segments. Without loss of generality, let the first point $A$ be in the bottom-left segment. Then, it is easy to see that any point in the 5 segments not bordering the bottom-left segment will be distance at least $\dfrac{1}{2}$ apart from $A$. Now, consider choosing the second point on the bottom-right segment. The probability for it to be distance at least 0.5 apart from $A$ is $\dfrac{0 + 1}{2} = \dfrac{1}{2}$ because of linearity of the given probability. (Alternatively, one can set up a coordinate system and use geometric probability.)

If the second point $B$ is on the left-bottom segment, then if $A$ is distance $x$ away from the left-bottom vertex, then $B$ must be at least $\dfrac{1}{2} - \sqrt{0.25 - x^2}$ away from that same vertex. Thus, using an averaging argument we find that the probability in this case is $$\frac{1}{\frac{1}{2}^2} \int_0^{\frac{1}{2}} \dfrac{1}{2} - \sqrt{0.25 - x^2} dx = 4\left(\frac{1}{4} - \frac{\pi}{16}\right) = 1 - \frac{\pi}{4}.$$

(Alternatively, one can equate the problem to finding all valid $(x, y)$ with $0 < x, y < \dfrac{1}{2}$ such that $x^2 + y^2 \ge \dfrac{1}{4}$, i.e. (x, y) is outside the unit circle with radius 0.5.)

Thus, averaging the probabilities gives $$P = \frac{1}{8} \left(5 + \frac{1}{2} + 1 - \frac{\pi}{4}\right) = \frac{1}{32} (26 - \pi).$$

Our answer is $\textbf{(A)}$.

## Case Solution

Fix one of the points on a SIDE. There are three cases: the other point is on the same side, a peripheral side, or the opposite side, with probability $0.25, 0.5, 0.25$, respectively.

Opposite side: Probability is obviously $1$, no matter what.

Same side: Pretend the points are on a line with coordinates $x$ and $y$. If $|a-b|<=\frac{1}{2}$, drawing a graph will give probability $\frac{1}{4}$.

Peripheral side: superimpose a coordinate system over the points; call them $(x, 0)$ and $(0, y)$. WLOG set $x, y >= 0$ and $x, y <= 1$. We need $0.25x^2+0.25y^2>0.25$, and drawing the coordinate system with bounds $(0, 0), (1, 0), (0, 1), (1, 1)$ gives probability $1-\frac{\pi}{16}$ that the distance between the points is $>0.25$.

Adding these up and finding the fraction gives us $\frac{1}{32} (26 - \pi)$ for an answer of $\boxed{A}$.