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

%% Sums, products, union & intersections, limits
\def\Sum{\sum\limits}
\def\Prod{\prod\limits}
\def\Cap{\mathop\cap\limits}
\def\Cup{\mathop\cup\limits}
\def\Times{\mathop\times\limits}
\def\Oplus{\mathop\oplus\limits}
\def\Lim{\mathop\lim\limits}


\newcommand{\D}{\mathcal{D}}
\newcommand{\F}{\mathbb{F}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\def\<{\langle}
\def\>{\rangle}
\def\hat{\widehat}

\def\And{\wedge}
\def\Or{\vee}
\def\Not{\overline}
\def\0{\bold{0}}
\def\s{\bold{s}}
\def\t{\bold{t}}
\def\u{\bold{u}}
\def\v{\bold{v}}
\def\x{\bold{x}}
\newcommand{\into}{\hookrightarrow}
\newcommand{\longto}{\longrightarrow}

\DeclareMathOperator{\Mod}{Mod}
\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}


\colorlet{vRed}{red!50!white}
\definecolor{vBlue}{rgb}{.60, .75, 1}
\colorlet{fRed}{red!30!white}
\colorlet{fBlue}{blue!30!white}
\colorlet{tRed}{red!70!white}
\colorlet{tBlue}{blue!60!white}
\colorlet{boxRed}{red!25!white}         %% Cosets not in the normalizer
\colorlet{boxBlue}{blue!20!white}
\colorlet{cosetBlue}{blue!15!white}
\colorlet{cosetRed}{red!15!white}
\definecolor{faded}{rgb}{.75,.75,.75}
\tikzstyle{f} = [faded]

\definecolor{Red}{rgb}{.9,0,0}
\definecolor{Blue}{rgb}{0,0,.9}
\definecolor{Green}{HTML}{3CAC13}
\definecolor{Purple}{HTML}{D287FF}
\tikzstyle{V} = [rectangle, draw, fill=white,inner sep=2pt,minimum size=2.5mm]
\tikzstyle{Up} = [rectangle, draw, fill=boxBlue,inner sep=2pt,minimum size=2.5mm]
\tikzstyle{Down} = [rectangle, draw, fill=boxRed,inner sep=2pt,minimum size=2.5mm]
\tikzstyle{UP} = [rectangle, draw, fill=tBlue,inner sep=2pt,minimum size=2.5mm]
\tikzstyle{DOWN} = [rectangle, draw, fill=tRed,inner sep=2pt,minimum size=2.5mm]

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


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

\begin{document}

$\;$ \vspace{-4mm}

\noindent \textbf{Read}. \emph{Mathematical Concepts in Modern
  Biology}, by Robeva/Hodge. Ch. 3: Inferring the topology of gene regulatory networks: an algebraic approach to reverse engineering, and \emph{Algebraic and Combinatorial Computational Biology}, by Robeva/Hodge. Ch 6: Inferring interactions in molecular networks via primary decompositions of monomial ideals. \\

%\noindent \textbf{Do}. Familiarize yourself with either Macaulay2,
%Singular, or Sage. \\

\noindent \textbf{Exercises}.

\begin{enumerate}

