# Chances of avoiding the diagonal

A circle of radius 1 is randomly placed in a rectangle $ABCD$ so that the circle lies completely inside the rectangle. Length and breadth of rectangles are 36 and 15 respectively.

Let the probability that the circle will not touch diagonal $AC$ be $\dfrac mn$. Here $m$ and $n$ are relatively prime positive integers.

Find the value of $m + n$.

I think this can be done by calculating area. But I am unable to get it how. Also the diagonal length will be 39 .

How can I achieve this?

-
Out of curiosity, where does this problem come from? Asking for the sum of numerator and denominator of a rational number does sound like a rather strange requirement for a real-world problem. – MvG Oct 23 '12 at 6:01
Found this problem in one PnC book. – vikiiii Oct 23 '12 at 16:32

We will use the diagram drawn by MvG. The center of the circle can lie only within the yellow region. (Note that there is also a yellow region above the diagonal.) Let the base of the rectangle lie along the $X$ axis, while the height lie along the $Y$ axis.

The equation of the line separating the yellow and green region and parallel to the diagonal is of the form $$\dfrac{x}{36} + \dfrac{y}{15} = \alpha$$ Since the distance between the line and diagonal should be $1$, we get that $$\dfrac{1-\alpha}{\sqrt{\dfrac1{36^2} + \dfrac1{15^2}}} = \dfrac{180}{13}(1-\alpha) = 1 \implies \alpha = \dfrac{167}{180}$$ The coordinates of the yellow triangle are $$(1,27/2), (1,1), (31,1)$$ The area of this triangle is $\dfrac{375}2$. Hence, the desired probability is $$\dfrac{2 \times \dfrac{375}2}{(36-2) \times (15-2)} = \dfrac{375}{442}$$

-

At first I was just guessing, or rather letting Cinderella do the guessing for me:

But the magic behind this guess that attempts to turn a floatingpoint number back into something like a rational is somewhat obscure (although the continued fraction in there are a nice subject). The idea is clear: all possible locations are the green area inset by 1 at every boundary. So that's $34\times 13$. The area where the circle does not touch is made up by two symmetric copies of the yellow triangle, which was measured in this image but which should be computed manually.

When doing manual computation, you can use the fact that all input lengths including the diagonal are rational (and in fact integers), so all trigonometric functions computed from these will be rational as well. You can compute the result stated above as

$$\frac{ \left(36 - 1 - \frac{36}{15} - \frac{39}{15}\right) \cdot \left(15 - 1 - \frac{15}{36} - \frac{39}{36}\right) }{(36 - 2) \cdot (15 - 2)} = \frac{375}{442}$$

The parenthesized expressions in the numerator correspond to the legs of the yellow triangle. The first term is the corresponding rectangle side. The second corresponds to the one unit inset at the bottom left corner. The third removes the part on the wrong side of the diagonal. And the fourth represents the distance between the diagonal and the corner of the triangle, corresponding to the line one unit apart from the diagonal.

To understand the third and fourth term a little bit better, let us zoom in on the bottom right corner.

There you see two congruent triangles, both similar to one half of your input rectangle. Both are scaled such that one leg has a length matching the radius of your disk.

The whole concept of comparing areas assumes that the discs are placed uniformly over all possible positions, which strictly speaking isn't stated in the question.

-
What is cindrella and how does he guess it? – vikiiii Oct 23 '12 at 16:32
@vikiiii: Cinderella is a powerful interactive geometry application, which has a buit-in scripting language that has guess as one of its functions. Both “Cinderella” and “guess” are links in my answer, so follow these for more information. – MvG Oct 23 '12 at 17:13
no problem.Thanks for the answer. – vikiiii Oct 23 '12 at 17:17