Algorithmic Aspects of Regular Graph Covers^{†}^{†}thanks: This paper continues the research started in ICALP 2014 [25] and extends its results. For a structural diagram visualizing our results, see http://pavel.klavik.cz/orgpad/regular_covers.html (supported for Firefox and Google Chrome). This work was initiated during workshops Algebraic, Topological and Complexity Aspects of Graph Covers (ATCACG). The authors are supported by CEITI (P202/12/G061 of GAČR). The first author is also supported by the project Kontakt LH12095, the second and the third authors by Charles University as GAUK 196213, the fourth author by the Ministry of Education of the Slovak Republic, the grant VEGA 1/0150/14, by Project LO1506 of the Czech Ministry of Education and by the project APVV150220.
Abstract
A graph covers a graph if there exists a locally bijective homomorphism from to . We deal with regular covers where this homomorphism is prescribed by the action of a semiregular subgroup of . We study computational aspects of regular covers that have not been addressed before. The decision problem RegularCover asks for given graphs and whether regularly covers . When , this problem becomes Cayley graph recognition for which the complexity is still unresolved. Another special case arises for when it becomes the graph isomorphism problem.
Our main result is an involved FPT algorithm solving RegularCover for planar inputs in time where denotes the number of edges of . The algorithm is based on dynamic programming and employs theoretical results proved in a related structural paper. Further, when is 3connected, is 2connected or the ratio is an odd integer, we can solve the problem RegularCover in polynomial time. In comparison, Bílka et al. (2011) proved that testing general graph covers is NPcomplete for planar inputs when is a small fixed graph such as or .
egular graph covers, planar graphs, FPT algorithm, computational complexity, graph isomorphism problem, Cayley graph recognition
1 Introduction
The notion of covering originates in topology as a notion of local similarity of two topological spaces. For instance, consider the unit circle and the real line. Globally, these two spaces are not the same, they have different properties, different fundamental groups, etc. But when we restrict ourselves to a small part of the circle, it looks the same as a small part of the real line; more precisely the two spaces are locally homeomorphic, and thus they share the local properties. The notion of covering formalizes this property of two spaces being locally the same.
Suppose that we have two topological spaces: a big one and a small one . We say that covers if there exists an epimorphism called a covering projection which locally preserves the structure of . For instance, the mapping from the real line to the unit circle is a covering projection. The existence of a covering projection ensures that looks locally the same as ; see Fig. 1a.
In this paper, we study coverings of graphs in a more restricting version called regular covering, for which the covering projection is described by an action of a group; see Section 2 for the formal definition. If regularly covers , then we say that is a (regular) quotient of .
Negami’s Theorem [52], stating that all regular quotients of planar graphs can be embedded into the projective plane, is one of the oldest results in topological graph theory. Therefore, we have decided to initiate the study of computational complexity of regular graph covers with planar graphs.
1.1 Applications of Graph Coverings
Suppose that covers and we have some information about one of the objects. How much knowledge does translate to the other object? It turns out that quite a lot, and this makes covering a powerful technique with many diverse applications. The big advantage of regular coverings is that they can be efficiently described and many properties easily translate between the objects. We sketch some applications now.
Powerful Constructions. The reverse of covering called lifting can be applied to small objects in order to construct large objects of desired properties. For instance, the wellknown Cayley graphs are large objects which can be described easily by a few elements of a group. Let be a Cayley graph generated by elements of a group . The vertices of correspond to the elements of and the edges are described by actions of on by left multiplication; each defines a permutation on and we put edges along the cycles of this permutation. See Fig. 1b for an example. Cayley graphs were originally invented to study the structure of groups [16].
In the language of coverings, every Cayley graph can be described as a lift of a one vertex graph with loops and halfedges attached labeled . Regular covers can be viewed as a generalization of Cayley graphs where the small graph can contain more than one vertex. For example, the famous Petersen graph can be constructed as a lift of a twovertex graph in Fig. 2a. These two vertices are necessary as it is known that Petersen graph is not a Cayley graph. Figure 2b shows a simple construction [50, 58] of the HoffmanSingleton graph [35] which is a 7regular graph with 50 vertices.
The Petersen and the HoffmanSingleton graphs are extremal graphs for the degreediameter problem: given integers and , find a maximal graph with diameter and degree . In general, the size of is not known. Many currently best constructions were obtained using the covering techniques [51].
Further applications employ the fact that nowherezero flows, vertex and edge colorings, eigenvalues and other graph invariants lift along a covering projection. Two main applications of constructions of lifts are the solution of the Heawood map coloring problem [53, 31] and constructions of arbitrarily large highly symmetrical graphs [10].
Models of Local Computation. These and similar constructions have many practical applications in designing highly efficient computer networks [20, 2, 9, 13, 14, 15, 32, 60], since these networks can be efficiently described/constructed and have many strong properties. In particular, networks based on covers of simple graphs allow fast parallelization of computation as described e.g. in [12, 3, 4].
Simplifying Objects. Regular coverings can be also applied in the opposite way, to project big objects onto smaller ones while preserving some properties. One way is to represent a class of objects satisfying some properties as quotients of the universal object of this property. For instance, this was used in the study of arctransitive cubic graphs [30], and the key point is that universal objects are much easier to work with. This idea is commonly used in fields such as the theory of Riemann surfaces [22] and theoretical physics [40].
1.2 Regular Covering Testing
Despite all described applications, the computational complexity of regular covering was not yet studied. In this paper, we initiate the study of the following computational problem.
Problem: RegularCover Input: Connected graphs and . Output: Does regularly cover ?
For a fixed graph , the computational complexity of RegularCover was first asked as an open problem by Abello et al. [1]: “Are there graphs for which the problem of determining if an input graph is a regular cover of is NPhard?” Currently, no NPhardness reduction is known for RegularCover, even when is a part of the input. Our main result shows that if is planar, no such graph exists. We use the complexity notation which omits polynomial factors. We establish the following FPT algorithm:
For planar graphs , the RegularCover problem can be solved in time , where is the number of edges of .
1.3 Related Computational Problems
We discuss other computational problems related to RegularCover. The notion of regular covers builds a bridge between two seemingly different problems: Cayley graph recognition and the graph isomorphism problem.
Covering Testing. The complexity of general covering was widely studied before, pioneered by Bodlaender [12] in the context of networks of processors in parallel computing. Abello et al. [1] introduced the Cover problem which asks for an input graph whether it covers a fixed graph . Unless is very simple, the problem turned out to be mostly NPcomplete, the general complexity is still unresolved but the papers [45, 24] show that it is NPcomplete for every regular graph where . For a survey of the complexity results, see [27].
We try to understand how much the additional algebraic structure of regular covering changes the computational complexity. For planar inputs , the change is significant: the problem Cover remains NPcomplete for several small fixed graphs (such as , ) [11], while RegularCover can be solved in polynomial time for every fixed graph by Theorem 1.2.
Cayley Graphs Testing. If the graph consists of a single vertex with attached loops and halfedges, it corresponds to Cayley graph recognition whose computational complexity is widely open. No hardness results are known and a polynomialtime algorithm is known only for recognition of circulant graphs [21]. In contrast, if consists of a vertex with three halfedges attached, then covers if and only if is a cubic 3edgecolorable graph, so Cover is NPcomplete [36].
The reader may notice that Theorem 1.2 gives a polynomial time algorithm to recognize planar Cayley graphs. The input is a regular planar graph , for . We test RegularCover for all graphs which a single vertex of degree . Unfortunately, finite planar Cayley graphs are very limited: either is a cycle, or is 3connected. Therefore, is a spherical group which is very simple. Therefore, is either finite (with ), representing one of the sporadic groups (for instance, a truncated dodecahedron is a Cayley graph of ), or very simple (a cycle, a prism, an antiprism, e.g.).
Graph Isomorphism Problem. The other extreme is when both graphs and have the same size, for which RegularCover is the famous graph isomorphism problem (GraphIso). Graph isomorphism belongs to NP, it is unlikely NPcomplete, however no polynomialtime algorithm is known and Babai [8] recently proved that it can be solved in quasipolynomial time. Also, polynomialtime algorithms for GraphIso are known for many graph classes and parameters; see [41] for an overview. Since RegularCover generalizes GraphIso, we cannot hope to solve it in polynomial time (unless solving GraphIso as well). It is natural to ask which results and techniques for GraphIso translate to RegularCover. Our results show that some technique for planar graphs translate, but the RegularCover problem is significantly more involved.
Theoretical motivation for studying the graph isomorphism problem is very similar to RegularCover. For practical instances, one can solve GraphIso very efficiently using various heuristics. But polynomialtime algorithm working for all graphs is not known and it is very desirable to understand the complexity of GraphIso. It is known that testing graph isomorphism is equivalent to testing isomorphism of general mathematical structures [33]. The notion of isomorphism is widely used in mathematics when one wants to show that two seemingly different structures are the same. One proceeds by guessing a mapping and proving that this mapping is an isomorphism. The natural complexity question is whether there is a better algorithmic way to derive an isomorphism. Similarly, regular covering is a wellknown mathematical notion which is algorithmically interesting and not understood.
Computing Automorphism Groups. A regular covering is described by a semiregular subgroup of the automorphism group . We denote the computational problem of finding generators of by AutGroup. Since a good understanding of is needed to solve RegularCover, it is closely related to AutGroup.
It is known that GraphIso can be reduced to AutGroup (which forms the foundation of group theory techniques used to attack the graph isomorphism problem, e.g., [48, 8]), moreover AutGroup can be solved by instances of GraphIso [49]. Surprisingly not much is known about automorphism groups of restricted classes of graphs. Jordan [39] gave an inductive characterization of automorphism groups of trees as the class of groups closed under direct product and wreath product with symmetric groups. Babai [5, 7] described automorphism groups of planar graphs. Recently, Jordanlike characterizations of automorphism groups of interval, circle and permutation graphs are given in [43, 44]. The AutGroup problem can be solved in linear time for trees and interval graphs [18], in linear time for permutation graphs [44], and in polynomial time for circle graphs [44].
Our description of semiregular actions on planar graphs in [26] was generalized in [42] to describe a Jordanlike characterization of automorphism groups of planar graphs, which is much more detailed than Babai’s description in [5]. It also implies a quadratictime algorithm for AutGroup of planar graphs (which likely can be improved to linear time), faster than the best previous trivial algorithm by combining [38, 49].
List Restricted Isomorphism Problem. Let and be graphs and the vertices of be equipped by lists: for each , we have . An isomorphism is called listcompatible if for every , we have . The existence of a listcompatible isomorphism is denoted by .
Problem: ListIso Input: Graph and , and for each a list . Output: Does ?
This problem was first introduced by Lubiw [47] and proved to be NPcomplete, even in the following restricted setting.
[Lubiw [47]] Testing existence of a fixedpoint free involutory automorphism is NPcomplete.
But only the above result of [47] is cited while the ListIso problem was forgotten. We have rediscovered ListIso since it was solved in a subroutine in our algorithm of Theorem 1.2 for 3connected planar and projectively planar graphs, for which it can be solved in polynomial time using [46]; see [25]. Our paper gives a nice motivation for ListIso, leading Klavík et al. [41] to study it for many restricted graph classes and parameters. In particular, ListIso can be solved in polynomial time for graphs of bounded genus and bounded treewidth [41].
We also consider special instances called ColorIso in which both graphs and are colored and we ask for existence of a colorpreserving isomorphism, denoted . Unlike ListIso, the ColorIso problem is a well known problem which is polynomialtime equivalent to GraphIso.
Homomorphisms and CSP. Since regular covering is a locally bijective homomorphism, we give an overview of complexity results concerning homomorphisms. Hell and Nešetřil [34] studied the problem Hom which asks whether there exists a homomorphism between an input graph and a fixed graph . Their celebrated dichotomy result for simple graphs states that the problem Hom is polynomially solvable if is bipartite, and it is NPcomplete otherwise. Homomorphisms can be described in the language of constraint satisfaction (CSP), and the famous dichotomy conjecture [23] claims that every CSP is either polynomially solvable, or NPcomplete.
1.4 Other Covering Problems
We introduce and discuss several other problems related to (regular) graph covering.
Lifting and Quotients. In the RegularCover problem, the input gives two graphs and . For the following problems, the input specifies only one graph and we ask for existence of the other graph:
Problem: RegularLifting Input: A connected graph and an integer . Output: Does there exists a graph regularly covering such that ?
Problem: RegularQuotient Input: A connected graph and an integer . Output: Does there exists a graph regularly covered by such that ?
Concerning RegularLifting, the answer is always positive. The theory of covering describes a technique called voltage assignment which can be applied to generate all folds . We do not deal with lifting in this paper, but there are nevertheless many interesting computational questions with applications. For instance, is it possible to generate efficiently all (regular) lifts up to isomorphism? (This is nontrivial since different voltage assignments might lead to isomorphic graphs.) Or, does there exists a lift with some additional properties?
Concerning RegularQuotient, by Theorem 1.3, this problem is NPcomplete even for the fixed . (We ask for existence of a halfquotient of which is equivalent to existence of a fixedpoint free involution in .) This hardness reduction can be easily generalized for every fixed even , but the complexity remains open for odd values of .
The reduction of Theorem 1.3 is from 3satisfiability, each variable is represented by a variable gadget which is an even cycle attached to the rest of the graph. Each cycle has two possible regular quotients, either the cycle of half length (obtained by the rotation), or the path of half length with attached halfedges (obtained by a reflection through opposite edges), corresponding to true and false values, respectively. These variable gadgets are attached to clause gadgets, and a quotient of a clause gadget can be constructed if and only if at least one literal of the clause is satisfied. This reduction does not imply NPcompleteness for the RegularCover problem since the input also gives a graph , so one can decode the assignment of the variables from it.
Fold Covering. To simplify the RegularCover problem, instead of fixing , we can fix the ratio . (When covers , then is an integer.) We get the following two problems for general and regular graph covers, respectively:
Problem: Fold(Regular)Cover Input: Connected graphs and such that . Output: Does (regularly) cover ?
For , both problems are equivalent to GraphIso. Bodlaender [12] proved that the FoldCover problem is GIhard for every fixed (meaning that GraphIso can be reduced to it). The same reduction also works for FoldRegularCover, see Lemma 2.3. Chaplick et al. [17] proved NPcompleteness of FoldCover and their reduction can be easily modified for all . The complexities of FoldCover and FoldRegularCover for all are open and very interesting. We note that for , every covering is a regular covering, so the problems FoldRegularCover and FoldCover are identical, and NPhardness of FoldCover would imply NPhardness for RegularCover as well. On the other hand, if FoldRegularCover is not NPcomplete for any value , the FoldRegularCover problems would be natural generalizations of GraphIso.
1.5 Three Properties
Let be a class of connected multigraphs. By we denote the class of all regular quotients of graphs of (note that ). For instance, when is the class of planar graphs, then the class is, by Negami Theorem [52], the class of projective planar graphs. We define the following three properties of , for formal definitions see Section 2:

The classes and are closed under taking subgraphs and under replacing connected components attached to 2cuts by edges.

For a 3connected graph , all semiregular subgroups of can be computed in polynomial time. Here by semiregularity, we mean that the action of has no nontrivial stabilizers of the vertices.

Let and be 3connected graphs of , possibly with colored and directed edges, and the vertices of be equipped with lists. We can decide ListIso of and in polynomial time. (Where the listcompatible isomorphism respects orientations and colors of edges.)
As we prove in Lemma 6, these three properties are tailored for the class of planar graphs. (The proof of the property (P3) is nontrivial, following from [41].) The main reason to state (P1) to (P3) is explicitely to make clear which properties of planar graphs are necessary for our algorithm.
Since ListIso is NPcomplete in general, we also use the restricted version with only ColorIso to highlight places where ListIso can be avoided:

Let and be 3connected graphs of , possibly with colored and directed edges, and the vertices of and are colored. We can decide ColorIso of and in polynomial time.
1.6 The Metaalgorithm
This paper studies complexity of regular covering testing, based on our structural results described in [26]. We establish the following algorithmic result:
Let be a class of graphs satisfying (P1) to (P3). There exists an FPT algorithm for RegularCover for inputs in time , where is the number of edges of .
Since the assumptions (P1) to (P3) are satisfied for planar graphs (Lemma 6), we get Theorem 1.2. Notice that if the input graph is 3connected, using our assumptions the RegularCover problem can be trivially solved, by enumerating all its regular quotients and testing graph isomorphism with . Babai [5] proved that to solve graph isomorphism, it is sufficient to solve graph isomorphism for 3connected graphs. We wanted to generalize this result to regular covers, but handling 2cuts is very complicated and we need the assumptions (P2) and (P3).
We process the graph by a series of reductions, replacing parts of the graph by edges, essentially forgetting details of the graph. We endup with a primitive graph which is either 3connected, or very simple (a cycle or ). This very natural idea of reductions was first introduced in a seminal paper of Trakhtenbrot [56] and further extended in [57, 37, 19, 59, 5]. The main difference is that these papers apply the reduction only to 2connected graphs, but in [26], we also reduce parts separated by 1cuts. The reason is that a regular quotient of a 2connected graph might be only 1connected, see Sections 3.1 and 4.1. Also, we prove in [26] that no essential information of semiregular actions is lost during reductions.
In [26], we describe how regular covering behaves with respect to vertex 1cuts and 2cuts. Concerning 1cuts, regular covering behaves nontrivially only on the central block of , so they are easy to deal with. But regular covering can behave highly complex on 2cuts. In this paper, we build an algorithm based on these structural results of [26]. When the reductions reach a 3connected graph, the natural next step is to compute all its quotients; there are polynomially many of them according to (P2).
What remains is the most difficult part: To test for each quotient whether it corresponds to after unrolling the reductions which is called expanding. The issue is that there may be exponentially many different ways to expand the graph, all described in [26]. Therefore, we have to test in a clever way whether it is possible to reach . Our algorithm consists of several subroutines, most of which we can perform in polynomial time. Only one subroutine (finding a certain “generalized matching”) we have not been able to solve in polynomial time.
This slow subroutine can be avoided in some cases:
If is a 3connected graph, if is a 2connected graph, or if is odd, then the metaalgorithm of Theorem 1.6 can be modified to run in polynomial time.
Let be a class of graphs satisfying (P1), (P2), and (P). There exists an algorithm listing for inputs all their regular quotients, with a polynomialtime delay.
Theorem 1.3 implies that to solve the RegularCover problem in general, one has to work with both graphs and from the beginning. Our algorithm starts only with and tries to match its quotients to only in the end.
Outline. In Section 2, we introduce the formal notation used in this paper. In Section 3, we state key structural properties of atoms, reductions and expansions from [26]. In Section 4, we use them to design the metaalgorithm of Theorem 1.6. In Section 5, we describe more details concerning the only slow subroutine of the metaalgorithm. Finally, in Section 6 we show that the class of planar graphs satisfies (P1) to (P3), thus proving Theorem 1.2. In Conclusions, we describe open problems and possible extensions of our results.
2 Definitions and Preliminaries
In this paper, we work with an extended model of graph which is formally described in [26]. A multigraph is a pair where is a set of vertices and is a multiset of edges. We denote by and by . The graph can possibly contain parallel edges and loops, and each loop at is incident twice with the vertex . Each edge gives rise to two halfedges, one attached to and the other to . We denote by the collection of all halfedges. We denote by and clearly . As quotients, we sometime obtain graphs containing (standalone) halfedges (missing the opposite halfedges).^{1}^{1}1Halfedges are sometimes also called darts or arcs while halfedges with freeends are called semiedges. Also, in the reductions, we obtain pendant edges, each consisting of two halfedges, one attached to some vertex , the other attached to no vertex.
Unless the graph is , we remove all vertices of degree 1 while keeping both halfedges. Assuming that the original graph contains no pendant edges, this removal does not change the automorphism group and existence of regular covering projections from to (when the removal is applied on both and ). A pendant edge attached to is called a single pendant edge if it is the only pendant edge attached to . Most graphs in this paper are assumed to be connected.
We consider graphs with colored edges and also with three different edge types (directed edges, undirected edges and a special type called halvable edges). It might seem strange to consider such general objects. But when we apply reductions, we replace parts of the graph by edges and the colors encode isomorphism classes of replaced parts. This allows the algorithm to work with smaller reduced graphs while preserving important parts of the structure of the original large graph. So even if the input graphs and are simple, more complicated multigraphs are naturally constructed.
We denote groups by capital Greek letters as for instance . We use , , and to denote symmetric groups, cyclic groups, dihedral groups and alternating groups, respectively.
2.1 Automorphisms and Groups
We state the definitions in a very general setting of multigraphs and halfedges. An automorphism is fully described by a permutation preserving edges and incidences between halfedges and vertices. Thus, induces two permutations and connected together by the very natural property for every . In most of situations, we omit subscripts and simply use or . In addition, we require that an automorphism preserves colors, edge types and orientation of directed edges.
Automorphism Groups. Let be the group of all automorphisms of . The orbit of a vertex in the action of is the set of all vertices , and the orbit of an edge is defined similarly as . The stabilizer of is the subgroup of all automorphisms which fix . An action is called semiregular if it has no nontrivial (i.e., nonidentity) stabilizers of both vertices and halfedges. Further, we require the stabilizer of an edge in a semiregular action to be trivial, unless it is a halvable edge, when it may contain an involution transposing the two halfedges. We say that a group is semiregular if the associated action is semiregular. More information on permutation groups can be found in [54].
2.2 Coverings
A graph covers a graph (or is a cover of ) if there exists a locally bijective homomorphism called a covering projection. A homomorphism from to is given by a mapping preserving edges and incidences between halfedges and vertices. It induces two mappings and such that for every . The property to be local bijective states that for every vertex the mapping restricted to the halfedges incident with is a bijection. Figure 3 contains two examples of graph covers. We mostly omit subscripts and just write or .
A fiber over a vertex is the set , i.e., the set of all vertices that are mapped to , and similarly for fibers over halfedges. From the standard assumption that both and are connected, it follows that all fibers of are of the same size. In other words, for some , which is the size of each fiber, and we say that is a fold cover of .
Regular Coverings. We are going to consider coverings which are highly symmetrical, called regular coverings. For example, in Fig. 3, the covering is more symmetric than . Let be a semiregular subgroup of . It defines a graph called a (regular) quotient of as follows: The vertices of are the orbits of the action of on , the halfedges of are the orbits of on . A vertexorbit is incident with a halfedgeorbit if and only if the vertices of are incident with the halfedges of . (Because the action of is semiregular, each vertex of is incident with exactly one halfedge of , so this is well defined.)
We naturally construct by mapping the vertices to its vertexorbits and halfedges to its halfedgeorbits, and it is a fold regular covering. Concerning an edge , it is mapped to an edge of if the two halfedges belong to different halfedgeorbits of . If both halfedges belong to the same halfedgeorbits, it corresponds to a standalone halfedge of .
2.3 Complexity of Regular Graph Coverings
We establish fundamental complexity properties of regular covering. Our goal is to highlight similarities with the graph isomorphism problem.
Belonging to NP. The Cover problem clearly belongs to NP since one can just test in polynomial time whether a given mapping is a locally bijective homomorphism. Not so obviously, the same holds for RegularCover:
The RegularCover problem belongs to NP.
By definition, regularly covers if and only if there exists a semiregular subgroup of such that . As a certificate, we give permutations, one for each element of , and an isomorphism between and . We check that these permutations define a group acting semiregularly on . The given isomorphism allows to check that the constructed is isomorphic to . Clearly, this certificate is polynomially large and can be verified in polynomial time.
One can prove even a stronger result:
For a mapping , we can test whether it is a regular covering projection in polynomial time.
Testing whether is a covering projection can clearly be done in polynomial time. It remains to test regularity. Choose an arbitrary spanning tree of . Since is a covering, then is a disjoint union of isomorphic copies of . We number the vertices of the fibers according to the spanning trees, i.e., such that . This induces a numbering of the halfedges of each fiber over a halfedge of , following the incidences between halfedges and vertices. For every halfedge , we define the permutation of taking to if there is a halfedge incident with a vertex of and paired with a halfedge incident with a vertex of .
Let be the group generated by all , where . We assume that is connected. By OrbitStabilizer Theorem, we have , and from the connectivity, it follows that . Therefore, the action of is regular if and only if which can be checked in polynomial time.
The constructed permutations associated with are known in the literature [31] as permutation voltage assigments associated with .
GIhardness. When , the problem RegularCover exactly corresponds to GraphIso. Let GI be the class of decision problems polynomialtime reducible to GraphIso. Bodlaender [12] proved the following for general covers (and his reduction works for regular covers as well):
For every fixed , the FoldCover and FoldRegularCover problems are GIhard.
For input graphs and of the graph isomorphism problem, we construct the graphs and depicted in Fig. 5. The reduction works since the universal vertices in must be mapped to the universal vertex in (since covering projection preserves degrees). Therefore, (regularly) covers if and only if .
3 Atoms, Reduction and Expansion
In this section, we state definitions and structural results from [26], describing behaviour of regular graph covers with respect to 1cuts and 2cuts in . We also prove new results concerning computational complexity of these techniques. In Section 3.1, we introduce blocktrees and describe behaviour of regular covering with respect to cuts. In Section 3.2, we introduce atoms which are inclusionminimal parts of with respect to cuts and cuts. In Section 3.3, we describe the reduction which replaces atoms by colored edges, preserving the essential structure of . In Section 3.4, we consider quotients of reduced graphs and revert the reductions in them by expansions.
3.1 Blocktrees and Central Blocks
The blocktree of is defined as follows. Consider all articulations in and all maximal connected subgraphs which we call blocks (with bridgeedges and pendant edges also counted as blocks). The blocktree is the incidence graph between the articulations and the blocks. For an example, see Fig. 6.
The Central Block. Recall that for a tree, its center is either the central vertex or the central pair of vertices of a longest path, depending on the parity of its length. Every automorphism of a tree preserves its center.
[[26], Lemma 2.1] If has a nontrivial semiregular automorphism, then has a central block.
In the following, we shall assume that contains a central block . We orient the edges of the blocktree towards the central block; so the blocktree becomes rooted. A (rooted) subtree of the blocktree is defined by any vertex different from the central block acting as root and by all its descendants. Let be an articulation contained in . By we denote the subtree of defined by and all its predecessors, and let be the graph induced by all vertices of the blocks of . All semiregular subgroups of act nontrivially and faithfully only on :
[[26], Lemma 2.2] Let be a semiregular subgroup of . If and are two articulations of the central block and of the same orbit of , then . Moreover there is a unique which maps to .
In the language of quotients, it means that consists of together with the graphs attached to , one for each orbit of .
Why Not Just 2connected Graphs? Since the behaviour of regular covering with respect to 1cuts in is very simple, a natural question follows: why do we not restrict ourselves to 2connected graphs ? For instance when solving graph isomorphism, it is sufficient to solve graph isomorphism of 2connected graphs and use it to find isomorphism of blocktrees.
This is not possible for regular covering testing. The issue is that the quotient might not be 2connected, so it may consists of many blocks and it is not easy to locate it in . When contains a subtree of blocks isomorphic to , it may correspond to , or it may correspond to a quotient of a subgraph of , together with some other attached. We use dynamic programming to deal with this in the metaalgorithm, see Section 4.1. Therefore, we have to define 3connected reduction for 1cuts in as well, unlike in [56, 37, 19, 59, 5].
3.2 Atoms
Suppose that is a block of , in particular is 2connected. Two vertices and form a 2cut if is disconnected. We say that a 2cut is nontrivial if and in .
Atoms are inclusionminimal subgraphs with respect to 1cuts and 2cuts in . We first define a set of subgraphs of called parts which are candidates for atoms:

