Line through a Square

A unit square is drawn in the Cartesian plane with vertices at ( 0 , 0 ) , ( 0 , 1 ) , ( 1 , 0 ) , ( 1 , 1 ) (0,0),(0,1),(1,0),(1,1) . Two points P , Q P,Q are chosen uniformly at random, P P from the boundary of the square and Q Q from the interior of the square. The line L 1 L_1 through P and Q is drawn. The probability that the points ( 0 , 0 ) and ( 1 , 1 ) (0,0) \mbox{ and } (1,1) are both on the same side of L 1 L_1 can be expressed as a b \frac{a}{b} where a a and b b are coprime positive integers. What is the value of a + b a + b ?


The answer is 5.

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.

9 solutions

Put A ( 0 , 0 ) ; B ( 1 , 0 ) ; C ( 1 , 1 ) ; D ( 0 , 1 ) A(0,0); B(1,0); C(1,1); D(0,1) . Assume P P is on A B AB such that B P B A = k \frac{BP}{BA}=k , where k [ 0 , 1 ] k \in [0,1] . Then C C and A A are on the same side of P Q PQ if and only if Q is contained in the triangle B P C BPC , which occurs with probability p = [ B P C ] [ A B C D ] = k 2 p=\frac{[BPC]}{[ABCD]}=\frac{k}{2} . This is the same as the uniform distribution on [ 0 , 1 ] [0,1] , so the probability is the same as the expected value of [ B P C ] [ A B C D ] \frac{[BPC]}{[ABCD]} . The expected value of [ B P C ] [BPC] is 1 2 [ B A C ] \frac{1}{2}[BAC] so the probability is [ B A C ] 2 [ A B C D ] = 1 4 \frac{[BAC]}{2[ABCD]}=\frac{1}{4} . We follow the same deduction for P P on B C BC , C D CD , D A DA and have the same reesult.

Many people got the correct answer to this problem while not correctly solving it.

A common claim was that if you draw the line sgement between the points ( 0 , 0 ) (0,0) and ( 1 , 1 ) (1,1) , then those points would be on the same side of the line P Q PQ when P P and Q Q are on the same side of the first line. This is not the case. Can you find a pair of points P P and Q Q for which this is not true?

The second compounding mistake was calculating that the probability of this occuring was 1 4 . \frac{1}{4}. The probability is actually 1 2 . \frac{1}{2}. Can you see why?

If you had difficulty approaching this problem, you should read the Brilliant Blog about Geometric Probability

Calvin Lin Staff - 7 years ago
Kai Chung Tam
May 20, 2014

Label A = ( 0 , 0 ) , B = ( 0 , 1 ) , C = ( 1 , 1 ) , D = ( 0 , 1 ) A=(0,0), B=(0,1), C=(1,1), D=(0,1) . The situation of Q Q on the four sides are symmetrical with respect to the diagonal A C AC , therefore we can assume Q Q to be randomly chosen just from one side, e.g. the segment A B AB .

When Q = ( x , 0 ) Q=(x,0) , the points P P such that A A and C C are on the same side of the line P Q PQ are those points that are in the triangle Q B C QBC , with area x / 2 x/2 . So the desired probability is

0 1 [ Q B C ] [ A B C D ] d x = 0 1 x 2 d x = 1 4 . \int_0^1 \frac{[QBC]}{[ABCD]}dx = \int_0^1 \frac{x}{2}dx = \frac{1}{4}.

Pio Esguerra
May 20, 2014

