% This is SAMPLE.TEX in text format, as of Mar 31, 1986.
% This is a sample LaTeX input file.  (Version of 28 May 1985)
%
% A '%' character causes TeX to ignore all remaining text on the line,
% and is used for comments like this one.
\documentclass[12pt]{paper}    % Specifies the document style.

\usepackage{graphicx}
                                      % The preamble begins here.
\title{Expection Time for Escape from a Convex Polygon  }  % Declares doc's title.
\author{P. Coulton }    % Declares the author's name.
\vskip-1truecm
\date{Department of Math. and C.S. \medbreak Eastern Illinois University }   % Deleting this command produces today's date.

\begin{document}           % End of preamble and beginning of text.%

\maketitle                 % Produces the title.
\hrulefill
\vskip0.1truecm
{\bf Abstract}
\bigbreak
We consider the case of a convex polygon in the plane and
give a general formula for the time to escape  moving in a straight line when the
direction for escape is given.
Using this formula we can obtain the expectation for escape for the choice of a
random direction by integrating over the set of possible directions.  Special cases
will be considered and we will show how to simulate the problem of expectation using maple.
\medbreak \noindent {\it AMS classification:} 
\medbreak \noindent {\it Keywords:} geometric probability, expectation, polygon,
set diameter
\vskip0.1truecm
\hrulefill
\medbreak \noindent
{\bf 1. Segment Strategies in the Plane}
\bigbreak
We consider the following problem:
\begin{itemize}
\item You awake in a forest (a convex polygon $K$)  whose geometry is completely known to you, but
you remember nothing about how you came to be in the forest.
\item Let $\sigma$ denote a straight line strategy for escape. 
\item  Given
an escape strategy, $\sigma$, we shall
call the average time for escape (where the time is identified
with arc-length)  the 
{\it expectation time}. 
\end{itemize}
\begin{center}
\includegraphics[scale=0.6]{pixs/escpth}
\vskip0.1truecm
Figure 1.  {\it An escape strategy from $P$ in direction $\theta$.} \hskip2truecm
\end{center}
Thus we have that the expectation is
$$E(\sigma) = {1 \over 2 \pi A(K)} \int_0^{2 \pi} \int_K t(x,y,\theta) \ dA \ d
\theta,$$ where $A(K)$ is the area of the polygon (or region) and $t(x,y)$ is the distance from $(x,y)$ to the boundary of the 
region in the direction determined by $\theta$.
Let $\delta$ denote the diameter of the convex set $K$. We naturally have the following:
\medbreak \noindent 
{\bf Lemma 1.1} {\it Assume that the diameter of $K$ is 1 and the 
expectation for escape from $K$ for some fixed strategy is 
$$E= \alpha, \ {\rm where} \ \alpha \in {\bf R}.$$
Then  for $\hat{K} \sim K$ geometrically similar to $K$ with diameter $\hat{\delta}$ we have $\hat{E} = \alpha \hat{\delta}$.}
\medbreak
Now consider a fixed point $(x,y)$ with chord length c(x,y) in the direction determined by $\theta$. Then $c(x,y)/2$ is the 
average escape time for the set of points that lie along this chord.  Therefore,  In order to find the expected 
escape time for a given fixed direction determined by some $\theta$ we must  integrate $c^2(h,\theta)$ for each 
position of height in $K$ along the $\zeta$-axis perpendicular to the angle $\theta$. 
Let $E(\sigma, \theta)$ denote the expectation for escaping with respect to the fixed direction determined by $\theta$, then
$$E(\sigma, \theta) ={1 \over 2 A(K)} \int_o^{h(\theta)} c^2(\zeta,\theta) d \zeta.$$
where $\zeta(\theta)$ denotes an axis in the plane that is perpendicular to
the chords determined by the angle $\theta$.
\begin{center}
\includegraphics[scale=0.6]{pixs/escpth2}
\vskip0.1truecm
Figure 2.  {\it Construction of the $\zeta$-axis.} \hskip2truecm
\end{center}
\vskip0.5truecm
Hence we can write
$$E(\sigma) = {1 \over 2 \pi A(K)} \int_0^{\pi} \int_0^{h(\theta)}
c^2(\zeta,\theta) \ d \zeta \ d
\theta,$$
where $h(\theta)$ is the altitude of the projection of $K$ onto the $\zeta$-axis.
\medbreak 
\noindent {\bf Proposition 1.2} {\it The expectation time for a circle
  of diameter $\delta$ using the segment strategy is
$$E(\sigma) = {4 \delta \over 3 \pi}.$$ }
\begin{center}
\includegraphics[scale=0.5]{pixs/circ}
\vskip0.1truecm
Figure 3.  {\it Construction of the $\zeta$-axis.} \hskip2truecm
\end{center}
 {\bf Proof:} Since the circle is symmetric
