Papers by Marek Sokołowski
13 paper(s) by this author
· All BibTeX
Time-Optimal APSP and Matrix Multiplication in Classes of Linear Neighborhood Complexity
The notion of linear neighborhood complexity is a very general structural assumption on a graph class, covering most classes of sparse graphs such as planar graphs, graphs excluding a fixed (topological) minor, or bounded expansion graphs, as well as many structured classes of dense graphs, such as graphs of bounded clique-width, twin-width, merge-width, or flip-width. In this work, we present $O(n^2)$-time optimal algorithms for $n$-vertex graphs coming from a class of linear neighborhood complexity for the following problems: $\bullet$ All-Pairs Shortest Paths, $\bullet$ the multiplication of the adjacency matrix $M$ of the input graph with any $n \times n$ matrix. More specifically, after a quadratic preprocessing, we can multiply $M$ with any $n$-vector in $O(n)$ time.
This solves several questions raised in [Bonnet, Kim, Geniet, Moon; ICALP '26], and improves and generalizes results in several other recent papers [Bonnet, Giocanti, Ossona de Mendez, Thomassé; STACS '23], [Bannach, Marwitz, Tantau; STACS '24], [Anand, van den Brand, McCarty; NeurIPS '26], [Kozma, Opler '26], and [Cardinal, McCarty, Yuditsky '26]. We also extend our results to classes of bounded VC density. In classes of linear neighborhood complexity, we also give a triangle-detection algorithm in randomized linear time $O(n+m)$ in $n$-vertex $m$-edge graphs, a $K_4$-detection algorithm in randomized $O(n \log^5 n + m \log n)$ or deterministic $O(n^2)$ time, and a $K_5$-detection algorithm in randomized $O(n \log^9 n + m \log^5 n)$ time.
Multiway $f$-Cut is fixed-parameter tractable
A connectivity function on a finite set $E$ is a function $f\colon 2^E\to\mathbb Z$ that is submodular and symmetric, with $f(\varnothing)=0$. Given a connectivity function $f$ via a value oracle, terminals $t_1,\ldots,t_r\in E$, and an integer $k$, the Multiway $f$-Cut problem asks whether $E$ has a partition $(P_1,\ldots,P_r)$ with $t_i\in P_i$ for every $i$ and $\sum_{i=1}^r f(P_i)\le k$. We prove that Multiway $f$-Cut is fixed-parameter tractable parameterized by $k$.
Cut functions of graphs are connectivity functions, so as a special case we recover the classical result that Edge Multiway Cut in graphs is fixed-parameter tractable. Our proof of correctness is completely elementary, and is arguably the simplest known proof of this fact.
An Erdős-Pósa theorem for cycles and faces of distinct lengths
We show that for every $k \in \mathbb{N}$, every graph $G$ contains $k$ vertex-disjoint cycles of different lengths, or there exists a set $X \subseteq V(G)$ with $|X| \in \mathcal{O}(k^6\mathsf{polylog}(k))$ such that $G-X$ has at most $k-1$ cycle lengths.
We also prove analogous results for facial lengths of embedded graphs. Let $G$ be a graph with a closed 2-cell embedding $ψ$ on a surface $Σ$ of Euler genus $g$, let $c$ be a colouring of the faces $\mathcal{F}(ψ)$ of $ψ$, and let $R(G,ψ)$ be the radial graph of $(G, ψ)$. Then there exist $k$ faces $F_1, \ldots , F_k \in \mathcal{F}(ψ)$ that are given pairwise distinct colours by $c$ and are pairwise at distance at least $d$ in $ψ$, or there exists a set $X \subseteq V(G)$ of order at most $\mathcal{O}(k^2dg)$ such that $|\{ c(F) \mid F \in \mathcal{F}(ψ) \text{ and } V(F) \cap \bigcup_{x \in X} N^d_{R(G,ψ)}(x) = \emptyset \}| \leq k(k+2)$.
Finally, using a result from additive combinatorics, we show that there are subdivided ladders with only a small number of cycle lengths. This suggests that it may be difficult to improve our bounds.
Polynomial-size encoding of all cuts of small value in integer-valued symmetric submodular functions
We study connectivity functions, that is, integer-valued symmetric submodular functions on a finite ground set attaining $0$ on the empty set. For a connectivity function $f$ on an $n$-element set $V$ and an integer $k\ge 0$, we show that the family of all sets $X\subseteq V$ with $f(X)=k$ admits a polynomial-size representation: it can be described by a list of at most $O(n^{4k})$ items, each consisting of a set to be included, another set to be excluded, and a partition of remaining elements, such that the union of some members of the partition and the set to be included are precisely all sets $X$ with $f(X)=k$. We also give an algorithm that constructs this representation in time $O(n^{2k+7}γ+n^{2k+8}+n^{4k+2})$, where $γ$ is the oracle time to evaluate $f$. This generalizes the low rank structure theorem of Bojańczyk, Pilipczuk, Przybyszewski, Sokołowski, and Stamoulis [Low rank MSO, arXiv, 2025] on cut-rank functions on graphs to general connectivity functions. As an application, for fixed $k$, we obtain a polynomial-time algorithm for finding a set $A$ with $f(A)=k$ and a prescribed cardinality constraint on $A$.
Half-integral Erdős-Pósa property for non-null $S$-$T$ paths
For a group $Γ$, a $Γ$-labelled graph is an undirected graph $G$ where every orientation of an edge is assigned an element of $Γ$ so that opposite orientations of the same edge are assigned inverse elements. A path in $G$ is non-null if the product of the labels along the path is not the neutral element of $Γ$. We prove that for every finite group $Γ$, non-null $S$-$T$ paths in $Γ$-labelled graphs exhibit the half-integral Erdős-Pósa property. More precisely, there is a function $f$, depending on $Γ$, such that for every $Γ$-labelled graph $G$, subsets of vertices $S$ and $T$, and integer $k$, one of the following objects exists: a family $\cal F$ consisting of $k$ non-null $S$-$T$ paths in $G$ such that every vertex of $G$ participates in at most two paths of $\cal F$; or a set $X$ consisting of at most $f(k)$ vertices that meets every non-null $S$-$T$ path in $G$. This in particular proves that in undirected graphs $S$-$T$ paths of odd length have the half-integral Erdős-Pósa property.
Almost-linear time parameterized algorithm for rankwidth via dynamic rankwidth
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łowski [FOCS 2023].
Elementary first-order model checking for sparse graphs
It is known that for subgraph-closed graph classes the first-order model checking problem is fixed-parameter tractable if and only if the class is nowhere dense [Grohe, Kreutzer, Siebertz, STOC 2014]. However, the dependency on the formula size is non-elementary, and in fact, this is unavoidable even for the class of all trees [Frick and Grohe, LICS 2002]. On the other hand, it is known that the dependency is elementary for classes of bounded degree [Frick and Grohe, LICS 2002] as well as for classes of bounded pathwidth [Lampis, ICALP 2023]. In this paper we generalise these results and almost completely characterise subgraph-closed graph classes for which the model checking problem is fixed-parameter tractable with an elementary dependency on the formula size. Those are the graph classes for which there exists a number $d$ such that for every $r$, some tree of depth $d$ and size bounded by an elementary function of $r$ is avoided as an $({\leq} r)$-subdivision in all graphs in the class. In particular, this implies that if the class in question excludes a fixed tree as a topological minor, then first-order model checking for graphs in the class is fixed-parameter tractable with an elementary dependency on the formula size.
Sparse Graphs of Twin-width 2 Have Bounded Tree-width
Twin-width is a structural width parameter introduced by Bonnet, Kim, Thomassé and Watrigant [FOCS 2020]. Very briefly, its essence is a gradual reduction (a contraction sequence) of the given graph down to a single vertex while maintaining limited difference of neighbourhoods of the vertices, and it can be seen as widely generalizing several other traditional structural parameters. Having such a sequence at hand allows to solve many otherwise hard problems efficiently. Our paper focuses on a comparison of twin-width to the more traditional tree-width on sparse graphs. Namely, we prove that if a graph $G$ of twin-width at most $2$ contains no $K_{t,t}$ subgraph for some integer $t$, then the tree-width of $G$ is bounded by a polynomial function of $t$. As a consequence, for any sparse graph class $\mathcal{C}$ we obtain a polynomial time algorithm which for any input graph $G \in \mathcal{C}$ either outputs a contraction sequence of width at most $c$ (where $c$ depends only on $\mathcal{C}$), or correctly outputs that $G$ has twin-width more than $2$. On the other hand, we present an easy example of a graph class of twin-width $3$ with unbounded tree-width, showing that our result cannot be extended to higher values of twin-width.
Flipper games for monadically stable graph classes
A class of graphs $\mathscr{C}$ is monadically stable if for any unary expansion $\widehat{\mathscr{C}}$ of $\mathscr{C}$, one cannot interpret, in first-order logic, arbitrarily long linear orders in graphs from $\widehat{\mathscr{C}}$. It is known that nowhere dense graph classes are monadically stable; these encompass most of the studied concepts of sparsity in graphs, including graph classes that exclude a fixed topological minor. On the other hand, monadic stability is a property expressed in purely model-theoretic terms and hence it is also suited for capturing structure in dense graphs.
For several years, it has been suspected that one can create a structure theory for monadically stable graph classes that mirrors the theory of nowhere dense graph classes in the dense setting. In this work we provide a step in this direction by giving a characterization of monadic stability through the Flipper game: a game on a graph played by Flipper, who in each round can complement the edge relation between any pair of vertex subsets, and Connector, who in each round localizes the game to a ball of bounded radius. This is an analog of the Splitter game, which characterizes nowhere dense classes of graphs (Grohe, Kreutzer, and Siebertz, J.ACM'17).
We give two different proofs of our main result. The first proof uses tools from model theory, and it exposes an additional property of monadically stable graph classes that is close in spirit to definability of types. Also, as a byproduct, we give an alternative proof of the recent result of Braunfeld and Laskowski (arXiv 2209.05120) that monadic stability for graph classes coincides with existential monadic stability. The second proof relies on the recently introduced notion of flip-wideness (Dreier, Mählmann, Siebertz, and Toruńczyk, ICALP 2023) and provides an efficient algorithm to compute Flipper's moves in a winning strategy.
Simpler and faster algorithms for detours in planar digraphs
In the directed detour problem one is given a digraph $G$ and a pair of vertices $s$ and~$t$, and the task is to decide whether there is a directed simple path from $s$ to $t$ in $G$ whose length is larger than $\mathsf{dist}_{G}(s,t)$. The more general parameterized variant, directed long detour, asks for a simple $s$-to-$t$ path of length at least $\mathsf{dist}_{G}(s,t)+k$, for a given parameter $k$. Surprisingly, it is still unknown whether directed detour is polynomial-time solvable on general digraphs. However, for planar digraphs, Wu and Wang~[Networks, '15] proposed an $\mathcal{O}(n^3)$-time algorithm for directed detour, while Fomin et al.~[STACS 2022] gave a $2^{\mathcal{O}(k)}\cdot n^{\mathcal{O}(1)}$-time fpt algorithm for directed long detour. The algorithm of Wu and Wang relies on a nontrivial analysis of how short detours may look like in a plane embedding, while the algorithm of Fomin et al.~is based on a reduction to the $§$-disjoint paths problem on planar digraphs. This latter problem is solvable in polynomial time using the algebraic machinery of Schrijver~[SIAM~J.~Comp.,~'94], but the degree of the obtained polynomial factor is huge.
In this paper we propose two simple algorithms: we show how to solve, in planar digraphs, directed detour in time $\mathcal{O}(n^2)$ and directed long detour in time $2^{\mathcal{O}(k)}\cdot n^4 \log n$. In both cases, the idea is to reduce to the $2$-disjoint paths problem in a planar digraph, and to observe that the obtained instances of this problem have a certain topological structure that makes them amenable to a direct greedy strategy.
Max Weight Independent Set in graphs with no long claws: An analog of the Gyárfás' path argument
Published
• View Publication
• BIB
We revisit recent developments for the Maximum Weight Independent Set problem in graphs excluding a subdivided claw $S_{t,t,t}$ as an induced subgraph [Chudnovsky, Pilipczuk, Pilipczuk, Thomassé, SODA 2020] and provide a subexponential-time algorithm with improved running time $2^{\mathcal{O}(\sqrt{n}\log n)}$ and a quasipolynomial-time approximation scheme with improved running time $2^{\mathcal{O}(\varepsilon^{-1} \log^{5} n)}$.
The Gyárfás' path argument, a powerful tool that is the main building block for many algorithms in $P_t$-free graphs, ensures that given an $n$-vertex $P_t$-free graph, in polynomial time we can find a set $P$ of at most $t-1$ vertices, such that every connected component of $G-N[P]$ has at most $n/2$ vertices. Our main technical contribution is an analog of this result for $S_{t,t,t}$-free graphs: given an $n$-vertex $S_{t,t,t}$-free graph, in polynomial time we can find a set $P$ of $\mathcal{O}(t \log n)$ vertices and an extended strip decomposition (an appropriate analog of the decomposition into connected components) of $G-N[P]$ such that every particle (an appropriate analog of a connected component to recurse on) of the said extended strip decomposition has at most $n/2$ vertices.
Graphs of bounded twin-width are quasi-polynomially $χ$-bounded
Published
• View Publication
• BIB
We prove that for every $t\in \mathbb{N}$ there is a constant $γ_t$ such that every graph with twin-width at most $t$ and clique number $ω$ has chromatic number bounded by $2^{γ_t \log^{4t+3} ω}$. In other words, we prove that graph classes of bounded twin-width are quasi-polynomially $χ$-bounded. This provides a significant step towards resolving the question of Bonnet et al. [ICALP 2021] about whether they are polynomially $χ$-bounded.
Bounds on half graph orders in powers of sparse graphs
Half graphs and their variants, such as ladders, semi-ladders and co-matchings, are combinatorial objects that encode total orders in graphs. Works by Adler and Adler (Eur. J. Comb.; 2014) and Fabiański et al. (STACS; 2019) prove that in the powers of sparse graphs, one cannot find arbitrarily large objects of this kind. However, these proofs either are non-constructive, or provide only loose upper bounds on the orders of half graphs and semi-ladders. In this work we provide nearly tight asymptotic lower and upper bounds on the maximum order of half graphs, parameterized on the distance, in the following classes of sparse graphs: planar graphs, graphs with bounded maximum degree, graphs with bounded pathwidth or treewidth, and graphs excluding a fixed clique as a minor.
The most significant part of our work is the upper bound for planar graphs. Here, we employ techniques of structural graph theory to analyze semi-ladders in planar graphs through the notion of cages, which expose a topological structure in semi-ladders. As an essential building block of this proof, we also state and prove a new structural result, yielding a fully polynomial bound on the neighborhood complexity in the class of planar graphs.