Interview Question
Country: United States
If R is radius of the circle
Length of a side of the equilateral triangle will be (sqrt(3))*R
Largest possible chord is the diameter - length 2R
so sqrt(3)/2 should be the answer
Draw a equilateral triange. Pick any one vertex and draw a tangent to it. Now if you notice, chords wth one end at this vertex have length more than side of triangle if they are passing through the inside portion of triangle in that case the angle made by the chord with the tangent is between 60 to 120 degrees whereas the chord can make any angle between 0 to 180 uniformly.
(120-60 )/180 = 1/3
Is it not a geometry question? lets say we have an equilateral triangle . Lets assume we remove the two sides of the equilateral triangle and left with one side. Now, the chords which will be lesser in length than this chord, will be on both sides of the diameter and lie symetrically. So the region behind the chord is the region we want. And then we can double this region. So the fraction can be found as follows
p*i*r*r (area of circle) == x
3*sqrt(3) / 4 *r*r (area of triangle) == y
x/2y is the answer.
How do you define "draw chords at random"?
- dev.cpu August 30, 2012Because different methods of selecting random chords yield different probabilities.
This problem is known as Bertrand's Paradox
en.wikipedia.org/wiki/Bertrand_paradox_(probability)