# Simplified Algorithmic Metatheorems Beyond MSO: Treewidth and Neighborhood Diversity

**Authors:** Du\v{s}an Knop, Martin Kouteck\'y, Tom\'a\v{s} Masa\v{r}\'ik, Tom\'a\v{s} Toufar

arXiv: 1703.00544 · 2026-01-06

## TL;DR

This paper investigates the computational complexity of extended MSO logic on graphs with bounded treewidth and neighborhood diversity, providing new algorithms and insights into their expressive power and tractability.

## Contribution

It extends Courcelle's theorem to new MSO variants and graph classes, offering parameterized algorithms and a novel CSP-based approach for bounded treewidth graphs.

## Key findings

- Linear variants of MSO extensions are feasible on neighborhood diversity graphs.
- Polynomial-time algorithms are provided for combined global and local constraints.
- A CSP formulation offers an alternative method for deriving algorithms on bounded treewidth graphs.

## Abstract

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 the fair objective function (fairMSO).   First, we show how these extensions of MSO relate to each other in their expressive power. Furthermore, we highlight a certain "linearity" of some of the newly introduced extensions which turns out to play an important role. Second, we provide parameterized algorithm for the aforementioned structural parameters. On the side of neighborhood diversity, we show that combining the linear variants of local and global cardinality constraints is possible while keeping the linear (FPT) runtime but removing linearity of either makes this impossible. Moreover, we provide a polynomial time (XP) algorithm for the most powerful of studied extensions, i.e. the combination of global and local constraints. Furthermore, we show a polynomial time (XP) algorithm on graphs of bounded treewidth for the same extension. In addition, we propose a general procedure of deriving XP algorithms on graphs on bounded treewidth via formulation as Constraint Satisfaction Problems (CSP). This shows an alternate approach as compared to standard dynamic programming formulations.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1703.00544/full.md

## Figures

6 figures with captions in the complete paper: https://tomesphere.com/paper/1703.00544/full.md

## References

41 references — full list in the complete paper: https://tomesphere.com/paper/1703.00544/full.md

---
Source: https://tomesphere.com/paper/1703.00544