\documentclass[11pt]{article}
\def\Z{\mathbb{Z}}
\def\Q{\mathbb{Q}}
\usepackage{latexsym,amsmath,amssymb,epsfig}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\textheight}{8.0in}
\begin{document}
\centerline{Mathematics 392--Seminar in Computational Commutative Algebra}
\centerline{Lab Day 3/Problem Set 6}
\centerline{March 11, 2019}
\vskip 10pt
\noindent
{\it General Information and Ground Rules}
\vskip 10pt
Today's lab session, and the problems for Problem Set 6 (due in class on 
Friday, March 15) will focus on two applications of elimination: the {\it implicitization}
problem for parametric surfaces, and finding the {\it envelope}
of a family of curves in the plane.  These topics are discussed in 
sections 3 and 4 of Chapter 3 in ``IVA''.   For this problem set, {\it please
attach your Maple worksheet file(s) to an email sent to {\tt jlittle@holycross.edu}
to submit your work.  Include all answers to the questions below and use text
regions for comments, explanations, etc.} 
\vskip 10pt
\noindent
{\it First Problems/Examples}
\vskip 10pt
\noindent
I.  Consider the parametric surface in $\mathbb{C}^3$ defined by 
\begin{align*}
x &= uv + v \\
y &= u^2 - 2v\\
z &= v^2 + u - v
\end{align*}
\begin{enumerate}
\item[A.]  Compute a {\it lex} Gr\"obner basis for the 
ideal 
$$I = \langle x - uv - v, y - u^2 + 2v, z - v^2 - u + v\rangle$$
with the variables arranged to eliminate $u,v$.  
\item[B.]  Use your answer to part A to find a variety 
$V \subset \mathbb{C}^3$ containing
the image of the parametrization mapping.
\item[C.]  Use the Extension Theorem from class on Friday, March 1
to prove that every point of $V$ is in the image of the 
parametrization mapping over $\mathbb{C}$.  (Hints:  This is equivalent to showing
that every partial solution $(x,y,z)$ in $V(I_2) \subset \mathbb{C}^3$ 
extends to a full solution $(x,y,z,u,v)$ in $V(I) \subset \mathbb{C}^5$.
The Gr\"obner basis is complicated, but you'll find what you need
if you look hard enough!)
\end{enumerate} 
\vskip 10pt
\noindent
II.  (Envelopes)  A family of curves in the plane is given 
by an equation $F(x,y,t) = 0$.  Setting $t$ equal to a constant
gives one of the curves in the family.  In this problem, we will
study the family defined by the equation:
$$F(x,y,t) = (x - t)^2 + (y - t^2)^2 - 1 = 0$$
From the form, we see that each curve
$F(x,y,t_0)$ is a circle of radius 1 whose center is a point
on the parabola $(t,t^2)$.  We can visualize the curves in
such a family in Maple by generating an {\it animated} plot
where $t$ is the ``animation variable''.  It is most convenient
to do this in parametric form though, so we will consider the 
parametric equations:
\begin{align*}
x &= t + \cos(\theta)\\
y &= t^2 + \sin(\theta)
\end{align*}
where the $(\cos(\theta),\sin(\theta))$ parametrizes the 
circle, and the $(t,t^2)$ give the coordinates of the center.
\begin{itemize}
\item  Load the {\tt plots} package:
\vskip 10pt
\centerline{\tt with(plots):}
\vskip 10pt
\item Then enter the following command:
\vskip 10pt
\centerline{\tt animate([t+cos(theta),t\^{}2+sin(theta),theta=0..2*Pi],t=-2..2,frames=20);}
\vskip 10pt
\item
To ``play the animation'', you first left click the mouse over the
graph, and select the options (forward or backward, loop or once, etc.) from 
the toolbar.  Then right click the mouse over the graph and select
play from the animate option on the plot menu.  
\vskip 10pt
\item The {\it envelope} of the family of curves given by $F(x,y,t) = 0$
is another curve that is {\it tangent} to each of the curves in the 
family at the intersection points of the envelope and the family curve.  
It is found by eliminating $t$ between the two equations:
\begin{align*}
F(x,y,t) &= 0\\
\frac{\partial}{\partial t} F(x,y,t) &= 0
\end{align*}
(This is discussed in detail in \S 3.4 of ``IVA.'')
For now, let's take this as given and find the envelope for
the family of curves above.
\end{itemize}  
\begin{enumerate}
\item[A)]  Define $F = (x-t)^2 + (y-t^2)^2 - 1$ as above, and compute
an appropriate Gr\"obner basis to find generator(s) of the elimination
ideal
$$I_1 = \langle F(x,y,t), \frac{\partial}{\partial t}F(x,y,t) \rangle \cap \mathbb{C}[x,y].$$
In Maple, the partial derivative can be computed with the {\tt diff} command.  Consult
the online help for documentation and examples.  
\item[B)]  Use {\tt implicitplot} to generate a picture of the envelope
curve for this family of circles (the variety $V(I_1)$ with $I_1$ as in part B).  
\item[C)]  To understand the geometry here in more detail, it will help
to generate a composite plot showing the animated family of curves,
together with the implicit plot of the envelope, and 
also the path followed by the centers of the circles in the family.  
The {\tt display} command in the {\tt plots} package can be used to 
combine plots in this way.  Look up the online help and see if you 
can figure out how it should work.  
\end{enumerate}
\vskip 10pt
\noindent
III.  You have just discovered the remnants of an ancient alien
civilization in a subterranean complex.  Near the entrance
there are two large rooms connected by a short corridor 3 feet
wide and 4 feet long.  The floor plan is given in the diagram 
in Figure 1.
\begin{figure}
\begin{center}
\includegraphics[height=3in,width=3in]{PS6III.png}
\end{center}
\caption{The floor plan of the alien complex (not exactly to scale)}
\end{figure}

