logoalt Hacker News

doogliusyesterday at 3:41 AM5 repliesview on HN

EDIT: ok this was nagging at me for a while as something being off, I think this is actually wrong (in some way that must cancel out to accidentally get the right answer) because I need to multiply by 2 pi c to consider all rotations of centers around (0,0) at a given radius, but then my integral no longer works. Ah well, that's what I get for trying to method act and solve quickly, I guess the hooligan stabs me. I think at least this approach done properly could save some dimensions out of the Jacobian we need to calculate. Original post below:

Much more elegant: consider every circle that fits inside the unit circle, and we will work backward to find combinations of points. We only need consider centers on the x axis by symmetry, so these are parameterized by circle center at (0,c) and radius r with 0<c<1 and 0<r<1-c. Each circle contributes (2 pi r)^3 volume of triples of points, and this double integral easily works out to 2 pi^3/5 which is the answer (after dividing by the volume of point triples in the unit circle, pi^3)


Replies

carstimonyesterday at 7:44 PM

You pointed out one error in your own answer, here's another. I haven't figured out the adjustments, but presumably they cancel.

You've done

∫₀¹ ∫₀¹⁻ᶜ (2π r)³ dr dc

However,

- the `dr` integral is assuming that the radii are uniformly likely in [0, r]

- the `dc` integral is assuming that the centers are uniformly likely in [0, c]

You need to wait these integrals by the conditional probability distributions.

show 1 reply
Someoneyesterday at 2:28 PM

One can discuss what “choosing three points independently and uniformly at random from the interior of a unit circle” means, but whatever you pick, I don’t think that method is doing it.

Doesn’t it have half its circle centers have 0 < c < ½, while that covers only a quarter of the area of the unit circle?

wedog6yesterday at 8:49 AM

I think it's fairly straightforward to adapt your method. Given circle center c you just need to multiply by 2 pi c to get all the circles.

    int 0..1 2 pi c int 0..(1-c) (2 pi r)^3 dr dc / pi^3
    int 0..1 2 pi c int 0..(1-c) (2 r)^3 dr dc 
    int 0..1 2 pi c 2 (1-c)^4 dc
    -4 pi int 0..1 (1-g) g^4 dg
    4 pi (1/6 - 1/5)
    4 pi / 30
    2 pi/ 15
Genuinely not sure if this is wrong or if TFA is.
show 1 reply
clutter55561yesterday at 8:46 AM

Damn! I read your answer before bed and actually had trouble sleeping trying to understand it!

Thanks for editing your answer though. The thug got you in the end, but you saved me in the process.

ccvannormanyesterday at 4:20 AM

took me a few reads but this is indeed correct (lol)