Logarithmic Weisfeiler-Leman Identifies All Planar Graphs

Martin Grohe, Sandra Kiefer
2021
The Weisfeiler-Leman (WL) algorithm is a well-known combinatorial procedure for detecting symmetries in graphs and it is widely used in graph-isomorphism tests. It proceeds by iteratively refining a colouring of vertex tuples. The number of iterations needed to obtain the final output is crucial for the parallelisability of the algorithm. We show that there is a constant k such that every planar graph can be identified (that is, distinguished from every non-isomorphic graph) by the
more » ... WL algorithm within a logarithmic number of iterations. This generalises a result due to Verbitsky (STACS 2007), who proved the same for 3-connected planar graphs. The number of iterations needed by the k-dimensional WL algorithm to identify a graph corresponds to the quantifier depth of a sentence that defines the graph in the (k + 1)-variable fragment C k+1 of first-order logic with counting quantifiers. Thus, our result implies that every planar graph is definable with a C k+1 -sentence of logarithmic quantifier depth. ACM Subject Classification Theory of computation → Finite Model Theory; Mathematics of computing → Graph theory ite programming [2, 3, 20] , homomorphism counting [8, 10] , and the algebra of coherent configurations [6] . Most recently, the WL algorithm has been applied in several interesting machine-learning contexts [1, 16, 33, 34, 39] . A very strong and highly exploited link between the algorithm and logic was established by Immerman and Lander [22] and Cai, Fürer, and Immerman [5]: WL k assigns the same colour to two k-tuples of vertices if and only if these tuples satisfy the same formulas of the (k + 1)-variable fragment C k+1 of first-order logic with counting quantifiers. Cai, Fürer, and Immerman [5] used this correspondence and an Ehrenfeucht-Fraïssé game that characterises equivalence for the logic C k+1 to prove that, for every k, there are non-isomorphic graphs of order O(k) that are not distinguished by WL k . Here we say that WL k distinguishes two graphs if WL k computes different stable colourings on them, that is, there is some colour such that the numbers of k-tuples of that colour differ in the two graphs. We say that WL k identifies a graph G if it distinguishes G from all graphs G ′ that are not isomorphic to G. It has been shown that for suitable constants k, the algorithm WL k identifies all planar graphs [13] , all graphs of bounded tree width [18] , and all graphs in many other natural graph classes [12, 14, 15, 17, 19] . For some of these classes, fairly tight bounds for the optimal value of k, called the Weisfeiler-Leman (WL) dimension, are known. Notably, interval graphs have WL dimension 2 [12], graphs of tree width k have WL dimension in the range ⌈k/2⌉ − 3 to k [26], and, most relevant for us, planar graphs have WL dimension 2 or 3 [27] . Another parameter of the WL algorithm that has received recent attention is the number of iterations it needs to reach its final, stable colouring. Since a set of size n k can only be partitioned n k − 1 times, a natural upper bound on the number of iterations to reach the final output is n k − 1 (n always denotes the number of vertices of the input graph). This bound cannot be improved for WL 1 , since there are infinitely many graphs on which the algorithm takes n − 1 iterations to compute its final output [25] . However, for WL 2 , it was shown that the bound Θ(n 2 ) is asymptotically not tight [28] . Currently, the best upper bound on the iteration number for WL 2 is O(n log n) [30] . The number of iterations of WL k is crucial for the parallelisability of the algorithm: for ℓ ≥ log n, it holds that ℓ iterations of WL k can be simulated in O(ℓ) steps on a PRAM with O(n k ) processors [21, 29] . In particular, if for a class C of graphs, all G, G ′ ∈ C (of order n) can be distinguished by WL k in O(log n) iterations, then the isomorphism problem for graphs in C is in the complexity class AC 1 . Grohe and Verbitsky [21] proved that this is the case for all classes of graphs of bounded tree width and all maps (graphs embedded into a surface together with a rotation system specifying the embedding), and Verbitsky [36] proved it for the class of 3-connected planar graphs. Our results We say that WL k distinguishes two graphs in ℓ iterations if the colouring obtained by WL k in the ℓ-th iteration differs among the two graphs, and we say WL k identifies a graph in ℓ iterations if it distinguishes the graph from every non-isomorphic graph in ℓ iterations. ▶ Theorem 1. There is a constant k such that WL k identifies every n-vertex planar graph in O(log n) iterations. The correspondence between WL k and the logic C k+1 can be refined to a correspondence between the number of iterations and the quantifier depth: WL k assigns the same colour to two k-tuples of vertices in the ℓ-th iteration if and only if these two k-tuples satisfy the same C k+1 -formulas of quantifier depth ℓ. Thus, the following theorem is equivalent to Theorem 1.
doi:10.18154/rwth-2021-06468 fatcat:4i4ilkygxjfibopkyoojm7olte