Graphs Identified by Logics with Counting

  • Sandra KieferEmail author
  • Pascal Schweitzer
  • Erkal Selman
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9234)


We classify graphs and, more generally, finite relational structures that are identified by \({C^{2}}\), that is, two-variable first-order logic with counting. Using this classification, we show that it can be decided in almost linear time whether a structure is identified by \({C^{2}}\). Our classification implies that for every graph identified by this logic, all vertex-colored versions of it are also identified. A similar statement is true for finite relational structures.

We provide constructions that solve the inversion problem for finite structures in linear time. This problem has previously been shown to be polynomial time solvable by Martin Otto. For graphs, we conclude that every \({C^{2}}\)-equivalence class contains a graph whose orbits are exactly the classes of the \({C^{2}}\)-partition of its vertex set and which has a single automorphism witnessing this fact.

For general k, we show that such statements are not true by providing examples of graphs of size linear in k which are identified by \({C^{3}}\) but for which the orbit partition is strictly finer than the \(C^k\)-partition. We also provide identified graphs which have vertex-colored versions that are not identified by \(C^k\).


  1. 1.
    Arvind, V., Köbler, J., Rattan, G., Verbitsky, O.: On the power of color refinement. In: FCT 2015, (to appear 2015)Google Scholar
  2. 2.
    Atserias, A., Maneva, E.N.: Sherali-adams relaxations and indistinguishability in counting logics. SIAM J. Comput. 42(1), 112–137 (2013)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Babai, L., Erdös, P., Selkow, S.M.: Random graph isomorphism. SIAM J. Comput. 9(3), 628–635 (1980)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Babai, L., Kucera, L.: Canonical labelling of graphs in linear average time. In: FOCS 1979, pp. 39–46. IEEE Computer Society (1979)Google Scholar
  5. 5.
    Berkholz, C., Bonsma, P., Grohe, M.: Tight lower and upper bounds for the complexity of canonical colour refinement. In: Bodlaender, H.L., Italiano, G.F. (eds.) ESA 2013. LNCS, vol. 8125, pp. 145–156. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  6. 6.
    Cai, J., Fürer, M., Immerman, N.: An optimal lower bound on the number of variables for graph identifications. Combinatorica 12(4), 389–410 (1992)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Chang, L.-C.: The uniqueness and nonuniqueness of the triangular association scheme. Sci. Record. 3, 604–613 (1959)MathSciNetzbMATHGoogle Scholar
  8. 8.
    Dawar, A., Holm, B.: Pebble games with algebraic rules. In: Czumaj, A., Mehlhorn, K., Pitts, A., Wattenhofer, R. (eds.) ICALP 2012, Part II. LNCS, vol. 7392, pp. 251–262. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  9. 9.
    Grädel, E., Otto, M.: On logics with two variables. Theor. Comput. Sci. 224(1–2), 73–113 (1999)CrossRefzbMATHGoogle Scholar
  10. 10.
    Grädel, E., Otto, M., Rosen, E.: Two-variable logic with counting is decidable. In: LICS 1997, pp. 306–317. IEEE Computer Society (1997)Google Scholar
  11. 11.
    Grohe, M.: Finite variable logics in descriptive complexity theory. Bull. Symbolic Log. 4(4), 345–398 (1998)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Grohe, M., Otto, M.: Pebble games and linear equations. In: Cégielski, P., Durand, A. (eds.) CSL 2012, of LIPIcs, vol. 16, pp. 289–304 (2012)Google Scholar
  13. 13.
    Hella, L.: Logical hierarchies in PTIME. Inf. Comput. 129(1), 1–19 (1996)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Hoffman, A.J.: On the uniqueness of the triangular association scheme. Ann. Math. Statist. 31(2), 492–497 (1960)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Kiefer, S., Schweitzer, P., Selman, E.: Graphs identified by logics with counting. CoRR, abs/1503.08792 (2015). full version of the paperGoogle Scholar
  16. 16.
    Kopczynski, E., Tan, T.: Regular graphs and the spectra of two-variable logic with counting. CoRR, abs/1304.0829 (2013)Google Scholar
  17. 17.
    Krebs, A., Verbitsky, O.: Universal covers, color refinement, and two-variable logic with counting quantifiers: Lower bounds for the depth. CoRR, abs/1407.3175 (2014)Google Scholar
  18. 18.
    Kucera, L.: Canonical labeling of regular graphs in linear average time. In: FOCS 1987, pp. 271–279. IEEE Computer Society (1987)Google Scholar
  19. 19.
    Lucas, E.: Récréations mathématiques. 2ième éd., nouveau tirage. Librairie Scientifique et Technique Albert Blanchard, Paris (1960)Google Scholar
  20. 20.
    McKay, B.D., Piperno, A.: Practical graph isomorphism, II. J. Symb. Comput. 60, 94–112 (2014)MathSciNetCrossRefzbMATHGoogle Scholar
  21. 21.
    Otto, M.: Canonization for two variables and puzzles on the square. Ann. Pure Appl. Logic 85(3), 243–282 (1997)MathSciNetCrossRefzbMATHGoogle Scholar
  22. 22.
    Pratt-Hartmann, I.: Complexity of the two-variable fragment with counting quantifiers. J. Log. Lang. Inf. 14(3), 369–395 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  23. 23.
    West, D.B.: Introduction to Graph Theory, 2nd edn. Pearson, Upper Saddle River (2000)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  • Sandra Kiefer
    • 1
    Email author
  • Pascal Schweitzer
    • 1
  • Erkal Selman
    • 1
  1. 1.RWTH Aachen UniversityAachenGermany

Personalised recommendations