\item \textbf{Asynchronous automata}. Draw the asynchronous automaton the following Boolean model:
  \[
  (f_1,f_2,f_3,f_4)=({\color{Blue}x_2\And\Not{x_3}},\;\;{\color{Red}\Not{x_1}},\;\; {\color{Green}x_3\Or x_4},\;\;{\color{Purple}x_1+x_2}).
  \]
  Then, partition the nodes into strongly connected components, and
  draw the acyclic directed graph formed by collapsing the SCCs into
  single nodes.  Find the attractors and classify them by type: fixed
  point, cyclic attractor, or complex attractor. The Boolean lattice
  $B_4$ is shown below.
  \[
  \begin{tikzpicture}[scale=2]
    \tikzstyle{v} = [rectangle, draw, inner sep=2pt]
    \tikzstyle{fp} = [rectangle, draw, fill=yellow,inner sep=1pt]
    \tikzstyle{1} = [-stealth,very thick,Blue]
    \tikzstyle{11} = [stealth-stealth,very thick,Blue]
    \tikzstyle{2} = [-stealth,very thick,Red]
    \tikzstyle{3} = [-stealth,very thick,Green]
    \tikzstyle{33} = [stealth-stealth,very thick,Green]
    \tikzstyle{4} = [-stealth,very thick,Purple]
    \tikzstyle{44} = [stealth-stealth,very thick,Purple]
    \tikzset{every loop/.style={min distance=3mm,looseness=5}}
    \tikzstyle{every node}=[font=\small]
    %%
    \begin{scope}[shift={(0,0)},shorten >= 0pt,shorten <= 0pt]
      \node (0000) [v] at (0,1) {$0000$};
      \node (0001) [v] at (2.25,2) {$0001$};
      \node (0010) [v] at (.75,2) {$0010$};
      \node (0100) [v] at (-.75,2) {$0100$};
      \node (1000) [v] at (-2.25,2) {$1000$};
      \node (0011) [v] at (3.75,3) {$0011$};
      \node (0101) [v] at (2.25,3) {$0101$};
      \node (0110) [v] at (.75,3) {$0110$};
      \node (1001) [v] at (-.75,3) {$1001$};
      \node (1010) [v] at (-2.25,3) {$1010$};
      \node (1100) [v] at (-3.75,3) {$1100$};
      \node (0111) [v] at (2.25,4) {$0111$};
      \node (1011) [v] at (.75,4) {$1011$};
      \node (1101) [v] at (-.75,4) {$1101$};
      \node (1110) [v] at (-2.25,4) {$1110$};
      %\draw[dashed] (-2.25,4) circle [x radius=.4cm, y radius=.2cm];
      \node (1111) [v] at (0,5) {$1111$};
      \draw [f] (0000) to (0001);
      \draw [f] (0010) to (0000);
      \draw [f] (0000) to (0100);
      \draw [f] (0000) to (1000);
      \draw [f] (0001) to (0011);
      \draw [f] (0101) to (0001);
      \draw [f] (0001) to (1001);
      \draw [f] (0010) to (0011);
      \draw [f] (0010) to (0110);
      \draw [f] (0010) to (1010);
      \draw [f] (0100) to (0101);
      \draw [f] (0100) to (0110);
      \draw [f] (0100) to (1100);
      \draw [f] (1001) to (1000);
      \draw [f] (1010) to (1000);
      \draw [f] (1000) to (1100);
      \draw [f] (0011) to (0111);
      \draw [f] (0011) to (1011);
      \draw [f] (0111) to (0101);
      \draw [f] (0101) to (1101);
      \draw [f] (0110) to (0111);
      \draw [f] (0110) to (1110);
      \draw [f] (1001) to (1011);
      \draw [f] (1101) to (1001);
      \draw [f] (1001) to (1011);
      \draw [f] (1011) to (1010);
      \draw [f] (1010) to (1110);
      \draw [f] (1101) to (1100);
      \draw [f] (1100) to (1110);
      \draw [f] (0111) to (1111);
      \draw [f] (1011) to (1111);
      \draw [f] (1111) to (1101);
      \draw [f] (1111) to (1110);
    \end{scope}
  \end{tikzpicture}
  \]