For simplicity let us denote the corners of the square as: O = ( 0 , 0 O=(0,0 ), N = ( 0 , 1 ) N=(0,1) , M = ( 1 , 1 ) M=(1,1) , and L = ( 1 , 0 ) L=(1,0) .

We are concerned with the probability of event A A where A A is the event that O O and M M are on the same side of the line L 1 L_1 determined by P P and Q Q .

We note that P P is equally likely to be on each side, i.e, if P R S P_{RS} is the event that P P is on side R S RS , then P ( P R S ) = 1 4 P(P_{RS})=\frac{1}{4} for R S Ω = { L M , M N , N O , O L } RS\in\Omega=\{LM,MN,NO,OL\} . The P R S P_{RS} 's also form a partition of our probability space.

Let us denote by A R S A_{RS} the probability that O O and M M are on the same side of L 1 L_1 given that P P is on R S Ω RS\in\Omega P ( A R S ) = P ( A P R S ) = P ( A P R S ) P ( P R S ) \Rightarrow P(A_{RS})=P(A|P_{RS})=\displaystyle\frac{P(A\cap P_{RS})}{P(P_{RS})} P ( A P R S ) = P ( A R S ) × P ( P R S ) \Rightarrow P(A\cap P_{RS})=P(A_{RS})\times P(P_{RS}) . It should be noted that P ( A ) = R S Ω P ( A P R S ) P(A)=\displaystyle\sum_{RS\in\Omega}{P(A\cap P_{RS})}

Let us consider that P P is on M N MN . Then P ( x , 1 ) P(x,1) for x [ 0 , 1 ] x\in[0,1] . Now, we place Q Q . The event A M N A_{MN} is then equivalent to the event that Q Q is inside the region Δ N O P \Delta NOP . The area of Δ N O P \Delta NOP is x 2 \frac{x}{2} . Then, P ( A M N ) = 0 1 x 2 d x P(A_{MN})=\displaystyle\int_0^1{\frac{x}{2}dx} since the area of the square is 1 1 .

Thus, P ( A M N ) = 1 4 P ( A P M N ) = 1 16 P(A_{MN})=\frac{1}{4}\Rightarrow P(A\cap P_{MN})=\frac{1}{16} . In a similar fashion, by considering Δ L O P \Delta LOP , P ( A L M ) = 1 4 P ( A P L M ) = 1 16 P(A_{LM})=\frac{1}{4}\Rightarrow P(A\cap P_{LM})=\frac{1}{16} .

Likewise, let us consider that P P is on O N ON with P ( 0 , y ) P(0,y) for y [ 0 , 1 ] y\in[0,1] . The event A O N A_{ON} is then equivalent to the event that Q Q is inside the region Δ P M N \Delta PMN with area 1 y 2 \frac{1-y}{2} P ( A O N ) = 0 1 ( 1 2 y 2 ) d y = 1 4 \Rightarrow P(A_{ON})=\displaystyle\int_0^1{\left(\frac{1}{2}-\frac{y}{2}\right)dy}=\frac{1}{4} P ( A P O N ) = 1 16 \Rightarrow P(A\cap P_{ON})=\frac{1}{16} . Again, we can obtain P ( A P O L ) = 1 16 P(A\cap P_{OL})=\frac{1}{16} in a similar way.

Therefore, P ( A ) = 4 × 1 16 = 1 4 P(A)=4\times\frac{1}{16}=\frac{1}{4} and the answer to the question, 5 5 , follows.

Milind Mehta
May 20, 2014

Name the points (0,0) as A, (1,0) as B, (1,1) as C and (0,1) as D. So for (1,1) and (0,0) to lie on 1 side of L 1 L_{1} , there has to 2 cases:

  • P lies on AB or BC and Q lies in \bigtriangleup ABC
  • Q lies on AD or CD and Q lies in \bigtriangleup ADC

We know that that AB=BC=CD=AD=1 and area \bigtriangleup ABC=area \bigtriangleup ADC =1/2.

Favourable cases for \bigtriangleup ABC:

(P lying on AB × \times Q lying in \bigtriangleup ABC) + (P lying on BC × \times Q lying in \bigtriangleup ABC) =

(length of AB × \times area of \bigtriangleup ABC) + (length of BC × \times area of \bigtriangleup ABC) =

[(1 × \times 1 2 \frac {1}{2} ) + (1 × \times 1 2 \frac {1}{2} )] / 2 = 1 2 \frac {1}{2}

It is to be noted that the equation is further divided by 2, since it includes each case of L 1 L_{1} twice. As L 1 L_{1} intersects both AB and BC, both the intersecting points can be taken as P, therefore the cases are halved to eliminate redundancy when P is on AB or BC.

Similarly favourable cases for \bigtriangleup ADC):

(P lying on AD × \times Q lying in \bigtriangleup ADC) + (P lying on CD × \times Q lying in \bigtriangleup ADC) =

(length of AD × \times area of \bigtriangleup ADC) + (length of CD × \times area of \bigtriangleup ADC) =

[(1 × \times 1 2 \frac {1}{2} ) + (1 × \times 1 2 \frac {1}{2} )] / 2 = 1 2 \frac {1}{2}

Therefore total favourable cases by adding we have 1 2 \frac {1}{2} + 1 2 \frac {1}{2} = 1.