A block part is a subgraph nonisomorphic to a pendant edge induced by the blocks of a subtree of the blocktree.

A proper part is a subgraph of defined by a nontrivial 2cut of a block . The subgraph consists of a connected component of together with and and all edges between and . In addition, we require that does not contain the central block; so it only contains some blocks of the subtree of the blocktree rooted at .

A dipole part is any dipole defined as follows. Let and be two distinct vertices of degree at least three joined by at least two parallel edges. Then the subgraph induced by and is called a dipole.
The inclusionminimal elements of are called atoms. We distinguish block atoms, proper atoms and dipoles according to the type of the defining part. Block atoms are either stars of pendant edges called star block atoms, or pendant blocks possibly with single pendant edges attached to them called nonstar block atoms. Each proper atom is a subgraph of a block, together with some single pendant edges attached to it. A dipole part is by definition always inclusionminimal, and therefore it is an atom. For an example, see Fig. 7.
We use the topological notation to denote the boundary and the interior of an atom . If is a dipole, we set . If is a proper or block atom, we put equal to the set of vertices of which are incident with an edge not contained in . For the interior, we use the standard topological definition where we only remove the vertices , the edges adjacent to are kept in . Single pendant edges of are always attached to .
Note that for a block atom , and for a proper atom or dipole . The interior of a dipole is a set of free edges. For a proper atom , the vertices of are exactly the vertices of the nontrivial 2cut used in the definition of proper parts, and they are never adjacent in .
[[26], Lemma 3.3] Let and be two different atoms. Then .
[[26], Lemma 3.8] Let be an atom and let .

