\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{\F}{\mathbb{F}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\def\0{\bold{0}}
\def\A{\bold{A}}
\def\B{\bold{B}}
\def\C{\bold{C}}
\def\I{\bold{I}}
\def\M{\bold{M}}
\def\P{\bold{P}}
\def\Q{\bold{Q}}
\def\a{\bold{a}}
\def\b{\bold{b}}
\def\c{\bold{c}}
\def\e{\bold{e}}
\def\p{\bold{p}}
\def\q{\bold{q}}
\def\t{\bold{t}}
\def\u{\bold{u}}
\def\v{\bold{v}}
\def\x{\bold{x}}
\def\<{\langle}
\def\>{\rangle}
\def\hat{\widehat}

\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 March 27 (Friday)
}} \rhead{\thepage} \cfoot{{\sf Math 4500 $|$ Mathematical Modeling
    $|$ Spring 2015 $|$ 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 either the Sage Notebook
({\tt http://www.sagemath.org/}) or on the Clemson Sage Server ({\tt
  https://sage.math.clemson.edu:34567}). \medskip


\begin{enumerate}

\item Recall the model of Stigler and Veliz-Cuba for the \emph{lac}
  operon, where a global system state is a $9$-varible Boolean vector
  $(M,P,B,C,R,A,A_\ell,L,L_\ell)=(x_1,x_2,\dots,x_9)\in\F_2^9$:
  \[
  \begin{array}{lll}
    f_M=\overline{R}\wedge C && \\ f_P=M && f_B=M \\ f_C=\overline{G_e}
    && f_R=\overline{A}\wedge\overline{A_\ell} \\ f_A=L\wedge B &&
    f_{A_\ell}=A\vee L\vee L_\ell \\ f_L=\overline{G_e}\wedge P\wedge L_e && 
    f_{L_\ell}=\overline{G_e}\wedge(L\vee L_e)
  \end{array}
  \]
  Give a well-written one sentence justification for each
  function. For example, $f_M=\overline{R}\wedge C$ could be: ``mRNA
  is produced if the \emph{lac} repressor protein is absent and the
  concentration of the catabolite activator protein (CAP) is high.'' \\
  
  
  
  % 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, type the following
  commands into Sage, one-by-one, and press Shift$+$Enter after each one:
\begin{verbatim}
                P.<x,y,z> = PolynomialRing(RR, 3, order='lex'); P
                I = ideal(x^2+y^2+xyz-1, x^2+y+z^2, x-z); I
                B = I.groebner_basis(); B
\end{verbatim}

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


\item Repeat the steps of 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 Recall the first and most basic model of the \emph{lac} operon
  that we saw:
  \[
  f_M=\overline{G_e}\wedge(L\vee L_e),\qquad f_E=M,\qquad 
  f_L=\overline{G_e}\wedge((E\wedge L_e)\vee(L\wedge\overline{E})).
  \]
  Propose a modified model by introducing a variable $L_\ell$ which
  denotes ``\emph{at least low levels of internal lactose}.'' This model will
  have Boolean variables $M,E,L,L_\ell$ and parameters $G_e,L_e$.
  \begin{enumerate}[(a)]
    \item Write out each function as a Boolean polynomial.
    \item Use Gr\"obener bases and Sage to compute the fixed points
      of this model.
    \item Compute the entire phase space of your model with the help
      of the Analysis of Dynamic Algebraic Models (ADAM) toolbox, at
      \url{http://adam.plantsimlab.org/}. Use the Open Polynomial
      Dynamical System (oPDS) option to enter your model, and print
      your results for each of the four possibilities $(G_e,L_e)$ of
      external glucose and lactose.
    \item Do the fixed points of this model make biological sense? Are
      you results biologically reasonable? Why or why not? \bigskip
  \end{enumerate}


  
\item Go into Sage, and click ``New Worksheet'', give it a name, and
  then click ``File'' and ``Load new worksheet from a file.'' There
  will be a box where you can enter the URL of an existing worksheet. Enter the following address, which is the file for the original $9$-variable model of the \emph{lac} operon:
  \begin{center} \small
   \url{http://www.math.clemson.edu/~macaule/classes/s15_math4500/lac-operon.sws}
\end{center}
  \begin{enumerate}[(a)]
  \item In this $9$-variable Boolean model, there is no variable to
    represent the cAMP receptor protein \emph{cmp}. Could you justify
    this decision? 
  \item Propose a new model with one additional variable
    $C_{\small\textsl{AMP}}$ that represents \emph{cmp}.
  \item Modify your Sage worksheet for your new model, and use
    Gr\"obener bases to compute the fixed points for each of the four
    possibilities $(G_e,L_e)$ of external glucose and lactose. Are
    these fixed points biologically feasible?
  \item Use the ADAM software to determine if there are any periodic
    cycles that are not fixed points. 
  \item Any final thoughts or comments? Do you notice any qualitative
    differences between this model and the original?
  \end{enumerate}

 


  
\end{enumerate}


\end{document}


