We give an algorithm that given a graph $G$ with $n$ vertices and $m$ edges and an integer $k$, in time $O_k(n^{1+o(1)}) + O(m)$ either outputs a rank decomposition of $G$ of width at most $k$ or determines that the rankwidth of $G$ is larger than $k$; the $O_k(\cdot)$-notation hides factors depending on $k$. Our algorithm returns also a $(2^{k+1}-1)$-expression for cliquewidth, yielding a $(2^{k+1}-1)$-approximation algorithm for cliquewidth with the same running time. This improves upon the $O_k(n^2)$ time algorithm of Fomin and Korhonen [STOC 2022]. The main ingredient of our algorithm is a fully dynamic algorithm for maintaining rank decompositions of bounded width: We give a data structure that for a dynamic $n$-vertex graph $G$ that is updated by edge insertions and deletions maintains a rank decomposition of $G$ of width at most $4k$ under the promise that the rankwidth of $G$ never grows above $k$. The amortized running time of each update is $O_k(2^{\sqrt{\log n} \log \log n})$. The data structure furthermore can maintain whether $G$ satisfies some fixed ${\sf CMSO}_1$ property within the same running time. We also give a framework for performing ``dense'' edge updates inside a given set of vertices $X$, where the new edges inside $X$ are described by a given ${\sf CMSO}_1$ sentence and vertex labels, in amortized $O_k(|X| \cdot 2^{\sqrt{\log n} \log \log n})$ time. Our dynamic algorithm generalizes the dynamic treewidth algorithm of Korhonen, Majewski, Nadara, Pilipczuk, and Soko{\l}owski [FOCS 2023].
翻译:我们提出一种算法:给定一个包含 $n$ 个顶点和 $m$ 条边的图 $G$ 及整数 $k$,该算法在时间 $O_k(n^{1+o(1)}) + O(m)$ 内,要么输出宽度至多为 $k$ 的 $G$ 的秩分解,要么判定 $G$ 的秩宽大于 $k$;其中 $O_k(\cdot)$ 表示隐藏与 $k$ 相关因子的记号。我们的算法还返回一个用于团宽的 $(2^{k+1}-1)$-表达式,从而以相同运行时间得到团宽的 $(2^{k+1}-1)$-近似算法。这改进了 Fomin 和 Korhonen [STOC 2022] 的 $O_k(n^2)$ 时间算法。该算法的核心是一个用于维护有界宽度秩分解的全动态算法:我们设计了一种数据结构,对于通过边插入和删除更新的动态 $n$ 顶点图 $G$,在保证 $G$ 的秩宽不超过 $k$ 的前提下,维护 $G$ 的宽度至多为 $4k$ 的秩分解。每次更新的均摊运行时间为 $O_k(2^{\sqrt{\log n} \log \log n})$。此外,该数据结构能以相同运行时间维护 $G$ 是否满足某个固定的 ${\sf CMSO}_1$ 性质。我们还给出一个框架,用于在给定顶点集 $X$ 内执行“稠密”边更新(其中 $X$ 内部的新边由给定的 ${\sf CMSO}_1$ 语句和顶点标签描述),均摊时间复杂度为 $O_k(|X| \cdot 2^{\sqrt{\log n} \log \log n})$。我们的动态算法推广了 Korhonen、Majewski、Nadara、Pilipczuk 和 Soko{\l}owski [FOCS 2023] 的动态树宽算法。