\documentclass[12pt]{article}
\usepackage{fancyhdr,fancybox,amssymb,epsfig,amsmath,latexsym,bm}
\usepackage{enumerate}
\usepackage{tikz}
\usepackage[all]{xy}
\usepackage{stackrel}
\usepackage[]{hyperref}
\usetikzlibrary{arrows}
\usetikzlibrary{decorations.markings}

\tikzset{big arrow/.style={decoration={markings,mark=at position 0.6
      with {\arrow[scale=2]{>}}}, postaction={decorate}, shorten >=1pt}}

% Code to make an augmented matrix (Usage: \begin{bmatrix}[ccc|c])
\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
  \hskip -\arraycolsep
  \let\@ifnextchar\new@ifnextchar
  \array{#1}}
\makeatother

\topmargin=-.5in
\headsep=0.2in
\oddsidemargin=0in
\textwidth=6.7in
\textheight=9.2in
\footskip=.5in

% Change this line to \def\bold{\mathbf} for ``upright boldface.''
\def\bold{\bm}

\newcommand{\C}{\mathbb{C}}
\newcommand{\F}{\mathbb{F}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\def\0{\bold{0}}
\def\u{\bold{u}}
\def\v{\bold{v}}
\def\x{\bold{x}}
\def\<{\langle}
\def\>{\rangle}
\def\hat{\widehat}

\def\And{\wedge}
\def\Or{\vee}

\DeclareMathOperator{\Span}{Span}
\DeclareMathOperator{\rank}{rank}
\newcommand{\vv}[2]{\begin{bmatrix} #1 \\ #2 \end{bmatrix}}
\newcommand{\vvv}[3]{\begin{bmatrix} #1 \\ #2 \\ #3 \end{bmatrix}}

\newcommand{\ds}{\displaystyle}

\renewcommand{\footrulewidth}{1pt}
\newenvironment{proof}[1][Proof.]{\smallskip\begin{trivlist}
    \item[\hskip \labelsep {\sffamily #1}]}{\qed\end{trivlist}\bigskip}
\newenvironment{sol}[1][Solution.]{\smallskip\begin{trivlist}
    \item[\hskip \labelsep {\sffamily #1}]}{\qed\end{trivlist}\bigskip}
\newenvironment{fminipage}
{\setlength{\fboxsep}{15pt}\begin{Sbox}\begin{minipage}}
{\end{minipage}\end{Sbox}\fbox{\TheSbox}}
\newcommand{\qed}{\hfill \ensuremath{\Box}}
\newcommand{\disp}{\displaystyle}


\pagestyle{fancy} \lhead{{\sf Homework 7 $|$ Due October 19 (Thursday)
}} \rhead{\thepage} \cfoot{{\sf Math 4500 $|$ Mathematical Modeling
    $|$ Fall 2017 $|$ M.~Macauley}}


\begin{document}

$\;$

\noindent \emph{Read}: Chapter 1: Mechanisms of gene regulation: Boolean
network models of the lactose operon in \emph{Escherichia coli}, by
R.~Robeva, B.~Kirkwood, and R.~Davis, pages 1--35. \\

\noindent \emph{Do}: Create an account on the Sage Math Cloud ({\tt
  https://cloud.sagemath.org}). \medskip


\begin{enumerate}

  % Robeva/Hodge, Exercises 1.9 (highly modified)
\item Consider the following system of polynomial equations:
  \begin{align*}
    x^2+y^2+xyz&=1 \\
    x^2+y+z^2&=0 \\
    x-z&=0
  \end{align*}
  To compute a Gr\"obner basis for this system over $\Q$, type the following
  commands into Sage, one-by-one, and press Shift$+$Enter after each one:
\begin{verbatim}
                P.<x,y,z> = PolynomialRing(QQ, 3, order='lex'); P
                I = ideal(x^2+y^2+x*y*z-1, x^2+y+z^2, x-z); I
                B = I.groebner_basis(); B
\end{verbatim}

\begin{enumerate}

\item For the system above, use the Gr\"obner basis you just computed to
  write a simpler system of polynomial equations that has the same
  set of solutions. Solve that system \emph{by hand} (it's not hard)
  to find all \emph{real-valued} solutions to the original system. 

\item Next, solve the original system but over the binary field,
  $\F_2=\{0,1\}$. For this, you need to replace {\tt RR} with {\tt
  GF(2)} in the Sage code.

\item Now, solve the original system but over the ternary field,
  $\F_3=\{0,1,2\}$. \\

\end{enumerate}

%%---------------------------------------------------------------------

\item Repeat the previous problem for this system of
  polynomial equations:
  \begin{align*}
    x^2y-z^3&=0 \\ 2xy-4z&=1 \\ z-y^2&=0 \\ x^3-4yz&=0
  \end{align*}


%%---------------------------------------------------------------------  


%\newpage
%
%$\;$\vspace{.1in}


\item Consider the following simple model of the \emph{lac} operon:
  \[
    \begin{array}{lll}
    f_M=\overline{R}\hspace{15mm} && f_R=\overline{A} \\ f_P=M && f_A=L\And B
    \\ f_B=M && f_L=P
  \end{array}
  \]
  For this problem, make the convention that
  $(x_1,x_2,x_3,x_4,x_5,x_6)=(M,P,B,R,A,L)$.
  \begin{enumerate}
    \item Justify each function in a single sentence. What other
      assumptions are made in this model? (E.g., presence or absense of external
      lactose and glucose?)
    \item Write each function as a polynomial over
      $\F_2=\{0,1\}$. Then, write out the system of equations
      $\{f_i+x_i=0$, $i=1,\dots,6\}$, whose solutions are the fixed points
      of the Boolean network.
    \item Go into Sage and type the following command:
 \begin{verbatim}
   P.<x1,x2,x3,x4,x5,x6> = PolynomialRing(GF(2), 6, order='lex'); P
 \end{verbatim}
    Now, define an ideal $I$ generated by the six polynomials,
    $f_i+x_i$, from Part~(b). Use Sage to compute the Gr\"obner basis
    of this ideal, and include a print-out of a screenshot.
  \item The Gr\"obner basis describes a simpler system of equations
    with the same solutions as the original. Write out this system
    and then solve it by hand to determine the fixed points of the
    Boolean network.
  \item Compute the entire phase space of your model with the help of
    either the \emph{Analysis of Dynamic Algebraic Models} (ADAM)
    toolbox, at \url{http://adam.plantsimlab.org/}, or \emph{TURING:
      Algorithms for computation with finite dynamical systems}, at
    \url{http://www.discretedynamics.org}. Include a print-out of a
    screenshot. Are there any periodic points that are not fixed
    points?
  \end{enumerate}




  
\end{enumerate}


\end{document}


