\documentclass[12pt, oneside]{article}   	% use "amsart" instead of "article" for AMSLaTeX format
\usepackage[margin=0.5in]{geometry}   
%\geometry{landscape}                		% Activate for for rotated page geometry
%\usepackage[parfill]{parskip}    		% Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}				% Use pdf, png, jpg, or eps� with pdflatex; use eps in DVI mode
								% TeX will automatically convert eps --> pdf in pdflatex	
\usepackage[english]{babel}								
\usepackage{epstopdf} 	
\usepackage{amssymb}
\usepackage{float}
\usepackage{caption}
\usepackage{varwidth}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{hyperref}
\usepackage{array}
\usepackage{enumerate}

\def\hb{\hfil \break}
\def\v{\vskip 10pt}
\baselineskip=20pt
\parskip 12pt
\parindent 0pt
%\usepackage{showframe}
\title{Midterm}
%\author{Leyda Almod\'{o}var}
\date{}							% Activate to display a given date or no date

\begin{document}

%\maketitle
{\bf Math 3900 Midterm 
\vskip -10pt
                               March 5, 2015 \hfill  SHOW ALL WORK and SIMPLIFY your answers
}
\v

1.  Circle T for True and F for False:

[3]~~ 1a.)  The boundary of a 2-dimensional face is a 1-dimensional cycle. 
\hfill T \hskip 0.5in  F

[3]~~ 1b.)  A circular disk is topologically equivalent to a triangle. 
\hfill T \hskip 0.5in  F

%[3]~~ 1c\hfill T \hskip 0.5in  F

[3]~~ 2.) Circle the correct answer.  Suppose the first row of a csv file contains the names of your columns using characters while the remaining rows contain only numbers.  Which command can you use to correctly read in this csv file so that your data set consists of only numbers.

\vskip -100pt

