% use [nosolutions] flag to hide solutions.
% use [solutions] flag to show solutions.
\documentclass[
	solutions
]{../../../lib/tex/handout}
\usepackage{../../../lib/tex/macros}

\uptitlel{Advanced 2}
\uptitler{\smallurl{}}
\title{Geometric Optimization}
\subtitle{
	Prepared by Mark on \today \par
	Based on a handout by Nakul \& Andreas
}

\begin{document}

	\maketitle

	\section{Optimization}

	\problem{}<simtri>
	Let $A$ and $B$ be two points on the same side of a given line $\ell$. \par
	Find a point $C$ on $\ell$ so that $|AC| + |BC|$ is minimized.


	\begin{center}
		\begin{tikzpicture}[scale = 2]
			\draw[-] (-2,0) -- (3,0);

			\fill[fill=black] (-0.6, 1) circle (0.03) node[below] {$A$};
			\fill[fill=black] (1.6, 0.75) circle (0.03) node[below] {$B$};
			\fill[fill=black] (0.5, 0) circle (0.03) node[below] {$C$};

			\draw[-] (-0.6, 1) -- (0.5, 0) -- (1.6, 0.75);
		\end{tikzpicture}
	\end{center}

	\vfill
	\pagebreak


	\definition{}
	An \textit{ellipse} with foci $A$, $B$ and radius $r$ is the set of all points $C$ where $|AB| + |BC| = r$.

	\problem{}
	Consider a reflective ellipse with foci $A$ and $B$. \par
	Find all points $X$ on the ellipse where $A$ can aim a laser at so that the beam reaches $B$. \par
	\hint{use \ref{simtri}}

	\begin{center}
		\begin{tikzpicture}[
			dot/.style={draw, fill, circle, inner sep=1.2},
			scale = 0.75
		]
			\def\a{5} % large half axis
			\def\b{3} % small half axis

			\draw (0,0) ellipse ({\a} and {\b});

			% Foci
			\node[dot,label={above right:$A$}] (A) at ({-sqrt(\a*\a-\b*\b)},0) {};
			\node[dot,label={above:$B$}] (B) at ({+sqrt(\a*\a-\b*\b)},0) {};

			% Node on ellipse
			\def\angle{150}
			\node[dot,label={\angle:$X$}] (X) at (\angle:{\a} and {\b}) {};
			\draw (A) -- (X) -- (B);
		\end{tikzpicture}
	\end{center}

	\vfill
	\pagebreak




	\problem{}
	Let $C$ be a point in the interior of a given angle. Find points A and B on the sides
	of the angle such that the perimeter of the triangle ABC is a minimum.
	\vfill

	\problem{}
	In a convex quadrilateral ABCD, find the point T for which the sum of the distances to
	the vertices is minimal.
	\vfill
	\pagebreak


	\problem{}
	A road needs to be constructed from town A to town B, crossing a river, over which a
	perpendicular bridge is to be constructed.
	Where should the bridge be placed to minimize $|AR_1| + |R_1R_2| + |R_2B|$?

	\begin{center}
		\begin{tikzpicture}[scale = 1.5]
			\draw[-] (-5, 0.5) -- (5, 0.5);
			\draw[-] (-5, -0.5) -- (5, -0.5);

			\fill[fill=black] (-3, -3) circle (0.06) node[below] {$A$};
			\fill[fill=black] (0.5, -0.5) circle (0.06) node[below] {$R_1$};
			\fill[fill=black] (0.5, 0.5) circle (0.06) node[below right] {$R_2$};
			\fill[fill=black] (3, 1) circle (0.06) node[below] {$B$};

			\draw[-] (-3, -3) -- (0.5, -0.5) -- (0.5, 0.5) -- (3,1);
		\end{tikzpicture}
	\end{center}

	\pagebreak





	\problem{}<equi>
	Consider an equilateral triangle triangle with vertices labeled $A$, $B$, and $C$. \par
	Let P be a point inside this triangle. Place $D$, $E$, and $F$ so that $PD$, $PE$, and $PF$
	are the perpendiculars from $P$ to the sides of the triangle. \par

	Find all points $P$ where $|PD| + |PE| + |PF|$ is minimized.

	\begin{center}
		\begin{tikzpicture}[scale = 4]
			\draw[-]
				(-1, 0)
				-- (1, 0)
				-- (0, 1.47)
				-- cycle
			;

			\fill[fill=black] (0, 1.47) circle (0.03) node[above] (A) {$A$};
			\fill[fill=black] (1, 0) circle (0.03) node[below right] {$B$};
			\fill[fill=black] (-1, 0) circle (0.03) node[below left] {$C$};

			\fill[fill=black] (0.39, 0.9) circle (0.03) node[above right] {$D$};
			\fill[fill=black] (-0.3, 0) circle (0.03) node[below right] {$E$};
			\fill[fill=black] (-0.555, 0.65) circle (0.03) node[above left] {$F$};

			\fill[fill=black] (-0.3, 0.5) circle (0.03) node[below right] {$P$};


			\draw[-] (-0.3, 0.5) -- (0.39, 0.9);
			\draw[-] (-0.3, 0.5) -- (-0.3, 0);
			\draw[-] (-0.3, 0.5) -- (-0.555, 0.65);

			\draw[-] (-0.2, 0) -- (-0.2, 0.1) -- (-0.3, 0.1);


		\end{tikzpicture}
	\end{center}

	\vfill
	\pagebreak




	\problem{}<equi2>
	With the same setup as \ref{equi}, find all points $P$ where $|PA| + |PB| + |PC|$ is minimized.
	\vfill


	\problem{}
	Solve \ref{equi2} for a triangle that isn't equilateral.
	\vfill
	\pagebreak



	\problem{}
	Draw a circle, then draw two distinct tangents $\ell_1$ and $\ell_2$ that intersect at point $A$. \par
	Let $P$ be a point on the circle between the tangents, and $BC$ be the tangent at that point.
	Describe how $P$ should be selected in order to minimize the perimeter of triangle $ABC$.

	\begin{center}
		\begin{tikzpicture}[scale = 2]
			\draw (0, 0) circle (1);

			\fill[fill=black] (-4, -1) circle (0.04) node[below] (A) {$A$};
			\draw[-] (-4, -1) -- (2, -1);
			\draw[-] (-4, -1) -- (1.2, 1.78);
			\draw[-] (-1, -1) -- (-1, 0.6);

			\fill[fill=black] (-1, 0.6) circle (0.04) node[above left] {$B$};
			\fill[fill=black] (-1, 0) circle (0.04) node[right] {$P$};
			\fill[fill=black] (-1, -1) circle (0.04) node[below] {$C$};
		\end{tikzpicture}
	\end{center}

	\vspace{2cm}


	\problem{}
	Now, assume that $\ell_1$ and $\ell_2$ intersect at $A$, and pick a point $P$ between them. \par
	Find $BC$ through $P$ so that the perimeter of $ABC$ is minimized.

	\vfill
	\pagebreak


	\section{Bonus Problems}

	\problem{}
	Given a cube $A_1B_1C_1D_1A_2B_2C_2D_2$ with side length $l$, \par
	find the angle and distance between lines $A_1B_2$ and $A_2C_1$.

	\begin{solution}
		Triangle $A_1B_2D_2$ is equilateral. \par
		Also, point $A_2$ is equidistant from each of this triangle's vertices. \par
		Therefore, its projection onto the plane formed by $A_1$, $B_2$, and $D_2$ is the center of the triangle. \par

		\vspace{2mm}

		Similarly, $C_1$ is mapped to the center of $A_1B_2D_2$. \par
		Therefore, lines $A_1B_2$ and $A_2C_1$ are perpendicular and the distance between them is
		equal to the distance from the center of triangle $A_1B_2D_2$ to its side.

		\vspace{2mm}

		Since all the sides of this triangle have length $l\sqrt{2}$, the distance in question is $\frac{a}{\sqrt{6}}$.

	\end{solution}

	\vfill

	\problem{}
	Consider a cube $A_1B_1C_1D_1A_2B_2C_2D_2$, and let $K$, $L$, \par
	and $M$ be midpoints of the edges $A_2D_2$, $A_1B_1$, and $C_1C_2$. \par
	Show that the triangle formed by $KLM$ is equilateral, and that its center is the center of the cube.

	\begin{solution}
		Let $O$ be the center of the cube. Then, $|OK| = |C_1D_2|$, $|2OL| = |D_2A_1|$, and $2|OM| = |A_1C_1|$. \par
		Since triangle $C_1D_2A_1$is equilateral, triangle $KLM$ is equilateral and has $O$ as its center.
	\end{solution}

	\vfill

	\pagebreak


	\problem{}
	Consider all $n$-gons with a certain perimeter.
	Show that the $n$-gon with maximal area has equal sides
	\vfill

	\problem{}
	Consider all $n$-gons with a certain perimeter.
	Show that the $n$-gon with maximal area has equal angles
	\vfill

\end{document}