with respect to the origin we have
$$E(\sigma) = {4 \over \pi \delta^2}\int_{0}^{\delta/2} \Big(2\sqrt{{\delta^2 \over 4}
    - \zeta^2} \ \Big)^2 d\zeta = {4 \over \pi \delta^2}\int_0^{\delta/2} \ ( \delta^2 -
  4\zeta^2 )
\ d \zeta  
= {4 \delta \over 3 \pi }$$
$$\approx 0.424 \delta.$$
\vskip0.5truecm \noindent
{\bf 2.  Convex Regular Polygons}
\vskip0.5truecm
\noindent {\bf Lemma 2.1 } {\it   The expectation to escape in a given direction $\theta$ from a trapezoid with boundary lines parallel to $\theta$ is given by 
$$E(\sigma,\theta) =  {(c_1^2+ c_1c_2 + c_2^2)h \over 6 A(K)}$$ 
where $c_1$ is the length of one of the parallel sides and $c_2$ is the length of the opposite side and where $h$ is the distance between the parallel sides.}
\begin{center}
\includegraphics[scale=0.5]{pixs/trap}
\vskip0.1truecm
Figure 4.  {\it An escape from the trapezoid  in a direction parallel to $\zeta$.} \hskip2truecm
\end{center}
\medbreak \noindent {\bf Proof:} Observe that the chord lengths increase in a linear fashion between 
points at height $0$ and $h$.  The chord length at height $t$  is 
$$c(\zeta) =  c_1 + {c_2 - c_1 \over h} \zeta $$
The contribution of the chord integral in this region is
$$\int_o^hc^2(\zeta) d \zeta = {1 \over 3} (c_1^2 + c_1c_2+ c^2_2)h.$$ 
\medbreak
\noindent {\bf Theorem } {\it   The expectation to escape from an $n$ sided regular  polygon  with side $a$ is given by 
$$E(\sigma) = { 2 \tan(\pi /n) \over 3 a^2 \pi } \int_o^{\pi/n}c_1^2h_1 +\sum_{j=2}^{n-2}(c_{j-1}^2 + c_{j-1}c_j + c_j^2)(h_j - h_{j-1}) \hskip3truecm$$ 
$$+ c_{n-2}^2(h_{n-1} -h_{n-2}) \Big) d \theta,$$
where the heights are given as in Figure 5  below.}
\begin{center}
\includegraphics[scale=0.45]{pixs/regp}
\vskip0.1truecm
Figure 5.  {\it Heights and chords as a function of $\theta$.} \hskip2truecm
\end{center}
\medbreak \noindent {\bf Proof:} We observe that the summation over the chord values follows directly from the trapezoidal formula.  We need only calculate the value of $A(K)$.\begin{center}
\includegraphics[scale=0.5]{pixs/nparea}
\vskip0.1truecm
Figure 6.  {\it The area of  the triangle associated to side of length $a$.} \hskip2truecm
\end{center}
The area is given by
$$ A(K) = a^2 n {\cot(\pi/n) \over 4}.$$  Plugging this into the formula and taking into account that we must complete $n$ identical integrals from $0$ to $\pi/n$  gives the result.
\bigbreak
As an example consider the case of the square of side length $a$. Then
$$c_o=0, \ c_1=a \sec(\theta), \ h_1= a \sin(\theta), c_2= a \sec(\theta), \ h_2= a \cos(\theta) - a \sin(\theta)$$
which  applied to our theorem leads to the integral formula
$$E(\sigma)={2\over 3 \pi a^2}  \int_o^{\pi/4} a^3(3 \sec(\theta)  - \sec(\theta) \tan(\theta)) d \theta,$$
$$={2a \over 3 \pi }  \Big(3 \ln(1 +\sqrt{2}) + 1 - \sqrt{2} \Big) $$
Now consider the case of the rectangle with sides $a$ and $b$.  Applying the theorem for 
side $a_1=a$ gives the integral formula
$$\int_o^{\arctan(b/a)}  \int_o^{h(\theta)}  c^2(t,\theta) dt  d \theta= \hskip5truecm$$
$$\hskip3truecm\int_o^{\arctan(b/a)} \Big( -{a^2b \over 3} \sec(\theta) \tan(\theta) + a^3 \sec(\theta) \Big) d \theta,$$
which leads to the formula 
$$E(\sigma) ={a +b \over 3 \pi }  \Big(3 \ln(1 +\sqrt{2}) + 1 - \sqrt{2} \Big). $$
As a further example consider the case of the regular pentagon with side length $a$.  We assume that  for 
some angle $\theta, \ 0 \le \theta \le \pi/5,$  and diameter $\delta$ we have
$$h_1 =a \sin(\theta); \ c_1 = a \cos(\theta)+ a\sin(\theta) \cot({2\pi \over 5}- \theta); \ h_2 - h_1=\delta \sin({\pi \over 5} - \theta);$$
$$c_2 = \delta( \cos({ \pi \over 5} - \theta) +\sin({\pi \over 5} -\theta)\cot({\pi \over 10} - \theta))$$
\begin{center}
\includegraphics[scale=0.5]{pixs/pent}
\vskip0.1truecm
Figure 7.  {\it An escape from the pentagon in a given direction determined by $\theta$.} \hskip2truecm
\end{center}
Therefore, using symmetry and doubling the bottom half of the computation we have
$$E(\sigma) =  {4 \tan(\pi /5)\over 3 a^2\pi }\int_o^{\pi/5}  c_1^2h_1 + (c_1^2 + c_1c_2 + c^2_2)(h_2 - h_1) d \theta.$$
To complete the the computation, we will need to solve the following integrals:
$$\int_o^{\pi/5} c_1^2 h_1 d \theta= \hskip11truecm$$
$$a^3 \int _o^{\pi/5}  \sin(\theta)\Big((\cos(\theta) +
\sin({\pi \over 10})\sin(\theta)\cos(\theta) +\cos({\pi \over 10})\sin^2(\theta)\Big)^2 \ d \theta,$$
$$\int_o^{\pi/5} c_1^2 (h_2 - h_1) d \theta = \hskip10truecm$$
$$a^2 \delta \int_o^{\pi/5} \sin({\pi \over 5} - \theta) \Big((\cos(\theta) +
\sin({\pi \over 10})\sin(\theta)\cos(\theta) +\cos({\pi \over 10})\sin^2(\theta)\Big)^2 \ d \theta. $$
The last two integrals are similar and  involve trigonometric functions of $\cos(\theta)$ and $\sin(\theta)$ with 
combined powers of 5 or less. The solution for the integrals in the case of the  the general regular  polygon is not significantly different since they also involve triangles and trapezoids of the same kind.
\bigbreak \noindent {\bf 3. The Case of the General Convex Polygon.}
\bigbreak   We begin with the case of the general triangle.
\medbreak \noindent {\bf Theorem} {\it The expectation for exiting a triangle  $K$  is 
$$E(\sigma) =\sum_{i=1}^3 { a_i \sin^2(\alpha_i) \over 6 \pi A(K)}  \Big(  \int_{o}^{\alpha_{i-1}}  a_{i-1}^2 \sec( {\pi \over 2} - \alpha_{i-1} - \theta) d \theta \hskip3truecm $$
$$ \hskip4truecm +   \int_{o}^{{\pi \over 2} - \alpha_{i+1}} 
a_{i+1}^2 \sec( {\pi \over 2} -\alpha_{i+1} - \theta) d \theta \Big),$$ 
$$=\sum_{i=1}^3 { a_i \sin^2(\alpha_i) \over 6 \pi A(K)}  \Big[ a_{i-1}^2 \ln\Big((\sec + \tan)( {\pi \over 2 } - \alpha_{i-1}) \Big) \hskip3truecm$$
$$ \hskip4truecm + a_{i+1}^2 \ln\Big((\sec + \tan)( {\pi \over 2 } - \alpha_{i+1} ) \Big) \Big],$$ 
where the  sides are of length $a_i$  and the interior angle between $a_{i-1}$ 
and $a_{i}$ is $\alpha_i$   and $a_3 =a_o$.} 
\medbreak 
\begin{center}
\includegraphics[scale=0.4]{pixs/tri}
\vskip0.1truecm
Figure 9.  {\it An escape from a polygon in a given direction determined by $\theta$.} \hskip2truecm
\end{center}
We note that the integral above is obtained by a substitution  in the case of the equilateral triangle since the actual integrand is 
$$\sin(\theta)\sec^2({\pi \over 6} -\theta).$$
As an application to the theorem consider the case of the equilateral triangle such that that $a_1=a_2=a_3=1$ then the formula gives 
$$E(\sigma) ={3/4 \over \pi \sqrt{3}/4} \ln( {2 \over \sqrt{3}} - { 1 \over \sqrt{3}})$$
$$={\sqrt{3} \ln(3)\over 2 \pi} \approx 0.31.$$
\noindent {\bf Theorem } {\it   The expectation to escape from an $n$ sided  polygon  is given by 
$$E(\sigma) = { 1 \over 6 \pi  A(K)}\sum_{j=1}^n \int_o^{\theta_j} \Big(c_1^2h_1 +\sum_{i=1}^{n-3}(c_i^2 + c_ic_{i+1} 
+ c_{i+1}^2)(h_{i+1} - h_i) \hskip2truecm$$
$$ \hskip4truecm + c_{n-2}^2(h_{n-1} -h_{n-2}) \Big) \  d \theta,$$
where $\sum_j \theta_j = \pi$ with the standard assumptions on the heights $h_i$ and the chords $c_i$ which depend on $\theta$. }
\begin{center}
\includegraphics[scale=0.4]{pixs/poly}
\vskip0.1truecm
Figure 9.  {\it An escape from a polygon in a given direction determined by $\theta$.} \hskip2truecm
\end{center}
A similar formula will hold for any convex polygon whic can be decomposed as triangles and trapezoids for each angle $\theta$.
I would like to thank Steve Finch and John Wetzel   for suggesting this problem to me.
\medbreak
\noindent {\bf Bibliography} \medbreak
\noindent [1] Coleman, R. {\it Random Paths Through Convex Bodies}, Journal of Applied Probability, {\bf 6}, No. 2, pp. 430-441, 1969
\medbreak 
\noindent [2] Coleman, R. {\it Random Sections of  a Sphere},  The Canadian Journal of Statistics, {\bf 17}, No. 1, pp. 27-39, 1989
\medbreak 
\noindent [3] Finch, S. R. and Wetzel, J. E. {\it Lost in a Forest}, Amer. Math. Monthly 111, 645-654, 2004. 
\medbreak 
\noindent [4] Santalo, L. {\it Integral Geometry and Geometric Probability}, Encyclopedia of Mathematics, Addison-Wesley, Reading, Massachusetts,  1976. 
\medbreak
\vfill \eject
\end{document}   % End of document