\begin{enumerate}[(A.)] 
\setlength{\itemindent}{30pt}
\item data $<$-- read.csv(``Book1.csv", header = TRUE) 
\item data $<$-- read.csv(``Book1.csv", header = FALSE) 
\item data $<$-- read.table(``Book1.csv", header = FALSE) 
\item data $<$-- import.data(``Book1.csv", header = FALSE) 
\item data $<$-- import.data(``Book1.csv")
\end{enumerate}
\v

[3]~~ 3.)  What command do you need to enter into Rstudio to access the help page for the function read.table

\eject

\vskip -3in
\leftline{\hskip -.6in \includegraphics[width=1.1\textwidth]{Presentation2} }
\vskip -1.6in
[12]~ 4a.)  Find the barcode for $H_0$ for the above filtration (you do not need to show work)
\vfill
[12]~ 4b.)  Find the barcode for $H_1$ for the above filtration  (you do not need to show work)
\vfill
\eject

[60]~ 5.)  Let C be the simplicial complex: 
\vskip -50pt

  %\begin{figure}[H]
  \rightline{  \includegraphics[width=0.5\textwidth]{Presentation1}  ~~~~~~~~~~~~~~~~~~~~~~~}
  %\end{figure}
  \vskip -60pt
  
  %% 6x4  10 14  6  6         12  28
Find the following:

\begin{enumerate}[(a.)] 
\item $C_0 = \underline{\hskip 3in}$
\v\v
\item $C_1 = \underline{\hskip 3in}$
\v\v
\item $C_2 = \underline{\hskip 3in}$
\v\v


\item $\partial_1(e_1 + e_4 + e_5) = \underline{\hskip 3in}$
\v\v\v\v
\item $e_1 + e_4 + e_5$ is in $C_n$ where $n$ =  \underline{\hskip .5in}
\v\v
\item $\partial(e_1 + e_4 + e_5)$ is in $C_k$ where $n$ =  \underline{\hskip .5in}
\vskip 2in
\item The matrix for $\partial_1:  C_1 \rightarrow C_0$ =  \underline{\hskip 3in}

\vskip 1.5in

\eject
 \rightline{  \includegraphics[width=0.5\textwidth]{Presentation1}}

\item $Z_1 =  \underline{\hskip 3in}$
\vfill
\item $B_1 = \underline{\hskip 3in}$
\vfill
\item $H_1 = \underline{\hskip 3in}$
\vfill\vfill
\end{enumerate}
\end{document}
\v
\hrule

\item $Z_0 = \{\Sigma _i n_i v_i$ in $C_0 ~|~ \delta_0 (\Sigma _i n_i v_i) = 0 \} = ~<v_1, v_2, v_3, v_4> ~= C_0$ 


\item Explain your answer for $Z_0$:
The elements in $Z_0$ are linear combinations of elements in $C_0$ that are mapped to 0 via $\delta_0$. But, $\delta_0$ maps all the vertices to 0. Hence, all linear combinations of  vertices will go to 0. \hb 
Thus $Z_0$ = $C_0 =  <v_1, v_2, v_3, v_4> $.
\item $B_0 = $ image of $\delta_1 = ~<v_1 + v_2, v_2 + v_3, v_3 + v_4, v_1 + v_4, v_1 + v_3,  v_2 + v_4> ~=$
\\$ <v_1 + v_2, v_2 + v_3, v_3 + v_4>$ since $v_1 + v_4$, $v_1 + v_3$ and $v_2 + v_4$ can be obtained from linear combinations of $v_1 + v_2$,  $v_2 + v_3$, and $v_3 + v_4$.
\item $H_0 = {Z_0}/{B_0} = \{v_1,v_2, v_3, v_4 ~|~ v_1 + v_2 = 0, v_2 + v_3 = 0, v_3 + v_4 = 0, v_1 + v_4 = 0, v_1 + v_3 = 0, v_2 + v_4 = 0\} = ~<[v_1]> $ where $[v_1] = \{v_1, v_2, v_3, v_4\}$ is a representative of the set containing all the vertices. Since we are working with coefficients in $\mathbb{Z}_2$, we get that $ v_1 = v_2$, $ v_2 = v_3$, $ v_3 = v_4$, $ v_1 = v_4$, $v_1 = v_3$ and $v_2 = v_4$. 
\item Rank $C_0 = 4$  \hfill  Rank $Z_0 = 4$ \hfill $B_0 = 3$ 
\item $|C_0| = 2^4 = 16$  \hfill   $|Z_0| = 2^4 = 16$  \hfill $|B_0| = 2^3 = 8$
%\item Rank $Z_0 = 4$
%\item $|Z_0| = 2^4 = 16$
%\item Rank $B_0 = 3$
%\item $|B_0| = 2^3 = 8$
\item Rank $H_0 =$ Rank $Z_0$ - Rank $B_0 = 4 - 3 = 1$
\item $|H_0| = 2^1 = 2$

\v
\hrule

\item Find the matrix for $\delta_0$:
\\ $M_0 = \bordermatrix{~ & v_1 & v_2 & v_3 & v_4 \cr
                 & 0 & 0 & 0 & 0 \cr  
                }$
   
\item Find the matrix for $\delta_1$:
\\ $M_1 = \bordermatrix{~ & e_1 & e_2 & e_3 & e_4 & e_5 & e_6 \cr
                  v_1 & 1 & 0 & 0 & 1 & 0 & 1 \cr
                  v_2 & 1 & 1 & 1 & 0 & 0 & 0\cr
                  v_3 & 0 & 1 & 0 & 1 & 1 & 0\cr
                  v_4 & 0 & 0 & 1 & 0 & 1 & 1\cr
                  }$
                  
\item Simplify the matrix for $\delta_1$ so that the nonzero columns are linearly independent.  Write the basis element above its corresponding column.
\\
\\$M_1 = \bordermatrix{~ & e_1 & e_2 & e_3 & e_4 & e_5 & e_6 \cr
                  v_1 & 1 & 0 & 0 & 1 & 0 & 1 \cr
                  v_2 & 1 & 1 & 1 & 0 & 0 & 0\cr
                  v_3 & 0 & 1 & 0 & 1 & 1 & 0\cr
                  v_4 & 0 & 0 & 1 & 0 & 1 & 1\cr
                  } \rightarrow  \bordermatrix{~ & e_1 & e_2 & e_3 & e_1 + e_2 + e_4 & e_5 & e_6 \cr
                  v_1 & 1 & 0 & 0 & 0 & 0 & 1 \cr
                  v_2 & 1 & 1 & 1 & 0 & 0 & 0\cr
                  v_3 & 0 & 1 & 0 & 0 & 1 & 0\cr
                  v_4 & 0 & 0 & 1 & 0 & 1 & 1\cr
                  }   \rightarrow $
\v
$\bordermatrix{~ & e_1 & e_2 & e_3 & e_1 + e_2 + e_4 & e_2 + e_3 + e_5 & e_6 \cr
                  v_1 & 1 & 0 & 0 & 0 & 0 & 1 \cr
                  v_2 & 1 & 1 & 1 & 0 & 0 & 0\cr
                  v_3 & 0 & 1 & 0 & 0 & 0 & 0\cr
                  v_4 & 0 & 0 & 1 & 0 & 0 & 1\cr
                  } \rightarrow $
                  \\
   \v
\rightline{               $ \bordermatrix{~ & e_1 & e_2 &  e_3  & e_1 + e_2 + e_4 &e_2 + e_3 + e_5 &e_1 + e_3 + e_6 \cr
                  v_1 & 1 & 0 & 0 & 0 & 0 & 0 \cr
                  v_2 & 1 & 1 & 1 & 0 & 0 & 0\cr
                  v_3 & 0 & 1 & 0 & 0 & 0 & 0\cr
                  v_4 & 0 & 0 & 1 & 0 & 0 & 0\cr
                  }$} 
                  
 \item Find the matrix for $\delta_2:       
        M_2 = \bordermatrix{~ & f_1 & f_2 & f_3 & f_4 \cr
                  e_1 & 1 & 0 & 1 & 0\cr
                  e_2 & 1 & 1 & 0 & 0\cr
                  e_3 & 0 & 1 & 1 & 0 \cr
                  e_4 & 1 & 0 & 0 & 1\cr
                  e_5 & 0 & 1 & 0 & 1\cr
                  e_6 & 0 & 0 & 1 & 1\cr
                  } $

\item Simplify the matrix for $\delta_2$ so that the nonzero columns are linearly independent.  Write the basis element above its corresponding column.

    $M_2 = \bordermatrix{~ & f_1 & f_2 & f_3 & f_4 \cr
                  e_1 & 1 & 0 & 1 & 0\cr
                  e_2 & 1 & 1 & 0 & 0\cr
                  e_3 & 0 & 1 & 1 & 0 \cr
                  e_4 & 1 & 0 & 0 & 1\cr
                  e_5 & 0 & 1 & 0 & 1\cr
                  e_6 & 0 & 0 & 1 & 1\cr
                  } \rightarrow \bordermatrix {~ & f_1 & f_2 & f_3 &f_1 + f_2 + f_3 + f_4 \cr
                  e_1 & 1 & 0 & 1 & 0\cr
                  e_2 & 1 & 1 & 0 & 0\cr
                  e_3 & 0 & 1 & 1 & 0 \cr
                  e_4 & 1 & 0 & 0 & 0\cr
                  e_5 & 0 & 1 & 0 & 0\cr
                  e_6 & 0 & 0 & 1 & 0\cr
                  }$
\v
\hrule

\item $Z_1 = \{\Sigma _i n_i e_i$ in $C_1 ~|~ \delta_1 (\Sigma _i n_i e_i) = 0 \} = ~ <e_1+ e_2 + e_4, e_2 + e_3 + e_5, e_1 + e_3 + e_6, e_4 + e_5 + e_6> $

\item Explain your answer for $Z_1$: 
\\
$Z_1 =$ null space of $M_1 =~<e_1+ e_2 + e_4, e_2 + e_3 + e_5, e_1 + e_3 + e_6> $

\item $B_1 = $ image of $\delta_2 = <e_1+ e_2 + e_4, e_2 + e_3 + e_5, e_1 + e_3 + e_6>$ 

\item $H_1 = {Z_1}/{B_1} = \frac{<e_1+ e_2 + e_4, e_2 + e_3 + e_5, e_1 + e_3 + e_6>}{<e_1+ e_2 + e_4, e_2 + e_3 + e_5, e_1 + e_3 + e_6>} ~ = ~ <0> $
\item Rank $C_1 = 6$ \hfill   Rank $Z_1 = 4$ \hfill  Rank $B_1 = 4$
\item $|C_1| = 2^6 = 64$   \hfill  $|Z_1| = 2^4 = 16$  \hfill  $|B_1| = 2^4 = 16$
\item Rank $H_1 =$ Rank $Z_1$ - Rank $B_1 = 4 - 4 = 0$
\item $|H_1| = 2^0 = 1$


\v
\hrule

\item $Z_2 = \{\Sigma _i n_i f_i$ in $C_2 ~|~ \delta_2 (\Sigma _i n_i f_i) = 0 \} = ~<f_1 + f_2 + f_3 + f_4>$
\item Explain your answer for $Z_2$: 
\\
\\$Z_2 =$ null space of $M_2 =~<f_1 + f_2 + f_3 + f_4> $
\item $B_2 = $ image of $\delta_3 = ~<0>$ since $\delta_3 : C_3 \rightarrow C_2$ and $C_3 = 0$. 

\item $H_2 = {Z_2}/{B_2} = \frac{<f_1 + f_2 + f_3 + f_4>} {<0> }= ~<f_1 + f_2 + f_3 + f_4>$
\item Rank $C_2 = 4$  \hfill   Rank $Z_2 = 1$ \hfill  Rank $B_2 = 0$
\item $|C_2| = 2^4 = 16$   \hfill  $|Z_2| = 2^1 = 2$  \hfill  $|B_2| = 2^0 = 1$
\item Rank $H_2 =$ Rank $Z_2$ - Rank $B_2 = 1 - 0 = 1$
\item $|H_2| = 2^1 = 2$

\newpage
   \begin{figure}[H]

  \centering
    \includegraphics[width=0.8\textwidth]{filtration}  

  \end{figure}
   \begin{figure}[H]
 \caption{Barcode for $H_0$}

  \centering
    \includegraphics[width=0.8\textwidth]{barcode_H0}  

  \end{figure}

   \begin{figure}[H]
 \caption{Barcode for $H_1$}

  \centering
    \includegraphics[width=0.8\textwidth]{barcodeH1}  

  \end{figure}
\end{itemize}




\end{document}