Euler Characteristic Examples

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

Next, here is a version of our module that draws a 3-dimensional simplicial complex.

drawGeometricRealization3D[complex_,points_]:=Module[
{verts={}, edges={}, faces={},tetrahedra={},graphics},

(* 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]]]];
If[Length[simplex]==4,AppendTo[tetrahedra,points[[simplex]]]]
,{simplex,complex}];

(* return the drawing *) 
graphics=Join[
If[Length[tetrahedra]>0,{Purple,Opacity[0.85],Tetrahedron[tetrahedra]},{}],
{Cyan,Opacity[0.4],Triangle[faces],Black,Opacity[1],Thick, Line[edges],PointSize[Large],Point[verts]}
];
Graphics3D[graphics] 
]

Here is a simple function that computes the Euler characteristic of a simplicial complex

eulerChar[complex_]:=Sum[(((-1))^(Length[simp]-1)),{simp,complex}]

Now  compute the Euler characteristic of the simplicial complexes in each of the following examples. What information does the Euler characteristic provide about a simplicial complex?

Example 1

points1={{-0.227083,-0.025},{-0.3625,0.316667},{0.173611,0.470139},{-0.486111,-0.0638889},{0.377083,0.28125},{0.189583,-0.241667},{0.359028,-0.0944444}};
complex1={{1},{2},{3},{4},{5},{6},{7},{1,2},{1,4},{2,4},{3,5},{6,7},{1,2,4}};
drawGeometricRealization[complex1,points1]

Example 2

points2={{-0.339583,0.402083},{-0.589583,0.520833},{-0.0743056,0.528472},{-0.606944,0.273611},{-0.114583,0.239583},{0.189583,-0.241667},{0.359028,-0.0944444},{0.489583,0.5},{0.429861,-0.290278},{-0.525694,-0.0555556},{-0.191667,-0.23125},{-0.302847,-0.183842}};
complex2=complex1={{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{1,2},{1,3},{1,4},{1,5},{2,4},{3,5},{6,7},{6,9},{7,9},{11,12},{1,2,4},{1,3,5},{6,7,9}};
drawGeometricRealization[complex2,points2]

Example 3

points3={{-0.352083,0.510417},{-0.589583,0.520833},{0.0236111,0.536806},{-0.640278,0.198611},{0.00416667,0.208333},{0.391667,0.202083},{0.475694,0.486806},{0.395833,-0.433333},{-0.318056,-0.102778},{-0.286111,0.209028},{0.291667,-0.09375},{-0.414583,-0.4},{0.0590278,-0.104861},{0.0263889,-0.422222}};
complex3={{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14},{2,4},{1,10},{3,5},{6,7},{9,12},{13,14},{8,11}};
drawGeometricRealization[complex3,points3]

Example 4

points4={{-0.352083,0.510417},{0.0631944,0.511806},{-0.659028,0.198611},{0.416667,0.195833},{-0.661111,-0.205556},{0.39375,-0.233333},{-0.364583,-0.502083},{0.0805556,-0.515972}};
complex4={{1},{2},{3},{4},{5},{6},{7},{8},{1,2},{1,3},{1,4},{1,8},{2,4},{3,5},{3,7},{3,8},{4,6},{4,8},{5,7},{7,8},{6,8},{1,2,4},{1,3,8},{3,5,7},{3,7,8},{1,4,8},{4,6,8}};
drawGeometricRealization[complex4,points4]

Example 5

points5=points4;
complex5={{1},{2},{3},{4},{5},{6},{7},{8},{1,2},{1,3},{1,4},{1,8},{2,4},{3,5},{3,7},{3,8},{4,6},{4,8},{5,7},{7,8},{6,8},{1,2,4},{3,5,7},{1,3,8},{4,6,8}};
drawGeometricRealization[complex5,points5]

Example 6

points6={{0.202083,0.504167},{-0.475,0.514583},{-0.640278,0.198611},{0.00416667,0.208333},{0.391667,0.202083},{0.254167,-0.41875},{-0.561806,-0.0944444},{-0.286111,0.209028},{0.427083,-0.0979167},{-0.516667,-0.435417},{0.119444,-0.102778},{-0.198611,-0.278472}};
complex6={{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{1,4},{1,5},{2,3},{2,8},{3,8},{4,5},{6,9},{6,11},{7,10},{7,12},{10,12},{9,11}};
drawGeometricRealization[complex6,points6]

Example 7

points7={{-0.589583,0.520833},{0.114583,0.235417},{0.475694,0.486806},{0.4375,-0.460417},{-0.318056,-0.102778},{-0.298611,0.229861},{-0.589583,-0.433333},{0.106944,-0.136111}};
complex7={{1},{2},{3},{4},{5},{6},{7},{8},{1,2},{1,3},{1,5},{1,6},{1,7},{2,3},{2,4},{2,6},{2,8},{3,4},{4,5},{4,7},{1,7},{4,8},{5,7},{5,8},{5,6},{1,2,3},{1,2,6},{1,5,6},{1,5,7},{2,3,4},{2,4,8},{4,5,8},{4,5,7}};
drawGeometricRealization[complex7,points7]

Example 8

points8={{-0.589583,0.520833},{0.114583,0.235417},{0.475694,0.486806},{0.4375,-0.460417},{-0.318056,-0.102778},{-0.298611,0.229861},{-0.589583,-0.433333},{0.106944,-0.136111}};
complex8={{1},{2},{3},{4},{5},{6},{7},{8},{1,2},{1,3},{1,5},{1,6},{1,7},{2,3},{2,4},{2,6},{2,8},{3,4},{4,5},{4,7},{1,7},{4,8},{5,7},{5,8},{5,6}};
drawGeometricRealization[complex8,points8]

Example 9

The following simplicial complex is a hollow tetrahedron.

points9={{0,0,0},{1,0,0},{0,1,0},{0,0,1}};
complex9={{1},{2},{3},{4},{1,2},{1,3},{1,4},{2,3},{2,4},{3,4},{1,2,3},{1,2,4},{1,3,4},{2,3,4}};
drawGeometricRealization3D[complex9,points9]

Example 10

The following simplicial complex is a solid tetrahedron.

points10={{0,0,0},{1,0,0},{0,1,0},{0,0,1}};
complex10={{1},{2},{3},{4},{1,2},{1,3},{1,4},{2,3},{2,4},{3,4},{1,2,3},{1,2,4},{1,3,4},{2,3,4},{1,2,3,4}};
drawGeometricRealization3D[complex10,points10]