Simplified Algorithmic Metatheorems Beyond MSO: Treewidth and Neighborhood Diversity

  • Dušan KnopEmail author
  • Martin Koutecký
  • Tomáš Masařík
  • Tomáš Toufar
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10520)


This paper settles the computational complexity of model checking of several extensions of the monadic second order (MSO) logic on two classes of graphs: graphs of bounded treewidth and graphs of bounded neighborhood diversity.

A classical theorem of Courcelle states that any graph property definable in MSO is decidable in linear time on graphs of bounded treewidth. Algorithmic metatheorems like Courcelle’s serve to generalize known positive results on various graph classes. We explore and extend three previously studied MSO extensions: global and local cardinality constraints (CardMSO and MSO-LCC) and optimizing a fair objective function (fairMSO).

We show how these fragments relate to each other in expressive power and highlight their (non)linearity. On the side of neighborhood diversity, we show that combining the linear variants of local and global cardinality constraints is possible while keeping FPT runtime but removing linearity of either makes this impossible, and we provide an XP algorithm for the hard case. Furthemore, we show that even the combination of the two most powerful fragments is solvable in polynomial time on graphs of bounded treewidth.


Treewidth Monadic Second-order (MSO) Variable Neighborhood Metatheorem Global Cardinality Constraint 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Alves, S.R., Dabrowski, K.K., Faria, L., Klein, S., Sau, I., dos Santos Souza, U.: On the (parameterized) complexity of recognizing well-covered (r, 1) graphs. In: Chan, T.H.H., Li, M., Wang, L. (eds.) COCOA. LNCS, pp. 423–437. Springer, Heidelberg (2016). doi: 10.1007/978-3-319-48749-6 Google Scholar
  2. 2.
    Arnborg, S., Lagergren, J., Seese, D.: Easy problems for tree-decomposable graphs. J. Algorithms 12(2), 308–340 (1991)CrossRefMathSciNetzbMATHGoogle Scholar
  3. 3.
    Bodlaender, H.L.: Treewidth: characterizations, applications, and computations. In: Fomin, F.V. (ed.) WG 2006. LNCS, vol. 4271, pp. 1–14. Springer, Heidelberg (2006). doi: 10.1007/11917496_1 CrossRefGoogle Scholar
  4. 4.
    Courcelle, B.: The monadic second-order logic of graphs I: Recognizable sets of finite graphs. Inf. Comput. 85, 12–75 (1990)CrossRefMathSciNetzbMATHGoogle Scholar
  5. 5.
    Courcelle, B., Makowsky, J.A., Rotics, U.: Linear time solvable optimization problems on graphs of bounded clique-width. Theor. Comput. Syst. 33(2), 125–150 (2000). CrossRefMathSciNetzbMATHGoogle Scholar
  6. 6.
    Courcelle, B., Mosbah, M.: Monadic second-order evaluations on tree-decomposable graphs. In: Schmidt, G., Berghammer, R. (eds.) WG 1991. LNCS, vol. 570, pp. 13–24. Springer, Heidelberg (1992). doi: 10.1007/3-540-55121-2_2 CrossRefGoogle Scholar
  7. 7.
    Cygan, M., Fomin, F.V., Kowalik, Ł., Lokshtanov, D., Marx, D., Pilipczuk, M., Pilipczuk, M., Saurabh, S.: Parameterized Algorithms. Springer, Heidelberg (2015). doi: 10.1007/978-3-319-21275-3 CrossRefzbMATHGoogle Scholar
  8. 8.
    Dvořák, P., Knop, D., Toufar, T.: Target Set Selection in Dense Graph Classes. CoRR 1610.07530 (October 2016)Google Scholar
  9. 9.
    Dvořák, P., Knop, D., Masařík, T.: Anti-path cover on sparse graph classes. In: Bouda, J., Holík, L., Kofroň, J., Strejček, J., Rambousek, A. (eds.) Proceedings 11th Doctoral Workshop on Mathematical and Engineering Methods in Computer Science, Telč, Czech Republic, 21st–23rd October 2016. Electronic Proceedings in Theoretical Computer Science, vol. 233, pp. 82–86. Open Publishing Association (2016)Google Scholar
  10. 10.
    Fiala, J., Gavenčiak, T., Knop, D., Koutecký, M., Kratochvíl, J.: Fixed parameter complexity of distance constrained labeling and uniform channel assignment problems. In: Dinh, T.N., Thai, M.T. (eds.) COCOON 2016. LNCS, vol. 9797, pp. 67–78. Springer, Cham (2016). doi: 10.1007/978-3-319-42634-1_6 CrossRefGoogle Scholar
  11. 11.
    Freuder, E.C.: Complexity of K-tree structured constraint satisfaction problems. In: Proceedings of the Eighth National Conference on Artificial Intelligence, vol. 1, pp. 49. AAAI 1990, AAAI Press (1990).
  12. 12.
    Frick, M., Grohe, M.: The complexity of first-order and monadic second-order logic revisited. Ann. Pure Appl. Logic 130(1–3), 3–31 (2004).
  13. 13.
    Ganian, R.: Using neighborhood diversity to solve hard problems. CoRR abs/1201.3091 (2012).
  14. 14.
    Ganian, R., Obdržálek, J.: Expanding the expressive power of monadic second-order logic on restricted graph classes. In: Lecroq, T., Mouchard, L. (eds.) IWOCA 2013. LNCS, vol. 8288, pp. 164–177. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-45278-9_15 CrossRefGoogle Scholar
  15. 15.
    Gargano, L., Rescigno, A.A.: Complexity of conflict-free colorings of graphs. Theor. Comput. Sci. 566, 39–49 (2015).
  16. 16.
    Gottlob, G., Pichler, R., Wei, F.: Monadic datalog over finite structures with bounded treewidth. In: Proceedings of the 26th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS), pp. 165–174 (2007)Google Scholar
  17. 17.
    Grohe, M., Kreutzer, S.: Methods algorithmic meta theorems. Model Theor. Methods Finite Comb. 558, 181–206 (2011)CrossRefMathSciNetzbMATHGoogle Scholar
  18. 18.
    Kloks, T. (ed.): Treewidth: Computations and Approximations. LNCS, vol. 842. Springer, Heidelberg (1994). doi: 10.1007/BFb0045375 zbMATHGoogle Scholar
  19. 19.
    Kneis, J., Langer, A., Rossmanith, P.: Courcelle’s theorem - a game-theoretic approach. Discret. Optim. 8(4), 568–594 (2011)CrossRefMathSciNetzbMATHGoogle Scholar
  20. 20.
    Knop, D., Kouteckỳ, M., Masařík, T., Toufar, T.: Simplified algorithmic metatheorems beyond MSO: Treewidth and neighborhood diversity. arXiv preprint. arXiv:1703.00544 (2017)
  21. 21.
    Kolaitis, P.G., Vardi, M.Y.: Conjunctive-query containment and constraint satisfaction. J. Comput. Syst. Sci. 61(2), 302–332 (2000). CrossRefMathSciNetzbMATHGoogle Scholar
  22. 22.
    Kolman, P., Koutecký, M., Tiwary, H.R.: Extension complexity, MSO logic, and treewidth (v3) (12 July 2016)., short version presented at SWAT 2016
  23. 23.
    Kolman, P., Lidický, B., Sereni, J.S.: On Fair Edge Deletion Problems (2009)Google Scholar
  24. 24.
    Lampis, M.: Algorithmic meta-theorems for restrictions of treewidth. Algorithmica 64(1), 19–37 (2012). CrossRefMathSciNetzbMATHGoogle Scholar
  25. 25.
    Lampis, M.: Model checking lower bounds for simple graphs. Log. Methods Comput. Sci. 10(1) (2014).
  26. 26.
    Langer, A., Reidl, F., Rossmanith, P., Sikdar, S.: Practical algorithms for MSO model-checking on tree-decomposable graphs. Comput. Sci. Rev. 13–14, 39–74 (2014)CrossRefzbMATHGoogle Scholar
  27. 27.
    Libkin, L.: Elements of Finite Model Theory. Springer-Verlag, Berlin (2004). doi: 10.1007/978-3-662-07003-1 CrossRefzbMATHGoogle Scholar
  28. 28.
    Masařík, T., Toufar, T.: Parameterized complexity of fair deletion problems. In: Gopal, T.V., Jäger, G., Steila, S. (eds.) TAMC 2017. LNCS, vol. 10185, pp. 628–642. Springer, Heidelberg (2017). doi: 10.1007/978-3-319-55911-7_45 CrossRefGoogle Scholar
  29. 29.
    Matoušek, J., Nešetřil, J.: Invitation to Discrete Mathematics, 2nd edn. Oxford University Press, Oxford (2009)zbMATHGoogle Scholar
  30. 30.
    Pilipczuk, M.: Problems parameterized by treewidth tractable in single exponential time: a logical approach. In: Murlak, F., Sankowski, P. (eds.) MFCS 2011. LNCS, vol. 6907, pp. 520–531. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-22993-0_47 CrossRefGoogle Scholar
  31. 31.
    Szeider, S.: Monadic second order logic on graphs with local cardinality constraints. ACM Trans. Comput. Log. 12(2), 12 (2011). CrossRefMathSciNetzbMATHGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Dušan Knop
    • 2
    Email author
  • Martin Koutecký
    • 2
  • Tomáš Masařík
    • 2
  • Tomáš Toufar
    • 1
  1. 1.Computer Science InstituteCharles UniversityPragueCzech Republic
  2. 2.Department of Applied MathematicsCharles UniversityPragueCzech Republic

Personalised recommendations