The image is an atom isomorphic to . Moreover and , where denotes the interior of .

If , then .

If , then .
Primitive Graphs. A graph is called primitive if it contains no atoms. The following lemma characterizing primitive graphs can be alternatively obtained from the wellknown theorem by Trakhtenbrot [56], see Fig. 8 for examples.^{2}^{2}2We consider with an attached single pendant edge as a graph with a central articulation.
[[26], Lemma 3.4] Let be a primitive graph. If has a central block, then it is a 3connected graph, a cycle for , or , or can be obtained from the aforementioned graphs by attaching single pendant edges to at least two vertices. If has a central articulation, then it is , possible with a single pendant edge attached.
If primitive graphs and belong to satisfying (P3), then we can test in polynomial time.
In both graphs, we replace single pendant edges with colored vertices. If and are , or , the problem is trivial. If they are cycles, we use the standard cycle isomorphism algorithms. If they are 3connected, we test using (P3).
Structure of Atoms. We call a graph essentially 3connected if it is a 3connected graph with possibly single pendant edges attached to it. Similarly, a graph is called essentially a cycle if it is a cycle with possibly single pendant edges attached to it. The structure of dipoles and star block atoms is clear. Nonstar block and proper atoms are either almost 3connected, or very simple:
[[26], Lemma 3.5] Every nonstar block atom is either with an attached single pendant edge, essentially a cycle, or essentially 3connected.
Let be a proper atom with . We define the extended proper atom as with the additional edge . Notice that the property (P1) ensures that belongs to the class .
[[26], Lemma 3.6] For every proper atoms , the extended proper atom is either essentially a cycle, or essentially 3connected.
Two atoms and are isomorphic if there exists an isomorphism which maps to .
For every atoms and of a graph belonging to satisfying (P1) and (P3), we can test in polynomial time.
If both and are dipoles and star block atoms, we can test trivially in polynomial time. If they are nonstar block atoms, by Lemma 3.2 they are either with attached single pendant edge, or essentially a cycle, or essentially 3connected. The first two possibilities can be solved trivially, so we assume that and are essentially 3connected. Let and be the 3connected graph created from and by removing pendant edges, where existence of pendant edges is coded by colors of and , and we further color and by a special color. We have if and only if there exists a colorpreserving isomorphism between and which can be tested using (P3). When and are proper atoms, we proceed similarly on extended proper atoms, using Lemma 3.2.
Symmetry Types of Atoms. We distinguish three symmetry types of atoms, and in reductions, we replace atoms by edges carrying their types. Therefore we work with multigraphs with three edge types: halvable edges, undirected edges and directed edges. We consider only the automorphisms which preserve these edge types and of course the orientation of directed edges. For an atom , we denote by the setwise stabilizer of .
Let be a proper atom or dipole with . We distinguish the following three symmetry types, depicted in Fig. 9:

The halvable atom. There exists a semiregular involutory automorphism which exchanges and . More precisely, the automorphism fixes no vertices and no directed and undirected edges, but some halvable edges may be fixed.

The symmetric atom. The atom is not halvable, but there exists an automorphism in which exchanges and .

The asymmetric atom. The atom is neither halvable, nor symmetric.
If is a block atom, then it is by definition symmetric.
For a dipole , we can determine its symmetry type in polynomial time.
The type depends only on the quantity of distinguished types of the parallel edges. We have directed edges from to , directed edges from to , undirected edges and halvable edges. We call a dipole balanced if the number of directed edges in the both directions is the same. The dipole is halvable if and only if it is balanced and has an even number of undirected edges. The dipole is symmetric if and only if it is balanced and has an odd number of undirected edges. The dipole is asymmetric if and only if it is unbalanced. This clearly can be tested in polynomial time.
For a proper atom of satisfying (P1), (P2), and (P3), we can determine its symmetry type in polynomial time.
Let . By Lemma 3.2, is either essentially a cycle (which is easy to deal with), or an essentially 3connected graph. Let be the 3connected graph created from by removing pendant edges, where existence of pendant edges is coded by colors of . By (P1), both and belong to . We apply (P3) on two copies of . In one copy, we color by a special color, and by another special color. In the other copy, we swap the colors of and . Using (P3), we check whether there exists a colorpreserving automorphism which exchanges and ; see Fig. 10. If not, then is asymmetric. If yes, we check whether is symmetric or halvable.
Using (P2), we generate polynomially many semiregular involutions of order two acting on . For each semiregular involution, we check whether it transposes to , and whether it preserves the colors of coding pendant edges. If such a semiregular involution exists, then is halvable, otherwise it is just symmetric.
Regular Projections and Quotients of Atoms. Let be a semiregular subgroup of , which defines a regular covering projection . For a proper atom or a dipole with , we get three possible types of projection ; see Fig. 11:

An edgeprojection. The atom is preserved in , meaning . Notice that may just be a subgraph of , not induced. For instance, it can happen that while .

A loopprojection. The interior is preserved and the vertices and are identified, i.e., and .

A halfprojection. There exists an involutory permutation in which exchanges and and preserves . The projection is a halved atom . This can happen only when is a halvable atom. In particular, the covering projection is a fold covering.
[[26], Lemma 3.9] For an atom and a regular covering projection , we have either an edgeprojection, a loopprojection, or a halfprojection. Moreover, for a block atom we have exclusively an edgeprojection.
So we get three types of quotients of . For an edgeprojection, we call this quotient an edgequotient, for a loopprojection, we call it a loopquotient, and for a halfprojection, we call it a halfquotient. The following lemma allows to say “the” edge and “the” loopquotient of an atom.
[[26], Lemma 3.9] For every atom , there is the unique edgequotient and the unique loopquotient up to isomorphism.
For halfquotients, this uniqueness does not hold. First, an atom with has to be halvable to admit a halfquotient. Then each halfquotient is determined by an involutory automorphism exchanging and ; here is the restriction of from the definition of a halfprojection. First, several different automorphisms may define equivalent covering projections of , so is an isomorphic halfquotient. On the other hand, different automorphisms may define nonequivalent covering projections of , so they give nonisomorphic halfquotients ; see Fig. 12. For a proper atom, we can bound the number of nonisomorphic halfquotients by the number of different semiregular involutions of 3connected graphs.
Let be a proper atom of satisfying (P1) and (P2). Then there are polynomially many nonisomorphic halfquotients of which can be computed in polynomial time.
By Lemma 3.2, is either essentially a cycle (where it holds trivially), or it is an essentially 3connected graph. We construct from be replacing pendant edges with colored vertices, by (P1) both and belong to . According to (P2), the number of different semiregular subgroups of order two is polynomial in the size of . Each halfquotient is defined by one of these semiregular involutions which fixes the edge , transposes and , and preserves colors.
3.3 Reduction
The reduction produces a reduction series of graphs . It produces graphs with colored edges and with three edge types: halvable, undirected and directed. We note that the results built in Section 3.2 transfers to colored graphs and colored atoms without any problems.
To construct from , we find the collection of all atoms of , together with isomorphism classes such that and belong to the same class if and only if . To each isomorphism class, we assign one new color not yet used in the graphs . We replace the atoms in by edges of colors of the corresponding isomorphism classes as follows.
For each block atom with , we replace it by a pendant edge of some color based at . For each proper atom or dipole with , we replace it by a new edge which is halvable/undirected/directed when is halvable/symmetric/asymmetric, respectively. Naturally, for each isomorphism class of asymmetric atom, we consistently choose an arbitrary orientation of the directed edges replacing these atoms. For an example of the reduction, see Fig. 13. By Lemma 3.2, the replaced the interiors of the atoms of are pairwise disjoint, so the reduction is well defined.
The reduction series stops in the step when is a primitive graph. For every graph , the reduction series corresponds to the reduction tree which is a rooted tree defined as follows. The root is the primitive graph , and the other nodes are the atoms obtained during the reductions. If a node contains a colored edge, it has the corresponding atom as a child. Therefore, the leaves are the atoms of , after removing them, the new leaves are the atoms of , and so on. For an example, see Fig. 14. It is proved in [26, 42] that the reduction series and the reduction tree captures .
If a graph belongs to satisfying (P1), (P2) and (P3), then the reductions series and the reduction tree can be computed in polynomial time.
To compute from , we find all atoms in and in , compute their isomorphism classes by Lemma 3.2 and assign new colors to them. By Lemmas 3.2 and 3.2, we compute symmetry types of these atoms. We end up with a primitive graph containing the atoms. The reduction tree can be easily constructed and the algorithm runs in polynomial time.
The following is the approach invented by Babai [5]:
[[5]] If graphs and belong to satisfying (P1) and (P3), we can test in polynomial time.
Using Lemma 3.3, we simultaneously apply reduction series on both and in polynomial time, using identical colors for isomorphic atoms in and . (We do not need to distinguish halvable and symmetric atoms, so (P2) is not needed.) We end up with two primitive graphs and and we test their isomorphism using Lemma 3.2. Alternatively, we can compute both reduction trees and apply the standard tree isomorphism of graphlabeled trees.
In general, the reduction series does not have to preserve the central block, and the atoms of has to be defined with respect to one chosen block which is preserved. On the other hand, by Lemma 3.1, if the RegularCover problem is nontrivial, then contains the central block which is preserved by the reduction series:
[[26], Lemma 4.1] Let admit a nontrivial semiregular automorphism . Then each has a central block which is obtained from the central block of by replacing its atoms by colored edges.
Quotient Reduction. Let be the reduction series of and let be a semiregular subgroup of . By Lemma 3.2, we argue that uniquely determines semiregular subgroups of . Each element somehow permutes atoms of and somehow permutes the rest of . The reduction constructs from by replacing with colored edges. Therefore, corresponding to can be defined in the following way. It permutes the colored edges in the same way as permutes the respective atoms of , while is equal to on the rest of the graph. The mapping defines the reduction epimorphism ; see [26], Proposition 4.1.
Let be the quotients with preserved colors and types of edges, and let be the corresponding covering projection from to . Recall that can contain edges, loops and halfedges; depending on the action of on the halfedges corresponding to the edges of . We investigate relation between and .
Let be an atom of represented by a colored edge in . By Lemma 3.2, can have three types of projections. It is easy to see that corresponds to an edge (for a block atom, to a pendant edge) for the edgeprojection, to a loop for the loopprojection and to a halfedge for a halfprojection. This explains the names of the quotients as the edgequotient, the loopquotient and a halfquotient. See Fig. 15 for examples and see the diagram in Fig. 16.
3.4 Expansion
We want to understand the expansion of quotients, corresponding to the diagram in Fig. 17. Suppose that is a semiregular subgroup of , defining the quotient . The expansion constructs a series of semiregular subgroups defining expanded quotients .
Unfortunately, the expansion is nondeterministic which means that the expanded quotients are not uniquely determined. Recall Lemma 3.2 and Fig. 11. The following characterization of all expanded quotients is the main result of [26]:
[[26], Theorem 1.2] Let be a reduction of . Every quotient of can be constructed from some quotient of by replacing each edge, loop and halfedge of by the subgraph corresponding to the edge, the loop, or a halfquotient of an atom of , respectively.
By Lemma 3.2, the edge and loopquotients are uniquely determined. The expansion is nondeterministic since there might be many nonisomorphic halfquotients, leading to different graphs . For instance, suppose that contains a halfedge corresponding to the dipole from Fig. 18. To construct , we replace this halfedge by one of the four possible halfquotients of this dipole.
[[26], Corollary 4.8] If contains no halfedge, then is uniquely determined. Thus, for an odd order of , the quotient uniquely determines .
Halfquotients of Dipoles. Dipoles with colored edges may admit exponentially many nonisomorphic halfquotients; see Fig. 18. Therefore, if contains a halfedge corresponding to a halfquotient of a dipole in , the number of nonisomorphic expansions of can be exponential in the size difference of and .
[[26], Lemma 4.9] Let be a dipole with colored edges. Then the number of pairwise nonisomorphic halfquotients is bounded by and this bound is achieved.
For the purpose of Section 4, we describe the structure of all quotients of a dipole. Each is constructed from an involutory semiregular automorphisms acting on . If , the halfquotient consists of a vertex with several loops and halfedges attached at . Since preserves the color classes and edge types, it acts indepedently on each color class and type of edges.
On each color class of the nonhalvable edges of , acts as a fixedpoint free involution. The undirected edges have to be paired by together. Each directed edge has to be paired with a directed edge of the opposite direction and the same color. In the quotient , we have no freedom: we get a (directed) loop for each such pair.
On each color class of halvable edges of , acts as an arbitrary semiregular involution. An edge fixed in is mapped into a halfedge of the given color in . If maps to , then we get a loop in . The resulting halfquotient is therefore determined by the numbers of fixed edges and the numbers of twocycles for each color class of halvable edges of size such that .
The Block Structure of Quotients. Last, we describe how the block structure changes during expansions. A block atom of is always projected by an edgeprojection, so it corresponds to a block atom of . Suppose that is a proper atom or a dipole with . For an edgeprojection, we get , and is isomorphic to an atom in .
For a loop or halfprojection, we get and is an articulation of . If is a dipole, then is a pendant star of halfedges and loops attached to . By Lemma 3.2, if is a proper atom, then is either a path ending with a halfedge and with attached single pendant edges (when is essentially a cycle), or a pendant block with attached single pendant edges and halfedges (when is essentially 3connected). (The reason is that the fiber of an articulation in a 2fold cover is a 2cut.)
[[26], Lemma 4.10] The block structure of is preserved in , possibly with some new subtrees of blocks attached.
4 Metaalgorithm
In this section, we establish the metaalgorithm from Theorem 1.6, solving RegularCover for belonging to satisfying (P1) to (P3) in time .
Let , and we assume that . (If is not an integer, then clearly does not cover . If , then it is equivalent to the graph isomorphism problem and we can test it using Lemma 3.3.) The algorithm consists of the following major parts:

Reduction Part: We construct the reduction series for terminating with the unique primitive graph . Throughout the reduction the central block is preserved, otherwise according to Lemma 3.3 there exists no semiregular automorphism of and we output “no”. According to (P1), the reduction preserves the class , and also every atom belongs to .

Quotient Part: Using (P2), we construct the list of all subgroups of of the order acting semiregularly on . The number of subgroups in the list is polynomially large by (P2).

Expansion Part: For each in the list, we compute . We say that a graph is expandable if there exists a sequence of extensions repeatedly applying Theorem 3.4 which constructs isomorphic to . We test the expandability of using dynamic programming while using (P3).
It remains to explain details of Expansion Part, and prove the correctness of the algorithm.
Outline. In Section 4.1, we give an overview of Expansion Part. In Section 4.2, we describe a catalog which stores all atoms and their quotients discovered during reductions. In Section 4.3, we describe reductions with lists, used in expandibility testing. Last, in Section 4.4, we conclude with a proof of Theorem 1.6.
4.1 Overview of Testing Expandability
In this section, we explain how to test expandability of . We start by illustrating the fundamental difficulty, for simplicity on pendant blocks. Suppose that has a pendant block as in Fig. 19. From the local information, there is no way to know whether this block corresponds in to the edgequotient of a block atom, or to the loopquotients of some proper atoms, or to halfquotients of some other proper atoms. It can easily happen that the all these atoms appear in . So without exploiting some additional information from , there is no way to know what is the preimage of this pendant block.
In our approach, we revert the problem of expandability of by reducing towards . But since it is not clear which atoms of correspond to which parts of , we do not decide it during the reductions, instead we just remember lists of all possibilities. The dynamic programming deals with these lists and computes further lists for larger parts of . Figure 20 illustrates the overview of our algorithm.
Reductions of Quotients and Cores. Notice that might not be primitive; see Fig. 21 for an example. It would be difficult to match it to a reduction series in , so in Step 3, we further reduce to a primitive graph .
We define atoms in the quotient graphs similarly as in Section 3.2 with only one difference. We choose one arbitrary block/articulation called the core in ; for instance, we can choose the central block/articulation. The core plays the role of the central block in the definition of parts and atoms. Also, in the definition we consider halfedges and loops as pendant edges, so they do not form block atoms. We proceed with the reductions in further till we obtain a primitive quotient graph , for some ; see Fig. 22.
Let be the graphs obtained by an expansion series of using Theorem 3.4.
The graph is expandable to , if and only if is expandable to .
It follows from the fact that the graphs are uniquelly determined, since no halfedges are expanded till .
If is expandable to , then the core of is expanded to some block or articulation of .
The graph consists of the core together with some pendant edges, loops and halfedges. By Lemma 3.4, the core is preserved as an articulation/block in all graphs . The core can be only changed by replacing of its colored edges by edgequotients. Since is expandable to , the expanded core is isomorphic to some block or articulation of .
In Step 4, we test all possible positions of the core in . (We have possibilities, so we run the dynamic programming algorithm multiple times.) In what follows, we have the core fixed in as well.
In Step 5, we apply on reductions with lists, described in Section 4.3. In Step 6, we test whether some choices from these lists are compatible with the graph .
4.2 Catalog of Atoms
During the reduction phase of the algorithm, we construct the following catalog of atoms forming a database of all discovered atoms. These atoms arise in three ways: atoms of , atoms in halfquotients of these atoms, and atoms in the reductions of the quotients . We are not very concerned with a specific implementation of the algorithm, so the purpose of this catalog is to simplify description.
For each isomorphism class of atoms represented by an atom , we store the following information in the catalog:

