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

\def\And{\wedge}
\def\Or{\vee}
%\def\Not{\neg}
\newcommand{\Not}[1]{\overline #1}



\DeclareMathOperator{\OR}{OR}
\DeclareMathOperator{\NOR}{NOR}
\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 8 $|$ Due April 1 (Friday)
}} \rhead{\thepage} \cfoot{{\sf Math 4500 $|$ Mathematical Modeling
    $|$ Spring 2022 $|$ M.~Macauley}}


\begin{document}

%$\;$

\noindent \emph{Read} Robeva/Hodge, 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,
pp. 1--35.

\begin{enumerate}

  \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 Sketch a (signed) wiring diagram for this model.
  \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 Compute the entire phase space of your model using the Cyclone
    program in AlgoRun, at \url{http://cyclone.algorun.org}. Include a
    print-out or screenshot. Describe each basin of attraction
    (connected component) by its size and limit cycle.
  \end{enumerate}

  
  % Robeva/Hodge, Exercises 1.12--14 (highly modified)
\item Consider a Boolean model of the \emph{lac} operon, based on five
  variables: mRNA ($M$), $\beta$-galactosidase ($B$), allolactose
  ($A$), intracellular lactose ($L$), and \emph{lac} permease ($P$),
  and the following transition functions:
  \begin{align*}
    f_M&=A \\
    f_B&=M \\
    f_A&=A\vee(L\wedge B) \\
    f_L&=P\vee(L\wedge\overline{B}) \\
    f_P&=M
  \end{align*}
  This model does not have any parameters -- it assumes that
  extracellular lactose is always available and extracellular glucose
  is always unavailable, and thus it is only able to describe the
  behavior of the system under the conditions.
  \begin{enumerate}
  \item As we saw in class, the dynamics do not accurately reflect the
    behavior of the biological system it is meant to model. Therefore,
    something is wrong. For each function, decide if it accurately
    reflects the underlying biology and/or the model assumptions.
  \item Propose a modification of the transition functions aimed at
    eliminating the biologically infeasible fixed point. Give the
    rationale for your modification and specify the biological
    mechanism or model assumptions that justify the change.
  \item Draw the wiring diagram and include print-out or screenshot of
    the phase space of your new model using AlgoRun.
  \item Analyze your model. How many fixed points are there? Do they
    all correspond to biologically realistic situations? Note that
    there should be no limit cycles of size $k\geq 2$. \\
  \end{enumerate}


  
\item Consider the following model of the trpyptophanase (\emph{tna}) operon in E. coli:
  \[
  \begin{array}{ll}
    f_A&=M\And\Not{\gamma} \\
    f_B&=M \\
    f_C&=\Not{\gamma}\\
    f_M&=C\And\Not{P} \\
    f_P&=\Not{W}\And\Not{W_m} \\
    f_W&=\omega_e\And B \\
    f_{W_m}&=(\omega_{em}\And B)\Or \omega_e\Or W
  \end{array}
  \]
  There are three parameters: $\gamma$ is glucose, $\omega_e$ is high
  levels of extracellular tryptophan, and $\omega_{em}$ represents (at
  least) medium levels of extracellular tryptophan.
  \begin{enumerate}
  \item Use Macaulay2 to convert these functions into polynomials over
    $\F_2=\{0,1\}$. Include the lines of code you used. Use
    $(x_1,x_2,x_3,x_4,x_5,x_6,x_7)=(A,B,C,M,P,W,W_m)$.
  \item Use AlgoRun to compute the phase space when
    $(\gamma,\omega_e,\omega_{em})=(0,0,1)$. Briefly summarize what you learn
    from this.
  \item For all three parameter vectors with $\gamma=0$, use the
    BoolNet program in R to render the phase space. Downloading
    RStudio is recommended. For each one, make a table with the number
    of basins of attraction, and the size of the limit cycle of
    each. Include a screenshot of the phase space. (Everyone's in the
    class should look different because there is some randomness for
    how it arranges the nodes.)
  \item For each case where $\gamma=0$, use BoolNet to find the
    attractors under an asynchronous update, and describe your
    findings.
  \end{enumerate}


\end{enumerate}
  
\end{document}


