Betti Numbers of Simplicial Complexes

First, here is a version of our module that draws a 2-dimensional simplicial complex.

drawGeometricRealization[complex_,points_]:=Module[
{verts={}, edges={}, faces={}},

(* make lists of simplices of each dimension *) 
Do[
If[Length[simplex]==1,AppendTo[verts,points[[simplex[[1]]]]]];
If[Length[simplex]==2,AppendTo[edges,points[[simplex]]]];
If[Length[simplex]==3,AppendTo[faces,points[[simplex]]]]
,{simplex,complex}];

(* return the drawing *) 
Show[
ListPlot[points->Range[Length[points]],AspectRatio->1,PlotStyle->{PointSize[Medium],Black},Axes->False],
Graphics[{Blue,Opacity[0.4],Triangle[faces],Black,Opacity[1],Line[edges]}] 
]
]

Example 1

Here is a simplicial complex (Subscript[K, 1]):

points1={{0,1},{1,1},{1,0},{0,0}};
complex1={{1},{2},{3},{4},{1,2},{2,3},{3,4},{4,1},{2,4},{1,2,4}};
drawGeometricRealization[complex1,points1]

Here is the boundary matrix of the 1-dimensional simplices in (Subscript[K, 1]):

d1={{1,0,0,1,0},{1,1,0,0,1},{0,1,1,0,0},{0,0,1,1,1}};
MatrixForm[d1]
MatrixRank[d1,Modulus->2]

Here is the boundary matrix of the 2-dimensional simplices in (Subscript[K, 1]):

d2={{1},{0},{0},{1},{1}};
MatrixForm[d2]
MatrixRank[d2,Modulus->2]

Example 2

Here is a simplicial complex (Subscript[K, 2]):

points2={{0,1},{1,1},{1,0},{0,0},{2,1},{2,0}};
complex2={{1},{2},{3},{4},{1,2},{2,3},{3,4},{4,1},{2,4},{2,5},{5,6},{3,6},{3,5},{1,2,4},{3,5,6}};
drawGeometricRealization[complex2,points2]

Here is the boundary matrix of the 1-dimensional simplices in (Subscript[K, 2]):

d1={{1,0,0,1,0,0,0,0,0},{1,1,0,0,1,1,0,0,0},{0,1,1,0,0,0,0,1,1},{0,0,1,1,1,0,0,0,0},{0,0,0,0,0,1,1,0,1},{0,0,0,0,0,0,1,1,0}};
MatrixForm[d1]

Now create the boundary matrix of the 2-dimensional simplices in (Subscript[K, 2]):

d2={{1,0},{0,0},{0,0},{1,0},{1,0},{0,1},{0,0},{0,1},{0,1},{0,1}}
MatrixForm[d2]
MatrixRank[d2,Modulus->2]

Use your boundary matrices to compute the betti numbers (Subscript[β, 0]) and (Subscript[β, 1]) of complex (Subscript[K, 2]). Note that there are 6 vertices, 9 edges, and 2 faces in K.

β0=6-MatrixRank[d1,Modulus->2]

β1=(9-MatrixRank[d1,Modulus->2])-MatrixRank[d2,Modulus->2]

This is as far as we got in class on April 16. We will resume with computing boundary matrices on Thursday.