The atom .

The corresponding colored edge of a given type representing the atom in the reduction.

If is an atom of , the unique edge and loopquotients of and information about its halfquotients.
For an overview of adding an atom into the catalog, see Algorithm 1.
Storing Star Block Atoms. Let be a star block atom. We store it in the catalog partially expanded which works as follows. By the definition, consists of a vertex with attached edges, loops and halfedges. If some edge corresponds to a star block atom , we replace it with the edges of . Similarly, if some loop corresponds to the loopquotient of a dipole , we replace it by the loops of . We repeat this till all pendant edges of correspond to block atoms and all loops of correspond to loopquotients of proper atoms. On the other hand, the halfedges of may correspond to halfquotients of both proper atoms and dipoles.
Storing Dipoles. Let be a dipole in . By Lemma 3.4, it can have exponentially many nonisomorphic halfquotients. On the other hand, they are well described in Section 3.4, so we can generate all of them from the dipole when needed.
We store this dipole in the catalog partially expanded which works as follows. Almost all edges of correspond to proper atoms, while at most one edge corresponds to a dipole . (At most one since from the definition, a dipole with consists of all edges between and .) If one edge corresponds to , we replace it in with the edges of the dipole . And if one of these edges of again correspond to some dipole , we proceed further with the expansion.
Notice that by the definition of the reduction, all colored edges of have different colors than the edges of . Therefore the halfquotients of the original dipole are exactly the same as the halfquotients of the partially expanded dipole . The reason for this expansion is that every halfquotient of the partially expanded dipole consists of loops and halfedges attached to one vertex, where each loop and each halfedge is expanded into one block (with attached single pendant edges, halfedges and loops).
Further, if a halvable dipole consists of exactly two edges of the same color, we compute its halfquotient consisting of just the single loop attached, and we add this quotient to the catalog. The reason is that this quotient behaves exactly as the loopquotient of some proper atom.
Storing Proper Atoms. If is not a dipole, we compute the list of all its pairwise nonisomorphic halfquotients, and store them in the catalog in the following way. A halfquotient of might not be primitive. Therefore, we apply a reduction series on , and add all atoms discovered by the reduction to the catalog. (We do not compute their halfquotients. They are never realized unless these atoms are directly found in as well.) When the reduction series finishes, this halfquotient is reduced to a primitive graph . Naturally, the block containing , being a single vertex of the halfquotient, behaves like the central block in the definition of atoms, i.e., it is never reduced. The reduced halfquotient is either essentially 3connected, a cycle with attached single pendant edges, or with a single pendant edge or halfedge attached. See Fig. 23 for an example.
Total Size of Catalog. Next, we prove that the catalog is not too large.
Assuming (P2), the catalog contains polynomially many atoms and halfquotients.
First we deal with the number of atoms in . Notice that by replacing an interior of an atom, the total number of vertices and edges is decreased; the interiors of atoms in each contain at least two vertices and edges in total and are pairwise disjoint (see Lemma 3.2). Thus we add a linear number of atoms of to the catalog, of total linear size.
By (P2), there are polynomially many possible quotients , in each we encounter linearly many atoms when reducing to . So we add polynomially many atoms to the catalog.
By (P2), each proper atom has polynomially many halfquotients, for different semiregular involutions of . So, we have in total polynomially many halfquotients, each containing at most linearly many atoms in its reduction series. And by Lemma 3.2 we have the unique edge and loopquotient. So again, the total number of atoms and quotients added to the catalog is polynomial.
Catalog Queries. Throughout the algorithm, we repeatedly ask queries whether some atom or some of its quotients is contained in the catalog, and if so, we retrieve the corresponding colored edge/loop/halfedge.
Assuming (P3), each catalog query can be answered in polynomial time.
4.3 Reductions with Lists
In this section, we describe Steps 5 and 6 of the diagram in Fig. 20. By Lemma 4.1, we need to test whether is expandible to . We approach this in the opposite way, by applying a reduction series on with respect to the core defining . As already discussed in Section 4.1, we do not know which parts of project to different parts of . Therefore each is a set of graphs, and is a set of primitive graphs. We then determine expandability of by testing whether .
Since each set can contain a huge number of graphs, we represent it implicitly in the following manner. Each is represented by one graph with some colored edges and with socalled pendant elements attached to some vertices.
Pendant Elements with Lists. A pendant element in corresponds to a block atom in for some , which is reduced in . When pendant elements are fully expanded, they correspond to block part of with pairwise disjoint interiors. We use the name pendant element since it may represent a pendant edge of some color, several loops of some other colors, and several halfedges of some other colors.
Each pendant element is equipped with a list whose members are possible realizations of the corresponding block atom by the quotients from the catalog. Each graph of is created for by replacing the pendant elements by some choices of edges, loops and halfedges from their lists. The list of a pendant element contains an edge/loop/halfedge if and only if it is possible to expand this edge/loop/halfedge to the graph isomorphic to the block part corresponding to . For an example, see Fig. 24. According to Lemma 4.2, we have polynomially many atoms, and so the size of each list is polynomial in size.
Each list contains at most one edge. Further, if two lists share an edge or a loop, their pendant elements correspond to isomorphic block parts in .
Two atoms have the isomorphic edgequotients if and only if they are isomorphic. Therefore each list contains at most one edge.
If a pendant element is fully expanded, it corresponds to one block part of . Suppose that an edge or a loopquotient belongs to . If it is fully expanded, then it has to be isomorphic to this block part. But according to Lemma 3.2, the expansions of edge and loopquotients are deterministic since halfedges are never encountered. Therefore the corresponding block part in is uniquely determined.
One list may contain several loops, for which identifying of the vertices of the boundaries constructs identical graphs; see Fig. 25. Similarly, a list may contain several halfedges; see Fig. 26. Because of the second part of Lemma 4.3, the loops pose no problem. On the other hand, one halfedge may be contained in lists of several different pendant elements which are expanded to nonisomorphic subgraphs in ; see Fig. 25. This creates the main difficulty for our algorithm, leading to the bottleneck in form of a slow subroutine requiring time .
Reductions with Lists. We want to compute the reduction series with lists ending with a primitive graph with attached pendant elements with computed lists. We construct by replacing all pendant edges and loops by pendant elements with singleton lists.
Suppose that we know