Monday, June 20, 2011

Ngon Dartboard Probability

This is an update to the Square Dartboard Probability question found at Infinigons.

The extension I offered was:
Given an integer n>2, what is the probability that a randomly-thrown dart will land closer to the center of the dartboard than to an edge of a regular polygon with n sides? What is the probability as n approaches infinity?

The solution below concerns only the first part of the extension question about probability that a randomly-thrown dart will land closer to the center than to any edge in a regular ngon.

Continuing from the diagram in the last post.

Taking advantage of symmetry, we need to only focus only on a slice.

For the case where n=4 (square), the probability will be the ratio of 8 times the area of the shared region divided by 8 times the area of the triangle. Turns out, the 8s reduce to 1 so we need only find the ratio of area of shaded region divided by area of triangle.

To find the area of the shaded region without solving for the intersection of the parabola and the radius, we'll use polar coordinates.

The equation for the parabola is given by
\[ \begin{align*}
r &= \frac{ 1 }{1 + cos \theta}
\end{align*} \]
The area of the shaded region is given by
\[ \begin{align*}
A_{shaded} &= \frac{1}{2} \int_{0}^{\frac{\pi}{n}} r^{2} d\theta \\
&= \frac{1}{2} \int_{0}^{\frac{\pi}{n}} \left ( \frac{ 1 }{1 + cos \theta} \right ) ^{2} d\theta
\end{align*} \]
where n is the number of sides of the ngon.

Using the half-angle formula and noticing that all angles are in quadrant I, we have:
\[ \begin{align*}
cos \frac{\theta}{2} &= \sqrt{ \frac{1 +cos \theta}{2}} \\
cos^2 \frac{\theta}{2} &= \frac{1 +cos \theta}{2} \\
2cos^2 \frac{\theta}{2} &= 1 +cos \theta \\
\frac{1}{2} sec^2 \frac{\theta}{2} &= \frac{1}{1 + cos \theta}
\end{align*} \]

Returning to the area of the shaded region an using the trigonometric identities, we have:
\[ \begin{align*}
A_{shaded} &= \frac{1}{2} \int_{0}^{\frac{\pi}{n}} \left ( \frac{ 1 }{1 + cos \theta} \right ) ^{2} d\theta \\
&= \frac{1}{2} \int_{0}^{\frac{\pi}{n}} \left ( \frac{1}{2}sec^2 \frac{\theta}{2} \right ) ^{2} d\theta \\
&= \frac{1}{8} \int_{0}^{\frac{\pi}{n}} sec^4 \frac{\theta}{2} d\theta \\
&= \frac{1}{8} \int_{0}^{\frac{\pi}{n}} sec^2 \frac{\theta}{2} \left ( tan^2 \frac{\theta}{2} + 1 \right ) d\theta \\
&= \frac{1}{8} \int_{0}^{\frac{\pi}{n}} sec^2 \frac{\theta}{2} tan^2 \frac{\theta}{2} + sec^2 \frac{\theta}{2} d\theta \\
&= \frac{1}{8} \int_{0}^{\frac{\pi}{n}} sec^2 \frac{\theta}{2} tan^2 \frac{\theta}{2}d\theta + \frac{1}{8} \int_{0}^{\frac{\pi}{n}} sec^2 \frac{\theta}{2} d\theta \\
\end{align*} \]
Using substitution
\[ \begin{align*}
u &= tan \frac{\theta}{2} \\
du &= \frac{1}{2} sec^2 \frac{\theta}{2} d\theta\\
2 du &= sec^2 \frac{\theta}{2} d\theta
\end{align*} \]
Another substitution
\[ \begin{align*}
v &= \frac{\theta}{2} \\
dv &= \frac{1}{2} d\theta \\
2 dv &= d\theta
\end{align*} \]
we have:
\[ \begin{align*}
A_{shaded} &= \frac{1}{8} \int_{0}^{\frac{\pi}{n}} sec^2 \frac{\theta}{2} tan^2 \frac{\theta}{2}d\theta + \frac{1}{8} \int_{0}^{\frac{\pi}{n}} sec^2 \frac{\theta}{2} d\theta \\
&= \frac{1}{8} \int_{0}^{tan\frac{\pi}{2n}} u^2 2 du + \frac{1}{8} \int_{0}^{\frac{\pi}{2n}} sec^2 v 2 dv \\
&= \frac{1}{8} \left [ \frac{ 2 u^3 }{3} \right ]_{0}^{ tan\frac{\pi}{2n}} + \frac{1}{8} \left [ 2 tan v \right ]_{0}^{\frac{\pi}{2n}} \\
&= \frac{1}{8} \left [ \frac{ 2 tan^3 \frac{\pi}{2n} }{3} - 0 \right ] + \frac{1}{8} \left [ 2 tan \frac{\pi}{2n} - 0 \right ] \\
&= \frac{1}{12} tan^3 \frac{\pi}{2n} + \frac{1}{4} tan \frac{\pi}{2n} \\
\end{align*} \]
In retrospect, it would've been cleaner if I worked on the indefinite integral and left out the lower and upper limit of integration.

