Suppose you drop a needle onto a square grid. What is the probability that the needle lies across a grid line? (Find a closed form for this probability.)
Details and Assumptions:
(0) The grid is infinite in the x- and y- directions:
Source: grid image
(1) The length of the needle equals the length of each grid square.
(2) The center of the needle lands anywhere on the grid with equal probability.
(3) The needle can be rotated (around its center) at any angle with equal probability.
(i.e., the position and rotation of the needle are each distributed uniformly, as in Buffon's needle problem)
Inspired by Buffon's needle problem ..
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.
The answer is exactly 3 / π ≈ 0 . 9 5 5 .
Let θ be the angle between the needle and the horizontal in counterclockwise direction. Without loss of generality we can limit ourselves to the case 0 ≤ θ < π / 2 . Also, without loss of generality we can choose the origin of a coordinate system, ( 0 , 0 ) , to be the grid crossing to the left and below the bottom-left end of the needle. Then the coordinates of the endpoints of the needle are ( x , y ) ; ( x + cos θ , y + sin θ ) . Let C ( x , y , θ ) = 1 if the needle crosses a line of the grid (which will be the line x = 1 or y = 1 , or both), and = 0 if it doesn't. Then C ( x , y , δ ) = { 0 1 if x ≥ 1 − cos θ and y ≥ 1 − sin θ otherwise The probability for any given value of δ is P ( θ ) = ∫ 0 1 ∫ 0 1 C ( x , y , θ ) d x d y = 1 − ( 1 − cos θ ) ( 1 − sin θ ) = cos θ + sin θ − cos θ sin θ = 2 sin ( θ + 4 π ) − 2 1 sin 2 θ . We take the average over all angles by integration: P = π / 2 1 ∫ 0 π / 2 P ( θ ) d θ = π 2 ( ∫ 0 π / 2 sin ( θ + 4 π ) d θ − 2 1 ∫ 0 π / 2 sin 2 θ d θ ) = π 2 [ − 2 cos ( θ + 4 π ) + 4 1 cos 2 θ ] 0 π / 2 = π 2 ( − 2 ( − 2 1 2 − 2 1 2 ) + 4 1 ( − 1 − 1 ) ) = π 2 ( 2 − 2 1 ) = π 3 .