Computational Complexity of the Weisfeiler-Leman Dimension
Abstract
The Weisfeiler-Leman dimension of a graph is the least number such that the -dimensional Weisfeiler-Leman algorithm distinguishes from every other non-isomorphic graph, or equivalently, the least such that is definable in -variable first-order logic with counting. The dimension is a standard measure of the descriptive or structural complexity of a graph and recently finds various applications in particular in the context of machine learning. This paper studies the complexity of computing the Weisfeiler-Leman dimension. We observe that deciding whether the Weisfeiler-Leman dimension of is at most is NP-hard, even if is restricted to have -bounded color classes. For each fixed , we give a polynomial-time algorithm that decides whether the Weisfeiler-Leman dimension of a given graph with -bounded color classes is at most . Moreover, we show that for these bounds on the color classes, this is optimal because the problem is P-hard under logspace-uniform AC0-reductions. Furthermore, for each larger bound on the color classes and each fixed , we provide a polynomial-time decision algorithm for the abelian case, that is, for structures of which each color class has an abelian automorphism group.
While the graph classes we consider may seem quite restrictive, graphs with -bounded abelian colors include CFI-graphs and multipedes, which form the basis of almost all known hard instances and lower bounds related to the Weisfeiler-Leman algorithm.
Keywords and phrases:
Weisfeiler-Leman algorithm, dimension, complexity, coherent configurationsFunding:
Moritz Lichter: The research of this author has received further funding by the European Union (ERC, SymSim, 101054974).Copyright and License:
![[Uncaptioned image]](x1.png)
2012 ACM Subject Classification:
Mathematics of computing Graph algorithms ; Theory of computation Problems, reductions and completeness ; Theory of computation Complexity theory and logicFunding:
The research leading to these results has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (EngageS: grant agreement No. 820148).Editors:
Jörg Endrullis and Sylvain SchmitzSeries and Publisher:

1 Introduction
The Weisfeiler-Leman algorithm is a simple combinatorial procedure studied in the context of the graph isomorphism problem. For every , the algorithm has a -dimensional variant, - for short, that colors -tuples of vertices according to how they structurally sit inside the whole graph: if two tuples get different colors, they cannot be mapped onto each other by an automorphism of the graph (while the converse is not always true). The -dimensional algorithm, which is also known as color refinement, starts by coloring each vertex according to its degree, and then repeatedly refines this coloring by including into each vertex color the multisets of colors of its neighbors. The -dimensional variant generalizes this idea and colors -tuples of vertices instead of single vertices [43, 11].
The Weisfeiler-Leman algorithm plays an important role in both theoretic and practical approaches to the graph isomorphism problem, but is also related to a plethora of seemingly unrelated areas: to finite model theory and descriptive complexity via the correspondence of - to -variable first-order logic with counting [11, 27], to machine learning via a correspondence to the expressive power of (higher-dimensional) graph neural networks [37], to the Sherali-Adams hierarchy in combinatorial optimization [3, 25], and to homomorphism counts from treewidth- graphs [14]. On the side of practical graph isomorphism, the color refinement procedure is a basic building block of the so-called individualization-refinement framework, which is the basis of almost every modern practical solver for the graph isomorphism problem [36, 28, 29, 1]. On the side of theoretical graph isomorphism, Babai’s quasipolynomial-time algorithm for the graph isomorphism problem [4] uses a combination of group-theoretic techniques and a logarithmic-dimensional Weisfeiler-Leman algorithm.
The Weisfeiler-Leman algorithm is a powerful algorithm for distinguishing non-isomorphic graphs on its own. For every , - can be used as an incomplete polynomial-time isomorphism test: if the multiset of colors of -tuples of two graphs and differ, then and cannot be isomorphic. In this case, - distinguishes and , otherwise and are --equivalent. For a given graph , we say that the -dimensional Weisfeiler-Leman algorithm - identifies if it distinguishes from every non-isomorphic graph. The smallest such is known as the Weisfeiler-Leman dimension of [21].
It is known that almost all graphs have Weisfeiler-Leman dimension [5]. However, color refinement fails spectacularly on regular graphs, where it always returns the monochromatic coloring. For these, it is known that - identifies almost all regular graphs [10, 32]. In contrast to these positive results, for every there is some graph (even of order linear in , of maximum degree , and with -bounded abelian color classes, i.e., such that no more than vertices can share the same vertex-color, and every color class induces a graph with abelian automorphism group) that is not identified by - [11]. These so-called CFI-graphs have high Weisfeiler-Leman dimension and are thus hard instances for combinatorial approaches to the graph isomorphism problem.
The situation changes for restricted classes of graphs. If the Weisfeiler-Leman dimension over some class of graphs is bounded by , then the - correctly decides isomorphism over this class. And since - can be implemented in polynomial time [27], this puts graph isomorphism over such classes into polynomial time. Examples of graph classes with bounded Weisfeiler-Leman dimension include graphs of bounded tree-width [23], graphs of bounded rank-width [24], graphs with -bounded color classes [27], planar graphs [30], and more generally every non-trivial minor-closed graph class [20].
In this paper, we study the computational complexity of computing the Weisfeiler-Leman dimension. We call the problem of deciding whether the Weisfeiler-Leman dimension of a given graph is at most the --identification problem. For upper complexity bounds, non-identification of a graph can be witnessed by providing a graph that is not distinguished from by - but is also not isomorphic to . As the latter can be checked in co-NP, this places the identification problem into the class of the polynomial hierarchy. If the graph isomorphism problem is solvable in polynomial time, this complexity bound collapses to co-NP. However, there is no apparent reason why the identification problem should not be polynomial-time decidable.
On the side of lower complexity bounds, the --identification problem is complete for polynomial time under uniform reductions in the circuit complexity class AC0 [31, 2]. Hardness of the --identification problem does, however, not easily imply any hardness results for the --identification problem for higher values of . Indeed, no hardness results are known for . The --identification problem in particular includes the problem of deciding whether a given strongly regular graph is determined up to isomorphism by its parameters, which is a baffling problem from classic combinatorics far beyond our current knowledge. To understand the difficulties of the --identification problem better, we can again consider classes of graphs. On every class of graphs with bounded color classes, graph isomorphism is solvable in polynomial time [6, 16], which puts the identification problem over this class into co-NP for every . Graphs with -bounded color classes are identified by - [27], which makes their identification problem trivial. As shown by the CFI-graphs [11], this is no longer true for graphs with -bounded color classes. Nevertheless, as shown by Fuhlbrück, Köbler, and Verbitsky, identification of graphs with -bounded color classes by - is efficiently decidable [15]. For higher dimensions or bounds on the color classes essentially nothing is known.
Contribution.
We extend the results of [15] from - to - and give a polynomial-time algorithm deciding whether a graph with -bounded color classes is identified by :
Theorem 1.
For every , there is an algorithm that decides the --identification problem for vertex- and edge-colored, directed graphs with -bounded color classes in time . If such a graph is not identified by , the algorithm provides a witness for this, i.e., a graph that is not isomorphic to and not distinguished from by -.
Via the correspondence of - to -variable counting logic, Theorem 1 implies that definability of graphs with -bounded color classes in this logic is decidable in polynomial time. While the restriction to -bounded color classes may seem stark, almost all known hardness results and lower bounds for the Weisfeiler-Leman algorithm remain true for graphs with bounded color classes and in most cases even -bounded color classes suffice [19, 13, 40, 39, 38].
Towards generalizing Theorem 1 to arbitrary relational structures and larger color classes, we consider structures with abelian color classes, i.e., structures of which each color class induces a structure with an abelian automorphism group. Such structures were previously considered in the context of descriptive complexity theory [44], and include both CFI-graphs [11] and multipedes [39, 38] over ordered base graphs, which form the basis of all known constructions of graphs with high Weisfeiler-Leman dimension. For many cases in descriptive complexity theory, restricting to -bounded abelian color classes is sufficient, but in some cases larger (but still abelian) color classes are required [26, 18, 33, 34]. For such structures, we obtain a polynomial-time algorithm as before:
Theorem 2.
For every and , there is an algorithm that decides the --identification problem for -ary relational structures with -bounded abelian color classes in time . If such a structure is not identified by , the algorithm provides a witness for this, i.e., a second structure that is not isomorphic to and not distinguished from by -.
On the side of hardness results, we first prove that when the dimension is part of the input, the identification problem is NP-hard. Note that a similar result was recently independently observed by Seppelt [42].
Theorem 3.
The problem of deciding, given a graph and a natural number , whether the Weisfeiler-Leman dimension of is at most is NP-hard, both over uncolored simple graphs, and over simple graphs with -bounded color classes.
Furthermore, we extend the P-hardness results for - [2] to arbitrary and prove that, when is fixed, the --identification problem is hard for polynomial time:
Theorem 4.
For every , the --identification problem is P-hard under uniform AC0-reductions over both uncolored simple graphs, and simple graphs with -bounded abelian color classes.
Techniques.
To prove Theorem 1, we exploit the close connection between the coloring computed by - and certain combinatorial structures called -ary coherent configurations. These structures come with two notions of isomorphisms, algebraic ones and combinatorial ones. Similarly to [15], we reduce the --identification problem to the separability problem for -ary coherent configurations, that is, to decide whether algebraic and combinatorial isomorphisms for a given -ary coherent configuration coincide. We make two crucial observations: First, we show that the -ary coherent configurations obtained from graphs are fully determined by their underlying -ary configurations. We call such configurations -induced. Second, we reduce the separability problem for arbitrary -ary coherent configurations to the same problem on the structurally simpler class of star-free -ary coherent configurations. Combining both observations, we show that two -induced, star-free -ary coherent configurations obtained from --equivalent graphs must be isomorphic. Given such a -ary coherent configuration obtained from a graph, it thus suffices to decide whether there is another non-isomorphic graph yielding the same configuration. Finally, we solve this problem by encoding it into the graph isomorphism problem for structures with bounded color classes, which is polynomial-time solvable [6, 16].
The main obstacle to generalize Theorem 1 to larger color classes or relational structures of higher arity is the existence of --equivalent structures that yield non-isomorphic star-free -ary coherent configurations, which greatly increases the space of possibly equivalent but non-isomorphic structures. To make up for this, we consider structures with abelian color classes. Using both the bijective pebble game [26] and ideas from the theory of coherent configurations, we provide structural insights for the class of -ary coherent configurations with abelian fibers. This allows us to finally prove that in the abelian case, it does suffice to consider other relational structures yielding the same -ary coherent configuration.
NP-hardness in Theorem 3 is proved by combining the known relationship between the Weisfeiler-Leman dimension of CFI-graphs [11] and the tree-width of the underlying base graphs with the recent result that computing the tree-width of cubic graphs is NP-hard [9]. With the same techniques, we can also prove that deciding --equivalence of graphs is co-NP-hard when the dimension is considered part of the input.
For the P-hardness result of the --identification problem in Theorem 4, we adapt a construction by Grohe [19] that he used to prove P-hardness of the --equivalence problem. The construction encodes monotone boolean circuits into graphs using different types of gadgets. This simultaneously reduces the monotone circuit value problem, which is known to be hard for polynomial time, to the --equivalence and the --identification problem. The main difficulty was to show identification of Grohe’s gadgets, specifically his so-called one-way switches. We give an alternative construction of these one-way switches based on the CFI-construction. This construction simplifies proofs and more importantly yields graphs with -bounded color classes for every . This shows hardness for the --equivalence and --identification problems even for graphs with -bounded abelian color classes.
Full proofs of all statements can be found in the full version of this paper [35].
2 The Weifeiler-Leman Algorithm and Coherent Configurations
Preliminaries.
For , we set . For a set , the set of all -element subsets of is denoted by . For two runtime-bounding functions and with parameters including , we write if is bounded by a function of . A simple graph is a pair of a set of vertices and a set of undirected edges. For a directed graph, we allow . For either graph type, we write for the edge or respectively. For a simple or directed graph , a vertex-coloring of is a map for some finite, ordered set of colors. Similarly, an edge-coloring is a map . A (vertex-)color class is a set for some vertex color . If all color classes have order at most , we say that the colored graph has -bounded color classes.
Relational structures are a higher-arity analogue of graphs. Formally, a -ary relational structure is a tuple of vertices and relations with . The number is the arity of the relation . We again allow relational structures to come with a vertex-coloring and define -bounded color classes as before.
An isomorphism between graphs and is a bijection such that if and only if . In this case and are isomorphic and we write . An isomorphism between edge- or vertex-colored graphs must also preserve the vertex- and edge-colors. Similarly, an isomorphism between (vertex-colored) relational structures is a (color-preserving) bijection between the vertex sets that preserves all relations and their complements. An automorphism is an isomorphism from a structure to itself. We say that a graph or relational structure has abelian color classes if for every color class , the induced substructure has an abelian automorphism group.
Bounded Variable Counting Logics.
First-order counting logic is the extension of first-order logic by the counting quantifiers for all natural numbers , which state that there exist at least distinct elements satisfying the formula that follows. But because first-order logic has the ability to simulate the counting quantifier by a sequence of usual existential quantifiers, adding counting quantifiers does not actually increase the expressive power of first-order logic. This situation changes when we restrict the number of variables. For a natural number , we define -variable counting logic to be the fragment of which only uses the variables . In order to not restrict the expressive power of these logics too much, we do, however, allow requantifications, that is, quantifications over a variable within the scope of another quantification over the same variable. As an example, the following is a -formula
which states that every vertex is adjacent to a vertex of degree .
A relational structure is definable in if there exists some formula which is satisfied by a structure if and only if it is isomorphic to .
The Weisfeiler-Leman Algorithm.
The distinguishing power of bounded variable counting logics has another characterization in terms of the Weisfeiler-Leman algorithm. For every , the -dimensional Weisfeiler-Leman algorithm (-) computes an isomorphism-invariant coloring of -tuples of vertices of a given graph via an iterative refinement process. Initially, the algorithm colors each -tuple according to its isomorphism type, i.e., get the same color if and only if mapping for every is an isomorphism of the induced subgraphs and . In each iteration, this coloring is refined as follows: if is the coloring obtained after refinement rounds, the coloring is defined as , where
and denotes the tuple obtained from by replacing the -th entry by . If does not induce a finer color partition on than , then the algorithm terminates and returns the stable coloring . This must happen before the -th refinement round.
We say that - distinguishes two -tuples if and that - distinguishes two -tuples for if - distinguishes the two -tuples we get by repeating the last entries of respectively . In either case, we write . Finally, - distinguishes two graphs and if the multisets of stable colors computed for the -tuples of vertices over the two graphs disagree. Otherwise, and are --equivalent and we write . A graph is identified by - if - distinguishes from every other non-isomorphic graph. Every -vertex graph is identified by -, and the least number such that - identifies is called the Weisfeiler-Leman dimension of , denoted by .
- is at least as powerful in distinguishing graphs as - and this hierarchy does not collapse [11]. Completely analogously, - can be applied to relational structures.
Lemma 5 ([11, 26]).
Let and be two relational structures of arity at most , and and two tuples of vertices. Then the following are equivalent:
-
(i)
For every -formula , we have if and only if , and
-
(ii)
the stable colors computed by - for the tuples and agree.
Further, every stable color class is definable by a single -formula.
In particular, the Weisfeiler-Leman dimension of a structure is precisely one less than the number of variables needed to define the structure in first-order counting logic.
Coherent Configurations.
For an introduction to (-ary) coherent configurations and their connection to the Weisfeiler-Leman algorithm we refer to [15]. For , a -ary rainbow is a pair of a finite set of vertices and a partition of , whose elements are called basis relations, that satisfies the following two conditions:
- (R1)
-
For every basis relations , all tuples have the same equality type, i.e., if and only if . We also call this the equality type of the relation .
- (R2)
-
is closed under permuting indices: For all basis relations and permutations of , the set is a basis relation.
Because the vertex set is determined by the partition , we write to denote the rainbow and in this case write for its vertex set . A -ary coherent configuration is a -ary rainbow that is stable under --refinement. Formally, this means that
- (C)
-
for all basis relations , the intersection number
is the same for all choices of and is thus well-defined.
For , the partition of -vertex tuples of an -ary relational structure according to their isomorphism type always yields a -ary rainbow. The connection of - and -ary coherent configurations is that the partition of -vertex tuples of a graph according to their --colors always forms a -ary coherent configuration.
Induced Configurations.
If is an -ary rainbow for , we can interpret as the -ary rainbow by partitioning -tuples according to the basis relations of the -subtuples they contain. Formally, let be the equivalence relation on whose equivalence classes are the basis relations of . We define the equivalence relation on by writing if and only if for all we have , where is the subtuple of for which all indices not in are deleted. The basis relations of are the equivalence classes of .
For every -ary rainbow , there is a unique coarsest -ary coherent configuration that is at least as fine as and is called the -ary coherent closure of . For an and an -ary rainbow , we also write for . Similarly, for an -ary relational structure , we write for the partition of into -color classes.
Every -ary coherent configuration induces the -ary coherent configuration for every by considering the partition of tuples of the form . This -ary coherent configuration is called the -skeleton of . For every basis relation and every subset of the indices, the set is a basis relation of and called the -face of . The -skeleton yields a partition of , whose partition classes are called fibers. We denote the set of fibers by . has -bounded fibers if all fibers of have order at most . If is a union of fibers, the induced structure is again a -ary coherent configuration. Between two fibers and , the induced configuration further induces a partition of , called an interspace.
A -ary coherent configuration is -induced if it is the coherent closure of its -skeleton, i.e., if . This is equivalent to being the coherent closure of some -ary rainbow. In particular, the -ary coherent closure of a (directed, colored) graph is -induced and the -ary coherent closure of an -ary relational structure is -induced for every .
For a -ary rainbow , the vertex-colored -ary relational structure where maps every vertex to its fiber is a colored variant of . Note that this requires choosing an ordering of the basis relations; colored variants are thus not unique.
Algebraic and Combinatorial Isomorphisms.
There are two notions of isomorphism for two -ary coherent configurations and . First, a combinatorial isomorphism is a bijection that preserves the partition into basis relations, i.e., for every basis relation , the mapped set is a basis relation of . Combinatorial isomorphisms are thus isomorphisms between certain colored variants of and and the notion also applies to rainbows.
Second, an algebraic isomorphism is a map between the two partitions that preserves the intersection numbers. More formally, we require that
- (A1)
-
for all , the relations and have the same equality type,
- (A2)
-
for all and permutations of , we have , and
- (A3)
-
for all , we have ,
but Property (A3) already implies the former two. Algebraic isomorphisms can be thought of as maps preserving the Weisfeiler-Leman colors and thus as a functional perspective on Weisfeiler-Leman equivalence. More formally, if for -ary relational structures and , is an algebraic isomorphism that preserves the relations of and , then is the unique map that maps every color class of the stable coloring computed by - on to the corresponding color class of the stable coloring computed by - on . In particular, we get in this case.
If is an algebraic isomorphism, then induces an algebraic isomorphism for every . If for some rainbow , induces a map for some rainbow by sending each basis relation of , which is a union of basis relations of , to the union of -images of these basis relations of . A combinatorial (respectively algebraic) automorphism of is a combinatorial (respectively algebraic) isomorphism from to itself. Every combinatorial isomorphism induces an algebraic isomorphism, but the converse is not true. Algebraic isomorphisms behave nicely with coherent closures as seen in the next lemma (the proof is analogue to the case [15, Lemma 2.4]):
Lemma 6.
For all -ary rainbows , algebraic isomorphisms , and
-
1.
, in particular, if is -induced, then so is ,
-
2.
is fully determined by its action on basis relations in , and
-
3.
if is induced by a combinatorial isomorphism , then induces .
A -ary coherent configuration is called separable if every algebraic isomorphism from is induced by a combinatorial one. There is a close relation to the power of the Weisfeiler-Leman algorithm (the proof is analogue to the case [15, Theorem 2.5]):
Lemma 7.
Let and be an -ary relational structure. Then is identified by the -dimensional Weisfeiler-Leman algorithm if and only if is separable.
3 Deciding Identification for Graphs With 5-Bounded Color Classes
As recently shown [15], identification of graphs with -bounded color classes by - is polynomial-time decidable. We extend this result to arbitrary dimensions of the Weisfeiler-Leman algorithm. We adapt the approach of [15] and solve the separability problem for -induced -ary coherent configurations with -bounded fibers. We generalize the elimination of interspaces containing a matching and of interspaces of type : we reduce to star-free -ary coherent configurations. By characterizing separability using certain automorphism groups, we provide a new reduction of the separability problem for such configurations to graph isomorphism for bounded color classes, which can be solved in polynomial time.
Disjoint Unions of Stars.
Let be a -ary coherent configuration and two distinct fibers. A disjoint union of stars between and is a basis relation such that every vertex in is incident to exactly one edge in . If no interspace of contains a disjoint union of stars, then is called star-free. We show that the separability problem of (-induced) -ary coherent configurations reduces to that of star-free ones.
Lemma 8.
Let be a -ary coherent configuration, two distinct fibers, and a disjoint union of stars between and . Then is separable if and only if is separable. Furthermore, if is -induced, then so is .
Proof sketch..
Let be the set of pairs of vertices in that have a common -neighbor in . We show that the -ary coherent configuration is uniquely determined by the configuration and the relation . For this, consider the function that maps each vertex in to its unique neighbor in . When we apply this map to some of the -components of a basis relation , the resulting set is again a basis relation, and we can obtain every basis relation of from basis relations in in this way.
We show that both algebraic and combinatorial isomorphisms can detect the uniqueness of this extension in the following sense: every algebraic or combinatorial isomorphism uniquely extends to an algebraic or combinatorial isomorphism , for some uniquely determined extension by a single fiber. Hence, is separable if and only if is. By analyzing this unique extension, it is moreover clear that it does not affect -inducedness. Lemma 8 allows us to remove fibers that are incident to a disjoint unions of stars without affecting the separability. This simultaneously generalizes the elimination of interspaces containing a matching and the elimination of fibers of size from [15].
5-Bounded Fibers.
In order to structurally understand -induced -ary coherent configurations, it mostly suffices to understand their -skeletons. The possible isomorphism types of -ary coherent configurations on a single fiber of order at most are known [15, 41], see Figure 1. Further, the possible interspaces between fibers of order up to are also known [15]. For fibers , it is always possible that the interspace is uniform, meaning that it consists of only a single basis relation . Every interspace between a fiber of size and a fiber of size at most is uniform [15, Lemma 3.1], and every interspace between two fibers of size is either uniform or contains a matching [15, Section 13]. Now, only two possible non-uniform, star-free interspaces remain, which are depicted in Figure 2.
We call an algebraic automorphism of a -ary coherent configuration strict if it fixes every fiber, i.e., it satisfies for every . The strict algebraic automorphisms of form a group, which we denote by . Using the enumeration of fiber and interspace types, we obtain the following reformulation of separability as in [15, Lemma 7.2].
Lemma 9.
A star-free -induced -ary coherent configuration with -bounded fibers is separable if and only if every strict algebraic automorphism is induced by a combinatorial one.
Proof sketch..
The forward implication is immediate. For the backward implication, consider an algebraic isomorphism . Because every coherent configuration of order at most is separable [15], is induced by a combinatorial isomorphism on every union of two fibers. We pick such a combinatorial isomorphism inducing for every interspace of type and everywhere else, we pick combinatorial isomorphisms inducing just on each fiber. Using the structure of fibers of order at most and their interspaces, we can show that these isomorphisms combine to a combinatorial isomorphism inducing on every fiber. But then, is a strict algebraic automorphism and is thus induced by a combinatorial automorphism . But then, induces and thus also by Lemma 6.
Strict Algebraic Automorphisms.
We now sketch a polynomial-time algorithm that decides whether every strict algebraic automorphism of a -ary coherent configuration is induced by a combinatorial automorphism. We will heavily use that the graph isomorphism problem is polynomial-time solvable for graphs with bounded color classes.
Lemma 10 ([6, 16]).
Isomorphism of -ary relational structures of order and -bounded color classes is decidable in time . A generating set of the automorphism group of these structures is computable in time .
By encoding the algebraic structure of a coherent configuration into a relational structure, we obtain the following:
Lemma 11.
There is an algorithm running in time that, given a -ary coherent configuration of order with -bounded fibers, computes a generating set of .
Proof.
We construct a -ary relational structure with -bounded color classes such that . The vertices of our constructed structure are the basis relations of , and we color each -tuple of basis relations using the color . Further, we color each basis relation by the tuple of fibers of its components. Because every fiber is -bounded, at most basis relations can share a color. Furthermore, it is immediate that the automorphisms of the structure constructed so far naturally correspond to strict algebraic automorphisms of . Thus, we can compute a generating set for the group of strict algebraic automorphisms in the required time using Lemma 10. Similarly, we can reduce the question whether a strict algebraic automorphism is induced by a combinatorial one to the graph isomorphism problem.
Lemma 12.
There is an algorithm running in time that, given a -ary coherent configuration with -bounded fibers and a strict algebraic automorphism , decides whether is induced by a combinatorial automorphism.
Proof sketch..
Let be an arbitrary colored variant of and another colored variant such that is a color-preserving map between the color classes of and . Combinatorial automorphisms inducing correspond to isomorphisms between and , meaning that is induced by a combinatorial automorphism if and only if . As has bounded fibers, so does . Thus, we can decide the latter in the required time by Lemma 10.
Corollary 13.
There is an algorithm running in time that, given a -ary coherent configuration with -bounded fibers, decides whether every strict algebraic automorphism of is induced by a combinatorial automorphism.
Proof.
Those strict algebraic automorphisms that are induced by combinatorial ones form a subgroup of the group of all strict algebraic automorphisms. Hence, it suffices to compute a generating set of the whole group via Lemma 11 and to decide whether all elements of it are induced by combinatorial automorphisms using Lemma 12. Finally, we are ready to prove our first theorem. See 1
Proof.
In a first step, we run on to get the -induced configuration . By Lemma 7, it remains to decide whether is separable. Now, we eliminate disjoint unions of stars using Lemma 8, while maintaining -inducedness of . By Lemma 9, it remains to decide whether every strict algebraic automorphism is induced by a combinatorial one. This can be achieved using Corollary 13.
If this is the case, the input structure is identified by -. Otherwise, the algorithm actually finds a strict algebraic automorphism which is not induced by a combinatorial automorphism. By adding back all interspaces containing a disjoint union of stars, we can extend to an algebraic isomorphism which is not induced by a combinatorial isomorphism. But then, we can obtain a witnessing graph from by replacing its edge set by its -image and similarly translating vertex- and edge-colors along .
4 Identification for Structures With Bounded Abelian Color Classes
The approach we used in Section 3 to decide the --identification problem for graphs with -bounded color classes does not easily generalize to larger bounds on the color classes or to relational structures of higher arity. In particular, Lemma 9 was crucial in the reduction of --identification to a statement on certain automorphisms which could be handled using group-theoretic techniques. The proof of the lemma was based on an explicit case distinction on the possible isomorphism types of interspaces, and fails for graphs with larger color classes. In this section, we show that Lemma 9 remains true in the special case of relational structures with bounded abelian color classes, i.e., structures for which the automorphism group of the structure induced on each color class is abelian. Such structures were already considered in the context of descriptive complexity theory [44] and include both CFI-graphs [11] and multipedes [39, 38] over ordered base graphs.
Coherent Configurations With Abelian Fibers.
To start, we translate the concept of abelian color classes to the corresponding concept of abelian fibers for -ary coherent configurations. A combinatorial automorphism of a -ary coherent configuration is color-preserving if fixes every basis relation of . This is equivalent to being an automorphism of every colored variant of or to the algebraic automorphism induced by being the identity (recall that combinatorial automorphisms are not required to fix every basis relation, but only the partition of into basis relations). We say that a coherent configuration has abelian fibers if, for each fiber , the group of color-preserving combinatorial automorphisms of is abelian.
Lemma 14.
Let be a relational structure of arity at most . If has abelian color classes, then has abelian fibers.
We start with a structural lemma, which states that small abelian fibers are always thin. For a fiber , a binary basis relation is called thin if every vertex in is incident to exactly one ingoing and exactly one outgoing -edge, that is, if is either a matching or a union of directed cycles. The fiber is called thin if all basis relations are thin and if this is true for all fibers of , we say that has thin fibers.
Lemma 15.
Let be a -ary coherent configuration. Then every abelian fiber of order at most is thin.
Proof.
Let be an abelian fiber of order at most . Then is the partition of into orbits under the natural action of the group of color-preserving automorphisms.
Now, assume that some binary basis relation contains two pairs and for . This implies that there is a color-preserving automorphism of that maps to . But as the group of color-preserving automorphism of is abelian and acts transitvely on the vertices of , its point-stabilizers are trivial. Because , this implies and thus . Thus, the basis relation is thin.
Next, we need one well-known lemma on the structure of thin fibers, which essentially states that thin fibers correspond to Cayley graphs of their automorphism groups.
Lemma 16 ([12, Section 2.1.4]).
Let be a -ary coherent configuration on a single thin fiber. Then the basis relations of are precisely those of the form for color-preserving combinatorial automorphisms of .
Separability of Configurations With Bounded Thin Fibers.
Next, we show that -ary coherent configurations with few, thin fibers are separable:
Lemma 17.
Let be a -ary coherent configuration with at most fibers. If has thin fibers, then is separable.
Proof sketch..
Let be a -tuple of vertices which contains a vertex from every fiber of . Then every vertex of is the unique outgoing neighbor of some vertex in with respect to some thin basis relation. Thus, all vertices of are fixed relative to .
Now, let be a colored variant of . By Lemma 7, is separable if and only if is identified by -. We show the latter using the bijective -pebble game, which is an Ehrenfeucht-Fraïssé-type game capturing --equivalence [26]. Indeed, if , this corresponds to Duplicator having a winning strategy in this game. But because we can fix every vertex of by only fixing one vertex per color class, we can easily extract an isomorphism from such a winning strategy. Finally, we are ready to once again reduce the question of separability to only strict algebraic automorphisms, which we can again deal with using Corollary 13.
Lemma 18.
Let be a -ary coherent configurations with thin fibers. Then is separable if and only if every strict algebraic automorphism of is induced by a combinatorial automorphism.
Proof sketch..
The proof is similar to that of Lemma 9, where instead of using that every -ary coherent configuration of order at most is separable, we apply Lemma 17 to get separability of sufficiently small configurations. Afterwards, we use the structure of configurations with thin fibers to show that the local bijections we picked are compatible with the partition in the -ary interspaces.
See 2
Proof.
Let be a relational structure of arity . Then is identified by if and only if is separable. Because the -ary coherent configuration has -bounded thin fibers by Lemmas 14 and 15, Lemma 18 implies that separability of is equivalent to every strict algebraic automorphism of being induced by a combinatorial automorphism. This can be checked in the given time using Corollary 13, and in case of a negative answer, we can construct a non-isomorphic but non-distinguished structure from the strict algebraic automorphism not induced by a combinatorial one as in Theorem 1. Note that the restriction to relational structures of arity at most is insubstantial, because the standard variant of the Weisfeiler-Leman algorithm given in Section 2 does not identify any relational structure of arity larger than , simply because it does not consider tuples of length larger than and thus cannot even detect whether a relation of arity larger than is empty. While there are variants of - which identify some -ary relational structures, these variants can be treated similarly to decide identification by those algorithms.
5 Hardness
We now prove hardness results that complement the positive results in the previous two sections. In the case that the dimension is part of the input, the --equivalence problem and the --identification problem are co-NP-hard and NP-hard, respectively. We use that deciding whether a cubic graph has tree-width is NP-hard [9]. The CFI-construction [11] assigns to a graph two CFI-graphs, which are distinguished by - if and only if has tree-width at most [8, 22]. If is cubic, then the CFI-graphs are polynomial-time computable and thus we reduced to --equivalence. To show hardness of --identification, we show that the CFI-graphs are actually identified by - if the tree-width of is at most . Hardness of the --equivalence problem was independently observed by Seppelt [42].
See 3
Theorem 19.
The problem of deciding, for a given pair of graphs and and a natural number , whether is co-NP-hard, both over uncolored simple graphs, and over simple graphs with -bounded abelian color classes.
P-Hardness for Fixed Dimension.
We again turn to the --identification problem for a fixed dimension , and show that both over uncolored simple graphs and over simple graphs with -bounded abelian color classes, the problem is P-hard under logspace-uniform AC0-reductions. We reduce from the P-hard monotone circuit value problem MCVP [17]. Our construction of a graph from a monotone circuit closely resembles the reductions of Grohe [19] to show P-hardness of the --equivalence problem. A similar reduction was also used to prove P-hardness of the identification problem for the color refinement algorithm (-) [2].
The reduction is based on so-called one-way switches, which were introduced by Grohe [19]. These graph gadgets allow color information computed by the Weisfeiler-Leman algorithm to pass in one direction, but block it from passing in the other. And while Grohe provides one-way switches for every dimension of the Weisfeiler-Leman algorithm, his gadgets have large color classes and are difficult to analyze. Instead, we give a new construction of such gadgets with -bounded color classes. We then use these one-way switches to construct a graph from an instance of the monotone circuit value problem from the identification of which we can read off the answer to the initial MCVP-query.
One-Way Switches.
Fix a dimension of the Weisfeiler-Leman algorithm. A -one-way switch is a graph gadget with a pair of input vertices and a pair of output vertices , which each form a color class of size . A pair of vertices is split if the two vertices are colored differently and - splits a pair if the coloring computed by - splits the pair. The crucial property of a -one-way switch is the following: if the input pair of the one-way switch is split, then - also splits the output pair, but not the other way around. One-way switches thus only allow one-way flow of --color information. In contrast to Grohe’s gadgets, our one-way switches are based on the CFI-construction [11]. We give only a brief sketch of the properties of our one-way switches here, and postpone their precise construction and properties to Appendix A.
Lemma 20 (simplified).
For every , there is a colored graph with -bounded abelian color classes, called -one-way switch, with an input pair and an output pair , neither of which is split by -, such that
-
1.
the graph obtained by splitting the input pair is identified by -,
-
2.
- splits the output pair of , and
-
3.
if we split the output pair , - still does not split the input pair .
From Monotone Circuits to Graphs.
We reduce the monotone circuit value problem to the --identification problem. A monotone circuit is a circuit consisting of input nodes with values True or False, inner nodes, which are either - or -nodes with two inputs each, and a distinguished output node. We write for the set of nodes of . With a monotone circuit , we associate the evaluation function , which is defined in the expected way. The monotone circuit value problem asks whether the output node of a given monotone circuit evaluates to True and is P-hard by [17].
Let be a monotone circuit. We construct a colored graph such that for every node , there is a vertex pair in that will be split by if and only if . Up to the construction of the one-way switches, the construction of is similar to constructions employed in [19] and [2]. We use two graphs and (see Figure 3) as gadgets to simulate logic gates. These gadgets both have two input pairs and one output pair such that exchanging the two output vertices by an automorphism requires the two vertices of one (for ) or both (for ) input pairs to also be exchanged.
The formal construction of is depicted in Figure 4. For every node of , we add a pair of vertices forming a color class of . To encode the input values of the circuit, we split every pair corresponding to an input node of value False. For every -node with input nodes and , we add a freshly colored copy of the gadget from Figure 3 and identify its output pair with the pair . Next, we connect its two input pairs via freshly colored one-way switches and to the pairs and respectively. More precisely, we identify the input pairs of these one-way switches with or respectively and identify their output pair with the respective input pair of the copy is identif of . Analogously, we add a copy of for every -node and connect it to its input via one-way switches as before.
This concludes the translation of the circuit itself, but for our reduction to the identification problem we need one more step: we connect all input pairs with to the output pair via additional one-way switches , whose input pair we identify with and whose output pair we identify with . Let be the resulting graph. Because we color different gadgets using distinct colors, and every gadget has -bounded color classes, the resulting graph also has -bounded color classes and indeed, these color classes could also be made abelian by introducing colored edges within the gadgets. The following lemma is proven similar to [19, Section 5.4] and [2, Theorem 7.11] by using the properties of the one-way switches to bound the distinguishing power of - on in terms of its distinguishing power on the individual gadgets.
Recall that contains, for every node of , a vertex pair . The essential property of the encoding of monotone circuits as graphs is the following:
Lemma 21.
For every monotone circuit with output node and every node of , we have if and only if .
Corollary 22.
The --equivalence problem for vertices is P-hard under uniform AC0-reductions, both over simple graphs with -bounded abelian color classes, and over uncolored simple graphs.
Consider now the modified graph that we get by adding another freshly colored one-way switch whose input pair is , i.e., the vertex pair corresponding to the output node of the circuit . Furthermore, we split the output pair of . Note that when splitting the output pair, we can choose which of the two vertices to give a fresh color to. We show that these two choices lead to non-isomorphic graphs which are distinguished by - if and only if the circuit evaluates to False.
Lemma 23.
For every monotone circuit , the graph is identified by - if and only if .
Proof sketch..
If , then all input and output pairs in are split. Because all gadgets in are identified when their input and output pairs are split, and different gadgets only interact at these split pairs, the whole graph is identified.
Conversely, assume , and let be the graph constructed just like , but with the colors of the two output vertices of the one-way switch exchanged. Because the pair is not split in , cannot distinguish the two output vertices of , which means that it cannot distinguish the non-isomorphic graphs and .
See 4
6 Conclusion
We have shown on the one hand that when the dimension is part of the input, the --equivalence problem and the --identification problem are co-NP-hard and NP-hard, respectively.
On the other hand, when the dimension is fixed, the equivalence problem is trivially solvable in polynomial time, and we have shown that the identification problem is solvable in polynomial time over graphs with -bounded color classes and on relational structures with -bounded abelian color classes. Still, the identification problem is P-hard in both cases. As an immediate corollary, we obtain the same polynomial-time solvability and hardness results for definability and equivalence in the bounded-variable logic with counting .
It would be interesting to know whether the --identification problem can be solved in polynomial time for larger color classes or indeed on general graphs when is fixed. Indeed, our NP-hardness reduction was based on whether the tree-width of a given graph is at most , which can be solved in linear time for every fixed [7], and thus does not even yield a super-linear lower bound when is fixed. Still, we would expect that neither the identification nor the equivalence problem can be solved in time . It might be fruitful to study these problems from the lens of parameterized complexity or provide lower complexity bounds based on the (strong) exponential time hypothesis.
References
- [1] Markus Anders and Pascal Schweitzer. Parallel computation of combinatorial symmetries. In 29th Annual European Symposium on Algorithms, ESA 2021, September 6-8, 2021, Lisbon, Portugal (Virtual Conference), volume 204 of LIPIcs, pages 6:1–6:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPICS.ESA.2021.6.
- [2] Vikraman Arvind, Johannes Köbler, Gaurav Rattan, and Oleg Verbitsky. Graph isomorphism, color refinement, and compactness. Comput. Complex., 26(3):627–685, 2017. doi:10.1007/S00037-016-0147-6.
- [3] Albert Atserias and Elitza N. Maneva. Sherali-Adams relaxations and indistinguishability in counting logics. SIAM J. Comput., 42(1):112–137, 2013. doi:10.1137/120867834.
- [4] László Babai. Graph isomorphism in quasipolynomial time [extended abstract]. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, June 18-21, 2016, pages 684–697. ACM, 2016. doi:10.1145/2897518.2897542.
- [5] László Babai and Ludek Kucera. Canonical labelling of graphs in linear average time. In 20th Annual Symposium on Foundations of Computer Science, San Juan, Puerto Rico, 29-31 October 1979, pages 39–46. IEEE Computer Society, 1979. doi:10.1109/SFCS.1979.8.
- [6] László Babai. Monte-Carlo algorithms in graph isomorphism testing. Technical Report 79-10, Université de Montréal, 1979.
- [7] Hans L. Bodlaender. A linear-time algorithm for finding tree-decompositions of small treewidth. SIAM J. Comput., 25(6):1305–1317, 1996. doi:10.1137/S0097539793251219.
- [8] Hans L. Bodlaender. A partial k-arboretum of graphs with bounded treewidth. Theor. Comput. Sci., 209(1-2):1–45, 1998. doi:10.1016/S0304-3975(97)00228-4.
- [9] Hans L. Bodlaender, Édouard Bonnet, Lars Jaffke, Dušan Knop, Paloma T. Lima, Martin Milanič, Sebastian Ordyniak, Sukanya Pandey, and Ondřej Suchý. Treewidth is NP-complete on cubic graphs. In 18th International Symposium on Parameterized and Exact Computation, IPEC 2023, September 6-8, 2023, Amsterdam, The Netherlands, volume 285 of LIPIcs, pages 7:1–7:13. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPICS.IPEC.2023.7.
- [10] Béla Bollobás. Distinguishing vertices of random graphs. North-holland Mathematics Studies, 62:33–49, 1982. doi:10.1016/S0304-0208(08)73545-X.
- [11] Jin-yi Cai, Martin Fürer, and Neil Immerman. An optimal lower bound on the number of variables for graph identification. Comb., 12(4):389–410, 1992. doi:10.1007/BF01305232.
- [12] G. Chen and I. Ponomarenko. Lectures on Coherent Configurations. Central China Normal University Press, 2019. A draft is available at https://www.pdmi.ras.ru/~inp/.
- [13] Anuj Dawar and David Richerby. The power of counting logics on restricted classes of finite structures. In Computer Science Logic, 21st International Workshop, CSL 2007, 16th Annual Conference of the EACSL, Lausanne, Switzerland, September 11-15, 2007, Proceedings, volume 4646 of Lecture Notes in Computer Science, pages 84–98. Springer, 2007. doi:10.1007/978-3-540-74915-8_10.
- [14] Zdenek Dvorák. On recognizing graphs by numbers of homomorphisms. J. Graph Theory, 64(4):330–342, 2010. doi:10.1002/JGT.20461.
- [15] Frank Fuhlbrück, Johannes Köbler, and Oleg Verbitsky. Identifiability of graphs with small color classes by the Weisfeiler-Leman algorithm. SIAM J. Discret. Math., 35(3):1792–1853, 2021. doi:10.1137/20M1327550.
- [16] Merrick Furst, John Hopcroft, and Eugene M. Luks. A subexponential algorithm for trivalent graph isomorphism. Technical report, Cornell University, USA, 1980.
- [17] Leslie M. Goldschlager. The monotone and planar circuit value problems are log space complete for P. SIGACT News, 9(2):25–29, 1977. doi:10.1145/1008354.1008356.
- [18] Erich Grädel and Wied Pakusa. Rank logic is dead, long live rank logic! J. Symb. Log., 84(1):54–87, 2019. doi:10.1017/jsl.2018.33.
- [19] Martin Grohe. Equivalence in finite-variable logics is complete for polynomial time. Comb., 19(4):507–532, 1999. doi:10.1007/S004939970004.
- [20] Martin Grohe. Fixed-point definability and polynomial time on graphs with excluded minors. J. ACM, 59(5):27:1–27:64, 2012. doi:10.1145/2371656.2371662.
- [21] Martin Grohe. Descriptive Complexity, Canonisation, and Definable Graph Structure Theory, volume 47 of Lecture Notes in Logic. Cambridge University Press, 2017. doi:10.1017/9781139028868.
- [22] Martin Grohe, Moritz Lichter, Daniel Neuen, and Pascal Schweitzer. Compressing CFI graphs and lower bounds for the Weisfeiler-Leman refinements. In 64th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2023, Santa Cruz, CA, USA, November 6-9, 2023, pages 798–809. IEEE, 2023. doi:10.1109/FOCS57990.2023.00052.
- [23] Martin Grohe and Julian Mariño. Definability and descriptive complexity on databases of bounded tree-width. In Database Theory - ICDT ’99, 7th International Conference, Jerusalem, Israel, January 10-12, 1999, Proceedings, volume 1540 of Lecture Notes in Computer Science, pages 70–82. Springer, 1999. doi:10.1007/3-540-49257-7_6.
- [24] Martin Grohe and Daniel Neuen. Canonisation and definability for graphs of bounded rank width. ACM Trans. Comput. Log., 24(1):6:1–6:31, 2023. doi:10.1145/3568025.
- [25] Martin Grohe and Martin Otto. Pebble games and linear equations. J. Symb. Log., 80(3):797–844, 2015. doi:10.1017/JSL.2015.28.
- [26] Lauri Hella. Logical hierarchies in PTIME. Inf. Comput., 129(1):1–19, 1996. doi:10.1006/INCO.1996.0070.
- [27] Neil Immerman and Eric S. Lander. Describing Graphs: A First-Order Approach to Graph Canonization, pages 59–81. Springer New York, New York, NY, 1990. doi:10.1007/978-1-4612-4478-3_5.
- [28] Tommi A. Junttila and Petteri Kaski. Engineering an efficient canonical labeling tool for large and sparse graphs. In Proceedings of the Nine Workshop on Algorithm Engineering and Experiments, ALENEX 2007, New Orleans, Louisiana, USA, January 6, 2007. SIAM, 2007. doi:10.1137/1.9781611972870.13.
- [29] Tommi A. Junttila and Petteri Kaski. Conflict propagation and component recursion for canonical labeling. In Theory and Practice of Algorithms in (Computer) Systems - First International ICST Conference, TAPAS 2011, Rome, Italy, April 18-20, 2011. Proceedings, volume 6595 of Lecture Notes in Computer Science, pages 151–162. Springer, 2011. doi:10.1007/978-3-642-19754-3_16.
- [30] Sandra Kiefer, Ilia Ponomarenko, and Pascal Schweitzer. The Weisfeiler-Leman dimension of planar graphs is at most 3. J. ACM, 66(6):44:1–44:31, 2019. doi:10.1145/3333003.
- [31] Sandra Kiefer, Pascal Schweitzer, and Erkal Selman. Graphs identified by logics with counting. ACM Trans. Comput. Log., 23(1):1:1–1:31, 2022. doi:10.1145/3417515.
- [32] Ludek Kucera. Canonical labeling of regular graphs in linear average time. In 28th Annuqal Symposium on Foundations of Computer Science, Los Angeles, California, USA, 27-29 October 1987, pages 271–279. IEEE Computer Society, 1987. doi:10.1109/SFCS.1987.11.
- [33] Moritz Lichter. Separating rank logic from polynomial time. J. ACM, 70(2), March 2023. doi:10.1145/3572918.
- [34] Moritz Lichter. Witnessed symmetric choice and interpretations in fixed-point logic with counting. In 50th International Colloquium on Automata, Languages, and Programming (ICALP 2023), volume 261 of LIPIcs, pages 133:1–133:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.ICALP.2023.133.
- [35] Moritz Lichter, Simon Raßmann, and Pascal Schweitzer. Computational complexity of the Weisfeiler-Leman dimension. CoRR, abs/2402.11531, 2024. doi:10.48550/arXiv.2402.11531.
- [36] Brendan D. McKay and Adolfo Piperno. Practical graph isomorphism, II. J. Symb. Comput., 60:94–112, 2014. doi:10.1016/J.JSC.2013.09.003.
- [37] Christopher Morris, Martin Ritzert, Matthias Fey, William L. Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and Leman go neural: Higher-order graph neural networks. In The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, The Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI 2019, The Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, January 27 - February 1, 2019, pages 4602–4609. AAAI Press, 2019. doi:10.1609/AAAI.V33I01.33014602.
- [38] Daniel Neuen and Pascal Schweitzer. Benchmark graphs for practical graph isomorphism. In 25th Annual European Symposium on Algorithms, ESA 2017, September 4-6, 2017, Vienna, Austria, volume 87 of LIPIcs, pages 60:1–60:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPICS.ESA.2017.60.
- [39] Daniel Neuen and Pascal Schweitzer. An exponential lower bound for individualization-refinement algorithms for graph isomorphism. In Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2018, Los Angeles, CA, USA, June 25-29, 2018, pages 138–150. ACM, 2018. doi:10.1145/3188745.3188900.
- [40] Thomas Schneider and Pascal Schweitzer. An upper bound on the Weisfeiler-Leman dimension, 2024. arXiv:2403.12581, doi:10.48550/arXiv.2403.12581.
- [41] Kyoungah See and Sung Y. Song. Association schemes of small order. Journal of Statistical Planning and Inference, 73(1):225–271, 1998. doi:10.1016/S0378-3758(98)00064-0.
- [42] Tim Seppelt. An Algorithmic Meta Theorem for Homomorphism Indistinguishability. In 49th International Symposium on Mathematical Foundations of Computer Science (MFCS 2024), volume 306 of Leibniz International Proceedings in Informatics (LIPIcs), pages 82:1–82:19, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.MFCS.2024.82.
- [43] B. Weisfeiler and A. Leman. The reduction of a graph to canonical form and the algebra which appears therein. Nauchno-Technicheskaya Informatsia, Seriya 2, 9:12–16, 1968. An english translation due to Grigory Ryabov is available at https://www.iti.zcu.cz/wl2018/pdf/wl_paper_translation.pdf.
- [44] Faried Abu Zaid, Erich Grädel, Martin Grohe, and Wied Pakusa. Choiceless polynomial time on structures with small abelian colour classes. In Mathematical Foundations of Computer Science 2014 - 39th International Symposium, MFCS 2014, Budapest, Hungary, August 25-29, 2014. Proceedings, Part I, volume 8634 of Lecture Notes in Computer Science, pages 50–62. Springer, 2014. doi:10.1007/978-3-662-44522-8_5.
Appendix A Construction of One-Way Switches
We construct our one-way switches based on the CFI-construction, and the proof of the properties heavily uses the bijective pebble game. We thus start with a short introduction to these.
The Bijective Pebble Game.
The question whether or - can distinguish structures and has another characterization in terms of the so-called bijective -pebble game. In this game, there are two players: Spoiler and Duplicator. Game positions are partial maps between and , where both tuples contain at most elements. We also sometimes identify such partial maps with the set .
We think of these maps as pairs of corresponding pebbles placed in the two graphs. If such a partial map is not a partial isomorphism, i.e., not an isomorphisms on the induced subgraphs, Spoiler wins immediately.
Otherwise, at the beginning of each turn, Spoiler picks up one pebble pair, either from the board if all pairs are placed, or from the side if there are pebble pairs left. Duplicator responds by giving a bijection between the two graphs. Spoiler then places the pebble pair they picked up on a pair of vertices of their choice. The game then continues in the resulting new position.
We say that Spoiler wins if the graphs have differing cardinality or they can reach a position that is no longer a partial isomorphism (and thus win immediately). Duplicator wins the game if Duplicator can find responses to Spoiler’s moves indefinitely.
Lemma 5 now has the following extension:
Lemma 24 ([11], [26]).
Let and be two relational structures of arity at most , and and two tuples of vertices. Then the following are equivalent:
-
(i)
Duplicator has a winning strategy in position of the bijective -pebble game between and ,
-
(ii)
for every -formula , we have if and only if ,
-
(iii)
the stable colors computed by - for the tuples and agree.
The CFI-Construction.
CFI-graphs are certain graphs with high Weisfeiler-Leman dimension [11]. To construct them, we start with a base graph , which is a connected simple graph, and a function . For a vertex , we denote the set of edges incident to by . Now, to construct the CFI-graph , we replace each vertex by a gadget which consists of inner vertices and outer vertices . Inside each gadget, the inner and outer vertices each form an independent set, and an inner vertex and outer vertex are connected by an edge if and only if . The resulting gadget for a vertex of degree is depicted in Figure 5.
Next, we define the edge set between different gadgets. For every edge , we connect the outer vertices and if and only if and add no further edges. Thus, corresponding outer vertex pairs and are always connected by a matching, which is either untwisted if , or twisted if .
Finally, we define a vertex coloring on this graph. For every vertex , we turn the set of inner vertices into a color class of size . Moreover, we turn each outer pair into a color class of size . This finishes the construction of CFI-graphs.
It turns out that for two functions , we have if and only if , meaning that every even number of twists cancels out. Thus, we also write and for the untwisted and twisted CFI-graphs over the base graph .
To understand the power of the Weisfeiler-Leman algorithm on CFI-graphs, it is convenient to study tree-width, which is a graph parameter that intuitively measures how far a graph is from being a tree. In this work, we do not need the formal definition of tree-width, and refer to [8]. The power of the Weisfeiler-Leman algorithm to distinguish CFI-graphs can now conveniently be expressed in terms of the tree-width of the base graphs, see [22].
Lemma 25.
For every base graph of tree-width , we have
Construction of the One-Way Switches.
We start by defining a base graph. Consider a wall graph consisting of rows of bricks each. Then, we attach a new vertex to the two upper corner vertices of the first row. The resulting graph is depicted in Figure 6.
Lemma 26.
The graph has tree-width , while has tree-width .
Now, we are ready to construct our one-way switches. In our proofs, we actually need a more explicit version of Lemma 20 in order to precisely control the expressive power fo the Weisfeiler-Leman algorithm on the whole graph in terms of its expressive power on the individual gadgets:
Lemma 27 (compare [19, Lemma 14]).
For every , there is a colored graph with -bounded color classes, called -one-way switch, with an input pair and an output pair satisfying the following properties:
-
1.
The graph obtained by splitting the input pair is identified by -.
-
2.
- splits the output pair of .
-
3.
There is no automorphism of exchanging the output vertices and .
Furthermore, there are sets of positions in the bijective -pebble game between and itself, called trapped and twisted such that
-
4.
every trapped or twisted position is a partial isomorphism,
-
5.
Duplicator can avoid non-trapped positions from trapped ones and non-twisted positions from twisted ones,
-
6.
for every trapped position , the position is also trapped,111 If the position contains more than pebbles, this means that every subposition on at most pebbles is trapped.
-
7.
for every twisted position , the position is also twisted.
-
8.
the positions and are both trapped and twisted,
-
9.
every subposition of a trapped position is trapped, and every subposition of a twisted position is twisted
Proof.
Let be the (untwisted) CFI-graph of , but with a CFI-gadget of degree added for the vertex instead of a gadget of degree . This leaves one outer pair of this gadget free which we use as our output pair . Furthermore, we use one of the other two outer pairs of this same CFI-gadget as the input pair .
Now, if we fix the output pair by individualizing one of the two vertices, the resulting graph corresponds to the usual CFI-graph of , while switching the pair corresponds to the twisted CFI-graph of . In particular, as these graphs are not isomorphic, there is no automorphism of switching the pair , which proves Property 3.
Moreover, splitting the input pair has the same effect to the power of - as removing one of the two edges incident to in the base graph has. When removing this edge in the base graph, the resulting graph is essentially equivalent to the CFI-graph of the -wall graph with one corner vertex replaced by a CFI-gadget of degree instead of . Because exchanging the two vertices of the free outer pair of this degree-3 gadget interchanges the twisted and untwisted CFI-graphs over the base graph, and - can distinguish CFI-graphs from all other graphs, the resulting graph is identified by -. This proves Property 1.
To show Property 2, we start the bijective -pebble game in position . Then, Spoiler uses the usual strategy of pebbling a wall which they then move from one side of the wall graph to the other. But because the game started in position , the two graphs the game is played on differ in a twist which will finally force Duplicator to lose.
Now, consider again the original graph without splitting the input pair. On this graph, we can extend every winning position for Duplicator in the bijective -pebble game between the untwisted CFI-graph and the twisted CFI-graph to a position in the bijective -pebble game between and itself which is compatible with . Similarly, we can extend every winning position for Duplicator in the bijective -pebble game between the untwisted CFI-graph and itself to a position between and itself which is compatible with .
We call the former positions twisted and the latter positions trapped. Properties 4, 6, 7 and 9 are then immediate, and Property 5 follows from Lemma 25 together with Lemma 26.
Because lies on a cycle in , there exists an automorphism of which twists both outer pairs of the gadget corresponding to . Lifting this automorphism to yields an automorphism switching and whilst fixing and . This proves Property 8.