Let and be two points on the Cartesian plane, where both the - and -coordinates of each are randomly and independently chosen from a continuous uniform distribution between and .
Denote by the probability that the square with and as opposite vertices is entirely within the square with vertices If can be expressed as , where and are coprime positive integers, find .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
This was a really enjoyable problem!
For convenience, I scaled the entire problem up 3 4 times, so that the smaller square has side 1 . The final answer, of course, doesn't change.
Let the two points, A and B , have coordinates a 1 , a 2 and a 3 , a 4 respectively. Note that a 1 , a 2 , a 3 , a 4 are uniformly random variables between 0 and 1 .
A natural first step is to evaluate the coordinates of the remaining two points, C and D .
The coordinates of the center of the square are 2 a 1 + a 3 , 2 a 2 + a 4 . To find, say, the x coordinate of C , one must add 2 ( a 1 − a 3 ) 2 + ( a 2 − a 4 ) 2 ⋅ c o s θ = 2 ( a 1 − a 3 ) 2 + ( a 2 − a 4 ) 2 ⋅ ( a 1 − a 3 ) 2 + ( a 2 − a 4 ) 2 ( a 4 − a 2 ) = 2 a 4 − a 2 to the center point's x coordinate, 2 a 1 + a 3 , as seen in the figure.
Finding the other three coordinates we need in a similar fashion, we find they are:
2 a 1 + a 2 + a 3 − a 4 , 2 a 1 + a 2 + a 4 − a 3 , 2 a 1 + a 3 + a 4 − a 2 and 2 a 2 + a 3 + a 4 − a 1 . In order for the formed square to be entirely within the one defined by 0 < x , y < 3 4 , these four values have to all be inside ( 0 , 3 4 ) .
We arrive at the following system:
⎩ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎧ 0 < a 1 + a 2 + a 3 − a 4 < 3 8 0 < a 1 + a 2 + a 4 − a 3 < 3 8 0 < a 1 + a 3 + a 4 − a 2 < 3 8 0 < a 2 + a 3 + a 4 − a 1 < 3 8 .
Note that only one of these four constraints can be broken at a time, as you can show easily (the difference between any two of the values is at most 2 and if we assume any two can be less than 0 or more than 3 8 , adding the two equations immediately leads to a contradiction). This will be important later.
Finding the probability density function for a 1 + a 2 + a 3 − a 4 is rather straightforward using c o n v o l u t i o n of PDF's:
P ( a 1 + a 2 + a 3 − a 4 = x ) = ⎩ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎧ 0 if x < − 1 6 ( x + 1 ) 3 if − 1 < x < 0 6 − 3 x 3 + 3 x 2 + 3 x + 1 if 0 < x < 1 6 3 x 3 − 1 5 x 2 + 2 1 x − 5 if 1 < x < 2 6 ( 3 − x ) 3 if 2 < x < 3 0 if 3 < x
So the probability a constraint is satisfied is:
∫ 0 3 8 P ( x ) = 9 7 2 9 3 1
Thus the probability a constraint is not satisfied is 1 − 9 7 2 9 3 1 = 9 7 2 4 1 .
Since only one of the constraints can be broken at a time, the probability any of them is broken is simply 4 ⋅ 9 7 2 4 1 = 9 7 2 1 6 4 , making our answer 1 − 9 7 2 1 6 4 = 9 7 2 8 0 8 = 2 4 3 2 0 2 .