# 2015 AMC 10A 2015 problem 25

I came across this problem when reviewing previous AMC tens.

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 $1/2$ is $(a-b\pi)/c$, where a, b, c are positive integers with gcd(a,b,c) = 1. What is $a+b+c$?

I know two solutions for this problem can be found on AoPS. In particular, I was looking at the second solution. I don't get how they get that the region has an area of $1/4$, or how they get the areas for the other regions.

Here is a link to the problem: http://artofproblemsolving.com/wiki/index.php/2015_AMC_10A_Problems/Problem_25

Thanks

Let's take the first area. If $a,b$ lie both on x-axis, the distance between them is $|b-a|$. However, I agree with the authors, that it's hard to see when $|b-a|>1/2$ without some graphics. So let's map them into a point in the unit square. The notation is slightly abused, but in fact we map points $(a,0),$ $(b,0)$ to a single point $(a,b)$ and check for which $(a,b)$ belonging to the unit square the desired inequality holds. The picture is as follows (the horizontal axis is for $a$, the vertical is $b$) and it is quite clear, the area is $1/4$:
The second case is analogous. You know the distance betwen points $(a,0)$ and $(0,b)$ is $\sqrt{a^2+b^2}$. To answer the question when $\sqrt{a^2+b^2}>1/2$ graphically, you need again to map the points into a single $(a,b)$ point in the unit square and get the following picture: