Mastodon

Recognizing Treewidth-3 Graphs

(English translation of the original article, by Gemini 3 Pro (~90%) + me.) This article is for the 21st day of Tree Advent Calendar 2025. Overview For a graph $G$, let $\mathrm{tw}(G)$ denote the treewidth of $G$. This article introduces a simple algorithm to solve the following decision problem. Input: A (simple undirected) graph $G = (V, E)$ with $n$ vertices and $m$ edges. Output: Is $\mathrm{tw}(G) \leq 3$? Expert readers might know these facts:...

December 21, 2025