\documentclass[11pt]{amstext-l} 

\usepackage[total={6in,8in},hmarginratio=1:1]{geometry}

% hyperlinks
\usepackage[colorlinks,linkcolor=blue]{hyperref}
%\usepackage[draft]{hyperref}   <------------------- Use this to turn off links.

% misc
\allowdisplaybreaks
\usepackage{enumitem}
\usepackage{needspace}  % <-- to prevent bad pagebreak over environment titles
% Use:  \Needspace{3\baselineskip} before opening an environment
\usepackage{xcolor}  % <-- to change text color.  

% Tikz stuff.
\usepackage{tikz}
\usepackage{tkz-graph}
\usepackage{tikz-3dplot}
\usepackage{pgfplots}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{cd}
\usetikzlibrary{positioning}
\usetikzlibrary{graphs,graphs.standard}
\usetikzlibrary{decorations.pathmorphing}    
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{arrows.meta,calc}
\usetikzlibrary{bending}
\usetikzlibrary{decorations.markings,shapes.geometric}
\tikzset{->-/.style={decoration={markings, mark=at position #1 with
  {\arrow{>}}},postaction={decorate}}}
\tikzset{-|-/.style={decoration={markings, mark=at position #1 with
  {\arrow{stealth}}},postaction={decorate}}}
\tikzset{movearrow/.style 2 args ={
        decoration={markings,
	  mark= at position {#1} with {\arrow{#2}} ,
        },
        postaction={decorate}
    }
}
\tikzset{<--/.style={decoration={markings, mark=at position #1 with
  {\arrow{<}}},postaction={decorate}}}
\tikzstyle{ball} = [circle,shading=ball, ball color=black,
    minimum size=1mm,inner sep=1.3pt]
\tikzstyle{bball} = [circle,shading=ball, ball color=blue,
    minimum size=1mm,inner sep=1.3pt]
\tikzstyle{miniball} = [circle,shading=ball, ball color=black,
    minimum size=1mm,inner sep=0.5pt]
\tikzstyle{mminiball} = [circle,shading=ball, ball color=black,
    minimum size=0.6mm,inner sep=0.1pt]
\tikzstyle{mycircle} = [draw,circle, minimum size=1mm,inner sep=1.3pt]

\usepackage{amssymb}

%    If the book includes commutative diagrams:
\usepackage[cmtip,all]{xy}
\usepackage{amscd}

%    As set up here, all theorem-class objects will be numbered with
%    the same counter, starting with 1 at every new chapter; numbers
%    will have the form <chapter>.<theorem>.  This may be changed if
%    the author prefers.
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{prop}[theorem]{Proposition}
\newtheorem{cor}[theorem]{Corollary}
\newtheorem{alg}[theorem]{Algorithm}
\newtheorem{conj}[theorem]{Conjecture}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

% for exercises appearing within a section
\newtheorem{xca}[theorem]{Exercise}

%\numberwithin{section}{chapter}
%\numberwithin{equation}{chapter}

\newcommand{\sr}[2]{\stackrel{#1}{#2}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\proj}{\mathbb{P}}
\newcommand{\AO}{\mathcal{O}}
\newcommand{\AOr}{\mathcal{O}^{\mathrm{rev}}}
\newcommand{\tV}{\widetilde{V}}
\newcommand{\tF}{\widetilde{F}}
\newcommand{\tL}{\widetilde{L}}
\newcommand{\tM}{\widetilde{\mathcal{M}}}
\newcommand{\tS}{\widetilde{S}}
\newcommand{\tH}{\widetilde{H}}
\newcommand{\tb}{\tilde{\beta}}
\newcommand{\rsa}{\rightsquigarrow}
\newcommand{\lra}{\longrightarrow}
\newcommand{\tc}{\tilde{c}}
\newcommand{\cmax}{c_{\mathrm{max}}}
\newcommand{\Dmax}{D_{\mathrm{max}}}
\newcommand{\cbig}{c_{\mathrm{big}}}
\newcommand{\czero}{c_{\mathrm{null}}}
\newcommand{\laplat}{\mathcal{L}}
\newcommand{\rlaplat}{\widetilde{\mathcal{L}}}
\newcommand{\bigsquig}{\scalebox{1.5}{$\rightsquigarrow$}}
\newcommand{\burning}{\mathbf{b}}
\newcommand{\bs}{\sigma_{\mathbf{b}}}
\newcommand{\stationary}{\zeta_{\mathrm{st}}}
\newcommand{\contract}{\,\tikz[baseline=0.5pt]{\draw[-Straight Barb] (0,0)--(0.14,0.2425);}\,}
\newcommand{\smallcontract}{\,\tikz[baseline=0.5pt,scale=0.8]{\draw[-Straight Barb] (0,0)--(0.14,0.2425);}\,}

\DeclareMathOperator{\Div}{Div}
\DeclareMathOperator{\Pic}{Pic}
\DeclareMathOperator{\Config}{Config}
\DeclareMathOperator{\Jac}{Jac}
\DeclareMathOperator{\basic}{\mathcal{B}}
\DeclareMathOperator{\crit}{\mathcal{K}}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\im}{im}
\DeclareMathOperator{\cok}{cok}
\DeclareMathOperator{\divf}{div}
\DeclareMathOperator{\tdiv}{\widetilde{div}}
\DeclareMathOperator{\Prin}{Prin}
\DeclareMathOperator{\outdeg}{outdeg}
\DeclareMathOperator{\indeg}{indeg}
\DeclareMathOperator{\opc}{\mathbf{c}}
\DeclareMathOperator{\opa}{\mathbf{a}}
\DeclareMathOperator{\opD}{\mathbf{D}}
\DeclareMathOperator{\wt}{wt}
\DeclareMathOperator{\rk}{rk}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\sand}{\mathcal{S}}
\DeclareMathOperator{\Stab}{Stab}
\DeclareMathOperator{\supp}{supp}
\DeclareMathOperator{\odo}{odo}
\DeclareMathOperator{\level}{level}
\DeclareMathOperator{\av}{av}
\DeclareMathOperator{\sign}{sign}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\skel}{Skel}
\DeclareMathOperator{\adj}{adj}
\DeclareMathOperator{\prob}{\mathbb{P}}

