# CHomP Examples

Several examples on how to use the Homology Programs are gathered in the examples/ subdirectory of the source code package of the advanced version of the Homology Software. Each example consists of a text file with brief explanation, a script file that displays this information and runs the computations, and a few additional files. A relatively up-to-date list of these examples is given below, with brief explanation what they illustrate (browse the exemples/ subdirectory of CHomP or run the script python/examples.py for an up-to-date list). To run each of the examples, type the command listed in the left column of the table below (add the extension ".bat" in Windows or ".sh" in Linux/MacOS/Unix). Note that in some systems it may be necessary to precede the command with "./", that is, for example, type ./bing.sh to run the example named bing below.

 NAME DESCRIPTION bing Bing's house with two rooms is an example of a contractible cubical set, built of squares embedded in R3, which cannot be reduced by means of free face collapses. This example shows how to define a general cubical set in which each cube is a Cartesian product of intervals. It also shows how to compute homology of such a set using the program homcubes. circle In this example a map of a circle onto itself with double winding is defined. The map in homology thus maps the 1-dimensional generator onto itself with the coefficient of 2. The map is given as a cubical multivalued map. This example shows how to use the old program chmap to compute the homomorphism induced by such a map in homology, and also how easy it is to do the same using the new features of the program homcubes. circthin This is a modification of the "circle" example, described above. The map is given as a multivalued map defined on cubical cells of dimension lower than the space dimension. This example shows how to use the program homcelmp. dim10 In this example the homology module of a 10-dimensional cube in R^10 is computed. It is a simple example which shows how to use the homcubes program. It also illustrates how difficult computations in high dimensions can be. excision This is an example of an index pair (for a discrete dynamical system) which does not satisfy the excision property, as explained in the paper "Excision-preserving Cubical Approach to the Algorithmic Computation of the Discrete Conley Index" by K. Stolot and P. Pilarczyk. Instead of using the homcubes program, one must do the computations using the new program homcub2l to overcome the difficulty. incl This is an example which shows how to compute the homomorphism induced in relative homology by a continuous map on a pair of cubical sets. It also illustrates a potential problem that may occur if one uses the -i switch of the homcubes program. kleinbot In this example, the homology module of the Klein bottle is computed with coefficients in Z and in Z_2. The homology module is computed by the program homcubes. We first compute the homology module with integer coefficients, and then with coefficients in Z2. This example contains two pictures of the Klein bottle. One consists of 4-dimensional cubes which was created with the use of a parametrization for embedding of this manifold into R^4. The other one consists of 2-dimensional elementary cubes (cubical cells) in R^4 and was obtained from the first one by geometric reduction programmed in homcubes. maze In this example the homology of a closed maze stored in a bitmap file is computed. The external wall forms the circle in which the maze is contained. If the maze picture has the homology of the circle, then this means that all the internal walls can be homotopically contracted towards the external wall and, as a consequence, from every place inside the maze to every other place there exists a path between the walls and this path is unique. This example shows how to convert BMP files to a text list of squares, and then how to compute the homology of this set of 2-dimensional cubes. nonacycl This is an example of an acyclic cubical multivalued map F: X -> Y such that its restriction to the subset A of X is not acyclic. Therefore, the map induced by F: (X, A) -> (Y, B) cannot be computed by "homcubes". This example illustrates how to use the program chkmvmap which verifies whether a cubical map satisfies the necessary assumptions for the homology computation. nonred This is an example of two geometric figures which are unions of cubes which are difficult to reduce, although they are acyclic, that is, their homology is the homology of a one-point space. This is a small example that illustrates how to use the homcubes program for the computation of homology of full cubical sets. num This is a technical example that illustrates how to use a compact representation of cubical sets and maps. probl This is a real example of a map which seems to be good for homology computation, but the program homcubes reduces the cubes in such a way that after the reduction the map is no longer acyclic. This example shows how to turn on the careful reduction method which does preserve the acyclicity of the map (this is done by the -a switch) to get the right result. projplan In this example the homology module over Z and over Z2 of the projective plane is computed. This example shows how to use the homchain program to compute homology over Z and over Z2. It also shows an embedding of a simplicial complex into the boundary of a high-dimensional hypercube; a PDF file with detailed explanation was prepared by Navin Sivakumar. qexample This is a series of examples of simplicial complexes represented in terms of faces of an n-dimensional cube in Rn. These examples were prepared by Anik Trahan, and they include the Klein bottle, Möbius band, real projective plane and torus. The elementary cubes are defined as Cartesian products of intervals, and the homology computation is done by the homcubes program. relative In this example, relative homology of a pair of sets (X, Y) painted in a BMP file is computed. The set Y consists of black pixels, and the set X\Y is painted in grey. This example shows how to use the program bmp2pset which extracts pixels from BMP images, and how to compute relative homology with homcubes. repeller This example illustrates how to compute the discrete Conley index of a repelling fixed point in R. It is an illustration of how to use the program cnvmvmap to convert between different formats of cubical maps, how to run the program indxpair which constructs an index pair, and then how to compute the Conley index of this index pair with the homcubes program. simkleinsimproj2simtorus This is a series of examples in which various simplicial complexes are defined, and their homology is computed. In the first step, a chain complex is created from the list of simplices of the highest dimension by the program simchain. Then the homology of this chain complex is computed by the program homchain, either with coefficients in the ring Z, or in some field Zp. The usage of the program homsimpl is also illustrated. This program can perform both steps of the computations at one fell swoop. simrelat In this example, the relative homology of a pair of simplicial complexes is computed in two ways: either with the use of the programs simchain and homchain in a sequence, or with the program homsimpl which does the same computations as both other programs. slicing This is an example of a big cube with some small cubes removed from it in such a way that the resulting set is homotopically equivalent to the wadge sum of 2 circles, 2 spheres and one torus of genus 2. This example was created with a program by T. Grudskaya, which I got from G. Watson. If this set is sliced along one of the coordinate axes into several pieces which overlap for the width of one or more cubes, then these pieces can be reduced separately, provided the overlapping parts are preserved. After gluing the reduced pieces together, one can compute the homology of this set and the result should be the same as for the entire set, but the computations should be faster. This example illustrates how to use the program cubslice to cut a large cubical set into slices, then how to use the program homcubes to do the full-dimensional geometric cubical reduction only (without computing homology), and then how to use the program psetglue to join cubical sets together (compute their union). torus In this example the homology module of the torus is computed. A chain complex of the torus is stored in a file and its homology module is computed by the program homchain. An extra file illustrates some details of the text data format for defining chain complexes. vanderpl This is an example of a cubical map generated for the Van der Pol equations embedded in R3. An isolating neighbourhood of an attracting trajectory was chosen here and a map corresponding to a discretization of the dynamical system was generated. Each cube is mapped into a rectangular set in R3 (a prism) contained in this neighbourhood. This example shows two methods of computing the homomorphism induced in homology by a cubical map: either with the programs chmap, chvchmap, and homchain (the program chkperf is also used to verify the assumptions), or with homcubes directly (the program chkmvmap is used to check the assumptions). Note the usage of the command-line option -i. wind3 This is a very simple example of a chain map which maps the circle onto itself with triple winding up. It shows how to define chain complexes and a chain map between them, and also how to compute the homomorphism induced in homology by such a map. wrapped This example illustrates the idea of space wrapping (a.k.a. periodic boundary conditions), and explains how to use the program homcubes to compute homology of cubical sets with identified edges.