For the area of the triangle, we need the length of base and height. The base is 1 and is the side adjacent to our central angle, the height is is the side opposite our angle:
\[ \begin{align*}
tan \frac{\pi}{n} &= \frac{h}{1} \\
tan \frac{\pi}{n} &= h \\
\end{align*} \]
So for the area of the triangle we have:
\[ \begin{align*}
A_{triangle} &= \frac{1}{2}bh \\
&= \frac{1}{2} \left ( 1 \right ) \left ( tan \frac{\pi}{n} \right ) \\
&= \frac{1}{2} tan \frac{\pi}{n} \\
\end{align*} \]
Combining the equations we have:
\[ \begin{align*}
P \left ( d_{c}\lt d_{e} \right) &= \frac{A_{shaded} }{A_{triangle} } \\
&= \frac{\frac{1}{12} tan^3 \frac{\pi}{2n} + \frac{1}{4} tan \frac{\pi}{2n} }{\frac{1}{2} tan \frac{\pi}{n} } \\
&= \frac{\frac{1}{12} \left ( tan^3 \frac{\pi}{2n} + 3 tan \frac{\pi}{2n} \right ) }{ \frac{1}{2} tan \frac{\pi}{n} } \\
&= \frac{ tan^3 \frac{\pi}{2n} + 3 tan \frac{\pi}{2n} }{ 6 tan \frac{\pi}{n} } \\
\end{align*} \]
So, given an integer n>2, the probability that a randomly thrown dart will land closer center than to the edge is:
\[ \begin{align*}
P \left ( d_{c}\lt d_{e} \right) &= \frac{ tan^3 \frac{\pi}{2n} + 3 tan \frac{\pi}{2n} }{ 6 tan \frac{\pi}{n} } \\
\end{align*} \]
... assuming no mistakes were made.

To verify for the case where n=4 (square):
\[ \begin{align*}
P \left ( d_{c}\lt d_{e} \right) &= \frac{ tan^3 \frac{\pi}{2n} + 3 tan \frac{\pi}{2n} }{ 6 tan \frac{\pi}{n} } \\
&= \frac{ tan^3 \frac{\pi}{8} + 3 tan \frac{\pi}{8} }{ 6 tan \frac{\pi}{4} } \\
\end{align*} \]
Using half-angle formula for tangent:
\[ \begin{align*}
tan \frac{\theta}{2} &= \frac{1 - cos \theta}{sin \theta}
\end{align*} \]
Evaluating using the half-angle formula, we have:
\[ \begin{align*}
tan \frac{\pi}{8} &= tan \frac{\frac{\pi}{4}}{2}\\
&= \frac{1- cos \frac{\pi}{4}}{sin \frac{\pi}{4}}\\
&= \frac{1- \frac{\sqrt{2}}{2}}{\frac{\sqrt{2}}{2}}\\
&= \sqrt{2} - 1\\
\end{align*} \]
Cubing, we have:
\[ \begin{align*}
tan^3 \frac{\pi}{8} &= \left ( \sqrt{2} - 1 \right )^3 \\
&= 2\sqrt{2} - 3 (2) + 3\sqrt{2} - 1 \\
&= 5\sqrt{2} - 7 \\
\end{align*} \]
Returning to our case where n=4 (square):
\[ \begin{align*}
P \left ( d_{c}\lt d_{e} \right) &= \frac{ tan^3 \frac{\pi}{2n} + 3 tan \frac{\pi}{2n} }{ 6 tan \frac{\pi}{n} } \\
&= \frac{ tan^3 \frac{\pi}{8} + 3 tan \frac{\pi}{8} }{ 6 tan \frac{\pi}{4} } \\
&= \frac{ \left ( 5\sqrt{2} - 7 \right ) + 3 \left (\sqrt{2} - 1 \right ) }{ 6 \left ( 1 \right ) } \\
&= \frac{ 5\sqrt{2} - 7 + 3 \sqrt{2} - 3 }{ 6 } \\
&= \frac{ 8\sqrt{2} - 10 }{ 6 } \\
&= \frac{ 4\sqrt{2} - 5}{ 3 } \approx .2189514165
\end{align*} \]
...which matches Allison's solution and Ms. Cookie's solution.

I'll update soon about simulations to find probability and limits.

Square Dartboard Probability
Ngon Dartboard Probability
Ngon Dartboard Probability Simulation
Ngon Dartboard Probability Limit

UPDATE: Added links to other posts.

No comments:

Post a Comment