\item \textbf{Alexander duality}.  Consider the simplicial complex $\Delta$ over $X=\{a,b,c,d,e\}$ shown below:
  \[
  \begin{tikzpicture}[scale=1.25, xscale=1.25,yscale=.7,v/.style={draw,Red,fill=Red, circle, inner sep=1pt},baseline=-1ex]
    \draw[Red,fill=Red!30] (0,0) -- (.707,1) -- (1.41,0) -- cycle;
    \node[v, label=left:{$a$}] (a) at (.707,2) {};
    \node[v, label=below:{$b$}] (b) at (.707,1) {};
    \node[v, label=above:{$\!\!c$}] (c) at (0,0) {};
    \node[v, label=above:{$d\!\!$}] (d) at (1.41,0) {};
    \node[v, label=above:{$e$}] (e) at (2.41,0) {};
    \draw [Red] (a)--(b); \draw [Red] (a)--(c); \draw [Red] (a)--(d);
    \draw [Red] (d)--(e);
  \end{tikzpicture}
  \]
  The 5-dimensional Boolean lattice $2^X$ also appears below.
  \begin{enumerate}[(i)]
  \item In the Boolean lattice, color the faces red, and the nonfaces blue.
  \item Find the maximal faces and minimal generators of the
    Stanley-Reisner ideal $I_{\Delta^c}$.
  \item Compute the primary decomposition of $I_{\Delta^c}$.
  \end{enumerate}
  \[
  \begin{tikzpicture}[scale=1.7]
    \tikzstyle{B} = [Blue]
    \tikzstyle{R} = [Red]
    \tikzstyle{F} = [f,dashed]
    \tikzstyle{every node}=[font=\footnotesize]
    %% Change V within \node[...] to....
    %% Up for light blue
    %% UP for dark blue
    %% DOWN for dark red
    %% Down for light red
    \node[anchor=south,V] (abcde) at (0,0) {$abcde$};
    \node[anchor=south,V] (abcd) at (-4,-1) {$abcd$};
    \node[anchor=south,V] (abce) at (-2,-1) {$abce$};
    \node[anchor=south,V] (abde) at (0,-1) {$abde$};
    \node[anchor=south,V] (acde) at (2,-1) {$acde$};
    \node[anchor=south,V] (bcde) at (4,-1) {$bcde$};
    \node[anchor=south,V] (abc) at (-4.5,-2) {$abc$};
    \node[anchor=south,V] (abd) at (-3.5,-2) {$abd$};
    \node[anchor=south,V] (abe) at (-2.5,-2) {$abe$};
    \node[anchor=south,V] (acd) at (-1.5,-2) {$acd$};
    \node[anchor=south,V] (ace) at (-.5,-2) {$ace$};
    \node[anchor=south,V] (ade) at (.5,-2) {$ade$};
    \node[anchor=south,V] (bcd) at (1.5,-2) {$bcd$};
    \node[anchor=south,V] (bce) at (2.5,-2) {$bce$};
    \node[anchor=south,V] (bde) at (3.5,-2) {$bde$};
    \node[anchor=south,V] (cde) at (4.5,-2) {$cde$};
    %%
    \node[anchor=south,V] (ab) at (-4.5,-3) {$ab$};
    \node[anchor=south,V] (ac) at (-3.5,-3) {$ac$};
    \node[anchor=south,V] (ad) at (-2.5,-3) {$ad$};
    \node[anchor=south,V] (ae) at (-1.5,-3) {$ae$};
    \node[anchor=south,V] (bc) at (-.5,-3) {$bc$};
    \node[anchor=south,V] (bd) at (.5,-3) {$bd$};
    \node[anchor=south,V] (be) at (1.5,-3) {$be$};
    \node[anchor=south,V] (cd) at (2.5,-3) {$cd$};
    \node[anchor=south,V] (ce) at (3.5,-3) {$ce$};
    \node[anchor=south,V] (de) at (4.5,-3) {$de$};
    %%
    \node[anchor=south,V] (a) at (-4,-4) {$a$};
    \node[anchor=south,V] (b) at (-2,-4) {$b$};
    \node[anchor=south,V] (c) at (0,-4) {$c$};
    \node[anchor=south,V] (d) at (2,-4) {$d$};
    \node[anchor=south,V] (e) at (4,-4) {$e$};
    \node[anchor=south,V] (empty) at (0,-5) {$\emptyset$};
    %
    %% Change [f] to:
    %% [B] for blue
    %% [R] for red
    %% [F] for dashed grey
    %%
    \draw[f] (abcde) -- (abcd); \draw[f] (abcde) -- (abce);
    \draw[f] (abcde) -- (abde);
    \draw[f] (abcde) -- (acde); \draw[f] (abcde) -- (bcde);
    %
    \draw[f] (abcd) -- (abc); \draw[f] (abcd) -- (abd);
    \draw[f] (abcd) -- (acd); \draw[f] (abcd) -- (bcd);
    %
    \draw[f] (abce) -- (abc); \draw[f] (abce) -- (abe);
    \draw[f] (abce) -- (ace); \draw[f] (abce) -- (bce);
    %
    \draw[f] (abde) -- (abd); \draw[f] (abde) -- (abe);
    \draw[f] (abde) -- (ade); \draw[f] (abde) -- (bde);
    %
    \draw[f] (acde) -- (acd); \draw[f] (acde) -- (ace);
    \draw[f] (acde) -- (ade); \draw[f] (cde) -- (acde);
    %
    \draw[f] (bcde) -- (bcd); \draw[f] (bcde) -- (bce);
    \draw[f] (bcde) -- (bde); \draw[f] (cde) -- (bcde);
    %
    \draw[f] (abc) -- (ab); \draw[f] (abc) -- (ac); \draw[f] (abc) -- (bc);
    \draw[f] (abd) -- (ab); \draw[f] (abd) -- (ad); \draw[f] (abd) -- (bd);
    \draw[f] (abe) -- (ab); \draw[f] (abe) -- (ae); \draw[f] (abe) -- (be);
    \draw[f] (acd) -- (ac); \draw[f] (acd) -- (ad); \draw[f] (acd) -- (cd);
    \draw[f] (ace) -- (ac); \draw[f] (ace) -- (ae); \draw[f] (ace) -- (ce);
    \draw[f] (ade) -- (ad); \draw[f] (ade) -- (ae); \draw[f] (ade) -- (de);
    \draw[f] (bcd) -- (bc); \draw[f] (bcd) -- (bd); \draw[f] (bcd) -- (cd);
    \draw[f] (bce) -- (bc); \draw[f] (bce) -- (be); \draw[f] (bce) -- (ce);
    \draw[f] (bde) -- (bd); \draw[f] (bde) -- (be); \draw[f] (bde) -- (de);
    \draw[f] (cde) -- (cd); \draw[f] (cde) -- (ce); \draw[f] (cde) -- (de);
    %
    \draw[f] (ab) -- (a); \draw[f] (ab) -- (b);
    \draw[f] (ac) -- (a); \draw[f] (ac) -- (c);
    \draw[f] (ad) -- (a); \draw[f] (ad) -- (d);
    \draw[f] (ae) -- (a); \draw[f] (ae) -- (e);
    \draw[f] (bc) -- (b); \draw[f] (bc) -- (c);
    \draw[f] (bd) -- (b); \draw[f] (bd) -- (d);
    \draw[f] (be) -- (b); \draw[f] (be) -- (e);
    \draw[f] (cd) -- (c); \draw[f] (cd) -- (d);
    \draw[f] (ce) -- (c); \draw[f] (ce) -- (e);
    \draw[f] (de) -- (d); \draw[f] (de) -- (e);
    %%
    \draw[f] (a) -- (empty); \draw[f] (b) -- (empty); \draw[f] (c) -- (empty);
    \draw[f] (d) -- (empty); \draw[f] (e) -- (empty);
  \end{tikzpicture}
  \]

