Buffon asked: if you drop a needle on the floor, how likely is it to cross a floorboard line? Assume that the needle length is the same as the floorboard width (and that the flooboards are long).

I learned Barbier's great solution some time ago at the link below, and I wanted to share it.

First, let's generalize the problem to include needles of any length, but instead of asking for the probability, ask for the expected number of floorboard line crossings. (Which could only be zero or one in the original problem, with probability 1.) Call this e(r), where r = (needle length)/(floorboard spacing).

Second, note that e(a+b) = e(a) + e(b), i.e. if we attach an a-segment to a b-segment, the number of lines you expect them to cross is additive. With that and continuity one can infer that e(a) = a e(1).

Third, that holds even if the two segments aren't aligned. They could each be curved! Say, piecewise differentiable. So e(a) gives the expectation for any reasonable curve of length a, not just a straight line.

Finally, if our curve is a hoop whose diameter is the floorboard spacing, then with probability 1 it crosses the same line twice. So e(pi) = 2.

Hence the answer to Buffon's question is 2/pi ~ 64% probability.