Consider a square with vertices
(
0
,
0
)
,
(
0
,
1
)
,
(
1
,
1
)
and
(
1
,
0
)
. Choose a random point within the square and draw a line segment from it to
(
0
,
0
)
. Next, choose a second random point within the square and draw a line segment from this point to
(
1
,
0
)
.
The probability that these two line segments intersect is b a , where a and b are positive coprime integers. Find a + b .
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.
I didn't manage to solve this problem and I was hoping someone would post a non-calculus solution. Since I didn't see one, I tried solving this problem myself. The algebra was a bit ugly so I'll just explain my process.
Given any point ( a , b ) in the square, you can find the probability that the other point you draw will cause the line segments to intersect. If you draw a line from ( 0 , 0 ) and ( 1 , 0 ) to the point, those 2 lines will split the square into 4 regions. If the other point is chosen in the lower or upper regions of the square, the line segments can't intersect. If the point is chosen in the side regions of the square, the line segments have a probability of 2 1 of intersecting (depending which vertex you draw each point to).
Consider a unit square centered around the origin (so vertices at ( ± 0 . 5 , ± 0 . 5 ) ). Then consider the point ( a , b ) with a < b in the first quadrant. When you find the probabilities for each of the following points ( a , b ) , ( − a , − b ) , ( b , − a ) , ( − b , a ) , that the other point is in the side region, the average of those probabilities is 2 1 (or the sum of all of the areas of the regions is 2 ). 2 1 × 2 1 = 4 1 . This account for all cases because one rotation of ( a , b ) must be in the first quadrant. If a > b , then reflect ( a , b ) over the y axis, and one of its rotations will have a < b .
There's probably a much simpler way to show this by exploiting the symmetry, which was my original goal, so hopefully someone else can try to revise my method.
Log in to reply
I think I found a non-calculus solution. It is similar in theory to, but not as smart as, your solution.
It combines middle-school level algebra with intuition gained from having taken a lot of college-level statistics.
Mostly it's middle school algebra.
Middle School algebra
Both of the following conditions must be true for the lines to intersect
Condition 1. The x value (x1) of the end-point of the red line must exceed the x value (x2) of the end point of the blue line.
(I'll finish this step in the "college-level algebra intuition section below)
Condition 2. The lines must intersect.
Use the following Middle School algebra to find the condition under which the lines intersection.
As you know lines intersection when there is a common solution to both line equations.
For the red line, call it "line 1", the line equation y = mx + b (where m is the slope and b is the y intercept is)
m = Change in y over change in x (rise over run) = y end point (y1) divided by x end point (x1) = y1/x1
b = y intercept = 0
the equation for line 1 is
y1 = y1/x1 * X
For the blue line, call it "line 2" the line equation y = mx + b is
m = y2/(x2-1) (it's "x2-1" rather than just "x2" because the line runs backwards from x = 1)
b = the end point of line 2 (blue line) proportioned out to where X = 1 i.e. = y2 * (1/x2) = y2/x2.
So the equation for line 2 (red line) is
y2 = y2/(x2-1) * X + (y2/x2)
The lines intersect when y2 > or equal to y1
solve
y2/(x2-1) * X + (y2/x2) > or equal to y1/x1 * X
Which I get as
(y2/x2) / ((y1/x1) - (y2 / (x2-1)) > or equal to X
Intuition from college level algebra
CALCULATE THE PROBABILITY OF CONDITION 1
For the first condition, condition 1, x1 must be greater than or equal to x2, this happens 1/2 of the time.
P of this happening = 1/2.
So probability of condition 1 is 1/2.
TO CALCULATE/INTUIT THE PROBABILITY OF CONDITION 2
Looking at the equation of when the lines intersect
(y2/x2) / ((y1/x1) - (y2 / (x2-1)) > or equal to X
rearrange (x2-1) to - (1-x2) to get
(y2/x2) / ((y1/x1) + (y2 / (1 - x2)) > or equal to X
y2 must be greater than x2 half the time. So probability for that value is 1/2.
y1 must be similarly greater than x1 half the time. Probability = 1/2
y2 must also be greater than (x2-1) half the time. Probability of that is 1/2.
So the probability of condition 2 =
((1/2) / ((1/2) + (1/2))) = 1/2
So overall probability is (probability of condition 1) * (probability of condition 2)
= (1/2) * (1/2) = 1/4
A = 1 B = 4
A+ B = 5
Log in to reply
Sorry I got lost while reading your solution. I think you made some mistakes and typoed in a few places, and in general it's harder to read stuff without L a T e X .
I realized instead of having 4 points as rotations of each other around the center of the square, you could let them be 4 points as reflections off of the diagonals of the square. That means with the vertices of the square given in the problem, the coordinates of the 4 points are ( a , b ) , ( b , a ) , ( 1 − a , 1 − b ) , ( 1 − b , 1 − a ) . For each of those points being chosen as the first point mentioned in the problem (not just one of the points like I mentioned in my previous method), you can find the sum of the area of the regions (that the second point could be in) easily by reflecting/rotating them to form a square.
I think this is the process to transforming the regions. Let A be the region where the second point could be chosen from given the first point as ( a , b ) . Let B , C , D be the regions from ( b , a ) , ( 1 − a , 1 − b ) , ( 1 − b , 1 − a ) , respectively. Reflecting B over the line connecting ( 0 , 0 ) , ( 1 , 1 ) , rotating C by 1 8 0 ∘ around the center of the square, and reflecting D over the line connecting ( 1 , 0 ) , ( 0 , 1 ) should make the regions form a square, which proves that the probability is 4 1 ( 4 squares 1 square ).
got it .. :D
Not how I did it. But great solution! :D
A slightly more intuitive answer:
We order all points within the square first by y-coordinate, and secondly by x-coordinate. We'll describe all red and blue segments by the cross product of all unique ordered pairs ( P 1 , P 2 ) of points in the square, with the assignments P 1 red, P 2 blue, and vice versa.
Fix P 1 , and let y 1 be its y-coordinate. P 2 can thus be any point in an area of size y 1 . (Note that P 2 might have the same y-coordinate as P 1 , but these cases measure as nothing compared to the remaining area.) Note, as well, that the triangle with points ( 0 , 0 ) , P 1 , and ( 1 , 0 ) has area 2 y 1 .
P 2 has probability 2 1 of falling inside the triangle, in which case, neither red-blue assignment will yield an intersection. If it falls outside the triangle, one red-blue assignment will yield an intersection, and the other will not. Thus, for arbitrarily fixed P 1 , the probability that a uniformly chosen ( P 2 , red-blue-choice ) pair will result in an intersection is exactly 4 1 .
Trivially integrate this result across all possible P 1 , and we get our final answer, 4 1 .
Same way I solved this :D! Love it
Mostafa has provided an excellent solution. Here's another approach.
Instead of calculating the probability of intersection directly, I'll first calculate the probability that the line segments do not intersect. We label the points O ( 0 , 0 ) , P , Q , R ( 1 , 0 ) , where P , Q are the first and second random points chosen, respectively. If these 4 points are not in convex position, then either P lies inside triangle O Q R or Q lies inside triangle O P R , and in both of these cases the line segments O P and Q R will not meet. Each of these cases occurs with probability ∫ 0 1 2 1 y d y = 4 1 , for a combined probability of 2 ∗ 4 1 = 2 1 . (The integral simply evaluates the expected fraction of the square occupied by, in turn, triangle O P R and triangle O Q R .)
The probability that the 4 points are in convex position is then 1 − 2 1 = 2 1 . Now if they are in convex position, then it is equally likely that O P and Q R will form either the sides of the convex hull or the diagonals. In the former case the line segments will not intersect, and in the latter they will. Thus the probability that the points are in convex position and do not intersect is 2 1 ∗ 2 1 = 4 1 .
Combining these two results gives us a probability of 4 3 that the line segments will not intersect, and thus a probability of 4 1 that they will. This makes a = 1 , b = 4 and so a + b = 5 .
Comment: By "in convex position" I mean that the 4 points are the vertices of their convex hull, which in turn is the smallest convex quadrilateral that contains the 4 points.
Beat me by a hair. Also, I think you mean ∫ 0 1 2 y d y = 4 1 in that first paragraph.
Log in to reply
Yes, I think I must been making that edit at the same time you were typing your comment. :) Funny how we wrote up essentially the same (intuitive) solution within minutes of each other. In any event, I'm glad that this question has been met with such interest.
Consider the first point ( a , b ) . Notice that the area of the region that the second line crosses the first is a triangle where the points ( 0 , 0 ) and ( 0 , 1 ) create the base, and the height is simply a . Thus the area of the region is a / 2 , and dividing this over the total, 1, we get a / 2 . Since a varies equally from 0 to 1 , we can take the average, a = 2 1 , and our answer is 4 1 . Thus 5
I don't think your argument is right. It's a coincidence that you get the right answer.
The region, where the location of the second point makes the lines cross, is not generally a triangle. The region is determined by the line through (0,0) and (a,b) all right. But the other line is not the line through (0,1) and (a,b), it's the line through (1,0) and (a,b).
i think its a simple solution, but im struggling to explain this properly, so please bear with me. consider any point pair of points P{(a,b),(c,d)} in the square. from P, it is possible to draw two pairs of lines to the vertices of the lowermost edge. identify L1(from (0,0) to (a,b)) L2(from (1,0) to (c,d)) as one pair; and M1(from 0,0 to c,d) and M2(from 1,0 to a,b) as another. in a similar manner, pairs of lines can be identified for EACH edge of the square. it can be proved by geometry that for every P, 2 pairs of such lines MUST intersect, and these two pairs will in fact belong to opposite sides of the square.
But we observe, that for all of the pairs of lines that have been drawn on lines other than the lowermost edge, an identical situation is obtained by rotating the "innards" of the square (without changing the coordinates), to obtain a different pair of points P', with each point in an different quadrant of the square, but having lines drawn from the base edge.
Summarizing, for every pair P, 2 lines out of 8 drawn to the sides of the square intersect. By rotating the square, we can make the other edges coincide with the lowermost one. Thus, for every pair selected there exist four other pairs corresponding to each of the other four quadrants such that 2 OUT OF 8 OF THE PAIRS OF LINES, DRAWN TO THE BASE, INTERSECT. Each point belongs to a unique set of four such pairs of points. therefore the probability is 2/8 for each such set of four pairs, and owing to the mutually exclusive and exhaustive nature of such pairs, so is the probability of intersection.
If the first point is (x1, y1) and the second is (x2, y2), then once the first point is picked, x2 has to be less than x1...in a uniform distribution, the probability is 1/2...then, y2 has to be greater than y1, probability = 1/2...so 1/4 is the probability, and the answer to the question is 5..
as we can see wherever i select the first random point, i get the same answer(according to question) .so jst select the first random point in the midpoint of square. then, area where i can get the second random P(lines will intersect)=point to cut the line(think geometrically) / total area =1/4 /1 =1/4 =a/b that gives ,a+b =5 this is a particular solution not a general, however u can use it jst to get the correct answer in minimum time but its not for knowledge concern.
red point=terminal of red line segment
blue point=terminal of blue line segment
There'll be two cases;
C A S E ( i ) Suppose I choose red point s.t. x+y>1 where x,y are the coordinates of red point, then for the 2 segments to intersect blue point must be chosen in the region bounded by
->red line segment ->x=0 ->y=1 and
-> line segment passing through (1,0) and red point (CONVINCE YOURSELF)
Note: area of this fig.= ar(trepezium) - ar(triangle)
probability of choosing red point is (dxdy)/1 and blue point is (area of the above mentioned figure)/1
so for this case prob. comes out to be..
0 ∫ 1 1 − x ∫ 1 ( 1 + x + ( ( x − 1 ) ( 1 − y ) / y ) ) / 2 − y / 2 ) d x d y = 5 / 2 4
here x goes from 0 to 1 and y goes from 1-x to 1
C A S E ( i i ) Now I choose red point s.t. x+y<1, then segments would intersect iff blue point is chosen in the region bounded by
->x=0 ->red line segment -> -> line segment passing through (1,0) and red point
In this case its a triangle. Using similar arguments as above probability comes out to be
0 ∫ 1 1 − x ∫ 1 ( ( y / 2 + x y / 1 − x ) x ) d x d y = 1 / 2 4
therefore summing the prob. ans = 5/24 + 1/24 =1/4 ⇒ 4+1 = 5
Problem Loading...
Note Loading...
Set Loading...
If the terminal point of the blue segment is ( u , v ) (while the other point is ( 1 , 0 ) ), then the probability that the two segments won't intersect is the the probability that the terminal red point is in either above the line y = u v x , or below both of the line y = u v x and the blue segment.
Thus, it remains to integrate this area for all the possible terminal blue points ( u , v ) in the given square; there are two cases to compute this integral.
The first case, if u ≤ v , then the area will be 2 1 ( v + v u ) and the probability is 2 1 ∫ 0 1 ∫ 0 v ( v + v u ) d u d v = 2 4 7
The second case, if u > v , then the area will be 2 1 ( 1 + ( 1 − u v ) + v ) and the probability is 2 1 ∫ 0 1 ∫ 0 u ( 1 + ( 1 − u v ) + v ) d v d u = 2 4 1 1
Therefore the probability that both lines intersect is 1 − ( 2 4 1 1 + 2 4 7 ) = 4 1