\begin{document}
\centerline{\bf\huge Simplicial complexes}
\bigskip

\section{First definitions.}
An (abstract) {\em simplicial complex} $\Delta$ on a finite set $S$
is a collection of subsets of $S$, closed under the operation of taking subsets.
The elements of a simplicial complex $\Delta$ are called {\em
faces}.  An element
$\sigma\in\Delta$ of cardinality $i+1$ is called an {\em $i$-dimensional face}
or an {\em $i$-face} of $\Delta$. The empty set, $\emptyset$, is the unique face of
dimension~$-1$.  Faces of dimension $0$, i.e., elements of $S$, are {\em
vertices} and faces of dimension $1$ are {\em edges}. 

The maximal faces under inclusion are called {\em facets}.  To describe a
simplicial complex, it is often convenient to simply list its facets---the other
faces are exactly determined as subsets.  The {\em dimension}
of $\Delta$, denoted $\dim(\Delta)$, is defined to be the maximum of the
dimensions of its faces.  A simplicial complex is {\em pure} if each of its
facets has dimension $\dim(\Delta)$.  

\begin{example}
  If $G=(V,E)$ is a simple connected graph (undirected with no multiple edges or loops),
  then $G$ is the pure one-dimensional simplicial complex on~$V$ with~$E$ as its set of facets.
\end{example}

\begin{example}\label{example: example simplicial complex}
  Figure~\ref{fig: example simplicial complex} pictures a simplicial complex
$\Delta$ on the set $[5]:=\{1,2,3,4,5\}$:
\[
  \Delta:=\{\emptyset, \overline{1},\overline{2},\overline{3},\overline{4},
  \overline{5},\overline{12},\overline{13},\overline{23},
  \overline{24},\overline{34},\overline{123}\},
\]
writing, for instance, $\overline{23}$ to represent the set $\{2,3\}$. 
\begin{figure}[ht] 
\begin{tikzpicture}[scale=0.8] 


  \draw[fill=gray!30] (0,0)--(1.732,-1)--(1.732,1)--(0,0);
  \draw (0,0) node[label=180:{$1$},ball] (1) {};
  \draw (1.732,-1) node[label=270:{$2$},ball] (2) {};
  \draw (1.732,1) node[label=90:{$3$},ball] (3) {};
  \draw (3.46,0) node[label=0:{$4$},ball] (4) {};
  \draw (4.3,-0.9) node[label=0:{$5$},ball] (5) {};
  \draw (1)--(2)--(3)--(1);
  \draw (2)--(3)--(4)--(2);

\end{tikzpicture} 
\caption{A $2$-dimensional simplicial complex, $\Delta$.}\label{fig: example simplicial complex} 
\end{figure}

The sets of {\em faces} of
each dimension are:
\[
  \begin{array}{ll}
    F_{-1}=\{\emptyset\}
    &F_0=\{\overline{1},\overline{2},\overline{3},\overline{4},\overline{5}\}\\[8pt]
    F_1=\{\overline{12},\overline{13},\overline{23},\overline{24},\overline{34}\}\qquad
  &F_2=\{\overline{123}\}.
\end{array}
\]
Its {\em facets} are $\overline{5}$, $\overline{24}$,
  $\overline{34}$, and $\overline{123}$.  The dimension of
  $\Delta$ is $2$, as determined by the facet $\overline{123}$.  Since not all of the facets
have the same dimension, $\Delta$ is not {\em pure}.
\end{example}

\section{Simplicial homology}  
Let $\Delta$ be an arbitrary simplicial complex. By relabeling, if necessary, assume
its vertices are $[n]:=\{1,\dots,n\}$.  For each $i$, let
$F_i(\Delta)$ be the set of faces of dimension~$i$, and define the {\em group of
$i$-chains} to be the free abelian group with basis
$F_i(\Delta)$:
\[
  C_i=C_i(\Delta):=\Z F_i(\Delta):=\{\textstyle\sum_{\sigma\in F_i(\Delta)}a_{\sigma}\,\sigma: a_{\sigma}\in\Z\}.
\]
The {\em boundary} of $\sigma\in F_i(\Delta)$
is
\[
  \partial_i(\sigma):=\sum_{j\in\sigma}\sign(j,\sigma)\,(\sigma\setminus
  j),
\]
where $\sign(j,\sigma)=(-1)^{k-1}$ if $j$ is the $k$-th element of $\sigma$
when the elements of $\sigma$ are listed in order, and $\sigma\setminus
j:=\sigma\setminus\{j\}$.  Extending linearly gives the {\em $i$-th boundary
mapping},
\[
  \partial_i\colon C_i(\Delta)\to C_{i-1}(\Delta).
\]
If $i> n-1$ or $i<-1$, then $C_i(\Delta):=0$, and we define $\partial_i := 0$.
We sometimes simply write~$\partial$ for $\partial_i$ if the dimension $i$ is clear from
context. 
\begin{example}
  Suppose $\sigma=\{1,3,4\}=\overline{134}\in\Delta$.  Then
$\sigma\in F_2(\Delta)$, and
\[
  \sign(1,\sigma)=1,\quad \sign(3,\sigma)=-1,\quad \sign(4,\sigma)=1.
\]
Therefore,
\[
  \partial(\sigma)=\partial_2(\overline{134})=\overline{34}-\overline{14}+\overline{13}.
\]
\end{example}

The {\em (augmented) chain complex} of $\Delta$ is the complex
\[
0\lra
C_{n-1}(\Delta)\stackrel{\rule[-0.2cm]{0cm}{0.1cm}\partial_{n-1}}{\lra}
\ \cdots\  \stackrel{\rule[-0.2cm]{0cm}{0.1cm}\partial_2}{\lra}
C_1(\Delta)\stackrel{\rule[-0.2cm]{0cm}{0.1cm}\partial_1}{\lra}
C_0(\Delta)\stackrel{\rule[-0.2cm]{0cm}{0.1cm}\partial_{0}}{\lra}C_{-1}(\Delta)\lra0.
\]
The word {\em complex} here refers to the fact that
$\partial^2:=\partial\circ\partial=0$, i.e., for each $i$, we have
$\partial_{i-1}\circ\partial_{i}=0$.

