From 746639ed6405746ceeffaba1311689905fd9200b Mon Sep 17 00:00:00 2001 From: grahamknockillaree Date: Thu, 18 Jan 2024 18:29:12 +0000 Subject: [PATCH] Add files via upload --- tutorial/chap0.html | 15 ++++++---- tutorial/chap0.txt | 13 +++++---- tutorial/chap0_mj.html | 15 ++++++---- tutorial/chap5.html | 63 ++++++++++++++++++++++++++++++++++-------- tutorial/chap5.txt | 48 ++++++++++++++++++++++++++++---- tutorial/chap5_mj.html | 63 ++++++++++++++++++++++++++++++++++-------- 6 files changed, 169 insertions(+), 48 deletions(-) diff --git a/tutorial/chap0.html b/tutorial/chap0.html index faf7378e..d8c0d138 100644 --- a/tutorial/chap0.html +++ b/tutorial/chap0.html @@ -214,21 +214,24 @@

Contents

 5.4 A second example of digital image segmentation
-
 5.5 Alternative approaches to computing persistent homology + + -
 5.6 Knotted proteins + -
 5.7 Random simplicial complexes + - diff --git a/tutorial/chap0.txt b/tutorial/chap0.txt index 51d7888b..920a89e4 100644 --- a/tutorial/chap0.txt +++ b/tutorial/chap0.txt @@ -85,12 +85,13 @@ 5.3-1 Naive example of image segmentation by automatic thresholding 5.3-2 Background to the data 5.4 A second example of digital image segmentation - 5.5 Alternative approaches to computing persistent homology - 5.5-1 Non-trivial cup product - 5.5-2 Explicit first homology generators - 5.6 Knotted proteins - 5.7 Random simplicial complexes - 5.8 Computing homology of a clique complex (Vietoris-Rips complex) + 5.5 Naive example of digital image contour extraction + 5.6 Alternative approaches to computing persistent homology + 5.6-1 Non-trivial cup product + 5.6-2 Explicit homology generators + 5.7 Knotted proteins + 5.8 Random simplicial complexes + 5.9 Computing homology of a clique complex (Vietoris-Rips complex) 6 Group theoretic computations 6.1 Third homotopy group of a supsension of an Eilenberg-MacLane space 6.2 Representations of knot quandles diff --git a/tutorial/chap0_mj.html b/tutorial/chap0_mj.html index 6e128dc3..da4e8e00 100644 --- a/tutorial/chap0_mj.html +++ b/tutorial/chap0_mj.html @@ -217,21 +217,24 @@

Contents

-
 5.5 Alternative approaches to computing persistent homology + + -
 5.6 Knotted proteins + -
 5.7 Random simplicial complexes + - diff --git a/tutorial/chap5.html b/tutorial/chap5.html index 2c9ea753..5caf552c 100644 --- a/tutorial/chap5.html +++ b/tutorial/chap5.html @@ -45,21 +45,24 @@ -
 5.5 Alternative approaches to computing persistent homology + + -
 5.6 Knotted proteins + -
 5.7 Random simplicial complexes + - @@ -271,9 +274,45 @@

5.4 A second example of digital image segmentationsegmented coins

+

+ +

5.5 Naive example of digital image contour extraction

+ +

The following greyscale image is available from the online appendix to the paper [CKL14].

+ +

circular gradient image

+ +

The following commands produce a picture of contours from this image based on greyscale values. They also produce a picture of just the closed contours (the non-closed contours having been homotopy collapsed to points).

+ + +
+gap> file:=Filename(DirectoriesPackageLibrary("HAP"),"../tutorial/images/circularGradient.png");;
+gap> L:=[];;                                                          
+gap> for n in [1..15] do
+> M:=ReadImageAsPureCubicalComplex(file,n*30000);
+> M:=PureComplexBoundary(M);;
+> Add(L,M);
+> od;;
+gap> C:=L[1];;
+gap> for n in [2..Length(L)] do C:=PureComplexUnion(C,L[n]); od;
+gap> Display(C);
+gap> Display(ContractedComplex(C));
+
+
+ +

Contours from the above greyscale image:

+ +

contours image

+ +

Closed contours from the above greyscale image:

+ +

closedcontours image

+ +

Very similar results are obtained when applied to the file circularGradientNoise.png, containing noise, available from the online appendix to the paper [CKL14].

+

-

5.5 Alternative approaches to computing persistent homology

+

5.6 Alternative approaches to computing persistent homology

