\documentclass[12pt]{article}
\usepackage{fancyhdr,fancybox,amssymb,epsfig,amsmath,latexsym,bm}
\usepackage{enumerate}
\usepackage{tikz}
\usepackage[all]{xy}
\usepackage[numbers,square,sort&compress]{natbib}
\usepackage{bibentry}
\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{\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}
\def\Not{\overline}

\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}



\setlength{\headheight}{15pt}
\lhead{{\sf Algebraic Systems Biology}: Homework 2}
\chead{}\rhead{\thepage}
\lfoot{Due Saturday, 3 May 2025}
\cfoot{}\rfoot{Written by M.~Macauley}
\pagestyle{fancy}

\begin{document}

$\;$ \vspace{-4mm}

\noindent \textbf{Read}. \emph{Algebraic and Discrete Mathematical Methods for Modern Biology}, by Robeva. Ch 6: Reduction of Boolean models. \\


\noindent \textbf{Exercises}.

\begin{enumerate}
  
\item The following is a model of the tryptophanase (\emph{tna}) operon in \emph{E.\ coli}:
  \[
  \begin{array}{llll}
    f_A=M\And\Not{\gamma} \qquad &&& f_W=\omega_e\And B \\
    f_B=M &&& f_{W_m}=(\omega_{em}\And B)\Or \omega_e\Or W \\
    f_C=\Not{\gamma} &&& f_{\omega_e}=\omega_e \\
    f_M=C\And\Not{P} &&& f_{\omega_{em}}=\omega_{em} \\
    f_P=\Not{W}\And\Not{W_m} &&& f_\gamma=\gamma \\
  \end{array}
  \]
  The parameters are encoded by ``frozen'' variables: $\gamma$
  is glucose, $\omega_e$ is high levels of extracellular tryptophan,
  and $\omega_{em}$ represents (at least) medium levels.
  \begin{enumerate}
  \item Write down a system of nonlinear equations whose solutions are the fixed points.
  \item Solve this system computationally by using Macaulay2 to compute a Gr\"obner basis of a particular ideal, and then solve the resulting simpler system by hand.
  \item Use Cyclone to find the attractors. Are there attractors that are not fixed points?
  \item Use BoolNet in RStudio to plot the state space. First, run the commands
\begin{verbatim}
  >  install.packages("BoolNet") 
  >  library(BoolNet)
\end{verbatim}
Then, create a file ``{\tt tna-operon.txt}'' with the model, and run the following commands:
\begin{verbatim}
  >  tnaModel <- loadNetwork("tna-operon.txt") 
  >  tnaAttractors <- getAttractors(tnaModel)
  >  plotStateGraph(tnaAttractors)
\end{verbatim}
You have to set the working directory to where the file is located. There are sample BoolNet files on course webpage. Each must end in a single newline. 
\item Use BoolNet to find the
  attractors under an asynchronous update, and summarize your
  findings. This can be done with the command:
\begin{verbatim}
    >  getAttractors(tnaModel,type="asynchronous")
\end{verbatim}
How does this compare to the synchronous state space?
\item Does this model exhibits bistability? Justify your answer. \\
  \end{enumerate}

\item More to be added\dots
  
\end{enumerate}
\end{document}

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

\end{enumerate}


\end{document}