\item \textbf{Reverse-engineering a Boolean model}. Consider a Boolean
  model $f=(f_1,f_2,f_3)$ whose (synchronous) phase spaces consists of
  the following:
  \[
  (0,0,1)\stackrel{f}{\longto}(1,0,1)\stackrel{f}{\longto}(1,1,1)
  \stackrel{f}{\longto}(1,1,0)
  \stackrel{f}{\longto}(0,1,0)
  \stackrel{f}{\longto}(0,0,0).
  \]
  In this problem, you will reverse-engineer the wiring diagram and
  then the models space.
  \begin{enumerate}
  \item Do the following steps for each $k=1,2,3$.
    \begin{enumerate}
    \item Write down the corresponding set of \emph{data}
      \[
      \mathcal{D}_k:=\big\{(\s_1,t_{1k}),\dots,(\s_5,t_{5k})\big\}
      \]
      that arises from the $k^{\rm th}$ coordinate of this time-series.
    \item Find the monomial ideal $I_{\Delta_k^c}$ of non-disposable
      sets, and compute its primary decomposition to find the min-sets.
    \item Find the pseudomonomial ideal $J_{\Delta_k^c}$, and compute
      its primary decomposition to find the signed min-sets.
    \end{enumerate}
  \item Find all min-sets and signed min-sets of the original Boolean model.
  \item Use Macaulay2 to compute the vanishing ideal $I(\D)$. How big
    is it?
  \item Find the model space
    $\Mod(\D)=\Prod_{i=1}^3\big[f_i+I(\D)\big]$. Use Lagrange
    interpolation to find $f=(f_1,f_2,f_3)$, and Macaulay2 to reduce
    them modulo $I(\D)$. \\
  \end{enumerate}

\end{enumerate}
\end{document}




\end{enumerate}