In Room 1, at the point marked A, you have discovered a functional, 
but very fragile, robot.  It has a horizontal cross-section that is a 
circle of diameter 2 feet.  The robot will accept movement commands,
but will not let itself be moved by any other means.  Your job 
is to figure out a way (any way) to maneuver the robot from point 
A to point B, subject to the following constraints:
\vskip 10pt
\begin{enumerate}
\item[1)]  The aliens were apparently very clever mathematicians,
but the robot's control program is {\it very limited} -- the
way you must specify its motion is to give a single polynomial
parametric curve $x = f(t), y = g(t)$ that traces the path
of the {\it center} of the robot's circular cross-section.
Only one curve is allowed -- no piecewise polynomial paths.
\item[2)]  The robot will be damaged beyond repair if it runs
into one of the walls.  If it does, you will have destroyed
the most amazing archeological discovery of all time.  
{\it So be careful!}
\item[3)]  Fortunately, you get to ``simulate'' possible 
motions using Maple as often as you like until you find
one that works, and then you can give the information
to the robot.
\end{enumerate}
\noindent
For this problem you will need to generate a (section of a) Maple worksheet
with graphics showing the rooms and corridor, and a display showing
that your path will keep the robot from hitting the walls
at any point.  And, you will {\it give a justification for why your path
will not run the robot into the walls}.  (By this I mean more evidence
than the picture -- for instance, if feasible, you could find the point on 
the envelope that is closest to the walls, and show that the
distance at the closest point is strictly positive.)
\vskip 10pt
\noindent
{\it Suggestions}
\vskip 10pt
\begin{enumerate}
\item[1)]  A good first step will be to set up a convenient
coordinate system.  This will let you set up plots showing the
rooms, etc.  You can also experiment and determine some 
paths from point A to point B to try.
\item[2)]  The discussion of envelopes from question II above
is relevant here!
\item[3)]  {\it Important Note:}  You will need to be somewhat clever
in how you apply the techniques we have discussed -- if you use
a ``brute force'' method, to compute the envelope for some
``obvious'' choices of the path, then you can easily end
up giving Maple a Gr\"obner basis calculation that will use
up an hour of calculation and tie up your computer
without producing any results(!)  There are several things
you can experiment with:
\vskip 10pt
\begin{itemize}
\item the monomial order you use (look at the online
help for MonomialOrder)
\item you can reduce the number of variables by
looking at one ``slice'' $x = const$ or $y = const$ at a
time.  This generally speeds things up {\it a lot}, but
you will need to look at several of these computations
to make sure the robot follows an acceptable path.
\item  However you approach the problem, you will need 
{\it give a justification for why your path
will not run the robot into the walls}.
\end{itemize}
\end{enumerate}
\end{document}