\begin{figure}[ht] 
\begin{tikzpicture}[scale=0.5] 

  \draw (0,0)--(0,2);
  \draw (0,0) node[label=270:{$1$},ball] {};
  \draw (0,2) node[label=90:{$2$},ball] {};

  \draw (1,1) edge[style=->,above] node {$\partial_1$} (2.2,1);

  \draw (3.4,0) node[label=270:{$1$},ball] {};
  \draw (3.4,0) node[label=0:{$-$},ball]  {};
  \draw (3.4,2) node[label=90:{$2$},ball] {};
  \draw (3.4,2) node[label=0:{$+$},ball]  {};

  \draw (0,-2.3) node {$\overline{12}$};
  \draw (0.9,-2.3) edge[style=|->,above] node {} (2.1,-2.3);
  \draw (3.4,-2.3) node {$\overline{2}-\overline{1}$};

  \draw[cap=round,ultra thick] (6.0,3) -- (6.0,-2.6);
  \begin{scope}[xshift=9.0cm]
    \draw[fill=gray!30] (-1,0)--(1,0)--(0,1.732)--(-1,0);
    \draw (-1,0) node[label=225:{$1$},ball] {};
    \draw (1,0) node[label=-45:{$2$},ball] {};
    \draw (0,1.732) node[label=90:{$3$},ball] {};

    \draw (1.9,0.866) edge[style=->,above] node {$\partial_2$} (3.1,0.866);

  \draw (0,-2.3) node {$\overline{123}$};
    \draw (1.9,-2.3) edge[style=|->,above] node {} (3.1,-2.3);

    \begin{scope}[xshift=6cm]
      \draw[fill=gray!20,dotted] (-1,0)--(1,0)--(0,1.732)--cycle;
      \begin{scope}[yshift=-0.3cm]
	\draw (-1,0) node[label=270:{$1$},ball] (1) {};
	\draw (1,0) node[label=270:{$2$},ball] (2) {};
	\draw (1) edge[style={-{Latex[scale=1.3]}}] (2);

	\draw (0.0,-2) node {$\overline{23}-\overline{13}+\overline{12}$};
      \end{scope}
      \def\myscale{4mm}
      \begin{scope}[xshift=-0.866*\myscale,yshift=0.5*\myscale]
	\draw (-1,0) node[label=180:{$1$},ball] (1) {};
	\draw (0,1.732) node[label=135:{$3$},ball] (3) {};
	\draw (3) edge[style={-{Latex[scale=1.3]}}] (1);
      \end{scope}
      \begin{scope}[xshift=0.866*\myscale,yshift=0.5*\myscale]
	\draw (1,0) node[label=0:{$2$},ball] (2) {};
	\draw (0,1.732) node[label=45:{$3$},ball] (3) {};
	\draw (2) edge[style={-{Latex[scale=1.3]}}] (3);
      \end{scope}
    \end{scope}
  \end{scope}
\end{tikzpicture} 
\caption[Two boundary mapping examples.]{Two boundary mapping examples.
  Notation: if $i<j$, then we write $i$ 
  {\tikz{\draw (0,0) node[mminiball] (1) {};  
         \draw (0.7,0) node[mminiball] (2) {}; 
	 \draw (1) edge[style={-{Latex[scale=0.8]}}] (2)}}
   $j$ for $\overline{ij}$ and $i$
  {\tikz{\draw (0,0) node[mminiball] (1) {};  
         \draw (0.7,0) node[mminiball] (2) {}; 
	 \draw (2) edge[style={-{Latex[scale=0.8]}}] (1)}}
	 $j$ for~$-\overline{ij}$.
}\label{fig: boundary example} 
\end{figure}
Figure~\ref{fig: boundary example} gives two examples of the application of a
boundary mapping.  Note that
\[
  \partial^2(\overline{12})=\partial_0(\partial_1(\overline{12}))=\partial_0(\overline{2}-\overline{1})=\emptyset-\emptyset=0.
\]
The reader is invited to verify $\partial^2(\overline{123})=0$.
\begin{figure}[ht] 
\begin{tikzpicture}[scale=0.5] 
  \shadedraw[top color=gray!10, bottom color=gray!60,draw] (0,0)--(1.8,0.3)--(0.3,2.2)--cycle;
  %\draw[fill=gray!30] (0,0)--(1.8,0.3)--(0.3,2.2);
  \draw[fill=gray!10] (1.8,0.3)--(1.8,1.9)--(0.3,2.2);
  \draw (0,0) node[label=225:{$1$},ball] (1) {};
  \draw (1.8,0.3) node[label=-45:{$2$},ball] (2) {};
  \draw (1.8,1.9) node[label=45:{$3$},ball] (3) {};
  \draw (0.3,2.2) node[label=135:{$4$},ball] (4) {};
  \draw (1)--(2)--(4)--(1);
  \draw (2)--(3)--(4)--(2);
  \draw[dashed] (1)--(3);
   
  \draw (4.2,0.866) edge[style=->,above] node {$\partial_3$} (6.3,0.866);

  \begin{scope}[xshift=8.5cm,yshift=-0.5cm,scale=0.7]
    \draw[fill=gray!30] (0,0)--(1.8,0.3)--(0.3,2.2)--cycle;
    \draw (0,0) node[label=270:{$1$},ball] (1) {};
    \draw (1.8,0.3) node[label=270:{$2$},ball] (2) {};
    \draw (0.3,2.2) node[label=90:{$4$},ball] (4) {};
    \draw [-{Stealth[bend,length=4pt]}, thick, rotate=8] (0.9,0.85) ++(290:3.1mm) arc [start
    angle=-30, end angle=290, x radius=2.7mm, y radius=3.7mm];
  \end{scope}
  \begin{scope}[xshift=14.5cm,yshift=1cm,scale=0.7]
    \draw[fill=gray!10] (1.8,0.3)--(1.8,1.9)--(0.3,2.2)--cycle;
    \draw (1.8,0.3) node[label=270:{$2$},ball] (2) {};
    \draw (1.8,1.9) node[label=45:{$3$},ball] (3) {};
    \draw (0.3,2.2) node[label=90:{$4$},ball] (4) {};
    \draw [-{Stealth[bend,length=4pt]}, thick, rotate=25] (1.95,0.8) ++(290:2.4mm) arc [start
    angle=-40, end angle=290, x radius=1.9mm, y radius=3.0mm];
  \end{scope}
  \begin{scope}[xshift=12.5cm,yshift=-1cm,scale=0.7]
    \draw[fill=gray!10] (0,0)--(1.8,0.3)--(1.8,1.9)--cycle;
    \draw (0,0) node[label=270:{$1$},ball] (1) {};
    \draw (1.8,0.3) node[label=270:{$2$},ball] (2) {};
    \draw (1.8,1.9) node[label=45:{$3$},ball] (3) {};
    \draw [-{Stealth[bend,length=4pt]}, thick, rotate=-31] (0.7,1.2) ++(290:2.4mm) arc [start
    angle=290, end angle=-40, x radius=1.9mm, y radius=3.0mm];
  \end{scope}
  \begin{scope}[xshift=11.1cm,yshift=1.3cm,scale=0.7]
    \draw[fill=gray!10] (0,0)--(1.8,1.9)--(0.3,2.2)--cycle;
    \draw (0,0) node[label=270:{$1$},ball] (1) {};
    \draw (1.8,1.9) node[label=45:{$3$},ball] (3) {};
    \draw (0.3,2.2) node[label=90:{$4$},ball] (4) {};
    \draw [-{Stealth[bend,length=4pt]}, thick, rotate=-25] (0.0,1.55) ++(290:2.4mm) arc [start
    angle=290, end angle=-40, x radius=1.9mm, y radius=3.0mm];
  \end{scope}

  \draw (4.4,-2.9) edge[style=|->,above] node {} (6.1,-2.9);
  \draw (0.9,-2.9) node {$\overline{1234}$};
  \draw (12.5,-2.9) node {$\overline{234}-\overline{134}+\overline{124}-\overline{123}$};

