Computation of Cubical Steenrod Squares
 1 Citations
 665 Downloads
Abstract
Bitmap images of arbitrary dimension may be formally perceived as unions of mdimensional boxes aligned with respect to a rectangular grid in Open image in new window . Cohomology and homology groups are well known topological invariants of such sets. Cohomological operations, such as the cup product, provide higherorder algebraic topological invariants, especially important for digital images of dimension higher than 3. If such an operation is determined at the level of simplicial chains [see e.g. GonzálezDíaz, Real, Homology, Homotopy Appl, 2003, 83–93], then it is effectively computable. However, decomposing a cubical complex into a simplicial one deleteriously affects the efficiency of such an approach. In order to avoid this overhead, a direct cubical approach was applied in [Pilarczyk, Real, Adv. Comput. Math., 2015, 253–275] for the cup product in cohomology, and implemented in the ChainCon software package [http://www.pawelpilarczyk.com/chaincon/].
We establish a formula for the Steenrod square operations [see Steenrod, Annals of Mathematics. Second Series, 1947, 290–320] directly at the level of cubical chains, and we prove the correctness of this formula. An implementation of this formula is programmed in C++ within the ChainCon software framework. We provide a few examples and discuss the effectiveness of this approach.
One specific application follows from the fact that Steenrod squares yield tests for the topological extension problem: Can a given map \(A\rightarrow S^d\) to a sphere \(S^d\) be extended to a given supercomplex X of A? In particular, the ROBSAT problem, which is to decide for a given function Open image in new window and a value \(r>0\) whether every Open image in new window with \(\Vert gf\Vert _\infty \le r\) has a root, reduces to the extension problem.
Keywords
Cohomology operation Cubical complex Cup product Chain contraction1 Introduction
Binary images (or bitmaps) appear in various contexts, not only image processing. One can perceive a 2dimensional bitmap image as a finite collection of squares (black pixels) aligned with respect to a fixed grid in Open image in new window , and indexed in both directions by the integers. A generalization to Open image in new window may be called an mdimensional binary image. For example, a 3dimensional binary image corresponds to a collection of voxels that represent a 3dimensional object embedded in Open image in new window . This definition of an mdimensional bitmap does not limit the area of applications to image processing alone. For example, a rectangular lattice in Open image in new window is often used for numerical simulations of PDEs or simply for approximating bounded sets in Open image in new window , e.g., an outer bound for a set of solutions to some equation.
Cohomology and homology groups are well known topological invariants that can be used to describe or classify the rough shape defined by an mdimensional bitmap. There exist theory and software that allow one to efficiently computate these invariants. For example, the monograph [11] and the CHomP [2] and CAPD [3] software projects contain algorithms aimed specifically at efficient homology computation of mdimensional bitmaps described in terms of full cubical sets and cubical complexes (see Sect. 2 for precise definitions of these terms).
Cohomological operations, such as the cup product, provide higherorder algebraic topological invariants than (co)homology groups alone. This is especially important for bitmaps of dimension higher than 3, where the natural human intuition may easily fail. One way to compute the operations effectively is to use an approach to homology computation known as “effective homology” [20, 21]. In this approach, instead of reducing the topological information to a minimal linear system that describes the degree of connectivity of the objects, one computes an algebraic skeleton, further called an algebraictopological model (or an AT model for short), for representing these objects. In particular, an AT model contains homomorphisms that allow to instantly obtain representative cycles for each homology generator, and to efficiently compute, for an arbitrary cycle, the combination of the corresponding homology generators. We refer to [9] for an explanation of the philosophy behind this approach, and to [17] for an application in the context of cubical sets.
Steenrod squares [23] are cohomology operations which, roughly speaking, enhance the cohomology ring structure and thus help discriminating between topologically different spaces which still might have isomorphic cohomology rings. Steenrod squares, as well as any cohomology operations, are by definition natural: They are compatible with the induced homomorphisms, and thus can discriminate between nonhomotopic maps. Moreover, due to the naturality, Steenrod squares can provide tests and sometimes even complete characterization for problems in homotopy theory. The primary example of such and also an important motivation for our work is the topological extension problem (for maps into a sphere): Can a given map \(A\rightarrow S^d\) to a sphere \(S^d\) be extended to a given supercomplex X of A? Here the Steenrod squares yield stronger test than the one obtained by plain cohomology and this test is complete if \(\dim X\le d+2\). In fact, this has been the original motivation for Steenrod to introduce his squares, which has been a major breakthrough in homotopy theory of the end of the first half of the twentieth century.
We are interested in the extension problem mainly because another computational problem – called robust satisfiability – reduces to it [5]. In that problem, given a continuous function Open image in new window and a value \(r>0\), one has to decide whether every Open image in new window with \(\Vert gf\Vert _\infty \le r\) has a root. In plain words, we ask for solvability of the system of equations \(f(x)=0\) under uncertainty about the function f quantified by the value of r. Robust satisfiability and the topological extension problem are essentially computationally equivalent [5]. In particular, theoretical complexity study of the extension problem [1] shows that robust satisfiability is decidable in polynomial time when \(\dim X\le 2n3\) or \(n=1,2\), and undecidable when \(\dim X\ge 2n2\) and n is odd. (In the remaining cases of n even and arbitrary dimension of X, the problem is decidable [25].) More practical point of view and an actual implementation is presented in [15] where the Steenrod squares are used in the context of cubical complexes.
Determining cohomological operations at the level of cochains allows one to use an AT model to compute them effectively. The idea is to take the cocycles corresponding to cohomology generators, apply the operation to them, and to determine the combination of the cohomology generators that defines the cohomology class represented by the resulting cocycle; see [8] for an indepth description of this approach. In particular, the simplicial formula provided implicitly in the first Steenrod’s paper on the topic [23] (see also [7] for an alternative approach), computes the Steenrod squares at the level of representing simplicial cocycles. This yields an effective method for computing the Steenrod squares on the level of cohomology of simplicial complexes, if combined with the computation of an AT model. Unfortunately, decomposing a cubical set into a simplicial complex deleteriously affects the efficiency of such an approach. A direct cubical approach was proposed in [17] for the cup product in cohomology (see also [12]), and implemented in the ChainCon software package [16].
The purpose of our paper is to establish a formula for the Steenrod square operations directly at the level of cubical chains. We emphasize the fact that our result is not based upon the formula provided by Real [19] for the case of simplicial sets; rather, we develop a direct cubical formula, following Steenrod’s original approach [23]; the correctness of this formula follows from the axiomatic approach to Steenrod squares, as explained at the beginning of Sect. 3. An implementation of this formula is programmed in C++ and put within the ChainCon software framework [16], and serves the purpose of proofofconcept and benchmarking.
2 Topological Preliminaries
A cubical map \(f:X\rightarrow Y\) from a cubical complex X to a cubical complex Y is a family of maps \(f_n:X_n\rightarrow Y_n\) that commute with all the face operators.
Cubical Sets. We follow the terminology and notation based upon [11, 14].
A set Open image in new window is called a cubical set if it is a finite union of elementary cubes; Note that cubical sets are obviously compact ENRs. The cubical set A is called a full cubical set if it is a finite union of full cubes. For example, an mdimensional binary image (or a bitmap) can be perceived as a full cubical set in Open image in new window for the purpose of topological analysis.
Since the face of an elementary cube is also an elementary cube, sets of elementary cubes yield a natural cubical complex structure. The homological properties of this cubical complex agree with the (singular) homology of the corresponding cubical set.
A chain map between two chain complexes is a homomorphism that commutes with the boundary operator. A chain contraction from a chain complex \(C_*\) to another chain complex \(C'_*\) is a triple \((\pi , \iota , \phi )\) of chain maps \(\pi :C_* \rightarrow C'_*\) (projection), \(\iota :C'_* \rightarrow C_*\) (inclusion) and \(\phi :C_* \rightarrow C_{* + 1}\) (chain homotopy) that satisfy the following conditions: (a) \(\mathrm{{Id}}_{C}  \iota \pi = \partial \phi + \phi \partial \); (b) \(\pi \iota = \mathrm{{Id}}_{C'}\); (c) \(\pi \phi = 0\); (d) \(\phi \iota = 0\); (e) \(\phi \phi = 0\). See e.g. [4, §12] for the motivation of this definition, and [8, p. 86] for comments on the terminology and applications. Note that the existence of a chain contraction from \(C_*\) to \(C'_*\) implies the fact that the homology and cohomology modules of both chain complexes are isomorphic.
An algebraic topological model (introduced in [6]), or an AT model for short, of a cubical complex K, is a chain contraction from \(C_* (K)\) to some free chain complex \(M_*\) with null differential. Note that \(M_*\) is isomorphic to the homology module of K. In particular, an AT model of K exists if \(H_* (K)\) has no torsion. In what follows, we work with coefficients in Open image in new window , so this condition is satisfied.
We use an AT model for representing the homology of K in the following way. The image of each element of \(M_*\) by the inclusion \(\iota \) is a cycle that represents the corresponding homology class. Additionally, the image of each cycle in \(C_* (K)\) by the projection map \(\pi \) is the homology class that contains the cycle. In this way, the homomorphisms \(\iota \) and \(\pi \) are used to go back and forth between homology generators and the corresponding cycles in \(C_* (K)\).
3 The Cubical Formulas for the Steenrod Operations
Definition 1
Our goal here is to give formulas for the chain maps \(D^k_*\) in the special case when X is a cubical complex – see Definition 2 and Theorem 3 below.
There is a subtle difference between our definition above and the definition provided in [18]: The chain maps \(D^k_*\) are defined in [18] for chain complexes with integral coefficients. Indeed, their existence can be proved in this stronger sense; however, for the definition of the Steenrod operations alone the “modulo 2” version is only relevant. The proof of [18, Theorem 3.60] gives a chain homotopy between any two choices of higher diagonal approximations (no matter whether over Open image in new window ). Thus the higher diagonal approximations over Open image in new window necessarily lead to the identical cohomology operations – Steenrod squares.
Definition 2
Theorem 3
The homomorphisms \(D^k_n\) defined above satisfy relation (2).
Proof
 1.When the face operator \(\partial _j^\pm \) is present on both sides of the tensor product, each term can be rewritten in one of the two types according to whether the signs of the operators \(\partial _j^\pm \) on the left and on the right agree or not, explicitlyfor unique \((A',B')\in \mathcal F_{n1}^{k+1}\) and \(t\in \{+,\}\) determined by A, B, j and s. It is not difficult to see that for any fixed \(A',B',t\) and j, the term of the first type appears either twice (when \(t=s(j)\)) or never (when \(t\ne s(j)\)). In the second type, the term appears exactly once (either \(\partial _{A'}^{*} \partial _j^{t}=\partial _A^*\) or \(\partial _{B'}^*\partial _j^t = \partial _B^*\) for some A and B).$$ \partial _{A'}^{*} \partial _j^{t} \sigma \otimes \partial _{B'}^* \partial _j^{t}\sigma \text { and } \partial _{A'}^{*} \partial _j^{t} \sigma \otimes \partial _{B'}^* \partial _j^{t}\sigma $$
 2.When the face operator \(\partial _j^\pm \) is present on one side of the tensor product only, we set up the following labeling:

\(\partial _{A,j}^{*,s}\sigma \otimes \partial _B^{*}\sigma \) will be called an \((A\cup \{j\},B,j,)\)term when \(s=s(j) = (1)^{[j]\setminus (A\cup B)}\).

\(\partial _{A,j}^{*,s}\sigma \otimes \partial _B^{*}\sigma \) will be called an \((A\cup \{j\},B,j,+)\)term when \(s=s(j)\).

\(\partial _A^{*}\sigma \otimes \partial _{B, j}^{*,s}\sigma \) will be called an \((A,B\cup \{j\},j,+)\)term when \(s=s(j)\).

\(\partial _A^{*}\sigma \otimes \partial _{B, j}^{*,s}\sigma \) will be called an \((A,B\cup \{j\},j,)\)term when \(s=s(j)\).
It follows that for each \((A',B')\in \mathcal F_n^{k}\), each \(j\in A'\cup B'\), and each sign \(t\in \{+,\}\), there is exactly one \((A',B',j,t) \)term in the sum above. We define the following pairing on the set of all such \((A',B',j,t)\)terms: We pair each \((A',B',j,+)\)term with the \((A',B',j',)\)term for \(j'=\min \big ((A\cup B)\setminus [j]\big )\) when the minimum exists.^{2} Note that the paired terms are equal. The unpairedrespectively.
\((A',B',j,+)\)terms for \(j=\max (A'\cup B')\) and

\((A', B',j,)\)terms for \(j=\min (A'\cup B')\) are equal to

\(\partial _{A'}^{*}\sigma \otimes \partial _{B'}^*\sigma \) and

\(\partial _{A'}^{*}\sigma \otimes \partial _{B'}^{*}\sigma \),

Corollary 4
4 The Algorithm, Software, and Examples
Software Implementation. The software publicly available at [16] under the GNU General Public License is written in the C++ programming language using the technique of generic programming. In particular, the type of cells in a cellular complex is a template parameter, so the same software applies to simplicial and cubical complexes alike, provided that the cellspecific operations (like the boundary) have been defined. In addition to a programming library that is accessible from within a program written in C++ and is the most efficient way of using this software, there are a few commandline programs provided that read definitions of cellular complexes saved in humanreadable text files, and output the results in text format to the console. These programs thus constitute an easy to use interface to the main features of the software. Simplicial and cubical cells are defined, and several algorithms are implemented, including the computation of an AT model, the cohomology ring, and the Steenrod squares. The main program written especially for this paper is called ssqcub, and computes the Steenrod squares of a cubical complex. Additional programs that may be used for comparison and for gathering additional information, are: ssqsim (computation of Steenrod squares for simplicial complexes), ssqcubs (computation of Steenrod squares for cubical complexes using simplicial subdivision), cringcub (computation of the cohomology ring for cubical complexes), and cringsim (computation of the cohomology ring for simplicial complexes). We refer to the website [16] and instructions provided there for further information.
A list of sample cubical sets that approximate selected manifolds with nontrivial Steenrod squares.
Name of the example  embedding dimension  Number of full cubes  Number of elementary cubes 

\(\text{ K }^2\) – Klein bottle  4  111  406 
Open image in new window – real projective plane  5  38  288 
Open image in new window – complex projective plane  8  281  16,915 
The nontrivial cup products and the nontrivial Steenrod squares. Cohomology generators are denoted by consecutive alphabetic letters for each dimension (e.g., a for dimension 0, e for dimension 4) with appended indices starting from 1 within each dimension separately.
Example  Betti numbers  Nontrivial cup products  Nontrivial Steenrod squares 

\({\text {K}}^2\)  (1, 2, 1)  \(b_1 \smile b_1 = c_1\), \(b_1 \smile b_2 = c_1\)  \(\mathrm{Sq}^1 (b_1) = c_1\) 
(1, 1, 1)  \(b_1 \smile b_1 = c_1\)  \(\mathrm{Sq}^1 (b_1) = c_1\)  
(1, 0, 1, 0, 1)  \(c_1 \smile c_1 = e_1\)  \(\mathrm{Sq}^2 (c_1) = e_1\) 
Using Simplicial Subdivision. In the previous approach for the computation of the Steenrod squares of digital images [7, 8], one would have to first compute a simplicial subdivision of a cubical set, and then compute the simplicial Steenrod squares, e.g., using the efficient formulas provided in [7]. This approach is considerably less efficient than using the direct cubical formula, especially in higher dimensions, where it takes a considerable number of simplices to fill a full cube. For example, our approximation of Klein bottle consisting of 111 full cubes of dimension 4 (see Table 1) yields a simplicial complex with 27, 404 simplices, as opposed to the cubical complex containing 5, 724 cubical cells. The 38 full cubes of dimension 5 that approximate Open image in new window yield 76, 475 simplicial cells and 7, 113 cubical cells, respectively. Obviously, the high numbers of simplicial cells detrimentally affect the computation speed (which is not linear!), and the memory usage as well.
Nontrivial Steenrod squares for suspensions. Cohomology generators are denoted by consecutive alphabetic letters for each dimension (e.g., a for dimension 0, e for dimension 4) with appended indices starting from 1 within each dimension separately.
Example  Betti numbers  Nontrivial Steenrod squares 

\(S^c ({\text {K}}^2)\)  (1, 0, 2, 1)  \(\mathrm{Sq}^1 (c_1) = d_1\) 
(1, 0, 1, 1)  \(\mathrm{Sq}^1 (c_1) = d_1\)  
(1, 0, 0, 1, 0, 1)  \(\mathrm{Sq}^2 (d_1) = f_1\) 
Time Complexity. Provided that an AT model of a chain complex has been already computed, computing all the Steenrod squares involves the computation of the inclusion map on selected homology generators, applying the formulas for the Steenrod squares at the level of chains, and checking if specific homology generators appear in the projections of faces that appear in the formula. Let s denote the number of cells in the chain complex, let g be the number of homology generators. An upper bound for the number of how many times (4) is applied is at most \(O (g^2)\). Assume the dimension is fixed, and then (4) evaluates in constant time times the cost of checking the projections, which is at most O (g). Since the chains are not longer than O (s), the overall pessimistic time complexity of the computation of all the Steenrod squares is \(O (g^3 s^2)\). Note that the time complexity of computing an AT model is \(O (s^3)\), and in typical applications the numbers of homology generators are very small; therefore, the cost of computing Steenrod squares is neglibigle if computation of complete homological information of a cubical complex is taken into consideration.
Footnotes
 1.
A diagonal approximation for X is any chain map \(C_*(X;G)\rightarrow C_*(X;G)\otimes C_*(X;G)\) which induces the map \(\varDelta _*:H_*(X;G)\rightarrow H_*(X\times X;G)\) where \(\varDelta :X\rightarrow X\times X\) is the diagonal map \(x\mapsto (x,x)\). In the case of cubical chain complexes, the explicit formula was given by Serre [22].
 2.
Or, equivalently, we pair each \((A',B',j,)\)term with the \((A',B',j',+)\)term for \(j'=\max \big ((A\cup B)\cap [j]\big )\) when the maximum exists.
Notes
Acknowledgements
The research conducted by both authors has received funding from the People Programme (Marie Curie Actions) of the European Union’s Seventh Framework Programme (FP7/20072013) under REA grant agreements no. 291734 (for M. K.) and no. 622033 (for P. P.).
References
 1.Čadek, M., Krčál, M., Matoušek, J., Vokřínek, L., Wagner, U.: Polynomialtime computation of homotopy groups and Postnikov systems in fixed dimension. Siam J. Comput. 43(5), 1728–1780 (2014)MathSciNetCrossRefzbMATHGoogle Scholar
 2.Computational Homology Project software. http://chomp.rutgers.edu/software/
 3.Computer Assisted Proofs in Dynamics group. http://capd.ii.uj.edu.pl/
 4.Eilenberg, S., Mac Lane, S.: On the groups \(H(\Pi, n)\), I. Ann. Math. 58, 55–106 (1953)MathSciNetCrossRefGoogle Scholar
 5.Franek, P., Krčál, M.: obust satisfiability of systems ofequations. J. ACM 62(4), 26:1–26:19 (2015). http://doi.acm.org/10.1145/2751524 CrossRefGoogle Scholar
 6.GonzalezDíaz, R., Medrano, B., SánchezPeláez, J., Real, P.: Simplicial perturbation techniques and effective homology. In: Ganzha, V.G., Mayr, E.W., Vorozhtsov, E.V. (eds.) CASC 2006. LNCS, vol. 4194, pp. 166–177. Springer, Heidelberg (2006)CrossRefGoogle Scholar
 7.GonzálezDíaz, R., Real, P.: A combinatorial method for computing Steenrod squares. J. Pure Appl. Algebra 139(1–3), 89–108 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
 8.GonzálezDíaz, R., Real, P.: Computation of cohomology operations on finite simplicial complexes. Homology Homotopy Appl. 5(2), 83–93 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
 9.GonzálezDíaz, R., Real, P.: HPT and cocyclic operations. Homology Homotopy Appl. 7(2), 95–108 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
 10.Hatcher, A.: Algebraic Topology. Cambridge University Press, Cambridge (2001). http://www.math.cornell.edu/ hatcher/AT/ATpage.html zbMATHGoogle Scholar
 11.Kaczynski, T., Mischaikow, K., Mrozek, M.: Computational homology, Applied Mathematical Sciences, vol. 157. SpringerVerlag, New York (2004)zbMATHGoogle Scholar
 12.Kaczynski, T., Mrozek, M.: The cubical cohomology ring: An algorithmic approach. Found. Comput. Math. 13(5), 789–818 (2013)MathSciNetCrossRefzbMATHGoogle Scholar
 13.Kühnel, W., Banchoff, T.F.: The 9vertex complex projective plane. Math. Intelligencer 5(3), 11–22 (1983)MathSciNetCrossRefzbMATHGoogle Scholar
 14.Mischaikow, K., Mrozek, M., Pilarczyk, P.: Graph approach to the computation of the homology of continuous maps. Found. Comput. Math. 5, 199–229 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
 15.Franek, P., Krčál, M., Wagner, H.: Robustness of zero sets: Implementation, submittedGoogle Scholar
 16.Pilarczyk, P.: The ChainCon software. Chain contractions,homology and cohomology software and examples. http://www.pawelpilarczyk.com/chaincon/
 17.Pilarczyk, P., Real, P.: Computation of cubical homology, cohomology, and (co)homological operations via chain contraction. Adv. Comput. Math. 41(1), 253–275 (2015)MathSciNetCrossRefzbMATHGoogle Scholar
 18.Prasolov, V.V.: Elements of Homology Theory. Graduate Studies in Mathematics, American Mathematical Society (2007)Google Scholar
 19.Real, P.: On the computability of the Steenrod squares. Ann. Univ. Ferrara, Nuova Ser., Sez. VII, Sc. Mat. 42, 57–63 (1996)MathSciNetzbMATHGoogle Scholar
 20.Sergeraert, F.: Effective homology, a survey (1992). http://wwwfourier.ujfgrenoble.fr/~sergerar/Papers/Survey.pdf
 21.Sergeraert, F.: The computability problem in algebraic topology. Adv. Math. 104(1), 1–29 (1994)MathSciNetCrossRefzbMATHGoogle Scholar
 22.Serre, J.P.: Homologie singulière des espaces fibrés. Ann. Math. 54(3), 425–505 (1951)CrossRefzbMATHGoogle Scholar
 23.Steenrod, N.E.: Products of cocycles and extensions of mappings. Ann. Math. 48(2), 290–320 (1947)MathSciNetCrossRefzbMATHGoogle Scholar
 24.Steenrod, N.E.: Cohomology operations, and obstructions to extending continuous functions. Adv. Math. 8, 371–416 (1972)MathSciNetCrossRefzbMATHGoogle Scholar
 25.Vokřínek, L.: Decidability of the extension problem for maps into odddimensional spheres. [math.AT] (2014). arXiv:1401.3758