From any sequence X_0 ⊂ X_1 ⊂ X_2 ⊂ ⋯ ⊂ X_T of cellular spaces (such as pure cubical complexes, or cubical complexes, or simplicial complexes, or regular CW complexes) we can construct a filtered chain complex C_∗ X_0 ⊂ C_∗ X_1 ⊂ C_∗ X_2 ⊂ ⋯ C_∗ X_T. The induced homology homomorphisms H_n(C_∗ X_0, F) → H_n(C_∗ X_1, F) → H_n(C_∗ X_2, F) → ⋯ → H_n(C_∗ X_T, F) with coefficients in a field F can be computed by applying an appropriate sequence of elementary row operations to the boundary matrices in the chain complex C_∗ X_T⊗ F; the boundary matrices are sparse and are best represented as such; the row operations need to be applied in a fashion that respects the filtration. This method is used in the above examples of persistent homology. The method is not practical when the number of cells in X_T is large.

@@ -307,7 +346,7 @@

5.5 Alternative approaches to computing persistent hom

-
5.5-1 Non-trivial cup product
+
5.6-1 Non-trivial cup product

Of course, a wedge S^2∨ S^1∨ S^1 has the same homology as the torus S^1× S^1. By establishing that a 'noise free' model for our data points, say the 10-th term X_10 in the filtration, has a non-trivial cup product ∪: H^1(X_10, Z) × H^1(X_10, Z) → H^2(X_10, Z) we can eliminate S^2∨ S^1∨ S^1 as a candidate from which the data was sampled.

@@ -322,7 +361,7 @@
5.5-1 Non-trivial cup product

-
5.5-2 Explicit homology generators
+
5.6-2 Explicit homology generators

It could be desirable to obtain explicit representatives of the persistent homology generators that "persist" through a significant sequence of filtration terms. There are two such generators in degree 1 and one such generator in degree 2. The explicit representatives in degree n could consist of an inclusion of pure cubical complexes Y_n ⊂ X_10 for which the incuced homology homomorphism H_n(Y_n, Z) → H_n(X_10, Z) is an isomorphism, and for which Y_n is minimal in the sense that its homotopy type changes if any one or more of its top dimensional cells are removed. Ideally the space Y_n should be "close to the original dataset" X_0. The following commands first construct an explicit degree 2 homology generator representative Y_2⊂ X_10 where Y_2 is homotopy equivalent to X_10. They then construct an explicit degree 1 homology generators representative Y_1⊂ X_10 where Y_1 is homotopy equivalent to a wedge of two circles. The final command displays the homology generators representative Y_1.

@@ -351,7 +390,7 @@
5.5-2 Explicit homology generators

-

5.6 Knotted proteins

+

5.7 Knotted proteins

The Protein Data Bank contains a wealth of data which can be investigated with respect to knottedness. Information on a particular protein can be downloaded as a .pdb file. Each protein consists of one or more chains of amino acids and the file gives 3-dimensional Euclidean coordinates of the atoms in amino acids. Each amino acid has a unique "alpha carbon" atom (labelled as "CA" in the pdb file). A simple 3-dimensional curve, the protein backbone, can be constructed through the sequence of alpha carbon atoms. Typically the ends of the protein backbone lie near the "surface" of the protein and can be joined by a path outside of the protein to obtain a simple closed curve in Euclidean 3-space.

@@ -415,7 +454,7 @@

5.6 Knotted proteins

-

5.7 Random simplicial complexes

+

5.8 Random simplicial complexes

For a positive integer n and probability p we denote by Y(n,p) the Linial-Meshulam random simplicial 2-complex. Its 1-skeleton is the complete graph on n vertices; each possible 2-simplex is included independently with probability p.

@@ -505,7 +544,7 @@

5.7 Random simplicial complexes

-

5.8 Computing homology of a clique complex (Vietoris-Rips complex)

+

5.9 Computing homology of a clique complex (Vietoris-Rips complex)

Topological data analysis provides one motivation for wanting to compute the homology of a clique complex. Consider for instance the cloud of data points shown in Example 5.2-1. This data is a set S of 400 points in the plane. Let Γ be the graph with vertex set S and with two vertices joined by an edge if they lie within a Euclidean distance of 40 of each other. The clique complex K=K(Γ) could be studied to see what it reveals about the data. The following commands construct K and show that it is a 23-dimensional simplicial complex consisting of a total of 36191976 simplices.