For total cases in square ABCD: (P lying on AB × \times Q lying in ABCD) + (P lying on BC × \times Q lying in ABCD) + (P lying on CD × \times Q lying in ABCD) + (P lying on AD × \times Q lying in ABCD) =

(length of AB × \times area of ABCD) + (length of BC × \times area of ABCD) + (length of CD × \times area of ABCD) + (length of AD × \times area of ABCD) =

(1 × \times 1) + (1 × \times 1) + (1 × \times 1) + (1 × \times 1) =

1+1+1+1=4 = Total cases.

Probability = F a v o u r a b l e C a s e s T o t a l C a s e s \frac {Favourable Cases}{Total Cases} = 1 4 \frac {1}{4} .

Since 1 & 4 are coprime, their sum, i.e ans = 1+4 =5

Seems okay, but the proof is somewhat bad

Calvin Lin Staff - 7 years ago
Caleb Leow
May 20, 2014

Since both halves of the square divided by the line (0,0) (1,1) are the same, the probabilities are the same. So, we assume that that P is on the point x on line (1,0) to (0,0). It doesn't matter since (1,0) to (0,0) is the same length as (1,0) to (1,1). Then, we see that the maximum "boundary" Q can be on is point (1,1) itself. thus the summation of the area that point Q can be drawn is \frac {1}{2} \times 1 \times x which is \frac {x}{2}. thus we integrate \frac {x}{2} from 1 to zero and we get \frac {1}{4} and 1 + 4 =5

Needs some work.

Calvin Lin Staff - 7 years ago
Calvin Lin Staff
May 13, 2014

We may ignore the case when ( 0 , 0 ) (0,0) or ( 1 , 1 ) (1,1) is on the line L 1 L_1 , since this happens with probability 0.

By symmetry, we may assume that P P lies on the x x -axis. Let p p be the y y - coordinate of P P . If we draw the line L 2 L_2 from ( 1 , 1 ) (1,1) to P P , we will have ( 0 , 0 ) (0,0) and ( 1 , 1 ) (1,1) on the same side of L 1 L_1 if and only if Q Q is to the right of line L 2 L_2 . The area of this triangle is 1 p 2 \frac{1-p}{2} .

We can construct a new unit square where the x x -axis represents the value of the point p p and the y y -coordinate represents the probability that Q Q will make L 1 L_1 have the desired property. The square in the figure below represents this, and the green region represents when the line L 1 L_1 will have the desired property. This area is 1 4 \frac{1}{4} the area of the square, so the probability is 1 4 \frac{1}{4} , and a + b = 1 + 4 = 5 a + b = 1 + 4 = 5 .

Deepak Kumar
May 20, 2014

After we draw the square with given points on the coordinate plane,it is clear that the points (0,0) & (1,1) are both on the same side of L1 only when both points P & Q are on the same side of the diagonal joining (0,0)& (1,1).It means point P must lie on two adjacent sides,whose probability= 2/4 = 1/2.Now point Q must lie on either side of the diagonal joining (0,0) & (1,1),whose probability =1/2.Hence net probability = (1/2) *(1/2) =1/4 which implies that a+b=1+4=5

John cyril Claur
May 20, 2014

We are asked to find the probability that the points (0,0) and (1,1) are both on the same side of L1, so, the point P and Q should be at the same side of the diagonal joining (0,0) and (1,1) The point P must lie on either on the side joining (0,1) and (1,1) or on the side joining (0,0) and (1,0), so we have 2 ways for this or its probability is 2/4 or 1/2 Now, the point Q must either lie on the upper part of the diagonal or on the lower part of the diagonal, so its probability is 1/2

Thus, the required probability is 1/2*1/2=1/4 so, a+b=1+4=5

Superman Son
May 20, 2014

THE POINTS (0,0) AND (1,1) WILL BE ON THE SAME SIDE OF THE LINE (L 1) WHEN THE POINT P AND Q BOTH ARE PRESENT ON THE SAME SIDE OF THE DIAGONAL JOINING (0,0),(1,1).THEN THE POINT P MUST LIE ON THE TWO ADJACENT SIDES i.e 2/4 = 1/2

now q must lie on either one half of the diagonal so as the diagonal divides the square in 2 equal halves so probability is 1/2.

now net probability = (1/2) *(1/2)

So, so wrong.

Calvin Lin Staff - 7 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...