\end{tikzpicture} 
\caption[$\partial_3$ for a solid tetrahedron.]{$\partial_3$ for a solid
  tetrahedron.
  Notation: if $i<j<k$, then we write  
  {\tikz[scale=0.3,baseline=1.5ex]{
    \draw[fill=gray!10] (-1,0)--(1,0)--(0,1.732)--cycle;
         \draw (-1,0) node[label=180:{$i$},mminiball] (i) {};  
         \draw (1,0) node[label=0:{$j$},mminiball] (j) {}; 
         \draw (0,1.732) node[label=90:{$k$},mminiball] (k) {}; 
	 \draw [-{Stealth[bend,length=3pt]}, thick, rotate=-25] (-0.1,0.6)
	 ++(290:2.4mm) arc [start angle=-40, end angle=270, x radius=3mm, y
	 radius=3.0mm];
       }
     }
  for $\overline{ijk}$ and 
  {\tikz[scale=0.3,baseline=1.5ex]{
    \draw[fill=gray!10] (-1,0)--(1,0)--(0,1.732)--cycle;
         \draw (-1,0) node[label=180:{$i$},mminiball] (i) {};  
         \draw (1,0) node[label=0:{$j$},mminiball] (j) {}; 
         \draw (0,1.732) node[label=90:{$k$},mminiball] (k) {}; 
	 \draw [-{Stealth[bend,length=3pt]}, thick, rotate=-25] (-0.35,0.45)
	 ++(290:2.4mm) arc [start angle=270, end angle=-40, x radius=3mm, y
	 radius=3.0mm];
       }
     }
  for $-\overline{ijk}$.
}\label{fig: tetrahedron boundary} 
\end{figure}

Figure~\ref{fig: tetrahedron boundary} shows the boundary of $\sigma=\overline{1234}$,
the solid tetrahedron.  Figure~\ref{fig: d^2 for tetrahedron} helps to
visualize the fact that $\partial^2(\sigma)=0$.  The orientations of the
triangles may be thought of as inducing a ``flow'' along the edges of the
triangles.  These flows cancel to give a net flow of~$0$.  This 
should remind you of Stokes' theorem from multivariable calculus.
\begin{figure}[ht] 
\begin{tikzpicture}[scale=0.7] 
  \shadedraw[top color=gray!10, bottom color=gray!60,draw] (0,0)--(1.8,0.3)--(0.3,2.2)--cycle;
  %\draw[fill=gray!30] (0,0)--(1.8,0.3)--(0.3,2.2);
  \shadedraw[top color=gray!1, bottom color=gray!30,draw] (1.8,0.3)--(1.8,1.9)--(0.3,2.2)--cycle;
  %\draw[fill=gray!10] (1.8,0.3)--(1.8,1.9)--(0.3,2.2);
  \draw (0,0) node[label=225:{$1$},ball] (1) {};
  \draw (1.8,0.3) node[label=-45:{$2$},ball] (2) {};
  \draw (1.8,1.9) node[label=45:{$3$},ball] (3) {};
  \draw (0.3,2.2) node[label=135:{$4$},ball] (4) {};
  \draw (1)--(2)--(4)--(1);
  \draw (2)--(3)--(4)--(2);

  \draw [-{Stealth[bend,length=4pt]}, thick, rotate=20] (0.65,1.2) ++(290:2.4mm) arc [start
    angle=-230, end angle=80, x radius=2.8mm, y radius=4.1mm];
  \draw [-{Stealth[bend,length=4pt]}, thick, rotate=60] (2.0,-0.50) ++(290:2.4mm) arc [start
    angle=-80, end angle=220, x radius=2.2mm, y radius=3.9mm];