diff --git a/tutorial/chap5.txt b/tutorial/chap5.txt index 0a890275..a783cfff 100644 --- a/tutorial/chap5.txt +++ b/tutorial/chap5.txt @@ -218,7 +218,43 @@  - 5.5 Alternative approaches to computing persistent homology + 5.5 Naive example of digital image contour extraction + + The following greyscale image is available from the online appendix + (http://www.ipol.im/pub/art/2014/74/FrechetAndConnectedCompDemo.tgz) to the + paper [CKL14]. + + The following commands produce a picture of contours from this image based + on greyscale values. They also produce a picture of just the closed contours + (the non-closed contours having been homotopy collapsed to points). + +  Example  + gap> file:=Filename(DirectoriesPackageLibrary("HAP"),"../tutorial/images/circularGradient.png");; + gap> L:=[];;  + gap> for n in [1..15] do + > M:=ReadImageAsPureCubicalComplex(file,n*30000); + > M:=PureComplexBoundary(M);; + > Add(L,M); + > od;; + gap> C:=L[1];; + gap> for n in [2..Length(L)] do C:=PureComplexUnion(C,L[n]); od; + gap> Display(C); + gap> Display(ContractedComplex(C)); +  +  + + Contours from the above greyscale image: + + Closed contours from the above greyscale image: + + Very similar results are obtained when applied to the file + circularGradientNoise.png, containing noise, available from the online + appendix + (http://www.ipol.im/pub/art/2014/74/FrechetAndConnectedCompDemo.tgz) to the + paper [CKL14]. + + + 5.6 Alternative approaches to computing persistent homology From any sequence X_0 ⊂ X_1 ⊂ X_2 ⊂ ⋯ ⊂ X_T of cellular spaces (such as pure cubical complexes, or cubical complexes, or simplicial complexes, or regular @@ -288,7 +324,7 @@ manifold with the homotopy type of a torus. - 5.5-1 Non-trivial cup product + 5.6-1 Non-trivial cup product Of course, a wedge S^2∨ S^1∨ S^1 has the same homology as the torus S^1× S^1. By establishing that a 'noise free' model for our data points, say the @@ -305,7 +341,7 @@  - 5.5-2 Explicit homology generators + 5.6-2 Explicit homology generators It could be desirable to obtain explicit representatives of the persistent homology generators that "persist" through a significant sequence of @@ -343,7 +379,7 @@  - 5.6 Knotted proteins + 5.7 Knotted proteins The Protein Data Bank (https://www.rcsb.org/) contains a wealth of data which can be investigated with respect to knottedness. Information on a @@ -422,7 +458,7 @@  - 5.7 Random simplicial complexes + 5.8 Random simplicial complexes For a positive integer n and probability p we denote by Y(n,p) the Linial-Meshulam random simplicial 2-complex. Its 1-skeleton is the complete @@ -525,7 +561,7 @@  - 5.8 Computing homology of a clique complex (Vietoris-Rips complex) + 5.9 Computing homology of a clique complex (Vietoris-Rips complex) Topological data analysis provides one motivation for wanting to compute the homology of a clique complex. Consider for instance the cloud of data points diff --git a/tutorial/chap5_mj.html b/tutorial/chap5_mj.html index 113bc969..2ff93251 100644 --- a/tutorial/chap5_mj.html +++ b/tutorial/chap5_mj.html @@ -48,21 +48,24 @@ -
 5.5 Alternative approaches to computing persistent homology + + -
 5.6 Knotted proteins + -
 5.7 Random simplicial complexes + - @@ -274,9 +277,45 @@

5.4 A second example of digital image segmentationsegmented coins

+

+ +

5.5 Naive example of digital image contour extraction

+ +

The following greyscale image is available from the online appendix to the paper [CKL14].

+ +

circular gradient image

+ +

The following commands produce a picture of contours from this image based on greyscale values. They also produce a picture of just the closed contours (the non-closed contours having been homotopy collapsed to points).

+ + +
+gap> file:=Filename(DirectoriesPackageLibrary("HAP"),"../tutorial/images/circularGradient.png");;
+gap> L:=[];;                                                          
+gap> for n in [1..15] do
+> M:=ReadImageAsPureCubicalComplex(file,n*30000);
+> M:=PureComplexBoundary(M);;
+> Add(L,M);
+> od;;
+gap> C:=L[1];;
+gap> for n in [2..Length(L)] do C:=PureComplexUnion(C,L[n]); od;
+gap> Display(C);
+gap> Display(ContractedComplex(C));
+
+
+ +

Contours from the above greyscale image:

+ +

contours image

+ +

Closed contours from the above greyscale image:

+ +

closedcontours image

+ +

Very similar results are obtained when applied to the file circularGradientNoise.png, containing noise, available from the online appendix to the paper [CKL14].

+

-

5.5 Alternative approaches to computing persistent homology

+

5.6 Alternative approaches to computing persistent homology

From any sequence \(X_0 \subset X_1 \subset X_2 \subset \cdots \subset X_T\) of cellular spaces (such as pure cubical complexes, or cubical complexes, or simplicial complexes, or regular CW complexes) we can construct a filtered chain complex \(C_\ast X_0 \subset C_\ast X_1 \subset C_\ast X_2 \subset \cdots C_\ast X_T\). The induced homology homomorphisms \(H_n(C_\ast X_0,\mathbb F) \rightarrow H_n(C_\ast X_1,\mathbb F) \rightarrow H_n(C_\ast X_2,\mathbb F) \rightarrow \cdots \rightarrow H_n(C_\ast X_T,\mathbb F)\) with coefficients in a field \(\mathbb F\) can be computed by applying an appropriate sequence of elementary row operations to the boundary matrices in the chain complex \(C_\ast X_T\otimes \mathbb F\); the boundary matrices are sparse and are best represented as such; the row operations need to be applied in a fashion that respects the filtration. This method is used in the above examples of persistent homology. The method is not practical when the number of cells in \(X_T\) is large.

@@ -310,7 +349,7 @@

5.5 Alternative approaches to computing persistent hom

-
5.5-1 Non-trivial cup product
+
5.6-1 Non-trivial cup product

Of course, a wedge \(S^2\vee S^1\vee S^1\) has the same homology as the torus \(S^1\times S^1\). By establishing that a 'noise free' model for our data points, say the 10-th term \(X_{10}\) in the filtration, has a non-trivial cup product \(\cup\colon H^1(X_{10},\mathbb Z) \times H^1(X_{10},\mathbb Z) \rightarrow H^2(X_{10},\mathbb Z)\) we can eliminate \(S^2\vee S^1\vee S^1\) as a candidate from which the data was sampled.

@@ -325,7 +364,7 @@
5.5-1 Non-trivial cup product

-
5.5-2 Explicit homology generators
+
5.6-2 Explicit homology generators

It could be desirable to obtain explicit representatives of the persistent homology generators that "persist" through a significant sequence of filtration terms. There are two such generators in degree \(1\) and one such generator in degree \(2\). The explicit representatives in degree \(n\) could consist of an inclusion of pure cubical complexes \(Y_n \subset X_{10}\) for which the incuced homology homomorphism \(H_n(Y_n,\mathbb Z) \rightarrow H_n(X_{10},\mathbb Z)\) is an isomorphism, and for which \(Y_n\) is minimal in the sense that its homotopy type changes if any one or more of its top dimensional cells are removed. Ideally the space \(Y_n\) should be "close to the original dataset" \(X_0\). The following commands first construct an explicit degree \(2\) homology generator representative \(Y_2\subset X_{10}\) where \(Y_2\) is homotopy equivalent to \(X_{10}\). They then construct an explicit degree \(1\) homology generators representative \(Y_1\subset X_{10}\) where \(Y_1\) is homotopy equivalent to a wedge of two circles. The final command displays the homology generators representative \(Y_1\).

@@ -354,7 +393,7 @@
5.5-2 Explicit homology generators

-

5.6 Knotted proteins

+

5.7 Knotted proteins

The Protein Data Bank contains a wealth of data which can be investigated with respect to knottedness. Information on a particular protein can be downloaded as a .pdb file. Each protein consists of one or more chains of amino acids and the file gives 3-dimensional Euclidean coordinates of the atoms in amino acids. Each amino acid has a unique "alpha carbon" atom (labelled as "CA" in the pdb file). A simple 3-dimensional curve, the protein backbone, can be constructed through the sequence of alpha carbon atoms. Typically the ends of the protein backbone lie near the "surface" of the protein and can be joined by a path outside of the protein to obtain a simple closed curve in Euclidean 3-space.

@@ -418,7 +457,7 @@

5.6 Knotted proteins

-

5.7 Random simplicial complexes

+

5.8 Random simplicial complexes

For a positive integer \(n\) and probability \(p\) we denote by \(Y(n,p)\) the Linial-Meshulam random simplicial 2-complex. Its \(1\)-skeleton is the complete graph on \(n\) vertices; each possible \(2\)-simplex is included independently with probability \(p\).

@@ -508,7 +547,7 @@

5.7 Random simplicial complexes

-

5.8 Computing homology of a clique complex (Vietoris-Rips complex)

+

5.9 Computing homology of a clique complex (Vietoris-Rips complex)

Topological data analysis provides one motivation for wanting to compute the homology of a clique complex. Consider for instance the cloud of data points shown in Example 5.2-1. This data is a set \(S\) of 400 points in the plane. Let \(\Gamma\) be the graph with vertex set \(S\) and with two vertices joined by an edge if they lie within a Euclidean distance of 40 of each other. The clique complex \(K=K(\Gamma)\) could be studied to see what it reveals about the data. The following commands construct \(K\) and show that it is a 23-dimensional simplicial complex consisting of a total of 36191976 simplices.