[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
research-article
Open access

Automorphisms and Isomorphisms of Maps in Linear Time

Published: 22 November 2024 Publication History

Abstract

A map is a \(2\)-cell decomposition of a closed compact surface, i.e., an embedding of a graph such that every face is homeomorphic to an open disc. An automorphism of a map can be thought of as a permutation of the vertices, which preserves the vertex-edge-face incidences in the embedding. Every automorphism of a map determines an angle-preserving homeomorphism of the surface. While it is conjectured that there is no “truly subquadratic” algorithm for testing map isomorphism for unconstrained genus, we present a linear-time algorithm for computing the generators of the automorphism group of a map on an orientable surface of genus \(g\neq 0\), parametrized by the genus \(g\). A map on an orientable surface is uniform if the cyclic vector of sizes of faces incident to a vertex \(v\) does not depend on the choice of \(v\). The algorithm applies a sequence of local reductions and produces a uniform map while preserving the automorphism group. The automorphism group of the original map can be reconstructed from the automorphism group of the associated uniform map in linear time. We also extend the algorithm to non-orientable surfaces by making use of the antipodal double-cover. The algorithm can be used to solve the map isomorphism problem between maps (orientable or non-orientable) of bounded negative Euler characteristic.

1 Introduction

The graph isomorphism problem asks whether or not two given graphs are isomorphic. It is one of the most fundamental problems in the theory of algorithms. Its computational complexity is still a huge open question, even after Babai's recent quasipolynomial-time breakthrough [4]. While some complexity-theoretic results indicate that this problem is unlikely NP-complete (if it was, the polynomial hierarchy would collapse to its second level, see [31]), no polynomial-time algorithm is known, even with extended resources like randomization or quantum computing. For quite a long time, it has been known that the isomorphism of bounded genus graphs can be solved in time \(n^{{\mathcal{O}}(g)}\), where \(g\) is the genus of the underlying surface; see, for example [30]. An algorithm with running time \(n^{(\log{g})^{{\mathcal{O}}(1)}}\) for bounded genus graphs follows from [29]. For planar graphs, Weinberg [34] (1966) gave a very simple quadratic-time algorithm for testing isomorphism of planar graphs. This was improved by Hopcroft and Tarjan [19] to \({\mathcal{O}}(n\log{n})\). Building on this earlier work, Hopcroft and Wong [20] published an article in 1974, in which they described a linear-time algorithm for testing isomorphism of planar graphs. An interesting question is whether the result of Hopcroft and Wong [20] can be generalized also for the bounded genus graphs, i.e., whether the isomorphism problem for graphs of bounded genus can be solved in time \(f(g)\cdot n\), for some computable function \(f\). This motivates the study of the isomorphism problem for embedded graphs. Recently, a linear-time algorithm was announced [22] for testing isomorphism of bounded genus graphs. The proposed algorithm employs the results of this article as a subroutine. For graphs on surfaces of higher genus, the graph isomorphism problem seems much harder. This can be explained in the following way. We can rather easily reduce the problem to \(3\)-connected graphs. For planar graphs, the famous result of Whitney [35] says that embeddings of \(3\)-connected planar graphs in the plane are (combinatorially) unique. However, for infinitely many surfaces \(S\) of non-positive Euler characteristics, there exist \(3\)-connected graphs with exponentially many embeddings into \(S\); see, for example, [6] and the references therein. This makes an essential difference between planar graphs and graphs of higher genera.
By a topological map we mean a \(2\)-cell decomposition of a closed compact surface, i.e., an embedding of a connected graph into a surface such that every face is homeomorphic to an open disc. An isomorphism of two maps is an isomorphism of the underlying graphs,which preserves the vertex-edge-face incidences. In particular, a map isomorphism induces a homeomorphism of the underlying surfaces. By the size of a map \(M\), denoted \(\|M\|\), we mean the number of edges of \(M\). A quadratic algorithm of complexity \((\|M_{1}\|+\|M_{2}\|)^{2}\) testing isomorphism between general maps \(M_{1}\) and \(M_{2}\) (regardless of genus) has been known for a long time, see Corollaries 2.8 and 2.9 and the discussion in the end of Section 2.
Our ambition is not just to decide the isomorphism problem between maps in linear time but to determine the set \({{\rm Iso}}(M_{1},M_{2})\) of all isomorphisms between two maps. The latter problem is closely related to the problem of computation of generators of the automorphism group of a map. For the sphere, Colbourn and Booth [10] proposed a way to modify the Hopcroft-Wong algorithm [20] to compute the generators of the automorphism group of a spherical map. However, they state the following: “We… base our automorphism algorithms on the Hopcroft-Wong algorithm. Necessarily, we will only be able to sketch our procedure. A more complete description and a proof of correctness would require a more thorough analysis of the Hopcroft-Wong algorithm than has yet appeared in the literature.” Sadly, the situation has not changed since, and the only available description of the Hopcroft-Wong algorithm is the extended abstract [20], which contains no proof of the correctness and running time.1 Our contribution also fills in this gap, and we obtain better insight into the Hopcroft-Wong algorithm by solving the problem in a greater generality; see [23] as well. Roughly speaking, the key idea of the Hopcroft-Wong algorithm is to try to apply contractions of edges to obtain two smaller maps, which are isomorphic if and only if the original maps are. In order to do this, in each step of the algorithm, the contracted edges must be chosen canonically in a way that they form an independent set invariant with respect to the action of the automorphism group. Unfortunately, a canonical choice is not always possible. In the sphere, this situation occurs only for a very special family of maps. If this happens, the Hopcroft-Wong algorithm employs another reduction which is not locally defined. The reductions are applied repeatedly until we obtain an irreducible map. A map \(M\) is irreducible if none of the prescribed reductions applies to \(M\). The original maps are isomorphic if and only if the associated irreducible maps are isomorphic.
It turns out that the impossibility of the canonical choice of the set of edges to be contracted is quite common for maps of higher genera. Therefore, we have decided to change the approach by relaxing the notion of irreducible maps on one side and reducing the amount of reductions just to three on the other side. The Hopcroft-Wong algorithm reduces spherical maps to maps having the same degrees of vertices and also the same degrees of faces (e.g., Platonic solids, cycles and dipoles), while the set of reductions described in Section 3 yields in the spherical case the sporadic family of Platonic and Archimedean maps, and five infinite families listen in Section 4.2. Since all the reductions defined in Section 3 are locally defined, they apply for maps on any orientable surface as well. The underlying surface determines only the set of irreducible maps. For genus \(g \gt 1\), the number of irreducible maps of genus \(g\) is by Proposition 4.1 finite. In Section 5, we introduce special algorithms solving the isomorphism problem for the irreducible maps on the sphere and on the torus. In Section 6, we extend the algorithm to maps on non-orientable surfaces. Further information on the algorithm and its complexity can be found in Section 7.
Our main results read as follows.
Theorem 1.1.
Let \(M_{1}\) and \(M_{2}\) be maps on a surface \(S\) of Euler characteristic \(\chi(S)\). The set of all isomorphisms \({{\rm Iso}}(M_{1},M_{2})\) from \(M_{1}\) to \(M_{2}\) can be determined in time \(f(\chi(S))\cdot(\|M_{1}\|+\|M_{2}\|)\), where \(f\) is some computable function and \(\|M\|\) denotes the size of the map \(M\).
Determining the set of all isomorphisms between two maps is closely related to finding the generators of the automorphism group \({\rm Aut}(M)\) of a map \(M\). More precisely, the set of all isomorphisms \(M_{1}\to M_{2}\) can be expressed as a composition \(\psi\circ{\rm Aut}(M_{1})\) where \(\psi:M_{1}\to M_{2}\) is any isomorphism. Thus, our first result goes hand-in-hand with the following.
Theorem 1.2.
Let \(M\) be a map on a surface \(S\) of Euler characteristic \(\chi(S)\). A generating set of the automorphism group \({\rm Aut}(M)\) of \(M\) can be computed in time \(f(\chi(S))\cdot\|M\|\), where \(f\) is some computable function and \(\|M\|\) denotes the size of the map \(M\).

2 Preliminaries

2.1 Elements of Theory of Maps

A map \(M\) is a \(2\)-cell decomposition of a closed-connected compact surface \(S\). The \(0\)-cells, \(1\)-cells and \(2\)-cells are called, respectively, the vertices, the edges and the faces of \(M\). Equivalently, a map is defined by an embedding \(\iota\colon X\to S\) of a connected graph \(X\) into \(S\) such that every connected component of \(S\setminus\iota(X)\) is homeomorphic to an open disc. By \(V(M)\), \(E(M)\), and \(F(M)\) we denote the sets of vertices, edges, and faces of \(M\), respectively. We put \(v(M):=|V(M)|\), \(e(M):=|E(M)|\), and \(f(M):=|F(M)|\). Recall that closed-connected compact surfaces are characterized by two invariants: the orientability and the Euler characteristic \(\chi\). The above invariants of \(M\) are related as follows.
Theorem 2.1.
(Euler-Poincaré formula). Let \(M\) be a map on a surface \(S\). Then
\begin{align*}v(M)-e(M)+f(M)=\chi(S)=\left\{\begin{array}{ll}2-2g, & \text{ if }S \text{ orientable of genus } g;\\2-\gamma, & \text{ if }S \text{ is non-orientable of genus }\gamma.\end{array}\right.\end{align*}
In what follows, we present two algebraic descriptions of maps suitable for investigation of automorphisms and isomorphisms between maps. We follow the description from [21] and [16, Section 7.6], where the reader can find more details. We need to introduce different models for maps on orientable surfaces and for maps on non-orientable surfaces.
Oriented Maps. Even though our main concern is in general maps, a large part of our algorithm deals with maps on orientable surfaces. An oriented map is a map on an orientable surface with a fixed global orientation. Every oriented map can be combinatorially described as a triple \((D,R,L)\). Here, \(D\) is the set of darts. By a dart we mean an edge endowed with one of the two possible orientations. Hence, each edge gives rise to two darts. The permutation \(R\in{\rm Sym}(D)\), called rotation, is the product \(R=\Pi_{v\in V}R_{v}\), where each \(R_{v}\) cyclically permutes the darts originating at \(v\in V\), following the chosen orientation around \(v\). The dart-reversing involution \(L\in{\rm Sym}(D)\) is an involution of \(D\) that, for each edge, swaps the two oppositely directed darts arising from the edge. Formally, a combinatorial oriented map is any triple \(M=(D,R,L)\), where \(D\) is a finite non-empty set of darts, \(R\) is any permutation of darts, \(L\) is a fixed-point-free involution of \(D\), and the monodromy group \(\langle R,L\rangle\leq{\rm Sym}(D)\) is transitive on \(D\). Clearly, \(|D|=2\|M\|\). Observe that transitivity of the monodromy group ensures that the map is connected. The vertices, edges, and faces of \(M\) are in one-to-one correspondence with the cycles of the permutations \(R\), \(L\), \(R^{-1}L\), respectively. By the phrase “a dart \(x\) is incident to a vertex \(v\)” we mean that \(x\in R_{v}\). Similarly, “\(x\) is incident to a face \(f\)” means that \(x\) belongs to the boundary walk of \(f\) defined by the respective cycle of \(R^{-1}L\). By the degree of a face we mean the length of its boundary walk. A face of degree \(d\) will be called a \(d\)-face. Note that each dart is incident to exactly one face. For convenience, we frequently use a shorthand notation \(x^{-1}=Lx\), for \(x\in D\). The dual of an oriented map \(M=(D,R,L)\) is the oriented map \(M^{*}=(D,R^{-1}L,L)\).
Apart from standard map theory references, see [15, 27] and [16, Section 7.6], we need to introduce labeled maps. A planted tree is a rooted tree embedded in the sphere, i.e., a planted tree is a spherical map having exactly one face. We say that a planted tree is integer-valued if to each vertex there is assigned an integer. A dart-labeling of an oriented map \(M=(D,R,L)\) is a mapping \(\ell\colon D\to{\mathcal{T}}\), where \({\mathcal{T}}\) is the set of integer-valued planted trees. A labeled oriented map\(M\) is a \(4\)-tuple \((D,R,L,\ell)\). The dual map is the map \(M^{*}\) defined as \(M^{*}=(D,R^{-1}L,L,\ell)\).
Two labeled oriented maps \(M_{1}=(D_{1},R_{1},L_{1},\ell_{1})\) and \(M_{2}=(D_{2},R_{2},L_{2},\ell_{2})\) are isomorphic, in symbols \(M_{1}\cong M_{2}\), if there exists a bijection \(\psi\colon D_{1}\to D_{2}\), called an isomorphism from \(M_{1}\) to \(M_{2}\), such that
\begin{align}\psi R_{1}=R_{2}\psi,\quad\psi L_{1}=L_{2}\psi,\quad{\rm and}\quad\ell_{1}= \ell_{2}\psi.\end{align}
(2.1)
Recall that an oriented map \((D,R,L)\) describes a topological map on an orientable surface with a fixed global orientation induced by \(R\). Therefore isomorphisms between oriented maps preserve the associated (global) orientations of the underlying surfaces by definition. Therefore, we will call them orientation-preserving isomorphisms. The set of orientation-preserving isomorphisms from \(M_{1}\) to \(M_{2}\) is denoted by \({{\rm Iso}^{+}}(M_{1},M_{2})\). The orientation-preserving automorphism group of \(M\) is the set \({\rm Aut}^{+}(M):={{\rm Iso}^{+}}(M,M)\). Algebraically, the group \({\rm Aut}^{+}(M)\) is the label-preserving subgroup of the centralizer of the monodromy group \(\langle R,L\rangle\) in \({\rm Sym}(D)\).
Remark 2.2.
Introduction of labels on darts of maps is needed to guarantee that each of the elementary reductions introduced in Section 3 produces a new map with isomorphic automorphism group. Otherwise it could happen that the number of automorphisms increases during the reduction process. This is essential for maps on surfaces with non-negative Euler characteristic. Labeling darts by planted trees turned out to be useful, since we are able to handle, modify and control the labels effectively, for more details, see Section 7.
Chirality. The mirror image of an oriented map \(M=(D,R,L)\) is the oriented map \(M^{-1}=(D,R^{-1},L)\). Similarly, the mirror image of a labeled oriented map \(M=(D,R,L,\ell)\) is the map \(M^{-1}=(D,R^{-1},L,\ell^{-1})\), where \(\ell^{-1}(x)\) is the mirror image of \(\ell(x)\) for each \(x\in D\).
An oriented map \(M\) is called reflexible if \(M\cong M^{-1}\). Otherwise the maps \(M\) and \(M^{-1}\) form a chiral pair. For example, all the Platonic maps are reflexible. The set of all isomorphisms from \(M_{1}\) to \(M_{2}\) is defined as \({{\rm Iso}}(M_{1},M_{2}):={{\rm Iso}^{+}}(M_{1},M_{2})\cup{{\rm Iso}^{+}}(M_{1 },M_{2}^{-1})\). Similarly, we put \({\rm Aut}(M):={{\rm Iso}}(M,M)\).
Maps on General Surfaces. Let \(M\) be a map on any, possibly non-orientable, surface. The associated combinatorial non-oriented map is a quadruple \((F,\lambda,\rho,\tau)\), where \(F\) is a finite non-empty set of flags, and \(\lambda,\rho,\tau\in{\rm Sym}(F)\) are fixed-point-free2 involutions such that \(\lambda\tau=\tau\lambda\) and the group \(\langle\lambda,\rho,\tau\rangle\) acts transitively on \(F\). Each flag corresponds uniquely to a vertex-edge-face incidence triple \((v,e,f)\). Geometrically, it can be viewed as the triangle defined by \(v\), the center of \(e\), and the center of \(f\). A flag \(x=(v,e,f)\) is adjacent to exactly three flags \(\lambda(x)\), \(\rho(x)\), \(\tau(x)\). The group \(\langle\lambda,\rho,\tau\rangle\) is called the non-oriented monodromy group of \(M\). The vertices, edges, and faces of \(M\) correspond uniquely to the orbits of \(\langle\rho,\tau\rangle\), \(\langle\lambda,\tau\rangle\), and \(\langle\rho,\lambda\rangle\), respectively. Since every edge of the underlying graph of \(M\) is incident to four flags, we have \(|F|=4\|M\|\). Similarly, as in the case of oriented maps, an isomorphism of two non-oriented maps \(M_{i}=(F_{i},\lambda_{i},\rho_{i},\tau_{i})\), for \(i=1,2\), is a bijection \(\psi\colon F_{1}\to F_{2}\) satisfying \(\psi\lambda_{1}=\lambda_{2}\psi\), \(\psi\rho_{1}=\rho_{2}\psi\), \(\psi\tau_{1}=\tau_{2}\psi\). In particular, an automorphism of \(M\) is a permutation of \(F\) which commutes with \(\lambda,\rho,\tau\). The even-word subgroup \(\langle\rho\tau,\tau\lambda\rangle\) has index at most two in the monodromy group of \(M\). If it is exactly two, the map \(M\) is called orientable. From an orientable non-oriented map \(M=(F,\lambda,\rho,\tau)\) it is possible to construct two oriented maps \(M^{+}=(D,R,L)\) and \(M^{-}=(D,R^{-1},L)\), where \(D\) is one of the two orbits of the action of \(\langle\rho\tau,\tau\lambda\rangle\), \(R=\rho\tau\) and \(L=\tau\lambda\). Conversely, for every oriented map \((D,R,L)\) it is possible to construct the corresponding non-oriented map \((F,\lambda,\rho,\tau)\); see [16, Section 7.6]. Note that the underlying topological maps for \((D,R,L)\) and \((D,R^{-1},L)\) and \((F,\lambda,\rho,\tau)\) are isomorphic, meaning that there is a homeomorphism of the underlying surface that is an isomorphism of the respective cell-complexes.
Test of Orientability. For a non-oriented map \(M=(F,\lambda,\rho,\tau)\), it is possible to test in linear time if \(M\) is orientable [15, 27]. The barycentric subdivision\(B\) of \(M\) is constructed by placing a new vertex in the center of every edge and face, and then joining the centers of faces with the incident vertices and with the center of the incident edges. There is a one-to-one correspondence between the vertices of \(B\) and the flags \(F\). The dual of \(B\) is a \(3\)-valent map, i.e., every vertex is of degree \(3\). The following theorem can be found in [16, Section 7.6].
Theorem 2.3.
A map \(M=(F,\lambda,\rho,\tau)\) is orientable if and only if the underlying \(3\)-valent graph of the dual of the barycentric subdivision of \(M\) is bipartite.
Remark 2.4.
In this article the term “map isomorphism” has, depending on the context, three meanings. Suppose the considered maps are topological maps. Then, the term “map isomorphism” means an isomorphism between the corresponding cell-complexes. If we mean by a map an oriented map \((D,R,L)\), then the term “map isomorphism” means an isomorphism in the category of oriented maps. Since the combinatorial map \((D,R,L)\) describes a topological map on an orientable surface with a given global orientation, the set of isomorphisms between two such maps \(M_{1}\) and \(M_{2}\) is called the set of orientation-preserving isomorphisms. Finally, when considering maps (without a given global orientation) described by \(4\)-tuples \((F,\lambda,\rho,\tau)\), then by the term “map isomorphism” we mean an isomorphism in the category of unoriented maps. Suppose the underlying surfaces of unoriented maps \(M_{1}\) and \(M_{2}\) are orientable. Then, these unoriented maps can be described as oriented maps \(N_{1}\) and \(N_{2}\) as well. Moreover, the set \({{\rm Iso}}(M_{1},M_{2})\) of map isomorphisms between unoriented maps \(M_{1}\) and \(M_{2}\) can be described as \({{\rm Iso}^{+}}(N_{1},N_{2})\cup{{\rm Iso}^{+}}(N_{1},N_{2}^{-1})\). The above correspondence holds for all maps except for cycles and paths embedded in the sphere. If \(M\) is a cycle or a path on the sphere, then there exists a unique reflection \(\rho\) fixing all darts of \(M\). Clearly, \(\rho\) cannot be distinguished from the identity considering its action on the darts of \(M\).
For technical reasons, in all the routines used in this article, we consider oriented maps, and we compute isomorphisms between them. If the underlying surfaces of the considered maps are non-orientable, then we lift the problem of determining \({{\rm Iso}}(M_{1},M_{2})\) to a problem of dermining a particular subset of \({{\rm Iso}^{+}}(\tilde{M}_{1},\tilde{M}_{2})\), where \(\tilde{M}_{i}\)(\(i=1,2\)) denotes the corresponding antipodal covers, see Section 6 for details.
Face-Normal Maps. A map is called face-normal, if all its faces are of degree at least three. It is well-known that every face-normal map on the sphere or on the projective plane has a vertex of degree at most \(5\). Using the Euler-Poincaré formula, this can be generalized for other surfaces.
Theorem 2.5.
Let \(S\) be a closed compact surface with Euler characteristic \(\chi(S)\leq 0\) and let \(M\) be a face-normal map on \(S\). Then the average degree of vertices is at most \(6(1-\chi(S))\). In particular, there is a vertex of valence at most \(6(1-\chi(S))\).
Proof.
A bound for maximum degree is achieved by a triangulation, thus we may assume that \(M\) is a triangulation. We have \(f=2e(M)/3\). By plugging this in the Euler-Poincaré formula and using \(2e(M)=\overline{d}(M)v(M)\), we obtain \(3v(M)-\overline{d}(M)v(M)/2=3\chi(S)\), where \(\overline{d}(M)\) is the average degree of a vertex. By manipulating the equality, we get \(\overline{d}(M)-6=-6\chi(S)/v(M)\). Since \(\chi(S)\leq 0\), the right hand side is maximized for \(v(M)=1\). We conclude that \(\overline{d}\leq 6(1-\chi(S))\). □
Local Types of Vertices and Uniform Maps. Let \(M\) be an oriented map. The lexicographically minimal representative of the cyclic vector of degrees of faces incident with a vertex \(v\), induced by the chosen global orientation, is called the local type of \(v\in V(M)\). Note that the same face may contribute several times to the local type of \(v\). The length of the local type of \(v\) is the degree of \(v\). The local types of vertices are linearly ordered as follows: \((f_{1},\dots,f_{k}) \lt (f^{\prime}_{1},\dots,f^{\prime}_{m})\) if \(k \lt m\), or if \(k=m\) and \((f_{1},\dots,f_{k})\prec(f^{\prime}_{1},\dots,f^{\prime}_{k})\), where \(\prec\) denotes the lexicographical order. We call a vertex light if it is of minimal local type, otherwise it is called heavy. In particular, a light vertex is of minimum degree. Theorem 2.5 implies that, in a face-normal map, the degree of light vertices is bounded by a function of \(\chi(S)\).
A map is uniform3 if the local types of all vertices are the same. A map is homogeneous of type \(\{k,\ell\}\) if every vertex is of degree \(k\) and every face is of degree \(\ell\). A dipole is a \(2\)-vertex spherical map which is dual to a spherical cycle. A bouquet is a one-vertex map that is a dual of a planted star (a tree embedded into the sphere with at most one vertex of degree \(\gt 1\)).
Example 2.6.
By Platonic (Archimedean), map we mean the \(2\)-skeleton of a Platonic (Archimedean) solid. The face-normal uniform spherical maps are the \(5\) Platonic maps, the \(13\) Archimedean maps, the \(2\)-skeleton of the pseudo-rhombicuboctahedron, prisms, antiprisms, and cycles of length at least \(3\). It easily follows from Euler's formula that the spherical homogeneous maps are the \(5\) Platonic maps, cycles, and dipoles. Bouquets with at least two loops are uniform but not homogeneous spherical maps.

2.2 Map Isomorphism Problem Regardless of Genus

The following statement, well-known for unlabeled maps, extends easily to labeled maps.
Theorem 2.7.
Let \(M_{1}\) and \(M_{2}\) be labeled oriented maps with sets of darts \(D_{1}\) and \(D_{2}\), respectively. For every \(x_{0}\in D_{1}\) and every \(y_{0}\in D_{2}\), there exists at most one isomorphism \(M_{1}\to M_{2}\) mapping \(x_{0}\) to \(y_{0}\). In particular, \({\rm Aut}^{+}(M_{1})\) is fixed-point-free on \(D_{1}\).
Proof.
Let \(M_{i}=(D_{i},R_{i},L_{i})\), for \(i=1,2\), be two oriented maps with sets of darts \(D_{1}\) and \(D_{2}\). Assume there exists an isomorphism \(\psi\) taking \(x\mapsto y\), for some \(x\in D_{1}\) and \(y\in D_{2}\). By connectedness, every dart \(z\in D_{1}\) can be expressed as an image \(W_{1}x\), where \(W_{1}\) is a word in permutations \(R_{1}\) and \(L_{1}\). Since \(\psi\) is a map isomorphism, we have \(\psi W_{1}x=W_{2}\psi x=W_{2}y\), where \(W_{2}\) arises by replacing each appearance of \(R_{1}\) by \(R_{2}\), and each appearance of \(L_{1}\) by \(L_{2}\). Hence, the image of any dart is uniquely determined by the image of a fixed dart \(x\). □
Corollary 2.8.
Let \(M_{1}\) and \(M_{2}\) be labeled oriented maps with sets of darts \(D_{1}\) and \(D_{2}\), respectively. If \(x_{0}\in D_{1}\) and \(y_{0}\in D_{2}\), then it can be checked in time \({\mathcal{O}}(\|M_{1}\|+\|M_{2}\|)\) whether there is an isomorphism mapping \(x_{0}\) to \(y_{0}\).
Proof.
Let \(M_{i}=(D_{i},R_{i},L_{i})\), for \(i=1,2\). The algorithm follows. We associate with the map \(M_{i}\) a cubic graph \(X_{i}\) with vertex-set \(D_{i}\). The edges of \(X_{i}\) are of two kinds: directed edges \((x,R_{i}(x))\), and unoriented edges \(\{x,L_{i}(x)\}\), for all \(x\in D_{i}\). Both \(X_{1}\) and \(X_{2}\) are strongly connected. We construct a spanning tree \(T\leq X_{1}\) rooted at \(x_{0}\in D_{1}\). This can be done in linear time employing any of the standard algorithms. The procedure can be modified in the way that for every dart \(x\in D_{1}\) it produces the unique path joining \(x\) to \(x_{0}\) in \(T\). Such a path associated to \(x\in D_{1}\) defines a string \(W_{x}=W(R_{1},L_{1})\) in terms of \(R_{1}\) and \(L_{1}\). Browsing the tree \(T\) we associate to every \(x\in D_{1}\) the dart \(y=W_{y}(R_{2},L_{2})y_{0}\), where \(W_{y}(R_{2},L_{2})\) arises from \(W_{x}(R_{1},L_{1})\) by replacing of each appearance of \(R_{1}\) by \(R_{2}\), and each appearance of \(L_{1}\) by \(L_{2}\). If the labels of \(x\) and \(y\) do not coincide, there is no isomorphism taking \(x_{0}\mapsto y_{0}\). In this way we either find a bijection \(\psi:D_{1}\to D_{2}\), or the constructed mapping is not a bijection and we conclude that the mapping \(x_{0}\mapsto y_{0}\) does not extend to a map isomorphism. Finally we check whether \(R_{2}\psi=\psi R_{1}\) and \(L_{2}\psi=\psi L_{1}\). If this is true, \(\psi\) is an isomorphism, otherwise the mapping \(x_{0}\mapsto y_{0}\) does not extend to a map isomorphism. It is left to the reader to check that all the used routines can be accomplished in linear time. □
Corollary 2.9.
Let \(M_{1}\) and \(M_{2}\) be labeled oriented maps. Then the map isomorphism problem for \(M_{1}\) and \(M_{2}\) can be decided in time \({\mathcal{O}}((\|M_{1}\|+\|M_{2}\|)^{2})\).
Proof.
For a fixed \(x_{0}\) we apply Corollary 2.8 for every dart \(y_{0}\) of \(M_{2}\). □
For unlabeled maps, Corollary 2.9 follows from a general algorithm solving the Simultaneous conjugacy problem.
Simultaneous Conjugation Problem. The problems of testing isomorphism of maps and computing the generators of the automorphism group of a map are related to the problem of simultaneous conjugation. In the latter problem, the input consists of two sets of permutations \(\alpha_{1},\dots,\alpha_{d}\) and \(\beta_{1},\dots,\beta_{d}\) on the set \(\{1,\dots,n\}\), each of which generates a transitive subgroup of the symmetric group. The goal is to find a permutation \(\gamma\) such that \(\gamma\alpha_{i}\gamma^{-1}=\beta_{i}\), for \(i=1,\dots,d\). Since mid 1970s it has been known that the simultaneous conjugation problem can be solved in time \({\mathcal{O}}(dn^{2})\) [14, 18]. A faster algorithm with running time \({\mathcal{O}}(n^{2}\log{d}/\log{n}+dn\log{n})\), was found only recently [8, 9]. An interesting open subproblem is to prove a conditional “truly superlinear” lower bound for any of the mentioned problems. There has been some progress in the direction of providing a lower bound. In particular, it is known that the communication complexity of the simultaneous conjugation problem is \(\Omega(dn\log(n))\), for \(d \gt 1\), and that under the decision tree model, the search version of the simultaneous conjugation problem has a lower bound of \(\Omega(n\log{n})\) [7].
Employing the algebraic description of maps introduced in Section 2 one can observe that the map isomorphism problem is a particular instance of the Simultaneous conjugacy problem. Namely, if \(\alpha_{1}\) and \(\beta_{1}\) are involutions, \(d=2\), and the set \(\{1,\dots,n\}\) is identified with the set of darts of a map on a surface, then this instance of the Simultaneous conjugacy problem is exactly the map isomorphism problem for oriented maps. If further \(\alpha_{1}=\beta_{1}\) and \(\alpha_{2}=\beta_{2}\), we get the map automorphism problem. Similarly, the map isomorphism problem for non-oriented maps \(M_{i}=(F_{i},\lambda_{i},\rho_{i},\tau_{i})\), \(i=1,2\), reduced to the simultaneous conjugation problem by setting \(F_{1}=F_{2}=\{1,\dots,n\}\), \(d=3\), \(\alpha_{1}=\lambda_{1}\), \(\alpha_{2}=\rho_{1}\), \(\alpha_{3}=\tau_{1}\), \(\beta_{1}=\lambda_{2}\), \(\beta_{2}=\rho_{2}\), \(\beta_{3}=\tau_{2}\), with an additional constraint \(\lambda_{i}\tau_{i}=\tau_{i}\lambda_{i}\), for \(i=1,2\).
As a consequence of the above discussion, we obtain that there is no hope for existence of an algorithm solving the map isomorphism problem in linear time for maps regardless of genus. On the other side, the best known algorithm for the conjugacy problem implies an \({\mathcal{O}}(n^{2}/\log{n})\) algorithm for the isomorphism and automorphism problems for maps of unrestricted genus. In complexity theory, this is not considered to be a “truly subquadratic” algorithm. This motivates the following conjecture.
Conjecture 2.10.
There is no \(\varepsilon \gt 0\) for which there is an algorithm for testing isomorphism of maps of unrestricted genus in time \({\mathcal{O}}(n^{2-\varepsilon})\), where \(n\) is the size of the input maps.

3 From Oriented Maps to Uniform Oriented Maps

In this section, we describe in detail a set of elementary reductions defined on labeled oriented maps, given by a quadruple \((D,R,L,\ell)\). The output of each elementary reduction is always a quadruple \((D^{\prime},R^{\prime},L^{\prime},\ell^{\prime})\), satisfying \(D^{\prime}\subseteq D\), \(v(M^{\prime})+e(M^{\prime}) \lt v(M)+e(M)\), and \({\rm Aut}^{+}(M^{\prime})={\rm Aut}^{+}(M)\restriction_{D^{\prime}}\). If none of the reductions apply, the map is a uniform oriented map. This defines a function which assigns to a given oriented map \(M\) a unique labeled oriented map \(U\) with \({\rm Aut}^{+}(M)\cong{\rm Aut}^{+}(U)\). Since the darts of \(U\) form a subset of the darts of \(M\), by Corollary 2.8, every generator of \({\rm Aut}^{+}(U)\) can be extended to a generator of \({\rm Aut}^{+}(M)\) in linear time. We deal with the uniform oriented maps in Section 4. Moreover, the size of the automorphism group of a map of genus \(g \gt 1\) is bounded by a function of \(g\) (and hence any generating set), see Corollary 4.2. On the other hand, for \(g=0,1\), it is known that the automorphism group of a map can be generated by at most four generators, and our algorithm identifies a set of generators with at most four elements; see the classifications of spherical and toroidal groups [11, 32].
After every elementary reduction, to ensure that \({\rm Aut}^{+}(M^{\prime})\cong{\rm Aut}^{+}(M)\), we need to define a new labeling \(\ell^{\prime}\). More precisely, the key property of the reductions reads as follows: the set of darts \(D^{\prime}\) of the map \(M^{\prime}\) is an \({\rm Aut}^{+}(M)\)-invariant subset of the set \(D\) of darts of \(M\), and the restriction \({\rm Aut}^{+}(M)_{\restriction{D^{\prime}}}={\rm Aut}^{+}(M^{\prime})\). To this end, in the whole section, we assume that we have an injective function \({{\bf Label}}\colon\mathbb{N}\times\bigcup_{k=1}^{\infty}{\mathcal{T}}^{k}\to{ \mathcal{T}}\), where \({\mathcal{T}}\) is the set of all integer-valued planted trees. Moreover, we assume that the root of \({{\bf Label}}(t,T_{1},\dots,T_{k})\) contains the integer \(t\), corresponding to the current step of the reduction procedure. After every elementary reduction, this integer is increased by one. In Section 7, we show how to evaluate \({{\bf Label}}\) in linear time.
Normalization. Our first aim is to reduce an input map to a face-normal map, since by Theorem 2.5 the degree of a light vertex in a face-normal map is bounded by a function of the genus. The following reductions remove faces of degree one and two. Normalization is of the highest priority and it is applied until the map is one of the following: (i) face-normal, (ii) bouquet, (iii) dipole. In the cases (ii) and (iii), the whole reduction procedure stops with a uniform map. In the case (i), the reduction procedure continues with further reductions. We describe the reduction formally.
For technical reasons, we split the reduction into two parts: deletion of loops, denoted by \({{\bf Loops}}(M)\), and replacement of a dipole by an edge, denoted by \({{\bf Dipoles}}(M)\).
Reduction Loops. If \(M=(D,R,L,\ell)\) with \(v(M) \gt 1\) contains loops, we remove them. Let \({\mathcal{L}}\) be the list of all maximal sequences of darts of the form \(s=\{x_{1},x_{1}^{-1},\dots,x_{k},x_{k}^{-1}\}\), where \(Rx_{i}=x_{i}^{-1}\), for \(i=1,\dots,k\), \(Rx_{i}^{-1}=x_{i+1}\) for \(i=1,\dots,k\), and \(Rx_{k}^{-1}\neq x_{1}\). By definition, \(R^{-1}Lx_{i}=x_{i}\), hence \(x_{i}\) bounds a \(1\)-face, for \(i=1,\dots,k\); see Figure 1. Moreover, for each such sequence \(s\), all the darts \(x_{i}\) are incident to the same vertex \(v\in V(M)\). We say that the unique vertex \(v\) with \(R_{v}=(x_{0},x_{1},x_{1}^{-1},\dots,x_{k},x_{k}^{-1},x_{k+1},\dots)\) is incident to \(s\). We call the darts \(x_{0}\) and \(x_{k+1}\) the bounding darts of the sequence \(s\).
Fig. 1.
Fig. 1. A sequence of darts \(x_{1},x_{1}^{-1},x_{2},x_{2}^{-1},x_{3},x_{3}^{-1}\) with bounding darts \(x_{0}\) and \(x_{4}\) .
The new map \(M^{\prime}=(D^{\prime},R^{\prime},L^{\prime},\ell^{\prime})=:{{\bf Loops}}(M)\) is defined as follows. First, we put \(D^{\prime}:=D\setminus\bigcup_{s\in{\mathcal{L}}}s\), and \(L^{\prime}:=L_{\restriction{D^{\prime}}}\). Let \(s=\{x_{1},x_{1}^{-1},\dots,x_{k},x_{k}^{-1}\}\in{\mathcal{L}}\) with bounding darts \(x_{0}\) and \(x_{k+1}\). If \(v\) is incident to \(s\), then we put \(R_{v}^{\prime}:=(x_{0},x_{k+1},\dots)\), else we put \(R_{v}^{\prime}:=R_{v}\). Moreover, we put \(\ell^{\prime}(x_{0}):={{\bf Label}}(t,a_{0},\dots,a_{k})\) and \(\ell^{\prime}(x_{k+1}):={{\bf Label}}(t,a_{k+1},b_{k},\dots,b_{1})\), where \(t\) is the current step, \(a_{i}=\ell(x_{i})\), for \(i=0,\dots,k+1\), and \(b_{i}=\ell(x_{i}^{-1})\), for \(i=1,\dots,k\). For every \(x\in D^{\prime}\) which is not a bounding dart in \(M\), we put \(\ell^{\prime}(x):=\ell(x)\). We obtain a well-defined map \(M^{\prime}\) with no faces of valence one; see Figure 1.
Lemma 3.1.
Let \(M_{i}=(D_{i},R_{i},L_{i},\ell_{i})\), \(i=1,2\) where \(D_{1}\cap D_{2}=\emptyset\), be labeled oriented maps. Let \(M_{1}^{\prime}:={{\bf Loops}}(M_{1})\) and \(M_{2}^{\prime}:={{\bf Loops}}(M_{2})\). Then \({{\rm Iso}^{+}}(M_{1},M_{2})_{\restriction{D_{1}^{\prime}}}={{\rm Iso}^{+}}(M_ {1}^{\prime},M_{2}^{\prime})\). In particular, \({\rm Aut}^{+}(M_{1})_{\restriction{D_{1}^{\prime}}}={\rm Aut}^{+}(M_{1}^{ \prime})\).
Proof.
If \(M\) has no \(1\)-faces or if \(M\) is a bouquet, then \(M^{\prime}=M\) and there is nothing to prove. Otherwise, let \(\psi\colon M_{1}\to M_{2}\) be an isomorphism. We prove that \(\psi^{\prime}:=\psi_{\restriction{D_{1}^{\prime}}}\) is an isomorphism of \(M_{1}^{\prime}\) and \(M_{2}^{\prime}\). Since \(\psi\) preserves the set of \(1\)-faces, the mapping \(\psi^{\prime}\) is a well-defined bijection. We check the commuting rules (2.1) for \(\psi^{\prime}\).
By the definition of \({{\bf Loops}}\), \(L_{i}^{\prime}=L_{i}{{}_{\restriction{D_{i}}}}\), for \(i=1,2\). Thus, we have \(\psi^{\prime}L_{1}^{\prime}=L_{2}^{\prime}\psi^{\prime}\). As concerns the permutations \(R_{1}^{\prime}\) and \(R_{2}^{\prime}\), we need to check the commuting rule only at the darts preceding a sequence of \(1\)-faces. With the above notation, using the definition of \(M_{1}^{\prime}\) and \(M_{2}^{\prime}\), and the fact that \(\psi\) is an isomorphism, we get
\begin{align*}\psi^{\prime}R_{1}^{\prime}x_{0}=\psi^{\prime}R_{1}(L_{1}R_{1})^{k}x_{0}=\psi R _{1}(L_{1}R_{1})^{k}x_{0}=R_{2}(L_{2}R_{2})^{k}\psi x_{0}=R_{2}(L_{2}R_{2})^{k }\psi^{\prime}x_{0}=R_{2}^{\prime}\psi^{\prime}x_{0}.\end{align*}
Finally, for \(\ell_{1}^{\prime}\) and \(\ell_{2}^{\prime}\), we have, by the definition of \({{\bf Loops}}\),
\begin{align*}\ell_{1}^{\prime}(x_{0})={{\bf Label}}(t,\ell_{1}(x_{0}),\dots, \ell_{1}(x_{k}))={{\bf Label}}(t,\ell_{2}(\psi x_{0}),\dots,\ell_ {2}(\psi x_{k}))=\ell_{2}^{\prime}(\psi^{\prime}x_{0})\end{align*}
if and only if
\begin{align*}\ell_{1}(x_{i})=\ell_{2}(\psi x_{i}),\text{ for }i=0,\dots,k,\end{align*}
which is satisfied since \(\psi\) is an isomorphism. Similarly, \(\ell^{\prime}_{1}(x_{k+1})=\ell^{\prime}_{2}(\psi x_{k+1})\).
Conversely, let \(\psi^{\prime}\colon M_{1}^{\prime}\to M_{2}^{\prime}\) be an isomorphism. With the above notation, we have
\begin{align*}x_{i}=R_{1}(L_{1}R_{1})^{i}x_{0}\quad{\rm and}\quad x_{k+1}=R_{1}^{\prime}x_{ 0}.\end{align*}
Since \({{\bf Label}}\) is injective, it follows that there are \(y_{1},\dots,y_{k}\) in \(D_{2}\setminus D_{2}^{\prime}\) such that
\begin{align*}y_{i}=R_{2}(L_{2}R_{2})^{i}\psi^{\prime}x_{0}.\end{align*}
Here we employ the fact that \(t\) is increased after every elementary reduction. This forbids the existence of an isomorphisms \(\psi^{\prime}:M_{1}^{\prime}\to M_{2}^{\prime}\) taking a bounding dart to a dart that is not bounding, i.e., \(\psi^{\prime}\) takes the set of bounding darts onto the set of bounding darts. We define an extension \(\psi\) of \(\psi^{\prime}\) by setting \(\psi x_{i}=y_{i}\), for \(i=1,\dots,k\). It is straightforward to check that \(\psi\in{{\rm Iso}^{+}}(M_{1},M_{2})\). □
Reduction Dipoles. Let \(M=(D,R,L,\ell)\) with \(v(M) \gt 2\) contain dipoles. Let \({\mathcal{L}}\) be the list of all maximal sequences \({\bf s}=x_{1},\dots,x_{k}\) of darts, \(k \gt 1\), satisfying \(Rx_{i}=x_{i+1}\), \((R^{-1}L)^{2}x_{i}=x_{i}\), and either \(Rx_{k}\neq x_{1}\) or \(Rx_{1}^{-1}\neq x_{k}^{-1}\); see Figure 2. Let \({\bf s}^{-1}:=(x_{k}^{-1},\dots,x_{1}^{-1})\in{\mathcal{L}}\) be the inverse sequence. There are vertices \(u\) and \(v\) such that \(R_{u}=(y_{1},{\bf s},y_{2},\dots)\) and \(R_{v}=(z_{1},{\bf s}^{-1},z_{2},\dots)\), for some \(y_{1},y_{2},z_{1},z_{2}\in D\). The symbol \({\bf s}\) in the definition of \(R_{v}\) and \(R_{u}\) means that one has to substitute \({\bf s}\) by the corresponding sequence of darts. At least one of the sets \(\{y_{1},y_{2}\}\), \(\{z_{1},z_{2}\}\) is non-empty since otherwise \(v(M)=2\) and \(M\) is a dipole. We say that \(u,v\) are incident to \({\bf s},{\bf s}^{-1}\), respectively; see Figure 2.
Fig. 2.
Fig. 2. A sequence of darts \(x_{1},\dots,x_{5}\) forming a dipole.
The new map \(M^{\prime}=(D^{\prime},R^{\prime},L^{\prime},\ell^{\prime})=:{{\bf Dipoles}}(M)\) is defined as follows. First, we put
\begin{align*}D^{\prime}:=D\setminus\bigcup_{(x_{1},\dots,x_{k})\in{\mathcal{L}}}(\{ x_{2},\dots,x_{k}\}\cup\{x_{1}^{-1},\dots,x_{k-1}^{-1}\}).\end{align*}
Let \({\bf s}=(x_{1},\dots,x_{k})\in{\mathcal{L}}\). If \(u\) and \(v\) are incident to \(\bf s\) and \({\bf s}^{-1}\), respectively, then we put \(R_{u}^{\prime}:=(y_{1},x_{1},y_{2}\dots)\) and \(R_{v}^{\prime}:=(z_{1},x_{k}^{-1},z_{2},\dots)\), else we put \(R_{u}^{\prime}:=R_{u}\). Next, we put \(L^{\prime}x_{1}:=x_{k}^{-1}\), \(L^{\prime}x_{k}^{-1}:=x_{1}\), and \(L^{\prime}x:=Lx\) if \(x\notin s\) for all \({\bf s}\in{\mathcal{L}}\). Finally, we put \(\ell^{\prime}(x_{1}):={{\bf Label}}(t,a_{1},\dots,a_{k})\) and \(\ell^{\prime}(x_{k}^{-1}):={{\bf Label}}(t,b_{k},\dots,b_{1})\), where \(t\) is the current step, \(a_{i}=\ell(x_{i})\) and \(b_{i}=\ell(x_{i}^{-1})\), for \(i=1,\dots,k\). We put \(\ell^{\prime}(x):=\ell(x)\) for every \(x\notin{\bf s}\in{\mathcal{L}}\), where \({\bf s}\) ranges through all elements of \({\mathcal{L}}\). We obtain a well-defined map \(M^{\prime}\) with no \(2\)-faces; see Figure 2.
Lemma 3.2.
Let \(M_{i}=(D_{i},R_{i},L_{i},\ell_{i})\), \(i=1,2\) where \(D_{1}\cap D_{2}=\emptyset\), be labeled oriented maps. Let \(M_{1}^{\prime}:={{\bf Dipoles}}(M_{1})\) and \(M_{2}^{\prime}:={{\bf Dipoles}}(M_{2})\). Then \({{\rm Iso}^{+}}(M_{1},M_{2})_{\restriction{D_{1}^{\prime}}}={{\rm Iso}^{+}}(M_ {1}^{\prime},M_{2}^{\prime})\). In particular, \({\rm Aut}^{+}(M_{1})_{\restriction{D_{1}^{\prime}}}={\rm Aut}^{+}(M_{1}^{ \prime})\).
Proof.
Let \(\psi\colon M_{1}\to M_{2}\) be an isomorphism. We prove that \(\psi^{\prime}=\psi_{\restriction{D_{1}^{\prime}}}\) is an isomorphism of \(M_{1}^{\prime}\) and \(M_{2}^{\prime}\). Since \(\psi\) preserves the set of \(2\)-faces, the mapping \(\psi^{\prime}\) is a well-defined bijection. We check the commuting rules (2.1) for \(\psi^{\prime}\).
By the definition of \({{\bf Dipoles}}\), \(L_{1}^{\prime}x_{1}=x_{k}^{-1}=L_{1}R_{1}^{k-1}x_{1}\) and \(L_{1}^{\prime}x_{k}^{-1}=L_{1}R_{1}^{k-1}x_{k}^{-1}\). We have
\begin{align*}\psi^{\prime}L_{1}^{\prime}x_{1}=\psi^{\prime}L_{1}R_{1}^{k-1}x_{1}=\psi L_{1} R_{1}^{k-1}x_{1}=L_{2}R_{2}^{k-1}\psi x_{1}=L_{2}^{\prime}\psi^{\prime}x_{1},\end{align*}
and
\begin{align*}\psi^{\prime}L_{1}^{\prime}x_{k}^{-1}=\psi^{\prime}L_{1}R_{1}^{k-1}x_{k}^{-1}= \psi L_{1}R_{1}^{k-1}x_{k}^{-1}=L_{2}R_{2}^{k-1}\psi x_{k}^{-1}=L_{2}^{\prime} \psi^{\prime}x_{k}^{-1}.\end{align*}
It follows that \(\psi L_{1}^{\prime}=L_{2}^{\prime}\psi\).
For \(R_{1}^{\prime}\) and \(R_{2}^{\prime}\), it follows that we need to check the commuting rule only at the darts \(x_{1}\) and \(x_{k}^{-1}\) bounding a sequence of \(2\)-faces in \(M_{1}\). With the above notation, using the definition of \(M_{1}^{\prime}\) and \(M_{2}^{\prime}\), and the fact that \(\psi\) is an isomorphism, we get
\begin{align*}\psi^{\prime}R_{1}^{\prime}x_{1}=\psi^{\prime}R_{1}^{k-1}x_{1}=\psi R_{1}^{k-1 }x_{1}=R_{2}^{k-1}\psi x_{1}=R_{2}^{\prime}\psi x_{1}=R_{2}^{\prime}\psi^{ \prime}x_{1}.\end{align*}
For \(x_{k}^{-1}\), the verification of the commuting rules is similar.
For \(\ell_{1}^{\prime}\) and \(\ell_{2}^{\prime}\), we have, by the definition of \({{\bf Dipoles}}\),
\begin{align*}\ell_{1}^{\prime}(x_{1})={{\bf Label}}({\bf s},\ell_{1}(x_{1}), \dots,\ell_{1}(x_{k}))={{\bf Label}}({\bf s},\ell_{2}(\psi x_{1}),\dots,\ell_{2}(\psi x_{k}))=\ell_{2}^{\prime}(\psi^{\prime}x_{1})\end{align*}
if and only if
\begin{align*}\ell_{1}(x_{i})=\ell_{2}(\psi x_{i}),\text{ for }i=1,\dots,k,\end{align*}
which is satisfied since \(\psi\) is an isomorphism. Similarly, we check that \(\ell_{1}^{\prime}(x_{k}^{-1})=\ell_{2}^{\prime}(\psi x_{k}^{-1})\).
Conversely, let \(\psi^{\prime}\colon M_{1}^{\prime}\to M_{2}^{\prime}\) be an isomorphism. With the above notation, we have
\begin{align*}x_{i}=R_{1}^{i-1}x_{1}\quad{\rm and}\quad x_{i}^{-1}=R^{i-1}x_{k}^{-1},\end{align*}
for \(i=1,\dots,k\). Since \({{\bf Label}}\) is injective, it follows that there are \(y_{2},\dots,y_{k}\) in \(D_{2}\setminus D_{2}^{\prime}\) such that
\begin{align*}y_{i}=R_{2}^{i-1}\psi^{\prime}x_{1}\end{align*}
determines a dipole. We define an extension \(\psi\) of \(\psi^{\prime}\) by setting \(\psi x_{i}:=y_{i}\), for \(i=2,\dots,k\). It is straightforward to check that the extension \(\psi\in{{\rm Iso}^{+}}(M_{1},M_{2})\). □
Face-Normal Maps. The input is a labeled face-normal oriented map \(M=(D,R,L,\ell)\) and a list \({\mathcal{L}}\) of all light vertices of degree \(d\) which have at least one heavy neighbour. For every vertex \(v\in{\mathcal{L}}\), we denote by \(u_{0},\dots,u_{k-1}\), for some \(1\leq k\leq d\), the cyclic sequence of all heavy neighbours of \(v\), following the prescribed orientation of the underlying surface. Denote by \(x_{0},x_{1},\dots,x_{k-1}\) the darts based at \(u_{0},u_{1},\dots,u_{k-1}\), joining \(u_{j}\) to \(v\) for \(j=0,\dots,k-1\). Let \(R_{u_{i}}=(y_{i},x_{i},z_{i},\dots)\), for \(i=0,\dots,k-1\), and let
\begin{align*}R_{v}=(x_{0}^{-1},A_{0},x_{1}^{-1},A_{1},\dots,x_{k-1}^{-1},A_{k-1}),\end{align*}
where each \(A_{i}\) is a (possibly empty) sequence of darts.
The new map \(M^{\prime}=(D^{\prime},R^{\prime},L^{\prime},\ell^{\prime})=:{{\bf Delete}}(M)\) is defined as follows. We set \(D^{\prime}:=D\) and \(L^{\prime}:=L\). For a heavy vertex \(w\) with no light neighbour, we have \(R_{w}^{\prime}:=R_{w}\). If \(v\in{\mathcal{L}}\), with the above notation, we set \(R_{u_{i}}^{\prime}:=(y_{i},A_{i},x_{i},x_{i-1}^{-1},z_{i},\dots)\). Moreover, we set \(\ell^{\prime}(x_{i}):={{\bf Label}}(t,\ell(x_{i}))\) and \(\ell^{\prime}(x_{i}^{-1}):={{\bf Label}}(t,\ell(x_{i}^{-1}))\), where \(t\) is the current step number; see Figure 3.
Fig. 3.
Fig. 3. An example of the reduction deleting a light vertex.
Lemma 3.3
Let \(M_{i}=(D_{i},R_{i},L_{i},\ell_{i})\), \(i=1,2\) where \(D_{1}\cap D_{2}=\emptyset\), be labeled oriented maps. Let \(M_{1}^{\prime}:={{\bf Delete}}(M_{1})\) and \(M_{2}^{\prime}:={{\bf Delete}}(M_{2})\). Then \({{\rm Iso}^{+}}(M_{1},M_{2})={{\rm Iso}^{+}}(M_{1}^{\prime},M_{2}^{\prime})\). In particular, \({\rm Aut}^{+}(M_{1})={\rm Aut}^{+}(M_{1}^{\prime})\).
Proof.
Let \(\psi\colon M_{1}\to M_{2}\) be an isomorphism. We prove that \(\psi\) is also an isomorphism of \(M_{1}^{\prime}\) and \(M_{2}^{\prime}\). We check the commuting rules (2.1) for \(\psi\). We have \(L_{i}^{\prime}=L_{i}\), for \(i=1,2\), so \(L_{1}^{\prime}\psi=\psi L_{2}^{\prime}\). For \(R_{1}^{\prime}\) and \(R_{2}^{\prime}\), we need to check the commuting rules only at \(x_{i},x_{i}^{-1},y_{i},a_{i}\in D_{1}^{\prime}\), for \(i=0,\dots,k-1\), where \(a_{i}\) is the last dart in the sequence \(A_{i}\). We have
\[\displaystyle\psi R_{1}^{\prime}x_{i}=\psi R_{1}^{-1}L_{1}x_{i}=R_{2}^{-1}L_{2 }\psi x_{i}=R_{2}^{\prime}\psi x_{i},\]
\[\displaystyle\psi R_{1}^{\prime}x_{i}^{-1}=\psi R_{1}L_{1}x_{i}^{-1}=R_{2}L_{2 }\psi x_{i}^{-1}=R_{2}^{\prime}\psi x_{i}^{-1}.\]
It remains to check the commuting rules at each \(y_{i}\) and \(a_{i}\). Note that if \(A_{i}\) is empty there is nothing to check. We have
\begin{align*}\psi R_{1}^{\prime}y_{i}=\psi R_{1}L_{1}R_{1}y_{i}=R_{2}L_{2}R_{2}\psi y_{i}=R _{2}^{\prime}\psi y_{i}.\end{align*}
Further, using the relations \(R_{1}^{\prime}a_{i}=x_{i}=L_{1}R_{1}^{q}a_{i}\), for some \(q \gt 0\), we get
\begin{align*}\psi R_{1}^{\prime}a_{i}=\psi x_{i}=\psi L_{1}R_{1}^{q}a_{i}=L_{2}R_{2}^{q} \psi a_{i}=R_{2}^{\prime}\psi a_{i}.\end{align*}
Putting it together, we proved that \(\psi R_{1}^{\prime}=R_{2}^{\prime}\psi\). Clearly, \(\ell_{1}^{\prime}(x_{i})=\ell_{2}^{\prime}(\psi x_{i})\) if and only if \(\ell_{1}(x_{i})=\ell_{2}(\psi x_{i})\). Similarly for \(x_{i}^{-1}\).
For the converse, we assume that \(\psi R^{\prime}_{1}=R^{\prime}_{2}\psi\) and \(\psi L^{\prime}_{1}=L^{\prime}_{2}\psi\) and we prove \(\psi R_{1}=R_{2}\psi\) and \(\psi L_{1}=L_{2}\psi\). Since \(L^{\prime}_{i}=L_{i}\), for \(i=1,2\), it is sufficient to prove \(\psi R_{1}=R_{2}\psi\). Similarly as above, we need to check the commuting rules for \(x_{i},x_{i}^{-1},y_{i},a_{i}\in D_{1}\).
By the definition of \(M_{1}^{\prime}\) and \(M_{2}^{\prime}\), we have \(R_{1}x_{i}=z_{i}=(R_{1}^{\prime})^{2}x_{i}\). Since \({{\bf Label}}\) is injective, we have \(R_{2}\psi x_{i}=\psi z_{i}=(R_{2}^{\prime})^{2}\psi x_{i}\). Using these relations, we get
\begin{align*}\psi R_{1}x_{i}=\psi(R_{1}^{\prime})^{2}x_{i}=(R_{2}^{\prime})^{2}\psi x_{i}=R _{2}\psi x_{i}.\end{align*}
By the definition of \(M_{1}^{\prime}\) and \(M_{2}^{\prime}\), we have \(R_{1}x_{i}^{-1}=R_{1}^{{}^{\prime}m}L_{1}^{\prime}x_{i}^{-1}\), for some \(m\). Since \({{\bf Label}}\) is injective, we have \(R_{2}\psi x_{i}^{-1}=R_{2}^{{}^{\prime}m}L_{2}^{\prime}\psi x_{i}^{-1}\). Using these relations, we get
\begin{align*}\psi R_{1}x_{i}^{-1}=\psi R_{1}^{{}^{\prime}m}L_{1}x_{i}^{-1}=R_{1}^{{}^{ \prime}m}L_{2}^{\prime}\psi x_{i}^{-1}=R_{2}\psi x_{i}^{-1}.\end{align*}
By the definition of \(M_{1}^{\prime}\) and \(M_{2}^{\prime}\), we have \(R_{1}y_{i}=x_{i}=R_{1}^{{}^{\prime}m}y_{i}\), for some \(m\). Since \({{\bf Label}}\) is injective, \(R_{2}\psi y_{i}=\psi x_{i}=R_{2}^{{}^{\prime}m}\psi y_{i}\). Using these relations, we get
\begin{align*}\psi R_{1}y_{i}=\psi R_{1}^{{}^{\prime}m}y_{i}=R_{2}^{{}^{\prime}m}\psi y_{i}= R_{2}\psi y_{i}.\end{align*}
By the definition of \(M_{1}^{\prime}\) and \(M_{2}^{\prime}\), we have \(R_{1}a_{i}=L_{1}^{\prime}R_{1}^{\prime-1}L_{1}^{\prime}R_{1}^{\prime}a_{i}\). Since \({{\bf Label}}\) is injective, \(R_{2}\psi a_{i}=L_{2}^{\prime}R_{2}^{\prime-1}L_{2}^{\prime}R_{2}^{\prime}\psi a _{i}\). Using these relations, we get
\begin{align*}\psi R_{1}a_{i}=\psi L_{1}^{\prime}R_{1}^{\prime-1}L_{1}^{\prime}R_{1}^{\prime }a_{i}=L_{2}^{\prime}R_{2}^{\prime-1}L_{2}^{\prime}R_{2}^{\prime}\psi a_{i}=R_ {2}\psi a_{i}.\end{align*}
Putting it together, we proved that \(\psi R_{1}=R_{2}\psi\), which implies that \(\psi\) is an isomorphism \(M_{1}\to M_{2}\). This completes the proof. □

4 Irreducible Maps of Genus \(\neq 1\)

In this section, we provide a linear-time algorithm computing the automorphism group of an irreducible oriented map of a fixed genus and the sets of orientation-preserving isomorphisms between two irreducible maps of a fixed genus. A labeled oriented map \(M\) is irreducible if none of the reductions introduced in Section 4 applies to \(M\). The analysis is splits into three parts: maps with negative Euler characteristics (Section 4.1), maps on the sphere (Section 4.2), and maps on the torus (Section 5). Solving in linear time the problem of determining the automorphism group and deciding the isomorphism problem for irreducible maps on the torus is exceptionally difficult. Therefore, the whole Section 5 is dedicated to toroidal maps.

4.1 Surfaces of Negative Euler Characteristic

An irreducible map with negative Euler characteristic is uniform face-normal. We prove that the number of uniform face-normal maps is bounded by a function of \(\chi\). Therefore, for a fixed \(\chi(S) \lt 0\), both the automorphism group of a map and the set of isomorphisms between two maps can be computed by a brute force approach. Note that the following lemma does not require the underlying surface to be orientable, it only requires \(\chi\) to be negative.
Proposition 4.1
The size of a uniform face-normal map on a closed compact surface \(S\) with Euler characteristic \(\chi(S) \lt 0\) is bounded by a quadratic function of \(-\chi(S)\). In particular, the number of such maps is finite.
Proof.
Babai noted in [3, Theorem 3.3] that the Hurwitz Theorem (see, e.g. [5] or [15]) implies that the number of vertices of a uniform map \(M\) on \(S\) is at most \(84|\chi(S)|\). By Theorem 2.5, the degree of a vertex of \(M\) is bounded by a function of \(\chi(S)\) as well. Therefore, the number of edges is also bounded by a function of \(\chi(S)\) and the statement follows. □
Corollary 4.2.
Let \(M=(D,R,L)\) be an oriented map on an orientable surface \(S\) with \(\chi(S) \lt 0\). Then \({\rm Aut}^{+}(M)\) can be computed in time \(f(\chi(S))\cdot\|M\|\), for some computable function \(f\).
Proof.
Denote \(\overline{M}=(\overline{D},\overline{R},\overline{L})\) the irreducible map associated to \(M\). By Proposition 4.1 the size of \(\overline{M}\) is bounded by a function depending only on \(\chi(S)\). By Theorem 2.7 the number of automorphisms of \(\overline{M}\) is bounded by \(|\overline{D}|=2\|\overline{M}\|\). Hence, \(|{\rm Aut}(\overline{M})|\) is bounded by a function of \(\chi(S)\) as well. Since in each elementary reduction, the set of darts of the reduced map is a subset of the darts of the input map, we have \(\overline{D}\subseteq D\). Let \(\overline{\psi}\) be an automorphism of \(\overline{M}\). By Corollary 2.8 the extension of \(\overline{\psi}\in{\rm Aut}^{+}(\overline{M})\) to an automorphism \(\psi\in{\rm Aut}^{+}(M)\) can be computed in linear time with respect to \(|D|\). Since the number of elements in \({\rm Aut}^{+}(\overline{M})\) is bounded by a function of \(\chi(S)\), checking extendability of all \(\overline{\psi}\in{\rm Aut}(\overline{M})\) we get the result. □
Corollary 4.3.
Let \(M_{i}=(D_{i},R_{i},L_{i})\), \(i=1,2\), be oriented maps on an orientable surface \(S\) with negative Euler characteristic \(\chi(S)\). Then \({{\rm Iso}^{+}}(M_{1},M_{2})\) can be computed in time \(f(\chi(S))(\|M_{1}\|+\|M_{2}\|)\), for some computable function \(f\).
Proof.
Denote \(\overline{M}_{i}=(\overline{D}_{i},\overline{R}_{i},\overline{L}_{i})\) the irreducible maps associated to \(M_{i}\), \(i=1,2\). We construct \({{\rm Iso}^{+}}(M_{1},M_{2})\) in two steps. First we compute the set \({{\rm Iso}^{+}}(\overline{M}_{1},\overline{M}_{2})\). We fix a dart \(x_{0}\) of \(\overline{M}_{1}\) and check for all darts \(y\) of \(\overline{M}_{2}\) whether a mapping \(x_{0}\mapsto y\) extends to an isomorphism \(\overline{M}_{1}\to\overline{M}_{2}\). Secondly, for each \(\overline{\psi}\in{{\rm Iso}^{+}}(\overline{M}_{1},\overline{M}_{2})\) we check whether it extends to an isomorphism \(\psi\in{{\rm Iso}^{+}}(M_{1},M_{2})\). By Corollary 2.8 this can be done in linear time. □
Corollary 4.4
Let \(M_{1}\), \(M_{2}\) be labeled maps on an orientable surface with negative Euler characteristics \(\chi(S)\). Then \({{\rm Iso}}(M_{1},M_{2})\) and \({\rm Aut}(M_{1})\) can be computed in time \(f(\chi(S))\cdot\|M_{1}\|\) for some computable function \(f\).
Proof.
The statement follows from Corollary 4.3 and an observation \({{\rm Iso}}(M_{1},M_{2})={{\rm Iso}^{+}}(M_{1},M_{2})\cup{{\rm Iso}^{+}}(M_{1}, M_{2}^{-1})\). □
Remark 4.5.
The reader might observe that labels of darts are not used explicitly in the statements and arguments of this subsection. In fact, they are not needed at all for determining \({{\rm Iso}^{+}}(M_{1},M_{2})\) for maps of negative Euler characteristic. Denote by \(N_{i}\), \(i=1,2\), the unlabeled associated to \(\overline{M}_{i}\). It may happen that \(|{{\rm Iso}^{+}}(N_{1},N_{2})| \gt |{{\rm Iso}^{+}}(\overline{M}_{1},\overline{M}_ {2})|\). However, the isomorphisms \(N_{1}\to N_{2}\) that do not extend to isomorphisms \(M_{1}\to M_{2}\) are eliminated in the procedure used in the proof of Corollary 4.2. Moreover, the number of such isomorphisms is bounded by a function of \(\chi(S)\).
Remark 4.6.
While for maps on surfaces of negative Euler characteristic the phrase “we can compute (determine) the automorphism group of a map in linear time” means that we can compute the list of all automorphisms in linear time, for the maps on surfaces of non-negative Euler characteristic there are infinitely many maps such that the size of the automorphism group is linear in the size of map. For these maps, by computing (determining) the automorphism group of a map in linear time, we mean that we are able to compute a list of generators of the automorphism group of a map \(M\) in linear time, where the number of the generators is bounded by an absolute constant. In particular, it requires to see that every finite group acting on a surface of non-negative Euler characteristic admits a set of generators of cardinality bounded by a constant. It is well known that groups acting on surfaces of non-negative Euler characteristic satisfy the above requirement. Further details are discussed below.

4.2 Sphere

By the definition of the reductions in Section 3, the irreducible spherical maps are the two-skeletons of the five Platonic solids, \(13\) Archimedean solids, pseudo-rhombicuboctahedron, prisms, antiprisms, cycles, dipoles, and bouquets. In the first three (sporadic) cases, the automorphism group and the set of isomorphisms between two maps can be computed by a brute force approach in the same way as in Corollaries 4.2 and 4.3. Hence, in what follows we assume that the associated irreducible map (to a spherical map) is a labeled prism, an antiprism, a dipole, bouquet, or a cycle. We show that for these maps, the problem of computing \({{\rm Iso}^{+}}(M_{1},M_{2})\) can be reduced to the case when both \(M_{1}\) and \(M_{2}\) are labeled cycles.
Remark 4.7.
Let \(M\) be an irreducible map on the sphere which is not sporadic. Denote \(G^{+}={\rm Aut}^{+}(M)\) and of \(G={\rm Aut}(M)\). Checking the list of spherical groups one of the following four cases happens: \(G=G^{+}\cong{\mathbb{Z}}_{k}\), \(G=G^{+}\cong{\mathbb{D}}_{k}\), \(G\cong{\mathbb{Z}}_{k}\times{\mathbb{Z}}_{2} \gt {\mathbb{Z}}_{k}\cong G^{+}\), \(G\cong{\mathbb{D}}_{k}\times{\mathbb{Z}}_{2} \gt {\mathbb{D}}_{k}\cong G^{+}\) for some integer \(k\). The symbols \({\mathbb{Z}}_{k}\) and \({\mathbb{D}}_{k}\) denote, respectively, the cyclic group of order \(k\) and the dihedral group of order \(2k\). Each of the above groups can be generated by at most three generators.
Lemma 4.8
For every oriented labeled map \(M\) which is a \(n\)-prism for \(n\neq 4\), an \(n\)-antiprism for \(n\neq 3\), a dipole or a bouquet, there is a labeled cycle \(M^{\prime}\) such that \({\rm Aut}^{+}(M)\cong{\rm Aut}^{+}(M^{\prime})\) and \(D(M^{\prime})\subseteq D(M)\). Moreover, \(M^{\prime}\) can be constructed in linear time.
Proof.
The idea of the proof is to take the dual \(M^{*}\) of \(M\), if \(M\) is not a bouquet, and apply the reductions defined in Section 3, following the order defined by the priorities. We distinguish several cases for \(M\). If \(M\) is an \(n\)-dipole, then the dual \(M^{*}\) is an \(n\)-cycle.
If \(M\) is an \(n\)-prism, then its dual is the \(n\)-bipyramid. It is easy to see that an \(n\)-bipyramid, for \(n \gt 4\), is reduced to a \(3n\)-dipole by applying the reduction Delete. After taking the dual once more, we terminate with a labelled \(3n\)-cycle. If \(n=4\), then \(M\) is the octahedral map, which is a sporadic map. For \(n=3\) applying Delete we get a triangle with tripled edges, which reduces by the reduction Dipoles to a labeled \(3\)-cycle. For \(n=2\), we obtain \(6\)-dipole, which dual is a \(6\)-cycle. Hence, except for \(n=4\), we get a labeled cycle.
Similarly, the dual of an \(n\)-antiprism, for \(n\neq 3\), is again a reducible map, which is reduced by applying a constant number of reductions to a \(2n\)-dipole. Every prism and antiprism (with the two exceptions) is therefore transformed to a labeled cycle.
Concerning bouquets, we transform every \(n\)-bouquet to an \(n\)-cycle based on the same set darts. Formally, let \(B_{n}=(D,R,L,\ell)\) be a bouquet. We set \(D^{\prime}=D\), \(L^{\prime}=L\) and \(\ell^{\prime}(x)={{\bf Label}}(s,\ell(x))\). By definition the rotation consists of a single cycle of the form \(R=(x_{0},x_{0}^{-1},x_{1},x_{1}^{-1},\dots,x_{n-1},x_{n-1}^{-1})\). We set \(R^{\prime}=\prod_{i=0}^{d-1}(x_{i}^{-1},x_{i+1})\). □
Transformation of Dart-Labels to Vertex-Labels. For technical reasons, we transform the labeling of darts \(\ell\colon D\to{\mathcal{U}}\) of a cycle \(X\) to a labeling of its vertices. It is done in a way that the automorphisms and isomorphisms are preserved. Choose one of the two orientations of the \(n\)-cycle \(X\) and denote by \(\overrightarrow{X}\) the cycle \(X\) endowed with the chosen orientation, and by \(\overleftarrow{X}\) the oppositely directed cycle. Denote \(D^{+}=\{x_{0},x_{1},\dots,x_{n-1}\}\) the subset of darts directed consistently with the chosen orientation. Assume \(V(M)=\{v_{0},\dots,v_{n-1}\}\), and that \(x_{i}\) is incident to \(v_{i}\) for \(i=0,\dots,n-1\). Then the local rotation at the vertex \(v_{i}\) is \(R_{v_{i}}=(x_{i},x_{i-1}^{-1})\), where the indices are counted modulo \(n\). We set \(\ell(v_{i})=(\ell(x_{i}),\ell(x_{i-1}^{-1}))\) to be the vector labeling the vertex \(v_{i}\), for \(i=0,1,\dots,n-1\).
Automorphisms and Isomorphisms of Labeled Cycles. We modify the algorithm introduced by Hopcroft and Wong [20] to test isomorphism of cycles. We assume that the labels of vertices of two input cycles \(X_{1}\) and \(X_{2}\) with disjoint sets of vertices are transformed to integers using a function \(f\) with the following property:
\(f\colon\ell(V(X_{1})\cup V(X_{2}))\to\{1,2,\dots k\}\), where \(\ell(V(X_{1})\cup V(X_{2}))\) is the set of labels of vertices from \(V(X_{1})\cup V(X_{2})\), \(k=|V(X_{1})|\cup|V(X_{2})|\),
\(f\) is injective,
there is a vertex \(v\in V(X_{1})\cup V(X_{2})\) such that \(f(\ell(v))=1\).
The algorithm is based on the following routine associating to an oriented labeled cycle \(\overrightarrow{X}\) in a canonical way a cycle \(\overrightarrow{Y}\) with constant labeling such that \(V(Y)\subseteq V(X)\) and \({\rm Aut}(\overrightarrow{Y})={\rm Aut}(\overrightarrow{X})\restriction_{V(Y)}\). In particular, \(|Y|\) divides \(|X|\).
Problem: \({\rm CanForm}(\overrightarrow{X})\)
Input: A cycle \(\overrightarrow{X}\) with a labeling \(\ell\colon V(\overrightarrow{X})\to\{1,\dots,k\}\).
Output: A cycle \(\overrightarrow{Y}\) with constant labeling such that \({\rm Aut}(\overrightarrow{X})\cong{\rm Aut}(\overrightarrow{Y})\).
1.  If \(\ell\) is constant, return \({\overrightarrow{X}}\).
2.  \(m\leftarrow\min\{\ell({\rm succ}(v)):v\in V(\overrightarrow{X}),\ell(v)=1\land \ell({\rm succ}(v))\neq 1\}\)
  and put \(S\leftarrow\{v\in V(\overrightarrow{X}):\ell(v)=1\land\ell({\rm succ}(v))=m\}\).
3.  For each \(v\in S\), set \(\ell(v)\leftarrow k+1\).
For each \(v\in S\), contract the edge \(\{v,{\rm succ}(v)\}\).
\(V(\overrightarrow{X})\leftarrow V(\overrightarrow{X})\setminus\{{\rm succ}(v): v\in S\}\).
\(k\leftarrow k+1\).
4.  If \(S=V(\overrightarrow{X})\), return \(\overrightarrow{X}\).
Else \(m\leftarrow\min\{\ell({\rm succ}(v)):v\in S\land\ell({\rm succ}(v))\neq\ell(v)\}\)
  and put \(S\leftarrow\{v\in S:\ell({\rm succ}(v))=m\}\).
5.  Go to step 3.
Now we are ready to present an algorithm checking isomorphism between two oriented labeled cycles of size \(k\) in linear time. It is assumed that before applying the algorithm we run the coding procedure transforming the vertex-labels of the disjoint union of two cycles \(X_{1}\cup X_{2}\) into integers. We set the minimum of the empty set to be \(0\).
Problem: \({\rm IsoCycle}(\overrightarrow{X}_{1},\overrightarrow{X}_{2})\)
Input: Cycles \(\overrightarrow{X}_{1},\overrightarrow{X}_{2}\), \(|\overrightarrow{X}_{1}|=|\overrightarrow{X}_{2}|=k\), with a labeling \(\ell\colon V(\overrightarrow{X})=V(\overrightarrow{X}_{1})\cup V(\overrightarrow{X}_{2})\to\{1,\dots,k\}\).
Output: No, if \(\overrightarrow{X}_{1}\) is not isomorphic to \(\overrightarrow{X}_{2}\), otherwise an isomorphism \(\psi\colon\overrightarrow{X}_{1}\to\overrightarrow{X}_{2}\).
1.  If \(\ell\) is constant, return \(\psi\).
2.  \(m_{i}\leftarrow\min\{\ell({\rm succ}(v)):v\in V(\overrightarrow{X}_{i}),\ell(v) =1\land\ell({\rm succ}(v))\neq 1\}\), for \(i=1,2\),
3.  If \(m_{1}\neq m_{2}\) return No
Else \(S_{i}\leftarrow\{v\in V(\overrightarrow{X}_{i}):\ell(v)=1\land\ell({\rm succ}(v))=m_{i}\}\), \(c_{i}\leftarrow|S_{i}|\) for \(i=1,2\).
If \(c_{1}\neq c_{2}\) return No.
4.  For each \(v\in S=S_{1}\cup S_{2}\), set \(\ell(v)\leftarrow k+1\).
For each \(v\in S\), contract the edge \(\{v,{\rm succ}(v)\}\).
\(V(\overrightarrow{X})\leftarrow V(\overrightarrow{X})\setminus\{{\rm succ}(v): v\in S\}\).
\(k\leftarrow k+1\).
5.  If \(S=V(\overrightarrow{X})\), Go To Step 8.
Else \(m_{i}\leftarrow\min\{\ell({\rm succ}(v)):v\in S_{i}\land\ell({\rm succ}(v)) \neq\ell(v)\}\), \(i=1,2\).
6.  If \(m_{1}\neq m_{2}\), return No
Else put \(S_{i}\leftarrow\{v\in S_{i}:\ell({\rm succ}(v))=m_{i}\}\), \(c_{i}\leftarrow|S_{i}|\) for \(i=1,2\).
If \(c_{1}\neq c_{2}\), return No.
7.  Go to step 4.
8.  If \(|S_{1}|\neq|S_{2}|\), return No
Else choose \(v_{i}\in S_{i}\), \(i=1,2\), and extend \(v_{1}\mapsto v_{2}\) to an isomorphism \(\psi\) of oriented cycles defined by \(S_{i}\). return \(\psi\).
Lemma 4.9.
Let \(X\) a labeled cycle. Then \({\rm Aut}(X)\) is generated by at most two generators and a minimal generating set of \({\rm Aut}(X)\) can be computed in time \({\mathcal{O}}(|X|)\).
Proof.
Clearly, the automorphism group of a labeled cycle is either cyclic, or dihedral. Therefore, we aim to determine a generating set consisting of at most two generators. Assume \(V(X)=\{v_{0},v_{1},\dots,v_{n-1}\}\), where \(v_{i+1}={\rm succ}(v_{i})\) and the indices are counted modulo \(n\). Employing \({\rm CanForm}(\overrightarrow{X})\) we obtain an associated cycle \(\overrightarrow{Y}\) with constant labeling of length \(d\), where \(d\) is a divisor of \(n\). Then \(\rho\colon v_{i}\mapsto v_{i+\frac{n}{d}}\), for \(i=0,1,\dots,n-1\), is an automorphism of \(X\) generating the rotational subgroup of \({\rm Aut}(X)\). Using \({\rm IsoCycle}(\overrightarrow{X},\overleftarrow{X})\) we either find a non-trivial automorphism \(\tau\notin\langle\rho\rangle\), or we check that there is no such automorphism. In the first case, \({\rm Aut}(X)=\langle\rho,\tau\rangle\), in the second case \({\rm Aut}(X)=\langle\rho\rangle\).
The linearity of the algorithm depends on linearity of \({\rm CanForm}(\overrightarrow{X},v)\) and \({\rm IsoCycle}(\overrightarrow{X},\overleftarrow{X})\). Each iteration of the set \(S\) (sets \(S_{1}\), \(S_{2}\)) takes \({\mathcal{O}}(|S|)\) time (\({\mathcal{O}}(|S_{1}|+|S_{2}|)\) time). Since we remove \(|S|\) vertices from \(X\) in each iteration the overall complexity is \({\mathcal{O}}(n)\). All the other used subroutines can be easily implemented in linear time. □
Lemma 4.10.
Let \(X_{1}\) and \(X_{2}\) be two labeled cycles. Then the set \({{\rm Iso}}(X_{1},X_{2})\) can be computed in time \({\mathcal{O}}(|X_{1}|+|X_{2}|)\).
Proof.
If \(|X_{1}|\neq|X_{2}|\), then \({{\rm Iso}}(X_{1},X_{2})=\emptyset\). Thus we assume \(|X_{1}|=|X_{2}|=k\), for some integer \(k\). Running \({\rm IsoCycle}(\overrightarrow{X_{1}},\overleftarrow{X_{2}})\) and \({\rm IsoCycle}(\overrightarrow{X_{1}},\overrightarrow{X_{2}})\) we either find an isomorphism \(\psi\colon X_{1}\to X_{2}\), or we conclude that \({{\rm Iso}}(X_{1},X_{2})=\emptyset\). In the first case we set \({{\rm Iso}}(X_{1},X_{2})=\psi\circ{\rm Aut}(X_{1})\). By Lemma 4.9 a generating set of \({\rm Aut}(X_{1})\) can be computed in linear time. □
Remark 4.11.
Manacher (1975) in [26] invented an \(O(n)\)-time algorithm for listing all the palindromes that appear at the start of a given string of length \(n\). Apostolico, Breslauer and Galil (1993) [2] observed that the same algorithm can also be used to find all maximal palindromic substrings anywhere within the input string, again in \(O(n)\) time. Alternatively one can use Manacher algorithm instead \({\rm IsoCycle}(\overrightarrow{X},\overleftarrow{X})\) to compute the complement of the rotational group of a labeled cycle \(X\) of length \(n\) as follows. Write the labels of vertices of \(\overrightarrow{X}\) as a string \(W\) of length \(n\) starting at an arbitrarily chosen vertex. Consider the concatenation \(WW\). Then apply the Manacher's algorithm to the concatenation \(WW\) to find all maximal palindromic substrings. If there exists a maximal palindromic substring \(P\subset WW\) of length \(\geq n\), then there exists an automorphism \(\tau\) fixing the mid-point of \(P\). The mid-point of \(P\) corresponds either to a vertex, or to a center of an edge of \(X\). If every maximal palindromic substring in \(WW\) is of length \(\lt n\), no nontrivial automorphism fixing a vertex or an edge of \(X\) exists.
Now, we are ready to prove the main result of this section.
Theorem 4.12.
Let \(M_{1}\), \(M_{2}\) be spherical maps. Then both \({\rm Aut}^{+}(M_{1})\), \({\rm Aut}(M_{1})\) can be computed in time \({\mathcal{O}}(\|M_{1}\|)\), and both \({{\rm Iso}^{+}}(M_{1},M_{2})\), \({{\rm Iso}}(M_{1},M_{2})\) can be computed in time \({\mathcal{O}}(\|M_{1}\|+\|M_{2}\|)\).
Proof.
Applying the reductions introduced in Section 3 we associate to \(M_{i}=(D_{i},R_{i},L_{i})\) an irreducible map \(\overline{M}_{i}=(\overline{D}_{i},\overline{R}_{i},\overline{L}_{i})\), \(i=1,2\), in \({\mathcal{O}}(\|M_{i}\|)\)-time. If \(\overline{M}_{i}\) is a sporadic, we use brute force to determine a generating set of both \({\rm Aut}^{+}({\overline{M}_{i}})\) and \({\rm Aut}({\overline{M}_{i}})\), \(i=1,2\). Using Corollary 2.8 we extend in linear time each of the generators to a generator of \({\rm Aut}^{+}({M_{i}})\) (to a generator of \({\rm Aut}({M_{i}})\)), \(i=1,2\). If both \(\overline{M}_{1}\) and \(\overline{M}_{2}\) belong to one of the infinite family of uniform maps, we first reduce them to labeled cycles \(X_{1}\) and \(X_{2}\). By Lemma 4.8, this can be done in linear time. Now we apply Lemma 4.9 and Lemma 4.10 to compute \({\rm Aut}(X_{1})\) and \({{\rm Iso}}(X_{1},X_{2})\), respectively. By Corollary 2.8 we can extend in linear time the generators of \({\rm Aut}(X_{1})\) to \({\rm Aut}^{+}(M_{1})\) and the defining isomorphism of \({{\rm Iso}}(X_{1},X_{2})\) to \({{\rm Iso}^{+}}(M_{1},M_{2})\).
Finally, we run the whole procedure to decide whether \(M_{1}=(D_{1},R_{1},L_{1})\) is isomorphic to its mirror image \(M_{1}^{-1}=(D_{1},R^{-1},L_{1})\). In the positive case the algorithm produces an orientation reversing automorphism \(\beta\). Then \({\rm Aut}(M_{1})=\langle\beta,{\rm Aut}^{+}(M_{1})\rangle\), otherwise \({\rm Aut}(M_{1})={\rm Aut}^{+}(M_{1})\). The set \({{\rm Iso}}(M_{1},M_{2})={{\rm Iso}^{+}}(M_{1},M_{2})\cup{{\rm Iso}^{+}}(M_{1}, M_{2}^{-1})\). Since our algorithm uses a constant number of routines and each of them has a linear complexity, we are done. □
Fig. 4.
Fig. 4. Illustration of \({\rm CanForm}(\vec{X})\) .

5 Irreducible Maps on Torus

By definition, the toroidal irreducible maps are uniform face-normal maps. The universal covers of uniform toroidal maps are uniform tilings of the Euclidean plane (infinite maps with finite vertex and face degrees). There are 12 such tilings; see [17, page 63] determined by the local type of vertices. The corresponding local types are \((3,3,3,3,3,3)\), \((4,4,4,4)\), \((6,6,6)\), \(2\times(3,3,3,3,6)\), \((3,3,3,4,4)\), \((3,3,4,3,4)\), \((3,4,6,4)\), \((3,6,3,6)\), \((3,12,12)\), \((4,6,12)\), and \((4,8,8)\). One type occurs in two forms, one is the mirror image of the other. Hence there are \(11\) uniform tilings of the Euclidean plane up to change of global orientation, each is determined by the corresponding local type of its vertices, see Figures 5 and 6. Each of these tilings \(T\) gives rise to an infinite family of toroidal uniform maps as follows. It is well-known that \({\rm Aut}^{+}(T)\) is isomorphic either to the triangle group \(\Delta(4,4,2)\) or to \(\Delta(6,3,2)\). For every uniform tiling \(T\) the group \({\rm Aut}^{+}(T)\) contains an infinite normal subgroup \(H\) of translations generated by two shifts. Every finite uniform toroidal map of the prescribed local type can be constructed as the quotient \(T/K\), where \(K\) is a subgroup of \(H\) of finite index. Recall that the triangle group \(\Delta(k,m,n)\) has a presentation
\begin{align*}\Delta(k,m,n)=\langle x,y,z\ \mid\ x^{k}=y^{m}=z^{n}=xyz=1\rangle,\end{align*}
where \(k,m,n\) are integers \(\gt 1\). The groups \(\Delta(k,m,n)\) are discrete groups of orientation-preserving automorphisms acting on the sphere, Euclidean plane, or hyperbolic plane, depending on whether \(q=\frac{1}{k}+\frac{1}{m}+\frac{1}{n} \gt 1\), \(q=1\), or \(q \lt 1\). In particular, \(\Delta(k,m,2)\) acts as the group of orientation-preserving automorphisms of \(k\)-valent tiling of a simply connected surface by regular \(m\)-gons. The tiling is Euclidean if and only if \((k,m)\in\{(3,6),(6,3),(4,4)\}\).
From Uniform Face-Normal Toroidal Maps to Homogeneous Maps. We show that each of the uniform maps \(T\) can be reduced to a homogeneous map of type \((4^{4})=(4,4,4,4)\), \((3^{6})=(3,3,3,3,3,3)\), or of type \((6^{3})=(6,6,6)\) such that \({\rm Aut}^{+}(T)\) is preserved.
Lemma 5.1
For every labeled uniform toroidal map \(M\), there is a labeled homogeneous map \(M^{\prime}\) of type \((4^{4})\), \((3^{6})\) or \((6^{3})\) such that \({\rm Aut}^{+}(M)\cong{\rm Aut}^{+}(M^{\prime})\) and \(D(M^{\prime})\subseteq D(M)\). Moreover, \(M^{\prime}\) can be constructed in linear time.
Proof.
The idea of the proof is to take the dual \(M^{*}\) of \(M\) and apply the reductions defined in Section 3. Since each of the uniform toroidal maps arise by factorization of the corresponding universal tiling of the Euclidean plane by a group of translations isomorphic to \(\mathbb{Z}\times\mathbb{Z}\) and the reductions commute with the factorizations, it is sufficient to investigate transformations of the universal tilings that correspond to the applied reductions. Denote by \(U\) the universal tiling associated to \(M\). In what follows we employ the notation from Figures 5 and 6. Three of the tilings, namely \(3^{6}\), \(6^{3}\), and \(4^{4}\) are already homogeneous. If \(U\) belongs to the family \(\{3.6.3.6,3^{2}.4.3.4,3.4.6.4,4.8^{2},3^{3}.4^{2}\}\), then \({{\bf Dipoles}}({{\bf Delete}}(U^{*}))\) is a homogeneous tiling. For instance, we have
\begin{align*}3.6.3.6\mapsto(3.6.3.6)^{*}\mapsto{{\bf Delete}}((3.6.3.6)^{*}) \mapsto{{\bf Dipoles}}({{\bf Delete}}((3.6.3.6)^{*})) \cong 3^{6}.\end{align*}
Fig. 5.
Fig. 5. Uniform maps on Torus.
Fig. 6.
Fig. 6. Uniform maps on torus.
If \(U\) belongs to \(\{3.12^{2},4.6.12\}\), then \({{\bf Dipoles}}({{\bf Delete}}(M^{*}))\cong 3.6.3.6\). The reduction of \(3.6.3.6\) to the map \(3^{6}\) is defined above. Unfortunately, \({{\bf Dipoles}}({{\bf Delete}}((3^{2}.4.3.4)^{*}))\cong 3^{2}.4.3.4\), hence this approach fails if \(U=3^{2}.4.3.4\). In this particular case, we contract simultaneously all the edges of \(3^{2}.4.3.4\) sharing exactly two triangles in common. These edges form a perfect matching invariant with respect to map automorphisms. Hence, this operation preserves the automorphism group of the map. After contracting the edges of the perfect matching, it suffices to apply the operation \({{\bf Dipoles}}\) to obtain the map of type \(4^{4}\).
In each of the eleven cases, we have defined a transformation taking a uniform toroidal map into a homogeneous toroidal map and preserving the automorphism group. □
Homogeneous Maps on Torus. First, we describe how to compute the generators of the automorphism group of unlabeled homogeneous toroidal maps. There are three possible homogeneous types of such maps: \((3^{6})\), \((4^{4})\), and \((6^{3})\). By duality, we may assume that the map is either of type \((4^{4})\), or of type \((3^{6})\). The maps admit a simple description in terms of three integer parameters \(r,s,t\) where \(0\leq t \lt r\). The 4-regular quadrangulation \(Q(r,s,t)\) is obtained from the \((r+1)\times(s+1)\) grid with underlying graph \(P_{r+1}\Box P_{s+1}\) (the Cartesian product of paths on \(r+1\) and \(s+1\) vertices) by identifying the “leftmost” path of length \(s\) with the “rightmost” one (to obtain a cylinder) and identifying the bottom \(r\)-cycle of this cylinder with the top one after rotating the top clockwise for \(t\) edges. In other words, the quadrangulation \(Q(r,s,t)\) is the quotient of the integer grid \(\mathbb{Z}\Box\mathbb{Z}\) determined by the equivalence relation generated by all pairs \((x,y)\sim(x+r,y)\) and \((x,y)\sim(x+t,y+s)\). The 6-regular triangulation \(T(r,s,t)\) is obtained from \(Q(r,s,t)\) by adding all diagonal edges joining \((x,y)\) with \((x+1,y+1)\). And the 3-regular hexangulations \(H(r,s,t)\) of the torus are just duals of triangulations \(T(r,s,t)\). It follows that (in the unlabeled case) one can reduce the isomorphism problem for homogeneous maps to computation of parameters \(r,s,t\) for the quadrangular grids.
Remark 5.2.
The classification of homogeneous toroidal maps can be derived by considering appropriate fundamental polygon of the universal cover (which is isomorphic to the tessellation of the plane with unit squares). This structure was known to geometers (Coxeter and Moser [12]). In graph theory, this was observed by Altschuler [1]; several later works do the same (e.g., [33]). Our notation comes from Fisk [13], who only considered 6-regular triangulations.
The parameters \(r,s,t\) depend on the choice of one of the edges incident with a chosen reference vertex \(v_{0}\). Let us describe the 6-regular case \(T(r,s,t)\) first. Let the clockwise order of the edges around \(v_{0}\) be \(e_{1},e_{2},\dots,e_{6}\). We start with \(e_{1}\) and take the straight-ahead walk (when we arrive to a vertex \(u\) using an edge \(e\), we continue the walk with the opposite edge in the local rotation around \(u\)). When we come back for the first time to a vertex we have already traversed, it can be shown that this vertex must be \(v_{0}\) and that we arrive through the edge \(e_{4}\), which is opposite to the initial edge \(e_{1}\). This way the straight-ahead walk closes up into a straight-ahead cycle \(C=v_{0}v_{1}\dots v_{r-1}v_{0}\). We let \(r\) be the length of this cycle. Now, let us start a straight-ahead walk from \(v_{0}\) with the initial edge \(e_{2}\). Let \(s \gt 0\) be the number of steps on this walk until we reach a vertex, say \(v_{t}\) (\(0\leq t \lt r\)), on the cycle \(C\), for the first time. This determines the three parameters \(r,s,t\) and it can be shown that the map is isomorphic to the map \(T(r,s,t)\) described above. A parametrization by \((r,s,t)\) in the 4-regular case is obtained similarly except that we do not have the directions of the edges \(e_{3}\) and \(e_{6}\). See Figure 7 for an example. In particular, this proves the well-known fact that the abelian group \(T=\langle a,b\rangle\) satisfying relations \(ra=0\) and \(ta=sb\) acts regularly on the vertices of \(T(r,s,t)\). In particular, it is a Cayley graph based on \(T\).
Fig. 7.
Fig. 7. The toroidal triangulation \(T(6,4,2)\) . Its parameter list is the cyclic sequence of parameters (6,4,2), (12,2,6), (12,2,4), (6,4,4), (12,2,6), (12,2,10). The stabilizers of the automorphism group action are trivial and its full automorphism group is isomorphic to \({\mathbb{Z}}_{6}\times{\mathbb{Z}}_{4}\) .
The following two lemmas summarize the above analysis of the map isomorphism (automorphism) problem on homogeneous toroidal maps.
Lemma 5.3
Let \(M_{1}\) and \(M_{2}\) be two unlabeled homogeneous toroidal maps of the same type. Then \(M_{1}\cong M_{2}\) are isomorphic if and only if there exist parametrizations \((r_{i},s_{i},t_{i})\) of \(M_{i}\), for \(i=1,2\), such that \((r_{1},s_{1},t_{1})=(r_{2},s_{2},t_{2})\). Moreover, the latter condition can be checked in linear time in the size of the maps.
The following fact follows from the above lemma.
Lemma 5.4.
Let \(M=Q(r,s,t)\) or \(M=T(r,s,t)\) be an unlabeled homogeneous map on the torus of type \((4^{4})\) or of type \((3^{6})\), respectively. The group \({\rm Aut}^{+}(M)\) is a product \(T\cdot H\) with \(T\cap H=\{1\}\), where \(T\) is regular on the vertex-set of \(M\) and \(H\) fixes a vertex, edge, or a face of \(M\). Moreover, \(T\) is either cyclic or a direct product of two cyclic groups and \(H\) is cyclic of size \(1,2,3,4\), or \(6\).
It is well-known that the group of translations \(T\leq{\rm Aut}^{+}(M)\) can always be written as a direct product of two cyclic groups. In particular, we have the following.
Lemma 5.5
Let \(T=\langle a,b\rangle\) be an abelian group, where \(|a|=r\) and \(a^{t}=b^{s}\) for some integers \(r,s,t\). Then there exists \(c\) and \(d\) such that \(T=\langle c\rangle\times\langle d\rangle\). Moreover, \(c\) and \(d\) can be computed in time \({\mathcal{O}}(rs)\).
Proof.
Using the Smith Normal Form, we have that \(T\cong\mathbb{Z}_{m}\times\mathbb{Z}_{n}\), where \(m=\gcd(r,t,s)\) and \(n=rs/\gcd(r,t,s)\). The respective generators of \(T\) can be chosen to be \(c=a^{\frac{t}{m}}b^{\frac{-s}{m}}\) and \(d=b^{\frac{t}{m}}\). □
Labeled Homogeneous Maps on the Torus. For technical reasons, we transform the dart-labels of a homogeneous toroidal map \(M\) to vertex-labels. The transformation depends on the choice of the edges \(e_{1}\) and \(e_{2}\) incident to the vertex \(v_{0}\). The couples \((v_{0},e_{1})\), \((v_{0},e_{2})\) determine sets of oriented horizontal and vertical cycles, respectively. If \(u\) is any vertex, it is contained in exactly one horizontal cycle \(H_{u}\), and exactly one vertical cycle \(C_{u}\). Thus there is a unique dart \(f_{1}\in H_{u}\) and \(f_{2}\in C_{u}\) incident to \(u\). Let \((f_{1},f_{2},f_{4},f_{5})\) be the rotation of darts at \(u\) if the type of \(M\) is \((4^{4})\) and \((f_{1},f_{2},f_{3},f_{4},f_{5},f_{6})\) if it is of type \((3^{6})\). We set \(\ell(u)=(\ell(f_{1}),\ell(f_{2}),\ell(f_{4}),\ell(f_{5}))\) in the first case, and \(\ell(u)=(\ell(f_{1}),\ell(f_{2}),\ell(f_{3}),\ell(f_{4}),\ell(f_{5}),\ell(f_{6 }))\) in the second case. Similarly as in the spherical case, the labels of vertices are encoded by integers.
Clearly, every label-preserving automorphism of \(M\) is an automorphism of the associated unlabeled homogeneous map \(\tilde{M}\). It follows that \(G={\rm Aut}^{+}(M)\leq{\rm Aut}^{+}(\tilde{M})=T\cdot H\), where \(T\) and \(H\) are the subgroups from Lemma 5.4. However, the subgroup \(T_{1}=G\cap T\) may not be transitive on the vertices of \(M\). An analogue of Lemma 5.4 holds for the action of \(G\) on the vertices of \(M\).
Lemma 5.6.
Let \(M\) be a labeled homogeneous map on torus of type \((4^{4})\) or of type \((3^{6})\). Let \(\tilde{M}=T(r,s,t)\) be the associated unlabeled homogeneous map with \({\rm Aut}^{+}(\tilde{M})=\tilde{T}\cdot\tilde{H}\). Then \(G={\rm Aut}^{+}(M)=T\cdot H\), where \(T=\tilde{T}\cap G\) acts freely on the vertex-set of \(M\), and \(H=\tilde{H}\cap G\) fixes a vertex, edge, or a face.
Transformation to Orthogonal Grid. Lemma 5.5 can be used to transform the shifted toroidal grid \({\mathcal{G}}\) with parameters \(r,s,t\) to the orthogonal toroidal grid \({\mathcal{G}}^{\perp}\) with parameters \(r^{\prime},s^{\prime}\). Note that the underlying graph may change, but both \({\mathcal{G}}\) and \({\mathcal{G}}^{\perp}\) are Cayley graphs based on the group \(\tilde{T}\), therefore, the vertex-labeling naturally transfers. More precisely, let \(\psi\) be an isomorphism of the actions of \(\tilde{T}\) on the vertex-sets of the original and of the orthogonal grid. Then the labeling of the vertices on the orthogonal grid is given by setting \(\ell(\psi(v))=\ell(v)\), where \(v\) ranges through the vertices of \({\mathcal{G}}\). We have the following.
Lemma 5.7.
Let \(M_{i}\), \(i=1,2\), be labeled homogeneous toroidal maps parametrized by the same triple \((r,s,t)\) of integers. Then \(M_{1}\cong M_{2}\) if and only if the associated labeled orthogonal toroidal grids are isomorphic.
Lemma 5.8.
Let \(M\) be a labeled homogeoneous toroidal map and let \({\mathcal{G}}\) be the associated labeled orthogonal toroidal grid. Then the groups of translations of \(M\) and of \({\mathcal{G}}\) coincide (as permutation groups acting on the set of vertices).
Remark 5.9.
The transformation \(M\mapsto{\mathcal{G}}\) associating to a homogeneous toroidal map an orthogonal grid does not preserve vertex-stabilizers even in the unlabeled case. For instance, let \(M=\{4,4\}_{2,1}\) (following the Coxeter notation) be the regular \(4\)-gonal embedding of \(K_{5}\) into the torus. It is a map of type \((4^{4})\) with the group of translations isomorphic to the cyclic group of order five and the vertex stabilizers being cyclic of order four. The underlying graph of the associated orthogonal grid \({\mathcal{G}}\) is isomorphic to a \(5\)-cycle with a loop attached to each vertex. The vertex-stabilizers of \({\rm Aut}^{+}({\mathcal{G}})\) are of order two.
Isomorphisms between Labeled Orthogonal Grids. Denote by \(\overrightarrow{X}\) a labeled orthogonal grid \(X\) of size \(r\times s\) with a parametrization with respect to origin \(v_{0}=v[0,0]\) and two chosen orthogonal darts \(x_{1}\), \(x_{2}\) based at \(v_{0}\). We can introduce a coordinate system by setting \(v=v[i,j]\), \(i\in\mathbb{Z}_{r}\) and \(j\in\mathbb{Z}_{s}\) if \(v\in V(\overrightarrow{X})\) can be reached from \(v_{0}\) by the oriented horizontal path of length \(i\) followed by the oriented vertical path of length \(j\). By a vertical cycle\(X_{i}\), \(i\in\mathbb{Z}_{r}\) we mean the cyclic vector \((v[i,0],v[i,1],\dots,v[i,s-1])\). Similarly, a horizontal cycle\(Y_{j}\), \(j\in\mathbb{Z}_{s}\) is the cyclic vector \((v[0,j],v[1,j],\dots,v[r-1,j])\). An isomorphism between two labeled orthogonal grids takes an oriented horizontal cycle onto an oriented horizontal cycle, and an oriented vertical cycle onto an oriented vertical cycle. In particular, vertex-stabilizers are trivial. We define the label of \(X_{i}\) by setting \({\mathcal{L}}(X_{i})=(\ell(v[i,0]),\ell(v[i,1]),\dots,\ell(v[i,s-1]))\). Observe that \({\mathcal{L}}(X_{i})\) depends on the parametrization defined by \(v_{0}\), \(x_{1}\) and \(x_{2}\). The set of vertical cycles of \(\overrightarrow{X}\) will be denoted by \({{\rm Cyc}}(\overrightarrow{X})\). There is a natural cyclic order of the set of vertical cycles given by \({\rm succ}(X_{i})=X_{i+1}\). For \(r\geq 2\), two consecutive cycles \(X_{i}\), \(X_{i+1}\), induce a ladder \({{\rm La}}(X_{i})\) with vertex set \(V(X_{i})\cup V(X_{i+1})\) and edges of the form \((v[i,j],v[i,j+1])\), \((v[i+1,j],v[i+1,j+1])\) and \((v[i,j],v[i+1,j])\), for \(j\in\mathbb{Z}_{s}\). For two consecutive labels \({\mathcal{L}}(X_{i})=(a_{0},\dots,a_{s-1})\) and \({\mathcal{L}}(X_{i+1})=(b_{0},\dots,b_{s-1})\) we set \({\mathcal{L}}(X_{i},X_{i+1})=(c_{0},\dots,c_{s-1})\), where \(c_{i}\) are first unused integers by \(\ell\) and \(c_{i}=c_{j}\) if and only if \((a_{i},b_{i})=(a_{j},b_{j})\). The integers \(c_{j}\), \(j\in\mathbb{Z}_{s}\), will be understood to be the labels of the vertices of the cycle \(X^{\prime}_{i}\) arising by contracting the spokes \((v[i,j],v[i+1,j])\) of the ladder \({{\rm La}}(X_{i})\). The ladder \({{\rm La}}(X_{i})\) is uniquely defined by an oriented cycle \({X^{\prime}}_{i}\), with vertex-set \(\{u[i,0],u[i,1],\dots,u[i,s-1]\}\), and labeling \(\ell(u[i,j])=(\ell(u[i,j],\ell(u[i+1,j]))\). Hence, the isomorphism problem for two ladders \({{\rm La}}(X_{i})\) and \({{\rm La}}(X_{m})\) can be decided by applying the algorithm \({\rm IsoCycle}({X^{\prime}}_{i},{X^{\prime}}_{m})\).
A labeled orthogonal grid \(\overrightarrow{X}\) of dimension \(r\times s\) will be called cyclic, if for every \(i\in\mathbb{Z}_{r}\), \({{\rm La}}(X_{i})\cong{{\rm La}}(X_{i+1})\). Denote by \({{\rm La}}(\overrightarrow{X})={{\rm La}}(X_{0})\). For two consecutive ladders \({{\rm La}}(X_{i}),{{\rm La}}(X_{i+1})\) define the \(i\)-th vertical shift \(h_{i}\) as the minimum integer \(h_{i}\in\mathbb{Z}_{s}\) such that there is an isomorphism \({{\rm La}}(X_{i})\to{{\rm La}}(X_{i+1})\) taking \(v[i,0]\mapsto v[i+1,h_{i}]\). One can easily see that in a cyclic grid \(\overrightarrow{X}\), all the vertical shifts \(h_{i}\) are equal. We set \(h(\overrightarrow{X})=h_{0}\in\mathbb{Z}_{s}\) to be the vertical shift of \(\overrightarrow{X}\). In particular, \(\overrightarrow{X}\) admits an automorphism \(\rho\) taking \(v[i,j]\mapsto v[i+1,j+h]\).
Lemma 5.10.
Let \(\overrightarrow{X}\), \(\overrightarrow{Y}\) be cyclic orthogonal grids of dimension \(r\times s\). Then \(\overrightarrow{X}\cong\overrightarrow{Y}\) if and only if \({{\rm La}}(\overrightarrow{X})\cong{{\rm La}}(\overrightarrow{Y})\) and \(h(\overrightarrow{X})=h(\overrightarrow{Y})\). Moreover, the isomorphism problem between cyclic orthogonal grids can be decided in time \({\mathcal{O}}(s)\).
Proof.
If \(\psi\colon\overrightarrow{X}\to\overrightarrow{Y}\) is an isomorphism, then \(\psi({{\rm La}}(X_{0}))\mapsto{{\rm La}}(Y_{i})\), for some \(i\in\mathbb{Z}_{r}\). Thus \({{\rm La}}(X_{0})\cong{{\rm La}}(Y_{i})\) and for the shifts we have \(h_{0}(\overrightarrow{X})=h_{i}(\overrightarrow{Y})\). Since both grids are cyclic of the same dimension the first implication follows.
Assume \({{\rm La}}(\overrightarrow{X})\cong{{\rm La}}(\overrightarrow{Y})\) and \(h(\overrightarrow{X})=h(\overrightarrow{Y})\). Let \(\psi_{0}\colon{{\rm La}}(X_{0})\to{{\rm La}}(Y_{0})\). Then \(\psi_{0}\) extends to an isomorphism \(\psi\colon\overrightarrow{X}\to\overrightarrow{Y}\) by setting \(\psi(v[i,j])=\rho_{Y}\psi_{0}\rho^{-1}_{X}(v[i,j])\), where \(\rho_{X}\) and \(\rho_{Y}\) are the automorphisms of \(\overrightarrow{X}\), and of \(\overrightarrow{Y}\), taking a vertex with coordinates \([i,j]\) to the vertex with coordinates \([i+1,j+h]\), \(h=h(\overrightarrow{X})=h(\overrightarrow{Y})\).
As we have already observed, the isomorphism problem between \({{\rm La}}(X_{0})\) and \({{\rm La}}(Y_{0})\) can be decided in time \({\mathcal{O}}(s)\). Finally \({{\rm Iso}}({{\rm La}}(X_{0}),{{\rm La}}(X_{1}))\) and \({{\rm Iso}}({{\rm La}}(Y_{0}),{{\rm La}}(Y_{1}))\) can be computed in time \({\mathcal{O}}(s)\), and therefore both \(h(\overrightarrow{X})\), \(h(\overrightarrow{Y})\) can be computed in time \({\mathcal{O}}(s)\) as well. □
The main idea of the following algorithm is to mimic \({\rm IsoCycle}(\overrightarrow{X},\overrightarrow{Y})\) in dimension two, where the vertical cycles \(X_{i}\) and the ladders \({{\rm La}}(X_{i})\), \(i\in\mathbb{Z}_{r}\), will play the role of vertices and edges of a cycle of length \(r\). Moreover, the vertex \(X_{i}\) is labeled by the isomorphism class of \({{\rm La}}(X_{i})\). Applying Steps 1–6, we get associated cyclic grids with the same automorphism group. In Step 7 the two cyclic grids are compared.
Problem: \({\rm IsoGrid}(\overrightarrow{X},\overrightarrow{Y})\)
Input: Labeled orthogonal parametrized grids \(\overrightarrow{X}\) and \(\overrightarrow{Y}\) of size \(r\times s\) with the integer labeling \(\ell\colon V(\overrightarrow{X})\cup V(\overrightarrow{Y})\to\{1,\dots,k\}\), where \(k=rs\).
Output: No, if \(\overrightarrow{X}\) is not isomorphic to \(\overrightarrow{Y}\), otherwise an isomorphism \(\psi\colon\overrightarrow{X}\to\overrightarrow{Y}\).
1.  If \({\mathcal{L}}\) is constant on \({{\rm Cyc}}(\overrightarrow{X})\) and constant on \({{\rm Cyc}}(\overrightarrow{Y})\),
  set \(\mathcal{S}_{X}={{\rm Cyc}}(\overrightarrow{X})\), \(\mathcal{S}_{Y}={{\rm Cyc}}(\overrightarrow{Y})\) and go to Step 7,
If \({\mathcal{L}}\) is constant on \({{\rm Cyc}}(\overrightarrow{X})\) and not constant on \({{\rm Cyc}}(\overrightarrow{Y})\), return No.
2.  Find a cycle \(Z\in{{\rm Cyc}}(\overrightarrow{X})\) such that \({{\rm La}}(Z)\ncong{{\rm La}}({\rm succ}(Z))\)
\(\mathcal{S}_{X}\leftarrow\{C\in{{\rm Cyc}}(\overrightarrow{X}):{{\rm La}}(C) \cong{{\rm La}}(Z),{\rm La}({\rm succ}(C))\cong{{\rm La}}({\rm succ}(Z))\}\), \(c_{X}\leftarrow|\mathcal{S}_{X}|\).
\(\mathcal{S}_{Y}\leftarrow\{C\in{{\rm Cyc}}(\overrightarrow{Y}):{{\rm La}}(C) \cong{{\rm La}}(Z),{{\rm La}}({\rm succ}(C))\cong{{\rm La}}({\rm succ}(Z))\}\), \(c_{Y}\leftarrow|S_{X}|\).
If \(c_{X}\neq c_{Y}\) return No.
3.  For each \({C}\in\mathcal{S}=\mathcal{S}_{X}\cup\mathcal{S}_{Y}\),
\({\mathcal{L}}(C)\leftarrow{\mathcal{L}}(C,{\rm succ}(C))\),
\({{\rm Cyc}}(\overrightarrow{X})\leftarrow{{\rm Cyc}}(\overrightarrow{X}) \setminus\{{\rm succ}(C):C\in\mathcal{S}_{X}\}\),
\({{\rm Cyc}}(\overrightarrow{Y})\leftarrow{{\rm Cyc}}(\overrightarrow{Y}) \setminus\{{\rm succ}(C):C\in\mathcal{S}_{Y}\}\),
  and \({\rm succ}(C)\leftarrow{\rm succ}({\rm succ}(C))\).
\(k\leftarrow k+2s\).
4.  If \(\mathcal{S}_{X}={{\rm Cyc}}(\overrightarrow{X})\) and \(\mathcal{S}_{Y}={{\rm Cyc}}(\overrightarrow{Y})\), go to Step 7.
Else Find a cycle \(Z\in\mathcal{S}_{X}\) such that \({{\rm La}}(Z)\ncong{{\rm La}}({\rm succ}(Z))\)
5.  \(\mathcal{S}_{X}\leftarrow\{C\in\mathcal{S}_{X}:{{\rm La}}(C)\cong{{\rm La}}(Z), {{\rm La}}({\rm succ}(C))\cong{{\rm La}}({\rm succ}(Z))\}\), \(c_{X}\leftarrow|\mathcal{S}_{X}|\),
\(\mathcal{S}_{Y}\leftarrow\{C\in\mathcal{S}_{Y}:{{\rm La}}(C)\cong{{\rm La}}(Z), {{\rm La}}({\rm succ}(C))\cong{{\rm La}}({\rm succ}(Z))\}\), \(c_{Y}\leftarrow|\mathcal{S}_{Y}|\).
If \(c_{X}\neq c_{Y}\), return No.
6.  Go to Step 3.
7.  Choose two arbitrary vertical cycles \(C_{X}\in{{\rm Cyc}}({\overrightarrow{X}})\), \(C_{Y}\in{{\rm Cyc}}({\overrightarrow{Y}})\)
If \({\rm IsoCycle}(\overrightarrow{C}_{X},\overrightarrow{C}_{Y})\) returns No or \(h(\overrightarrow{X})\neq h(\overrightarrow{X})\) then return No,
Else \({\rm IsoCycle}(\overrightarrow{C}_{X},\overrightarrow{C}_{Y})\) gives an isomorphism \(\overline{\psi}\colon{\overrightarrow{C}}_{X}\to{\overrightarrow{C}}_{Y}\).
8.  Extend \(\overline{\psi}\) to an isomorphism \(\psi\colon{\overrightarrow{X}}\to{\overrightarrow{Y}}\), between the grids, return \(\psi\).
Lemma 5.11.
Problem \({\rm IsoGrid}(\overrightarrow{X},\overrightarrow{Y})\) can be solved in time \({\mathcal{O}}(rs)\).
Proof.
Observe that for vertices \(u\in V(\overrightarrow{X})\) and \(v\in V(\overrightarrow{X})\) there exists at most one isomorphism taking \(u\mapsto v\). We prove that the algorithm described above satisfies the statement.
Suppose that it stops after \(m\) iterations. Denote by \({\overrightarrow{X}}^{(i)}\), \({\overrightarrow{Y}}^{(i)}\), \(i=0,\dots,m\), the orthogonal grids obtained from the input grids \({\overrightarrow{X}}^{(0)}={\overrightarrow{X}}\) and \({\overrightarrow{Y}}^{(0)}={\overrightarrow{Y}}\) in the \(i\)-th iteration, and similarly denote \(\mathcal{S}_{X}^{(i)}\) and \(\mathcal{S}_{Y}^{(i)}\) the sets of active vertical cycles computed in the \(i\)-th iteration. If \(\psi\colon{\overrightarrow{X}}^{(i)}\to{\overrightarrow{Y}}^{(i)}\) is an isomorphism, then by definition of \(\mathcal{S}_{X}^{(i)}\), \(\psi\) takes \(\mathcal{S}_{X}^{(i)}\to\mathcal{S}_{Y}^{(i)}\), and consequently, it determines a unique isomorphism \(\tilde{\psi}\colon{\overrightarrow{X}}^{(i+1)}\to{\overrightarrow{Y}}^{(i+1)}\) such that the restriction of \(\psi\) onto \(V({\overrightarrow{X}}^{(i+1)})\) is \(\tilde{\psi}\). Moreover, in Step 3, for the cycles obtained by contraction of the ladders defined by \(\mathcal{S}_{X}^{(i)}\cup\mathcal{S}_{Y}^{(i)}\), we introduce labels not used in \({\overrightarrow{X}}^{(i)}\cup{\overrightarrow{Y}}^{(i)}\). Thus new isomorphisms cannot appear in \({{\rm Iso}}(\overrightarrow{X}^{(i+1)},\overrightarrow{Y}^{(i+1)})\). It follows that there is a one-to-one correspondence between \({{\rm Iso}}(\overrightarrow{X},\overrightarrow{Y})\) and \({{\rm Iso}}(\overrightarrow{X}^{(m)},\overrightarrow{Y}^{(m)})\), such that every for every \(\psi\in{{\rm Iso}}(\overrightarrow{X},\overrightarrow{Y})\) the restriction \(\psi|_{A}\in{{\rm Iso}}(\overrightarrow{X}^{(m)},\overrightarrow{Y}^{(m)})\), where \(A=V(\overrightarrow{X}^{(m)})\subseteq V(\overrightarrow{X})\). In Step 7 we compare two cyclic grids. Since there is a one-to-one correspondence between \({{\rm Iso}}(\overrightarrow{X}^{(m)},\overrightarrow{Y}^{(m)})\) and \({{\rm Iso}}(\overrightarrow{X},\overrightarrow{Y})\) the algorithm computes \({{\rm Iso}}(\overrightarrow{X},\overrightarrow{Y})\).
As concerns the complexity, the first two initial steps take \({\mathcal{O}}(rs)\) time. In each iteration (Steps 3,4 and 5) we decide an isomorphism between \(|\mathcal{S}_{X}^{(i)}\cup\mathcal{S}_{Y}^{(i)}|\) pairs of ladders. Since \(\sum|\mathcal{S}_{X}^{(i)}\cup\mathcal{S}_{Y}^{(i)}|\leq 2r\), and the isomorphism problem between two ladders can be decided in time \(\mathcal{O}(s)\), the complexity of this subroutine is \(\mathcal{O}(rs)\). In Step 3, we construct \({\mathcal{L}}(C,{\rm succ}(C))\) by sorting lexicographically \(r\) pairs of integers and identifying them with the first unused integers. Since the largest used integer is at most \(2rs\), it is possible to achieve this using bucket sort in time \({\mathcal{O}}(r)\). Finally Step 7 is, by Lemma 5.10, of complexity \({\mathcal{O}}(s)\) and Step 8 is of complexity \({\mathcal{O}}(rs)\). □
Lemma 5.12.
The automorphism group \({\rm Aut}(\overrightarrow{X})\) of an \(r\times s\) orthogonal grid can be computed in time \({\mathcal{O}}(rs)\).
Proof.
We run the \({\rm IsoGrid}(\overrightarrow{X},\overrightarrow{X})\) to derive an associated cyclic grid \(\overrightarrow{X}^{(m)}\) of dimension \(d\times s\) with the same automorphism group. The two automorphisms generating \({\rm Aut}(\overrightarrow{X}^{(m)})\) are of the form \(\rho\colon v[i,j]\mapsto v[i+1,j+h]\) and \(\tau\colon v[i,j]\mapsto v[i,j+q]\) where \(q\) is the least integer satisfying \(0\leq q \lt s\) such that there is an automorphism of \(X_{0}\) taking \(v[0,0]\to v[0,q]\). The parameter \(q\) can be computed by \({\rm CanForm}(X_{0})\) in time \(\mathcal{O}(s)\). Then \(\rho\), \(\tau\) extend to generators of \({\rm Aut}(\overrightarrow{X})\) by setting \(\tilde{\rho}\colon[i,j]\mapsto[i+\frac{r}{d},j+h]\) and \(\tilde{\tau}\colon[i,j]\mapsto[i,j+q]\), respectively. □
Theorem 5.13.
Let \(M\), \(N\) be maps on torus. Then both \({\rm Aut}^{+}(M)\), \({\rm Aut}(M)\) can be computed in time \({\mathcal{O}}(\|M\|)\), and both \({{\rm Iso}^{+}}(M,N)\), \({{\rm Iso}}(M,N)\) can be computed in time \({\mathcal{O}}(\|M\|+\|N\|)\).
Proof.
Applying the reductions described in Section 3 we associate to \(M\) and \(N\) the reduced uniform maps. If the associated uniform maps are not of the same local type, we set \({{\rm Iso}^{+}}(M,N)={{\rm Iso}}(M,N)=\emptyset\). By Lemma 5.1 we further reduce the uniform maps to homogeneous toroidal maps \(\overline{M}\) and \(\overline{N}\). We compute the sets \(P(\overline{M})\), \(P(\overline{N})\) of all possible triples of integers \((r,s,t)\) defining parametrizations of \(\overline{M}\), \(\overline{N}\), respectively. If \(P(\overline{M})\cap P(\overline{N})=\emptyset\), we set \({{\rm Iso}^{+}}(M,N)={{\rm Iso}}(M,N)=\emptyset\). For every parametrization \((r,s,t)\in P(\overline{M})\) we derive the associated orthogonal grid \(\overrightarrow{X}(r,s,t)\). Similarly, we derive orthogonal grids \(\overrightarrow{Y}(r,s,t)\), for \((r,s,t)\in P(\overline{N})\). Denote the two sets of grids \(\mathcal{G}(M)\) and \(\mathcal{G}(N)\). Each parametrization is defined by two consecutive darts \(x_{0},x_{1}\) based at the same vertex, where \(x_{1}\) follows \(x_{0}\) in the global orientation of torus. Hence \(|\mathcal{G}(M)|=6\) or \(|\mathcal{G}(M)|=4\) depending on whether the reduced map is a \(6\)-valent triangulation, or a \(4\)-valent quadrangulation. For every choice of \(\overrightarrow{X}\in\mathcal{G}(M)\) and a choice of \(\overrightarrow{Y}\in\mathcal{G}(N)\) with the same parametrization, we run \({\rm IsoGrid}(\overrightarrow{X},\overrightarrow{Y})\). As a result we either construct an isomorphism \(\psi_{0}\colon\overrightarrow{X}\to\overrightarrow{Y}\), or we conclude that no such isomorphism exists. In the first case we extend \(\psi_{0}\) to an isomorphism \(\psi\colon M\to N\).
In order to determine the group of translations of \(M\) we run \({\rm IsoGrid}(\overrightarrow{X},\overrightarrow{X})\). By Lemma 5.12, this procedure returns a generating set of \({\rm Aut}(\overrightarrow{X})\) isomorphic to the group of translations of \(M\). We extend the generators (there are at most two) to a generating set \(\{\alpha,\beta\}\) of the group of translations \(T\) of \(M\).
Finally, we compute the complement \(H\) of the group of translations \(T\) of \(M\). If \(T\neq 1\), then we consider the factor grid \(\overrightarrow{X}/T\), which has trivial group of translations. Therefore in what follows we assume that the group of translations of the orthogonal grids associated to \(M\) is trivial. Since an element of \(H\) may fix a vertex, edge, or a face we first modify the grid \(\overrightarrow{X}\) as follows. Subdivide each edge of \(\overrightarrow{X}\) and join the center of each quadrilateral to the midpoints of the four incident edges. For the new vertices at the centers of edges and faces we use two different, so far unused labels, to distinguish the two kinds of new vertices. In this way we have obtained \(2r\times 2s\) the extended orthogonal grid \(\tilde{X}\) associated to \(M\). Observe that the group of translations of the extended grid remains trivial. Hence, till end of the proof we may identify \(\overrightarrow{X}:=\tilde{X}\). It is well-known that if there exists two isometries of the torus fixing different sets of vertices, then the group of translations is non-trivial. Since we assume that the group of translations is trivial, an isomorphism \(\tau\) between two orthogonal grids \(\overrightarrow{X}\) and \(\overrightarrow{X}^{\prime}\) associated to \(M\) fixes a vertex \(w\) (the vertex-sets of \(\overrightarrow{X}\) and \(\overrightarrow{X}^{\prime}\) coincide). Moreover, if \(w^{\prime}\) is another vertex fixed by an automorphism \(\tau^{\prime}\), then \(\tau^{\prime}\in\langle\tau\rangle\) and \(w^{\prime}\) is fixed by \(\tau\). A vertex-stabilizer of \(M\) is non-trivial if and only if there are two isomorphic associated orthogonal grids \(\overrightarrow{X}\) and \(\overrightarrow{X}^{\prime}\) parametrized with respect to different pairs of darts based at the origin. We fix \(\overrightarrow{X}\) and check isomorphism of \(\overrightarrow{X}\) with all possible orthogonal grids \(\overrightarrow{X}^{\prime}\) associated to \(M\). Hence we can determine a generator \(\tau\) of the fixer of \(w\), and extend it to an automorphism \(\gamma\) of \(M\). Then \(\langle\alpha,\beta,\gamma\rangle={\rm Aut}^{+}(M)\) and \({{\rm Iso}^{+}}(M,N)=\psi\circ\langle\alpha,\beta,\gamma\rangle\) and \({{\rm Iso}}(M,N)={{\rm Iso}^{+}}(M,N)\cup{{\rm Iso}^{+}}(M,N^{-1})\). Lemmas 5.11 and 5.12 establish linear complexity of the algorithm. □

6 Non-Orientable Surfaces

For a map \(M\) on a non-orientable surface \(S\), we reduce the problem of computing the generators of \({\rm Aut}(M)\) to the problem of computing the generators of \({\rm Aut}^{+}(\widetilde{M})\), where \(\widetilde{M}\) is the antipodal double cover over \(M\).
Given a map \(M=(F,\lambda,\rho,\tau)\) on a non-orientable surface of genus \(\gamma\), we define the antipodal double cover \(\widetilde{M}=(D,R,L)\) by setting \(D:=F\), \(R:=\rho\tau\), and \(L:=\tau\lambda\). Since \(M\) is non-orientable, we have \(\langle R,L\rangle=\langle\lambda,\rho,\tau\rangle\), so \(\langle R,L\rangle\) is transitive and \(\widetilde{M}\) is well-defined. For more details on this construction see [28]. We note that \(\widetilde{\chi}=2\chi\), where \(\widetilde{\chi}\) and \(\chi\) is the Euler characteristic of the underlying surface of \(\widetilde{M}\) and \(M\), respectively. Note that one can use Theorem 2.3 to check (in linear time) whether \(M=(F;\lambda,\rho,\tau)\) is non-orientable, otherwise the andipodal double cover is not correctly defined, since the group \(\langle R,L\rangle\) is not transitive on the set \(D=F\).
Lemma 6.1
We have \({\rm Aut}(M)\leq{\rm Aut}^{+}(\widetilde{M})\).
Proof.
Let \(\varphi\in{\rm Aut}(M)\). Then we have \(R^{\varphi}=(\rho\tau)^{\varphi}=\rho^{\varphi}\tau^{\varphi}=\rho\tau=R\) and \(L^{\varphi}=(\tau\lambda)^{\varphi}=\tau^{\varphi}\lambda^{\varphi}=\tau \lambda=L\). □
Lemma 6.2
We have \({\rm Aut}(M)=\{\varphi\in{\rm Aut}^{+}(\widetilde{M}):\varphi\tau=\tau\varphi\}\).
Proof.
Let \(\varphi\in{\rm Aut}^{+}(\widetilde{M})\). We have \(\varphi R\varphi^{-1}=R\) and \(\varphi L\varphi^{-1}=L\). By plugging in \(R=\rho\tau\) and \(L=\tau\lambda\), we obtain
\begin{align*}\varphi(\rho\tau)\varphi^{-1}=\rho\tau\quad{\rm and}\quad\varphi(\tau\lambda) \varphi^{-1}=\lambda\tau.\end{align*}
From there, by rearranging the left-hand sides of the equations, we get
\begin{align*}(\varphi\rho\varphi^{-1})(\varphi\tau\varphi^{-1})=\varphi(\rho\tau)\varphi^{- 1}=\rho\tau\quad{\rm and}\quad(\varphi\tau\varphi^{-1})(\varphi\lambda\varphi ^{-1})=\varphi(\tau\lambda)\varphi^{-1}=\tau\lambda.\end{align*}
Finally, we obtain
\begin{align*}\varphi\rho\varphi^{-1}=\rho\tau(\varphi\tau\varphi^{-1})\quad{\rm and}\quad \varphi\lambda\varphi^{-1}=(\varphi\tau\varphi^{-1})\tau\lambda.\end{align*}
If \(\varphi\in{\rm Aut}(M)\), then, in particular, it commutes with \(\tau\). On the other hand, if \(\varphi\) commutes with \(\tau\), then the last two equations imply that it also must commute with \(\rho\) and \(\lambda\), i.e., \(\varphi\in{\rm Aut}(M)\). □
The previous lemma suggests an approach for computing the generators of the automorphism group of \(M\).
Lemma 6.3
Let \(M=(F,\lambda,\rho,\tau)\) be a map on a non-orientable surface of genus \(\gamma \gt 2\). Then it is possible to compute the generators of \({\rm Aut}(M)\) in time \(f(\gamma)|F|\). Moreover, the isomorphism problem for maps of genus \(\gamma \gt 2\) can be solved in linear time.
Proof.
First, we construct \(\widetilde{M}\) in time \({\mathcal{O}}(|F|)\). Using the algorithm from Sections 3 and 4, we construct the associated labeled uniform map \(\overline{M}\) and compute the generators of \({\rm Aut}^{+}(\widetilde{M})\).
Suppose that \(\gamma \gt 2\). By Riemann-Hurwitz theorem, we have \(|{\rm Aut}^{+}(\overline{M})|\leq 84(g-1)\), where \(g=\gamma-1\). For each \(\overline{\varphi}\in{\rm Aut}^{+}(\overline{M})\), we construct the unique extension \(\varphi\in{\rm Aut}^{+}(\widetilde{M})\) and check whether \(\varphi\tau\varphi^{-1}=\tau\) in time \({\mathcal{O}}(|F|)\). The previous Lemma 6.2 states that \({\rm Aut}(M)\) consists exactly of those \(\varphi\).
Let \(M_{1}\) and \(M_{2}\) be maps on a surface of genus \(\gamma\). We construct the antipodal double covers \(\widetilde{M}_{i}\), \(i=1,2\), and decide in linear time whether \(\widetilde{M}_{1}\cong\widetilde{M}_{2}\). If the algorithm returns “No”, there is no isomorphism \(M_{1}\to M_{2}\). Otherwise we obtain an isomorphism \(\psi\colon\widetilde{M}_{1}\to\widetilde{M}_{2}\). Let \(\overline{\psi}\colon\overline{M}_{1}\to\overline{M}_{2}\) be the restriction of \(\psi\) to the reduced maps, and \(\overline{\tau}_{i}\), \(i=1,2\), be the restrictions of \(\tau_{i}\) to the reduced maps respectively. Then \(\psi\) is an isomorphism \(M_{1}\to M_{2}\) if and only if \(\overline{\tau}_{2}\overline{\psi}=\overline{\psi}\overline{\tau}_{1}\). This can be checked by brute force. □
To proceed with maps on the projective plane and Klein bottle, we define the action diagram for a permutation group \(G\leq{\rm Sym}(\Omega)\) with a generating set \(S\). To every generator \(g\in S\) we assign a unique color \(c_{g}\). The action diagram \({\mathcal{A}}(G)\) of \(G\) is an edge-colored oriented graph with the vertex set \(\Omega\). There is an oriented edge \(x\to y\) of color \(c_{g}\) if and only \(gx=y\). We first prove the following technical lemma.
Lemma 6.4
Let \(C\leq{\rm Sym}(\Omega)\) be a semiregular cyclic group and let \(\tau\in{\rm Sym}(\Omega)\) be fixed-point-free involution. Then there is an algorithm which finds the subgroup \(L\leq C\) centralizing \(\tau\) in time \({\mathcal{O}}(|\Omega|)\).
Proof.
Let \(C=\langle\varphi\rangle\), where \(|\varphi|=n\). It is sufficient to find the smallest \(m \gt 0\) such that \(\varphi^{m}\) commutes with \(\tau\). Then the group \(A=\langle\tau,\varphi^{m}\rangle\) is abelian of order \(n/m\) or \(2n/m\). Since both \(\varphi\) and \(\tau\) are fixed-point-free permutations, the orbits of \(A\) are either of size \(n/m\), or of size \(2n/m\) and the respective action diagrams are either Möbius ladders, or ladders (prisms).
Step 1. We first determine the largest cyclic subgroup \(K\leq\langle\varphi\rangle\) satisfying the property that the orbits of \(\langle K,\tau\rangle\) have size \(|K|\), or \(2|K|\). If this is the case, then \(\tau\) matches an orbit \(O\) of \(K\) to a unique orbit \(\tau(O)\), where \(\tau(O)=O\) may happen.
The group \(\langle\varphi\rangle\) acts semiregularly on \(\Omega\) and hence there are exactly \(|\Omega|/n\) orbits \(O_{1},\dots,O_{|\Omega|/n}\) of size \(n\). We find the smallest \(m^{\prime} \gt 0\) such that for every \(i=1,\dots,|\Omega|/n\), and every \(x\in O_{i}\), there is \(j\) such that \(\{\tau(x),\tau\varphi^{m^{\prime}}(x)\}\subseteq O_{j}\). Let \(X_{i}:={\mathcal{A}}(\langle\varphi\rangle,O_{i})\), for \(i=1,\dots,|\Omega|/n\). Note that each \(X_{i}\) is an oriented cycle, a Cayley graph of a cyclic group. We further label the vertices of \(X_{i}\) such that \(\ell_{i}(x)=j\) if \(\tau(x)\in O_{j}\).
For each oriented labeled cycle \(X_{i}\), we use the algorithm \({\rm CanForm}(X_{i})\) from Section 4 to compute the integer \(k_{i}\) such that \({\rm Aut}^{+}(X_{i})\cong\mathbb{Z}_{k_{i}}\). We have \({\rm Aut}^{+}(X_{i})=\langle\varphi^{m_{i}}\rangle\), where \(m_{i}:=n/k_{i}\), for \(i=1,\dots,|\Omega|/n\). Each \(\varphi^{m_{i}}\) is label-preserving on \(X_{i}\), i.e., for every \(x\in O_{i}\), \(\ell(x)=\ell\varphi^{m_{i}}(x)\). By the definition of \(\ell\), the points \(\tau(x)\) and \(\tau\varphi^{m_{i}}(x)\) belong to the same orbit of \(\varphi\). Clearly,
\begin{align*}K=\langle\varphi^{m^{\prime}}\rangle=\bigcap_{i=1}^{|D|/n}\langle\varphi^{m_{i }}\rangle.\end{align*}
This implies that \(m^{\prime}=n/k\), where \(k=\gcd(k_{1},\dots,k_{|\Omega|/n})\).
Step 2. We find \(m\) such that \(L=\langle\varphi^{m}\rangle\) commutes with \(\tau\). Clearly, \(L\) is a subgroup of \(K=\langle\alpha\rangle\), where \(\alpha=\varphi^{m^{\prime}}\). Let \(O_{1}^{\prime},\dots,O_{|\Omega|/k}^{\prime}\) be the orbits of \(K\), and we define \(X_{i}^{\prime}:={\mathcal{A}}(\langle\varphi^{m^{\prime}}\rangle,O_{i}^{\prime})\), for \(i=1,\dots,|D|/k\). From the definition of \(m^{\prime}\), it follows that \(\tau(O_{i}^{\prime})=O_{j}^{\prime}\), for some \(j\). In other words, \(\tau\) defines a perfect matching between the points of \(O_{i}^{\prime}\) and \(O_{j}^{\prime}\). We distinguish two cases.
\(\tau(O_{i}^{\prime})=O_{i}^{\prime}\). We identify the points of \(O_{i}\) with \(\mathbb{Z}_{k}=\{0,\dots,k-1\}\). For a point \(x\in O_{i}\), with \(|x-\tau(x)|=k/2\), we define \(\ell(x):=k/2\) and \(\ell\tau(x):=k/2\). For a point \(x\in O_{i}\), with \(|x-\tau(x)| \lt k/2\), we define \(\ell(x):=+|x-\tau(x)|\) and \(\ell\tau(x):=-|x-\tau(x)|\).
\(\tau(O_{i}^{\prime})=O_{j}^{\prime}\), for \(i\neq j\). We identify the points of \(O_{i}^{\prime}\cup O_{j}^{\prime}\) with \(\mathbb{Z}_{k}\cup\mathbb{Z}_{k}=\{0,\dots,k-1\}\cup\{0,\dots,k-1\}\) as follows. First, we identify \(O_{i}^{\prime}\) with \(\mathbb{Z}_{k}\). Then, for \(x\in O_{i}^{\prime}\) identified with \(0\), we identify \(\tau(x)\) with \(0\), and extend uniquely using the action of \((\mathbb{Z}_{k},+)\). Similarly, as in the previous case we define a labeling \(\ell\) of \(O_{i}\) and \(O_{j}\). For a point \(x\in O_{i}\), with \(|x-\tau(x)|=k/2\), we define \(\ell(x):=k/2\) and \(\ell\tau(x):=k/2\). For a point \(x\in O_{i}\), with \(|x-\tau(x)| \lt k/2\), we define \(\ell(x):=+|x-\tau(x)|\) and \(\ell\tau(x):=-|x-\tau(x)|\).
We use the algorithm \({\rm CanForm}(X_{i})\) from Section 4 to compute the integer \(k_{i}^{\prime}\) such that \({\rm Aut}^{+}(X_{i})\cong\mathbb{Z}_{k_{i}^{\prime}}\), for \(i=1,\dots,|\Omega|/k\). Let \(m_{i}^{\prime}:=k/{k_{i}^{\prime}}\). By the definition of \(\ell\), we have, for every \(x\in O_{i}\),
\begin{align*}\ell(x) & =\ell\alpha^{m_{i}^{\prime}}(x), \\\pm|x-\tau(x)| & =\pm|\alpha^{m_{i}^{\prime}}(x)-\tau\alpha^{m_{i}^{\prime}}(x)|.\end{align*}
This exactly means that \(\tau\alpha^{m_{i}^{\prime}}(x)=\alpha^{m_{i}^{\prime}}\tau(x)\). Finally, \(L=\langle\varphi^{m}\rangle\) is the intersection
\begin{align*}\bigcap_{i=1}^{|\Omega|/k}\langle\alpha^{m_{i}^{\prime}}\rangle.\end{align*}
This implies that \(m=k/\gcd(k_{1}^{\prime},\dots,k_{|\Omega|/k}^{\prime})\).
Both Step 1 and Step 2 can be computed in linear time. In Step 1, we have \(|\Omega|/n\) cycles of size \(n\). The time spent \({\rm CanForm}(\overrightarrow{X}_{i})\) on each of the cycles \(X_{i}\), \(i=1,\dots,|\Omega|/n\) is \({\mathcal{O}}(n)\). The greatest common divisor of \(|\Omega|/n\) numbers in the interval \([1,|\Omega|]\) can be computed in time \({\mathcal{O}}(|\Omega|)\). Thus the overall complexity of Step 1 is \({\mathcal{O}}(|\Omega|)\). Exactly the same argument applies for Step 2. □
Lemma 6.5
For a map \(M=(F,\lambda,\rho,\tau)\) on the projective plane, it is possible to compute the generators of \({\rm Aut}(M)\) in time \({\mathcal{O}}(|F|)\). Moreover, the isomorphism problem between two maps on projective plane can be decided in linear time.
Proof.
Note that in this case \(\widetilde{M}\) is a spherical map. If the reduced map \(\overline{M}\) from \(\widetilde{M}\) does not belong to one of the infinite families, then we may use the same approach as in the case when \(\gamma \gt 2\). Otherwise, \(\overline{M}\) is one of the following: bouquet, dipole, cycle, prism, antiprism. We only deal with the cycle, since the other cases are reduced to it. If \(\overline{M}\) is a cycle, then we have that either \({\rm Aut}^{+}(\overline{M})\cong{\rm Aut}^{+}(\widetilde{M})\cong\mathbb{D}_{n}\) or \({\rm Aut}^{+}(\overline{M})\cong{\rm Aut}^{+}(\widetilde{M})\cong\mathbb{Z}_{n}\), for some \(n\).
First, suppose that \({\rm Aut}^{+}(\widetilde{M})\cong\mathbb{Z}_{n}\). Let \(\varphi\) be the generator of \({\rm Aut}^{+}(\widetilde{M})\), i.e., \(\langle\varphi\rangle={\rm Aut}^{+}(\widetilde{M})\) and \(\varphi^{n}={\rm id}\). By Lemma 6.1, \({\rm Aut}(M)\leq{\rm Aut}^{+}(\widetilde{M})\) and therefore, \({\rm Aut}(M)\) is also a cyclic group. By Lemma 6.2, it is sufficient to find the smallest \(m \gt 0\) such that \(\varphi^{m}\) commutes with \(\tau\). By Lemma 6.4, this can be done in time \({\mathcal{O}}(|D|)\).
Suppose that \({\rm Aut}(\widetilde{M})\cong\mathbb{D}_{n}\). It is known that \(\mathbb{D}_{n}\) can be written as the semidirect product4 \(\mathbb{Z}_{n}\rtimes\mathbb{Z}_{2}\), i.e., \(\mathbb{D}_{n}\) has two generators, one of order \(n\) and the other of order \(2\). There are \(\varphi,\psi\in{\rm Aut}^{+}(\widetilde{M})\) such that \(\varphi^{n}={\rm id}\), \(\psi^{2}={\rm id}\), and \(\langle\varphi,\psi\rangle={\rm Aut}^{+}(\widetilde{M})\). By Lemma 6.1, \({\rm Aut}(M)\leq{\rm Aut}^{+}(\widetilde{M})\), i.e., there is \(k\) dividing \(n\) such that \({\rm Aut}(M)\cong\mathbb{D}_{k}\) or \({\rm Aut}(M)\cong\mathbb{Z}_{k}\). To check whether \(\psi\in{\rm Aut}(M)\), by Lemma 6.2, it suffices to check if \(\psi\tau\psi^{-1}=\tau\), which can be done in linear time. To investigate the cyclic subgroup \(\langle\psi\rangle\), we proceed as in the cyclic case above.
Let \(M_{1}\) and \(M_{2}\) be maps on the projective plane. We construct the antipodal double covers \(\widetilde{M}_{i}\), \(i=1,2\), and decide in linear time whether \(\widetilde{M}_{1}\cong\widetilde{M}_{2}\). If the algorithm returns “No”, there is no isomorphism \(M_{1}\to M_{2}\). Otherwise we obtain an isomorphism \(\psi\colon\widetilde{M}_{1}\to\widetilde{M}_{2}\). Then \(\psi\) is an isomorphism \(M_{1}\to M_{2}\) if and only if \(\tau_{2}\psi=\psi\tau_{1}\). Let \(\overline{\psi}\) be the associated isomorphism of the reduced maps, and let \(\overline{\tau}_{i}\) be the restricted antipodal automorphisms of the reduced maps. Then \(\psi\) is an isomorphism \(M_{1}\to M_{2}\) if and only if \(\overline{\tau}_{2}\overline{\psi}=\overline{\psi}\overline{\tau}_{1}\). The latter can be checked by a modified algorithm from the proof of Lemma 6.5. □
Lemma 6.6
Let \(M=(F,\lambda,\rho,\tau)\) be a map on the Klein bottle. Then it is possible to compute the generators of \({\rm Aut}(M)\) in time \({\mathcal{O}}(|F|)\). Moreover, the isomorphism problem for two maps on Klein bottle can be decided in linear time.
Proof.
We form the antipodal double-cover \(\widetilde{M}=(D,R,L)\) of \(M\), which is in this case a toroidal map, and compute the generators of \(G={\rm Aut}^{+}(\widetilde{M})=T\rtimes H\), where \(T=\langle\varphi\rangle\times\langle\psi\rangle\) and \(H\) is complement of \(T\). Moreover, \(H\) is cyclic of order \(|H|\leq 6\). Further, we assume that \(|\varphi|=r\) and \(|\psi|=s\). By Lemma 6.2, we need to determine the centralizer \(C_{G}(\tau)\). For \(C_{H}(\tau)\leq C_{G}(\tau)\) can be determined by brute-force, checking the commutativity with \(\tau\) for every element of \(H\) individually. We show how to find in linear time the generators of \(K=C_{T}(\tau)\). By Lemma 6.4, we find minimal \(m \gt 0\) and \(n \gt 0\) such that \(\varphi^{m}\) and \(\psi^{n}\) commute with \(\tau\).
By definition, every element of \(\langle\varphi^{m},\psi^{n}\rangle=\langle\varphi^{m}\rangle\times\langle\psi^ {n}\rangle\) commutes with \(\tau\). Conversely, let \(\pi=\varphi^{k}\psi^{\ell}\in T\) be such that \(\tau\pi\tau^{-1}=\pi\). By plugging in, we get
\begin{align*}\tau\varphi^{k}\psi^{\ell}\tau^{-1}=\tau\varphi\tau^{-1}\tau\psi^{\ell}\tau^{- 1}=\varphi^{k}\psi^{\ell}.\end{align*}
Since \(T=\langle\varphi\rangle\times\langle\psi\rangle\), the last equality holds only if \(\tau\varphi^{k}\tau^{-1}=\varphi^{k}\) and \(\tau\psi^{\ell}\tau=\psi^{\ell}\). It follows that \(\varphi^{k}\in\langle\varphi^{m}\rangle\) and \(\psi^{\ell}\in\langle\psi^{n}\rangle\), and consequently, \(\pi\in\langle\varphi^{m},\psi^{n}\rangle\).
Let \(M_{1}\) and \(M_{2}\) be maps on Klein bottle. We construct the antipodal double covers \(\widetilde{M}_{i}\), \(i=1,2\), and decide in linear time whether \(\widetilde{M}_{1}\cong\widetilde{M}_{2}\). If the algorithm returns “No”, there is no isomorphism \(M_{1}\to M_{2}\). Otherwise we obtain an isomorphism \(\psi\colon\widetilde{M}_{1}\to\widetilde{M}_{2}\). Then \(\psi\) is an isomorphism \(M_{1}\to M_{2}\) if and only if \(\tau_{2}\psi=\psi\tau_{1}\). Let \(\overline{\psi}\) be the associated isomorphism of the reduced maps, and let \(\overline{\tau}_{i}\) be the restricted antipodal automorphisms of the reduced maps. Then \(\psi\) is an isomorphism \(M_{1}\to M_{2}\) if and only if \(\overline{\tau}_{2}\overline{\psi}=\overline{\psi}\overline{\tau}_{1}\). The latter can be checked by a modified algorithm from the proof of Lemma 6.5. □
The results of this section are summarized by the following.
Theorem 6.7.
If \(M=(F,\lambda,\rho,\tau)\) be a map on a non-orientable surface of genus \(\gamma\), then the generators of \({\rm Aut}(M)\) can be computed in time \({\mathcal{O}}(|F|)\). If \(M_{1}=(F_{1},\lambda_{1},\rho_{1},\tau_{1})\) and \(M_{2}=(F_{2},\lambda_{1},\rho_{2},\tau_{2})\) are on a non-orientable surface of genus \(\gamma\), then the isomorphism of \(M_{1}\) and \(M_{2}\) can be computed in time \({\mathcal{O}}(|F_{1}|+|F_{2}|)\).

7 Complexity of the Algorithm and Summary

In this section, we investigate the complexity of various parts of our algorithm. We focus on the routines which complexity was not analyzed above. We argue that it runs in time linear in the size of the input, i.e., in time \({\mathcal{O}}(|D_{1}|+|D_{2}|)\). We show a representation of the function \(\ell\) such that \(\ell(x)\) and \(\ell(y)\) can be compared in constant time. We also describe an implementation of the function \({{\bf Label}}\) that computes the new label in time proportional to the number of its arguments. At the end, we give a summary of the whole algorithm.
Reductions. The data structure to find next reduction is a list of queues, the number of which is bounded by a function of genus. Every time a vicinity of a vertex is modified, it is pushed to the correct queue. At each step we look at the first non-empty queue.
The only difficulty is with updating the local type for every vertex. If there is a large face \(f\) of size \({\mathcal{O}}(v(M))\) incident to a vertex of small degree, we cannot afford to update the local type of every vertex incident to \(f\), since the degree of \(f\) may decrease just by one. To overcome this obstacle we use another trick.
We define the vertex-face incidence map\(\Gamma(M)\) of \(M\) which is a bipartite quadrangular map associated to \(M\). Its vertices are the vertices and centers of faces of \(M\). For every vertex \(v\in V(M)\) and face-center \(f\in F(M)\) of a face incident to \(v\) there is an edge joining \(v\) to \(f\). Note that \(f\) can be multiply incident to \(v\), for each such incidence there is an edge in \(\Gamma(M)\). The map \(\Gamma(M)\) can be alternatively obtained as the dual of the medial map. Every reduction easily translates to a reduction in \(\Gamma(M)\). We update \(\Gamma(M)\) after every elementary reduction. The important property of \(\Gamma(M)\) is that if \(v\) is a vertex of \(M\), then cyclic vector of degrees of the neighbors of \(v\) in \(\Gamma(M)\) is exactly the local type of \(v\) in \(M\). To update the local type of a vertex after a reduction it suffices to look at its cyclic vector of degrees of its neighbors in \(\Gamma\).
Greatest Common Divisor. At several places in the text, we compute the greatest common divisor of more than two numbers. For positive integers \(a,b\), the complexity of computing \(\gcd(a,b)\) can be bounded by \({\mathcal{O}}(\log(\min(a,b)/\gcd(a,b)))\).
If we have a sequence \(a_{0},\dots,a_{n-1}\) of integers in range \([1,N]\), for some \(N\), then the complexity of computing \(\gcd(a_{0},\dots,a_{n-1})\) can be bounded as follows. Put \(g_{0}:=a_{0}\). Then put \(g_{i}:=\gcd(g_{i-1},a_{i})\), for \(i=1,\dots,n-1\). The complexity of computing \(g_{i}\) is \({\mathcal{O}}(\log(\min(g_{i-1},a_{i})/g_{i}))\). In the worst case, this is \({\mathcal{O}}(\log(g_{i-1}/a_{i}))={\mathcal{O}}(\log(g_{i-1})-\log(g_{i}))\). We have
\begin{align*}\sum_{i=1}^{n-1}\log(g_{i-1})-\log(g_{i-1})=\log(g_{0})-\log(g_{n-1})\leq\log(g_{0})\leq\log(N).\end{align*}
The overall complexity is therefore \({\mathcal{O}}(n+\log(N))\). In our context, \(n\) is the number of darts, i.e. \(n=|D|\), and \(N\) is at most \(n\), so we can compute the \(\gcd\) of \(n\) numbers in linear time.
Labels. In Section 3, we were using the function \(\ell\) as the labeling of a map \(M\) and the injective function \({{\bf Label}}(t,a_{1},\dots,a_{m})\), where \(t\in\mathbb{N}\) denotes the step and every \(a_{i}\) is a label, for constructing new labels.
First, we describe the implementation of labels, i.e., the images of \(\ell\). Every label is implemented as a rooted planted tree with integers assigned to its nodes. A rooted planted tree is a rooted tree embedded in the plane, i.e., by permuting the children of a node we get different trees; see Figure 8. Every planted tree with \(n\) nodes can be uniquely encoded by a 01-string of length \(2n\). Further, we require that the children of every node \(N\) have smaller integers than their nodes. This type of tree is also called a maximum heap. Such a tree can be uniquely encoded by a string (sequence) of integers.
Fig. 8.
Fig. 8. Labels represented as planted trees together with the associated prefix tree.
Now we define \({{\bf Label}}\). The integer \(t\) represents the current step of the algorithm. At the start, we have \(t=0\) and the map \(M\) has constant labeling—every dart is labeled by a one-vertex tree with \(0\) assigned to its only vertex. Performing a reduction increments \(s\) by \(1\). For labels (rooted planted trees) \(a_{1},\dots,a_{m}\), the function \({{\bf Label}}(t,a_{1},\dots,a_{m})\) constructs a new rooted planted tree with \(t\) in the root and the root joined to the roots of \(a_{1},\dots,a_{m}\). Clearly this function is injective and can be implemented in the same running time as the corresponding reduction.
Finally, we relabel homogeneous maps by integers. This is necessary mainly for the case when the reductions terminate at cycles since in this case we need to be able to compare labels in constant time. Suppose that we have two homogeneous maps \(M_{1}\) and \(M_{2}\) with the corresponding sets of labels \({\mathcal{T}}=\{T_{1},\dots,T_{k}\}\) and \({\mathcal{T}}^{\prime}=\{T_{1}^{\prime},\dots,T_{k}^{\prime}\}\). We construct bijections \(\sigma\colon{\mathcal{T}}\to\{1,\dots,k\}\) and \(\sigma^{\prime}\colon{\mathcal{T}}^{\prime}\to\{1,\dots,k\}\) such that after replacing \(T_{i}\) by \(\sigma(T_{i})\) and \(T_{i}^{\prime}\) by \(\sigma^{\prime}(T_{i}^{\prime})\), we get isomorphic maps. To construct \(\sigma\) and \(\sigma^{\prime}\), we replace every tree in \({\mathcal{T}}\) and \({\mathcal{T}}^{\prime}\) by a string of integers. Then we find the lexicographic ordering of \({\mathcal{T}}\) and \({\mathcal{T}}^{\prime}\) by constructing two prefix trees (sometimes in literature called trie); see Figure 8. This lexicographic ordering gives the bijections \(\sigma\) and \(\sigma^{\prime}\). Finally, we need to check if the pre-images of every \(i\) under \(\sigma\) and \(\sigma^{\prime}\) are the same planted trees, otherwise the maps are not isomorphic. This can be easily implemented in linear time.

Footnotes

1
The PhD thesis of Wong also does not bring any new information compared to [20].
2
It is possible to extend the theory to maps on surfaces with boundaries by allowing fixed points of \(\lambda,\rho,\tau\).
3
In [3] Babai uses the term semiregular instead of uniform.
4
A group \(G\) is a semidirect product of \(N\) and \(H\) if \(N,H\leq G\), \(N\cap H=\{1\}\), and \(N\) is a normal subgroup of \(G\). We write \(G=N\rtimes H\).

References

[1]
A. Altshuler. 1973. Construction and enumeration of regular maps on the torus. Discrete Mathematics 4 (1973), 201–217.
[2]
Alberto Apostolico, Dany Breslauer, and Zvi Galil. 1993. Parallel detection of all palindromes in a string. Theoretical Computer Science 141 (1993), 163–173.
[3]
L. Babai. 1991. Vertex-transitive graphs and vertex-transitive maps. Journal of Graph Theory 15, 6 (1991), 587–627.
[4]
L. Babai. 2016. Graph isomorphism in quasipolynomial time. In Proceedings of the 48th Annual ACM Symposium on Theory of Computing. ACM, 684–697.
[5]
N. L. Biggs and A. T. White. 1979. Permutation Groups and Combinatorial Structures, Vol. 33. Cambridge University Press.
[6]
C.Paul Bonnington, M.J. Grannell, T.S. Griggs, and J. Širáň. 2000. Exponential families of non-isomorphic triangulations of complete graphs. Journal of Combinatorial Theory, Series B 78, 2 (2000), 169–184.
[7]
A. Brodnik, A. Malnič, and R. Požar. 2015. Lower bounds on the simultaneous conjugacy problem in the symmetric group. In Proceedings of the 4th Annual Mississippi Discrete Mathematics Workshop.
[8]
Andrej Brodnik, Aleksander Malnič, and Rok Požar. 2021. The simultaneous conjugacy problem in the symmetric group. Mathematics of Computation 90, 332 (2021), 2977–2995, 2021.
[9]
Andrej Brodnik, Aleksander Malnič, and Rok Požar. 2022. A subquadratic algorithm for the simultaneous conjugacy problem. Journal of Graph Theory 100, 4 (2022), 630–637.
[10]
C. J. Colbourn and K. S. Booth. 1981. Linear time automorphism algorithms for trees, interval graphs, and planar graphs. SIAM Journal on Computing 10, 1 (1981), 203–225, 1981.
[11]
J. H. Conway, H. Burgiel, and C. Goodman-Strauss. 2016. The Symmetries of Things. CRC Press.
[12]
H. S. M. Coxeter and W. O. J. Moser. 2013. Generators and Relations for Discrete Groups, Vol. 14. Springer Science & Business Media.
[13]
S. Fisk. 1977. Geometric coloring theory. Advances in Mathematics 24, 3 (1977), 298–340.
[14]
M. Fontet. 1977. Calcul de centralisateur d’un groupe de permutations. Bulletin de la Societe Mathematique de France 49–50 (1977), 53–63.
[15]
J. L. Gross and T. W. Tucker. 2001. Topological Graph Theory. Dover.
[16]
J. L. Gross, J. Yellen, and P. Zhang. 2013. Handbook of Graph Theory. Chapman and Hall/CRC.
[17]
B. Grünbaum and G. C. Shephard. 1987. Tilings and Patterns. Freeman.
[18]
Christoph M Hoffmann. 1982. Subcomplete generalizations of graph isomorphism. Journal of Computer and System Sciences 25, 3 (1982), 332–359.
[19]
J. E. Hopcroft and R. Endre. Tarjan. 1973. A V log V algorithm for isomorphism of triconnected planar graphs. The Journal of Computer and System Sciences 7, 3 (1973), 323–331.
[20]
J. E. Hopcroft and J. K. Wong. 1974. Linear time algorithm for isomorphism on planar graphs. In Proceedings of the 6th Annual ACM Symppsium on Theory of Computing.
[21]
G. A. Jones and D. Singerman. 1978. Theory of maps on orientable surfaces. Proceedings of the London Mathematical Society 3, 2 (1978), 273–307.
[22]
K. Kawarabayashi. 2015. Graph isomorphism for bounded genus graphs in linear time. arXiv:1511.02460. Retreived from https://arxiv.org/abs/1511.02460
[23]
K. Kawarabayashi, P. Klavík, B. Mohar, R. Nedela, and P. Zeman. 2021. Isomorphisms of maps on the sphere. In Polytopes and Discrete Geometry, Vol. 764: Contemporary Mathematics. American Mathematical Society, 125–147.
[24]
K. Kawarabayashi and B. Mohar. 2008. Graph and map isomorphism and all polyhedral embeddings in linear time. In Proceedings of the 40th Annual ACM Symposium on Theory of Computing. ACM, 471–480.
[25]
K. Kawarabayashi, B. Mohar, R. Nedela, and P. Zeman. 2021. Automorphisms and isomorphisms of maps in linear time. In Proceedings of the 48th International Colloquium on Automata, Languages, and Programming (ICALP).
[26]
Glenn Manacher. 1975. A new linear-time “on-line” algorithm for finding the smallest initial palindrome of a string. Journal of the ACM 22, 3 (1975), 346–351.
[27]
B. Mohar and C. Thomassen. 2001. Graphs on Surfaces, Vol. 10. Johns Hopkins University Press.
[28]
R. Nedela and M. Škoviera. 1997. Exponents of orientable maps. Proceedings of the London Mathematical Society 75, 1 (1997), 1–31.
[29]
D. Neuen. 2020. Hypergraph isomorphism for groups with restricted composition factors. In Proceedings of the 47th International Colloquium on Automata, Languages, and Programming (ICALP). Leibniz International Proceedings in Informatics, Vol. 168, 88:1–88:19.
[30]
I. N. Ponomarenko. 1991. The isomorphism problem for classes of graphs closed under contraction. Journal of Soviet Mathematics 55, 2 (1991), 1621–1643.
[31]
U. Schöning. 1988. Graph isomorphism is in the low hierarchy. Journal of Computer and System Sciences 37, 3 (1988), 312–323.
[32]
Ondrej Šuch. 2011. Vertex-transitive maps on a torus. Acta Mathematica Universitatis Comenianae 80, 1 (2011), 1–30.
[33]
C. Thomassen. 1991. Tilings of the torus and the Klein bottle and vertex-transitive graphs on a fixed surface. Transactions of the American Mathematical Society 323, 2 (1991), 605–635.
[34]
L. Weinberg. 1966. A simple and efficient algorithm for determining isomorphism of planar triply connected graphs. IEEE Transactions on Circuit Theory 13, 2 (1966), 142–148.
[35]
H. Whitney. 1933. 2-isomorphic graphs. American Journal of Mathematics 55, 1 (1933), 245–254.

Index Terms

  1. Automorphisms and Isomorphisms of Maps in Linear Time

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Transactions on Algorithms
    ACM Transactions on Algorithms  Volume 21, Issue 1
    January 2025
    389 pages
    EISSN:1549-6333
    DOI:10.1145/3702035
    • Editor:
    • Edith Cohen
    Issue’s Table of Contents

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 22 November 2024
    Online AM: 07 August 2024
    Accepted: 05 July 2024
    Revised: 23 May 2024
    Received: 04 May 2022
    Published in TALG Volume 21, Issue 1

    Check for updates

    Author Tags

    1. maps on surfaces
    2. automorphism
    3. isomorphism
    4. linear-time algorithm

    Qualifiers

    • Research-article

    Funding Sources

    • JSPS Kakenhi
    • JSPS Kakenhi
    • JST ASPIRE
    • NSERC Discovery
    • Slovak Research and Development Agency
    • GAČR
    • Carlsberg Foundation Young Researcher Fellowship

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 172
      Total Downloads
    • Downloads (Last 12 months)172
    • Downloads (Last 6 weeks)75
    Reflects downloads up to 05 Mar 2025

    Other Metrics

    Citations

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Login options

    Full Access

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media