Lab exercises

Simplicial complex in Dionysus is just a list of its simplices. See how we define a full triangle spanned on vertices labeled with 0, 1 and 2 in the following example.


In [5]:
from dionysus import Simplex

complex = [Simplex([0]), Simplex([1]), Simplex([2]), Simplex([0, 1]), 
           Simplex([0, 2]), Simplex([2, 1]), Simplex([0, 1, 2])]
complex


Out[5]:
[<0>, <1>, <2>, <0, 1>, <0, 2>, <1, 2>, <0, 1, 2>]

Since specifying each simplex in a complex is a cumbersome task, dionysus has a closure method which automatically adds missing simplices of lower dimensions in the complex. So the above complex can also be defined as follows.


In [12]:
from dionysus import closure

# Closure accepts 2 arguments: a complex and its dimension
complex = closure([Simplex([0, 1, 2])], 2)
complex


Out[12]:
[<0, 2>, <0, 1>, <1, 2>, <0>, <1>, <2>, <0, 1, 2>]

Triangulation

Write the code for the following methods.

  1. sphere(dimension): returns a simplicial complex for a sphere of dimension dimension.
  2. torus(n): returns a simplicial complex for connected sum of n toruses (see http://www-history.mcs.st-and.ac.uk/~john/MT4521/Lectures/L23.html).

Test the code to see if the obtained triangulation is valid for torus and sphere of dimension 2.

Homology

Read the document http://nbviewer.jupyter.org/github/gregorjerse/rt2/blob/master/2015_2016/lab6/Computing%20homology.ipynb . Then compute homology of the following objects.

  1. Spheres of dimension 1, 2, ... , 10. Based on the results determine the homology groups of the n-dimensional sphere.
  2. Connected sum of 1, 2, ..., 10 toruses. Based on the results determine the homology groups of the connected sum of n toruses.
  3. Complex containing 2, 3, 4 disconnected spheres. Based on the results determine the homology groups of a complex consisting of more disconnected components if we know the homology groups for each individual component.

Determine the object

In files o1, o2 and o3 are cloud of points. Construct the alpha shape complex on them (hint: use radious 1) and compute the homology of the resulting complex.

Determine betti numbers for each of the complex and based on them determine which of the following objects do they represent.

  1. Two disjoint rings.
  2. Two entwined rings.
  3. Two rings touching in a common point.

To refresh memory on alpha shapes generation see the document http://nbviewer.jupyter.org/github/gregorjerse/rt2/blob/master/2015_2016/lab4/Alpha%20shapes%20vs.%20Vietoris%20Rips.ipynb