\end{tikzpicture} 
\caption{As seen in Figure~\ref{fig: tetrahedron boundary}, the boundary of a
solid tetrahedron consists of oriented triangular facets.}\label{fig: d^2 for tetrahedron} 
\end{figure}

\begin{example}\label{example: chain complex example}
  Let $\Delta$ be the simplicial complex on $[4]$ with facets $\overline{12}$,
  $\overline{3}$, and $\overline{4}$ pictured
  in Figure~\ref{fig: chain complex example}.  The faces of each dimension are:
  \[
    F_{-1}(\Delta)=\{\emptyset\},\quad
    F_{0}(\Delta)=\{\overline{1},\overline{2},\overline{3},\overline{4}\},\quad
    F_{1}(\Delta)=\{\overline{12}\}.
  \]
\begin{figure}[ht] 
  \centering
\begin{tikzpicture}
\draw (0,0) node[label=270:{$1$},ball] (1) {};
\draw (1.3,0) node[label=270:{$2$},ball] (2) {};
\draw (2.5,0.5) node[label=45:{$3$},ball] (3) {};
\draw (2.5,-0.4) node[label=-45:{$4$},ball] (4) {};
\draw (1)--(2);
\end{tikzpicture}
\caption{Simplicial complex for Example~\ref{example: chain complex
example}.}\label{fig: chain
complex example} 
\end{figure}

