Circle Problem
Hi,
I thought of a really good interview question yesterday.
Take a circle of radius 'r', and divide into 3 part of equal area using two parallel chords.
What is the distance between the chords 'd' in terms of the radius 'r'
Here is an image of the problem
http://www.dmcgrath.net/circle/
It took me about an hour to solve the problem, but the solution I found was very elegant (but then I would say that!!)
What does everyone else think of the problem..... and more importantly can YOU solve it?
Dan
Dan McGrath
Wednesday, June 26, 2002
let 2x = d;
(pi*r^2)/2 :(pi*r^2)/3 = r:x SO,
3/2 = r/x;
3/2 = 2r/d;
d = 4r/3.
Corect me if I am wrong.
Cheers
Sujeet
Sujeet Varakhedi
Saturday, June 29, 2002
How is (pi*r^2)/2 :(pi*r^2)/3 = r:x ?
vivek gupta
Sunday, June 30, 2002
Nice try,
But I think you've taken a too simplistic view there.
Certainly the answer you've given is incorrect.
To be honest, for a question that sounds so simple, the solutions (that I have derived) have all been quite complicated.
.....but there has just got to be a simple solution to it, I am sure of it.
Anyone else care to try?....
Dan
Dan McGrath
Monday, July 01, 2002
my answer is
d = 2 sin ( (arcsin PI/6) / 2 ) r
or
k = 0.5176 r
Cheradenine Zakalwe
Monday, July 01, 2002
I am unable to go further than the following equation:
k/2* sqrt(1k*k/4) + (2/pi) * sininverse(k/2) = (pi/6)
vivek gupta
Monday, July 01, 2002
Dan,
I get d = 0.52955*r
Pete
Pete de Graaf
Tuesday, July 16, 2002
Me too.
I just reckon there must be an easier way of getting there.....
Dan
Dan McGrath
Wednesday, July 17, 2002
I get d = 0.52986*r
Scott Sharp
Wednesday, July 24, 2002
Guys, can you post your working? This is driving me nuts.
Adrian Gilby
Thursday, July 25, 2002
I've not gotten it, but here's what I have so far.. you need the middle area to be 1/3 of the total area, so the middle area A = (1/3 Pi r^2).
The middle area is comprised of the two types of areas, pie wedges on the left and right, each wedge area given by (Pi r^2) * (Theta / 360), where the angle theta is given by 2*sininverse ((1/2 d) / r). The other type of area in the middle region is given by the top and bottom trianges bordered by the pie wedges and horizontal lines. Their area, using the Pythagorean Theorum to get the width, is 1/2(1/2d * (sqrt(r^2  1/4d^2))). There are 4 trianges of this size.
So, Area = 2 * (pie wedges) + 4 * (trianges)
Or,
(1/3 Pi r^2) = (2 * (Pi r^2) * (2 * (sininverse ((1/2 d) / r) / 360))) + (4 * 1/2d * (sqrt(r^2  1/4*d^2)))
Without making shortcut approximations, how to simplfy that in to "r=k*d" form I do not know. I ran down the page with algebra and trig. Obviously, there can be more than one way to approach this.
Larry Mitchell
Thursday, July 25, 2002
You might find it easier if you work in radians instead of degrees. That way a lot of the pis cancel out.
I get it down to:
theta + sin(theta)cos(theta) = pi/6.
But I can't work back from there to get theta and thus k.
Adrian Gilby
Thursday, July 25, 2002
Adrian,
I guess I cheated a bit, then, because I got to the same equation you have and wrote a simple computer program to solve for theta numerically. It's not pretty, but it works!
Scott Sharp
Friday, July 26, 2002
Hmmm,
Dan, care to enlighten us? I'd love to know how to solve this!
If you restate in terms of k, you get:
sin1(k) = pi/6  k cos (sin1(k))
Interestingly, this leads to an infinite series if you substitute for sin1(k). Also, cos(sin1(k)) = sqrt(1  k^2), so you can get:
sin1(k) = pi/6  k sqrt(1  k^2)
Again, can't get further than this.
Adrian Gilby
Monday, July 29, 2002
Hi,
The best way I can do it is to integrate the equation of a circle (x^2 + y^2 = r^2) for just a quarter of a circle
You essentially want to divide the quarter of a circle into 2 bits, one (the outer bit) should be twice the size of the inner bit)
I hope that makes sense
Then just set the limits of the integrand accordingly, it's quite elegant, and probably the easiest way to do it.
Unfortunately I can't remember how to integrate polar equations, as I reckon that'd be even easier.....
Dan McGrath
Tuesday, August 06, 2002
Recent Topics
Fog Creek Home