\noindent Here is the chain complex for $\Delta$:
\begin{center}
  \begin{tikzpicture}
    \draw (0,0) node (a) {$0$};
    \draw (2,0) node (b) {$C_{1}(\Delta)$};
    \draw (5,0) node (c) {$C_{0}(\Delta)$};
    \draw (8,0) node (d) {$C_{-1}(\Delta)$};
    \draw (10,0) node (e) {$0$.};

    \draw (a) edge[style=->,above] node {} (b);
    \draw (b) edge[style=->,above] node {$\partial_1$} (c);
    \draw (c) edge[style=->,above] node {$\partial_0$} (d);
    \draw (d) edge[style=->,above] node {} (e);

    \draw (b)++(0,-1.2) node (b') {$\overline{12}$};
    \draw (c)++(-0.7,-1.2) node (c') {$\overline{2}-\overline{1}$};
    \draw[|->] (b')--(c');

    \draw (c)++(0.4,-0.6) node (c1) {$\overline{1}\ $};
    \draw (c)++(0.4,-1.0) node (c2) {$\overline{2}\ $};
    \draw (c)++(0.4,-1.4) node (c3) {$\overline{3}\ $};
    \draw (c)++(0.4,-1.8) node (c4) {$\overline{4}\ $};
    \draw (d)++(-0.3,-1.2) node (em) {$\emptyset$};
    \draw (c1) edge[style=|-,bend right=3] (7.2,-1.2);
    \draw (c2) edge[style=|-,bend right=1] (7.2,-1.2);
    \draw (c3) edge[style=|-,bend left=1] (7.2,-1.2);
    \draw (c4) edge[style=|-,bend left=3] (7.2,-1.2);
    \draw[->] (7.2,-1.2)--(7.3,-1.2);
  \end{tikzpicture}
\end{center}

\noindent In terms of matrices, the chain complex is given by
\begin{center}
  \begin{tikzpicture}
    \draw (0.7,0) node (a) {$0$};
    \draw (2,0) node (b) {$\Z$};
    \draw (5,0) node (c) {$\Z^4$};
    \draw (8.2,0) node (d) {$\Z$};
    \draw (9.5,0) node (e) {$0$.};

    \draw (a) edge[style=->,below] node {} (b);
    \draw (b) edge[style=->,below] node {$\rule{0mm}{8pt}\partial_1$} (c);
    \draw (c) edge[style=->,below] node {$\rule{0mm}{8pt}\partial_0$} (d);
    \draw (d) edge[style=->,below] node {} (e);

    \begin{scope}[xshift=3.5cm,yshift=1.1cm]
      \draw (0,0) node {
	$
	\begin{pmatrix}
	  -1\\
	  1\\
	  0\\
	  0
	\end{pmatrix}
	$
      };
      \draw (-0.85,0.72) node {$\overline{1}$}; 
      \draw (-0.85,0.28) node {$\overline{2}$}; 
      \draw (-0.85,-0.18) node {$\overline{3}$}; 
      \draw (-0.85,-0.63) node {$\overline{4}$}; 
      \draw (0.0,1.15) node {$\overline{12}$}; 
    \end{scope}
    \begin{scope}[xshift=6.8cm,yshift=0.4cm]
      \draw (0,0) node (m) {
	$
	\setlength{\arraycolsep}{3.2pt}
	\textstyle
	\begin{pmatrix}
	  1&1&1&1
	\end{pmatrix}
      $
      };
      \draw (-1.1,0.02) node {$\emptyset$}; 
      \draw (-0.6,0.44) node {$\overline{1}$}; 
      \draw (-0.22,0.44) node {$\overline{2}$}; 
      \draw (0.18,0.44) node {$\overline{3}$}; 
      \draw (0.58,0.44) node {$\overline{4}$}; 
    \end{scope}
  \end{tikzpicture}
\end{center}
The sequence is not exact since $\rk(\im\,\partial_1)=\rk\,\partial_1=1$,
whereas by rank-nullity, $\rk(\ker(\partial_0))=4-\rk\,\partial_0=3$.
\end{example}

\begin{definition}
  For $i\in\Z$, the {\em $i$-th (reduced) homology}
  of $\Delta$ is the abelian group
\[
  \tH_i(\Delta):=\ker\,\partial_i/\im\,\partial_{i+1}.
\]
In particular, $\tH_{n-1}(\Delta)=\ker(\partial_{n-1})$, and $\tH_{i}(\Delta)=0$ for
$i>n-1$ or $i<0$.   Elements of $\ker\,\partial_i$ are called {\em
$i$-cycles}
and elements of $\im\,\partial_{i+1}$ are called {\em $i$-boundaries}.
The {\em $i$-th (reduced) Betti number} of $\Delta$ is the rank of the $i$-th homology
group:
\[
  \tb_i(\Delta):=\rk\, \tH_i(\Delta)=\rk(\ker \partial_i)-\rk(\partial_{i+1}).
\]
\end{definition}
\begin{remark} To define ordinary (non-reduced) homology groups, $H_i(\Delta)$,
  and Betti numbers~$\beta_i(\Delta)$, modify the chain complex by replacing
  $C_{-1}(\Delta)$ with $0$ and $\partial_0$ with the zero mapping.  The
  difference between homology and reduced homology is that
  $H_0(\Delta)\simeq\Z\oplus \tH_0(\Delta)$ and, thus,
  $\beta_0(\Delta)=\tb_0(\Delta)+1$.  All other homology groups and Betti
  numbers coincide.  From now on, we use ``homology''
  to mean reduced homology.
\end{remark}
In general, homology can be thought of as a measure of how close the chain
complex is to  being exact.  In particular, $\tH_i(\Delta)=0$ for all~$i$ if and
only if the chain complex for~$\Delta$ is exact.   For the next several
examples, we will explore how exactness relates to the topology of~$\Delta$.  

The $0$-th homology group measures ``connectedness''.  Write $i\sim j$ for
vertices $i$ and $j$ in a simplicial complex $\Delta$ if
$\overline{ij}\in\Delta$.  An equivalence class under the transitive closure of
$\sim$ is a {\em connected component} of~$\Delta$.

\begin{xca} Show that $\tb_0(\Delta)$ is one less than the number of connected
  components of~$\Delta$. 
\end{xca}

For instance, for the simplicial complex~$\Delta$ in
Example~\ref{example: chain complex example}, 
\[
\tb_0(\Delta)=\rk\, \tH_0(\Delta)=\rk(\ker\,\partial_0)-\rk(\partial_1)=3-1=2.
\]

\Needspace{3\baselineskip} 
\begin{example}
  The hollow triangle,
\begin{center}
  \begin{tikzpicture}
  \begin{scope}[xshift=4cm,scale=0.4]
  \draw (-1,0) node[label=225:{$1$},ball] (1) {};  
  \draw (1,0) node[label=-45:{$2$},ball] (2) {};  
  \draw (0,1.732) node[label=90:{$3$},ball] (3) {};  
  \draw (1)--(2)--(3)--(1);
\end{scope}
  \draw (0,0) node[label=
    {$\Delta=\{\emptyset,\overline{1},\overline{2},
      \overline{3},\overline{12},\overline{13},\overline{23}$\}}
    ] {};
\end{tikzpicture}
\end{center}
has chain complex
\begin{center}
\begin{tikzpicture}[]
    \draw (0.7,0) node (a) {$0$};
    \draw (2,0) node (b) {$\Z^3$};
    \draw (5.8,0) node (c) {$\Z^3$};
    \draw (8.3,0) node (d) {$\Z$};
    \draw (9.5,0) node (e) {$0$.};

    \draw (a) edge[style=->,below] node {} (b);
    \draw (b) edge[style=->,below] node {$\rule{0mm}{8pt}\partial_1$} (c);
    \draw (c) edge[style=->,below] node {$\rule{0mm}{8pt}\partial_0$} (d);
    \draw (d) edge[style=->,below] node {} (e);

    \begin{scope}[xshift=4.0cm,yshift=1.0cm]
      \draw (0,0) node {
	$
	\begin{pmatrix}
	  -1&-1&0\\
	  1&0&-1\\
	  0&1&1\\
	\end{pmatrix}
	$
      };
      \draw (-1.6,0.49) node {$\overline{1}$}; 
      \draw (-1.6,0.05) node {$\overline{2}$}; 
      \draw (-1.6,-0.40) node {$\overline{3}$}; 
      \draw (-0.8,0.9) node {$\overline{12}$}; 
      \draw (-0.0,0.9) node {$\overline{13}$}; 
      \draw (0.8,0.9) node {$\overline{23}$}; 
    \end{scope}
    \begin{scope}[xshift=7.1cm,yshift=0.7cm]
      \draw (0,0) node (m) {
	$
	\setlength{\arraycolsep}{3.2pt}
	\textstyle
	\begin{pmatrix}
	  1&1&1
	\end{pmatrix}
      $
      };
      \draw (-0.85,0.02) node {$\emptyset$}; 
      \draw (-0.4,0.44) node {$\overline{1}$}; 
      \draw (-0.02,0.44) node {$\overline{2}$}; 
      \draw (0.38,0.44) node {$\overline{3}$}; 
    \end{scope}
\end{tikzpicture}
\end{center}
It is easy to see that $\rk(\partial_1)=\rk(\ker\,\partial_0)=2$. It follows that
$\tb_0(\Delta)=0$, which could have been anticipated since $\Delta$ is
connected.  Since $\rk(\partial_1)=2$, rank-nullity says
$\rk(\ker\,\partial_1)=1$, whereas $\partial_2=0$.  Therefore,
$\tb_1(\Delta)=\rk(\ker\,\partial_1)-\rk(\partial_2)=1$.  In fact,
$\tH_1(\Delta)$ is generated by the $1$-cycle
\begin{center}
\begin{tikzpicture}[scale=0.6]
  \draw (-1.5,1) node {$\overline{23}-\overline{13}+\overline{12}$};
  \draw (0.7,1) node {$=$};
  \begin{scope}[xshift=3cm]
  \draw (-1,0) node[label=225:{$1$},ball] (1) {};  
  \draw (1,0) node[label=-45:{$2$},ball] (2) {};  
  \draw (0,1.732) node[label=90:{$3$},ball] (3) {};  
  \draw[movearrow={0.60}{Latex[scale=1.3]}] (1)--(2);
  \draw[movearrow={0.60}{Latex[scale=1.3]}] (2)--(3);
  \draw[movearrow={0.60}{Latex[scale=1.3]}] (3)--(1);
  \draw (1.6,0.8) node {.};
  \end{scope}
\end{tikzpicture}
\end{center}
If we would add $\overline{123}$ to $\Delta$ to get a solid triangle, then the
above cycle would be a boundary, and there would be no homology in any
dimension.  Similarly, a solid tetrahedron has no homology, and a hollow
tetrahedron has homology only in dimension~$2$ (of rank $1$).
\end{example}

\begin{xca}
  Compute the Betti numbers for the simplicial complex formed by gluing two
  (hollow) triangles along an edge.  Describe generators for the homology.
\end{xca}

\begin{example}\label{example: cone}
  Consider the simplicial complex pictured in Figure~\ref{fig: cone} with
  facets $\overline{14},\overline{24},\overline{34},\overline{123}$.  It
  consists of a solid triangular base whose vertices are connected by edges to
  the vertex $4$.  The three triangular walls incident on the base are hollow.
\begin{figure}[ht] 
  \centering
  \begin{tikzpicture}[scale=0.9]
\draw (0,0) node[label=180:{$1$},ball] (1) {};
\draw (1.9,-1.2) node[label=270:{$2$},ball] (2) {};
\draw (2.1,0.5) node[label=0:{$3$},ball] (3) {};
\draw (1,1.7) node[label=135:{$4$},ball] (4) {};

\shadedraw[top color=gray!10, bottom color=gray!60,draw] (0,0)--(1.9,-1.2)--(2.1,0.5)--cycle;
\draw (1)--(4);
\draw[thick] (2)--(4);
\draw (3)--(4);
\end{tikzpicture}
\caption{Simplicial complex for Example~\ref{example: cone}.}\label{fig: cone} 
\end{figure}

What are the Betti numbers?  The chain complex is:
\begin{center}
\begin{tikzpicture}
    \draw (0,0) node (a) {$0$};
    \draw (0.8,0) node (b) {$\Z$};
    \draw (2.8,0) node (c) {$\Z^6$};
    \draw (7.0,0) node (d) {$\Z^4$};
    \draw (9.3,0) node (e) {$\Z$};
    \draw (10.1,0) node (f) {$0$.};

    \draw (a) edge[style=->] node {} (b);
    \draw (b) edge[style=->,below] node {$\rule{0mm}{8pt}\partial_2$} (c);
    \draw (c) edge[style=->,below] node {$\rule{0mm}{8pt}\partial_1$} (d);
    \draw (d) edge[style=->,below] node {$\rule{0mm}{8pt}\partial_0$} (e);
    \draw (e) edge[style=->] node {} (f);

    \begin{scope}[xshift=1.88cm,yshift=1.0cm]
      \draw (0,0) node {
	\setlength{\delimitershortfall}{0pt}
	$
	\left(
	\begin{smallmatrix}
	  1&\\[2pt]
	  -1&\\[2pt]
	  0&\\[2pt]
	  1&\\[2pt]
	  0&\\[2pt]
	  0&\\
	\end{smallmatrix}
	\!\right)
	$
      };
      \draw (0.0,1.10) node {$\scriptstyle\overline{123}$}; 
      \draw (-0.68,0.75) node {$\scriptstyle\overline{12}$}; 
      \draw (-0.68,0.48) node {$\scriptstyle\overline{13}$}; 
      \draw (-0.68,0.18) node {$\scriptstyle\overline{14}$}; 
      \draw (-0.68,-0.12) node {$\scriptstyle\overline{23}$}; 
      \draw (-0.68,-0.41) node {$\scriptstyle\overline{24}$}; 
      \draw (-0.68,-0.70) node {$\scriptstyle\overline{34}$}; 
    \end{scope}
    \begin{scope}[xshift=4.95cm,yshift=0.8cm]
      \draw (0,0) node (m) {
	\setlength{\delimitershortfall}{0pt}
	$
	\left(
	\begin{smallmatrix}
	  -1&-1&-1&0&0&0\\[2pt]
         1&0&0&-1&-1&0\\[2pt]
         0&1&0&1&0&-1\\[2pt]
         0&0&1&0&1&1
	\end{smallmatrix}
	\right)
      $
      };
      \draw (-1.75,0.50) node {$\scriptstyle\overline{1}$}; 
      \draw (-1.75,0.18) node {$\scriptstyle\overline{2}$}; 
      \draw (-1.75,-0.13) node {$\scriptstyle\overline{3}$}; 
      \draw (-1.75,-0.45) node {$\scriptstyle\overline{4}$}; 

      \draw (-1.15,0.9) node {$\scriptstyle\overline{12}$}; 
      \draw (-0.7,0.9) node {$\scriptstyle\overline{13}$}; 
      \draw (-0.25,0.9) node {$\scriptstyle\overline{14}$}; 
      \draw (0.22,0.9) node {$\scriptstyle\overline{23}$}; 
      \draw (0.68,0.9) node {$\scriptstyle\overline{24}$}; 
      \draw (1.15,0.9) node {$\scriptstyle\overline{34}$}; 
    \end{scope}
    \begin{scope}[xshift=8.12cm,yshift=0.4cm]
      \draw (0,0) node (m) {
	\setlength{\delimitershortfall}{0pt}
	$
	\left(
	\begin{smallmatrix}
         1\,&1\,&1\,&1
	\end{smallmatrix}
	\right)
      $
      };
      \draw (-0.74,0.00) node {$\scriptstyle\emptyset$}; 
      \draw (-0.40,0.36) node {$\scriptstyle\overline{1}$}; 
      \draw (-0.11,0.36) node {$\scriptstyle\overline{2}$}; 
      \draw (0.18,0.36) node {$\scriptstyle\overline{3}$}; 
      \draw (0.45,0.36) node {$\scriptstyle\overline{4}$}; 
    \end{scope}
\end{tikzpicture}
\end{center}

By inspection, $\rk(\partial_2)=1$ and
$\rk(\partial_1)=\rk(\ker\,\partial_0)=3$.  Rank-nullity gives
$\rk(\ker\,\partial_1)=6-3=3$.  Therefore, $\tb_0=\tb_2=0$ and $\tb_1=2$.
It is not surprising that $\tb_0=0$, since $\Delta$ is connected. Also, the
fact that $\tb_2=0$ is easy to see since $\overline{123}$ is the only face of
dimension $2$, and its boundary is not zero. Seeing
that $\tb_1=2$ is a little harder.  Given the cycles corresponding to the three
hollow triangles incident on vertex $4$, one might suppose~$\tb_1=3$. However,
as conveyed in Figure~\ref{fig: dependence among cycles},
those cycles are not independent: if properly oriented their sum is the
boundary of the solid triangle,~$\overline{123}$; hence, their sum is $0$ in
the first homology group.
\begin{figure}[ht] 
  \centering
\begin{tikzpicture}
\begin{scope}[xshift=-1.5cm]
  \draw (0,0) node[label=180:{$1$},ball] (1) {};
  \draw (1.9,-1.2) node[label=270:{$2$},ball] (2) {};
  \draw (2.1,0.5) node[label=0:{$3$},ball] (3) {};
  \draw (1,1.7) node[label=135:{$4$},ball] (4) {};
  \shadedraw[top color=gray!10, bottom color=gray!60,draw] (0,0)--(1.9,-1.2)--(2.1,0.5)--cycle;
  \draw (1)--(4);
  \draw[thick] (2)--(4);
  \draw (3)--(4);
  \begin{scope}[xshift=0.23cm,yshift=-0.4cm,scale=0.5]
  \draw[->] (0,0)--(1.9,-1.2);
  \end{scope}
  \begin{scope}[xshift=1.2cm,yshift=-0.1cm,scale=0.5]
  \draw[->] (1.9,-1.2)--(2.1,0.5);
  \end{scope}
  \begin{scope}[xshift=0.6cm,yshift=0.3cm,scale=0.5]
  \draw[color=gray!60,->] (2.1,0.5)--(0,0);
  \end{scope}
  \begin{scope}[xshift=0.7cm,yshift=0.1cm,scale=0.4]
  \draw[->] (1.9,-1.2)--(1,1.7);
  \end{scope}
  \begin{scope}[xshift=1.0cm,yshift=0.2cm,scale=0.4]
  \draw[<-] (1.9,-1.2)--(1,1.7);
  \end{scope}
  \begin{scope}[xshift=0.05cm,yshift=0.5cm,scale=0.5]
  \draw[->] (1,1.7)--(0,0);
  \end{scope}
  \begin{scope}[xshift=0.45cm,yshift=0.4cm,scale=0.5]
  \draw[color=gray!60,<-] (1,1.7)--(0,0);
  \end{scope}
  \begin{scope}[xshift=1.0cm,yshift=0.6cm,scale=0.5]
  \draw[<-] (1,1.7)--(2.1,0.5);
  \end{scope}
  \begin{scope}[xshift=0.73cm,yshift=0.4cm,scale=0.5]
  \draw[color=gray!60,->] (1,1.7)--(2.1,0.5);
  \end{scope}
\end{scope}
\draw (0,-2.8) node {$(\overline{12}+\overline{24}-\overline{14})+
                     (\overline{23}+\overline{34}-\overline{24})+
		   (\overline{14}-\overline{34}-\overline{13})=
		   \underbrace{(\rule[-0.15cm]{0cm}{0.1cm}\overline{12}+
		   \overline{23}-\overline{13})}_{\displaystyle\partial_2(\,\rule[0.0cm]{0cm}{0.40cm}\overline{123}\,)}$};
\end{tikzpicture}
\caption{A tetrahedron with solid base and hollow walls.  Cycles around the
walls sum to the boundary of the base, illustrating a dependence among the
cycles in the first homology group.}\label{fig: dependence among cycles} 
\end{figure}
\end{example}

\subsection{A quick aside on algebraic topology}  Algebraic topology seeks an assignment of
the form $X\mapsto\alpha(X)$ where $X$ is a topological space and $\alpha(X)$ is
some algebraic invariant (a group, ring, etc.).  If~$X\simeq Y$ as topological
spaces, i.e., if~$X$ and~$Y$ are homeomorphic, then we should
have~$\alpha(X)\simeq\alpha(Y)$ as algebraic objects---this is what it means to
be {\em invariant}.  The simplicial homology we have developed provides the
tool for creating one such invariant.

Let $X$ be a $2$-torus---the surface of a donut.  Draw triangles on the surface
so that neighboring triangles meet vertex-to-vertex or edge-to-edge.  The
triangulation is naturally interpreted as a simplicial complex~$\Delta$.  An
amazing fact, of fundamental importance, is that the associated
homology groups do not depend on the choice of triangulation!  In this way, we
get an assignment
\[
X\mapsto \tH_i(X):=\tH_i(\Delta),  
\]
and, hence, also $X\mapsto\tb_i(X):=\tb_i(\Delta)$, for all $i$.

In a course on algebraic topology, one learns that these homology groups do not
see certain aspects of a space.  For instance, they do not change under certain
contraction operations.  A line segment can be continuously morphed into a
single point, and the same goes for a solid triangle or tetrahedron.  So these
spaces all have the homology of a point---in other words: none at all (all
homology groups are trivial).  A tree is similarly contractible to a point, so
the addition of a tree to a space has no effect on homology.  Imagine the tent
with missing walls depicted in Figure~\ref{fig: cone}.  Contracting the base to
a point leaves two vertices connected by three line segments.  Contracting one
of these line segments produces two loops meeting at a single vertex.  No
further significant contraction is possible---we are not allowed to contract
around ``holes'' (of any dimension).  These two loops account for $\tb_1=2$ in
our previous calculation.  As another example, imagine a hollow tetrahedron.
Contracting a facet yields a surface that is essentially a sphere with three
longitudinal lines connecting its poles, thus dividing the sphere into 3
regions.  Contracting two of these regions results in a sphere---a bubble---with
a single vertex drawn on it.  No further collapse is possible.  This bubble
accounts for the fact that $\tb_2=1$ is the only nonzero Betti number for the
sphere.  (Exercise: verify that~$\tb_2=1$ in this case.)
\end{document}
