-
Exact Shortest Paths with Rational Weights on the Word RAM
Authors:
Adam Karczmarz,
Wojciech Nadara,
Marek Sokołowski
Abstract:
Exact computation of shortest paths in weighted graphs has been traditionally studied in one of two settings. First, one can assume that the edge weights are real numbers and all the performed operations on reals (typically comparisons and additions) take constant time. Classical Dijkstra's and Bellman-Ford algorithms have been described in this setting. More efficient exact shortest paths algorit…
▽ More
Exact computation of shortest paths in weighted graphs has been traditionally studied in one of two settings. First, one can assume that the edge weights are real numbers and all the performed operations on reals (typically comparisons and additions) take constant time. Classical Dijkstra's and Bellman-Ford algorithms have been described in this setting. More efficient exact shortest paths algorithms have been obtained for integer-weighted graphs. Integrality assumption not only enables faster algorithms but also allows implementing the aforementioned algorithms in a much more realistic word RAM model where only arithmetic operations on $O(\log{n})$-bit integers are performed in constant time. On the word RAM one can as efficiently exactly encode even \emph{rational-weighted} instances with $O(\log{n})$-bit numerators and denominators. However, the known exact real-weighted shortest paths algorithms, run on such a rational input, can easily encounter intermediate values of $Θ(n)$ bits if represented exactly. This leads to a factor-$Ω(n)$ slowdown on the word RAM. At the same time, the scaling algorithms suited for integer weights do not produce exact solutions for rational inputs without dramatically increasing their accuracy.
In this paper, we design randomized exact single-source shortest paths algorithms for rational-weighted graphs on the word RAM. Most importantly, in the non-negative case, we obtain a near-linear time algorithm matching Dijkstra's algorithm running time up to polylogarithmic factors. In presence of negative weights, we give an $\tilde{O}(n^{2.5})$-time algorithm breaking through the best known strongly polynomial bound attained by Bellman-Ford for sufficiently dense graphs.
△ Less
Submitted 6 November, 2023;
originally announced November 2023.
-
Fully dynamic approximation schemes on planar and apex-minor-free graphs
Authors:
Tuukka Korhonen,
Wojciech Nadara,
Michał Pilipczuk,
Marek Sokołowski
Abstract:
The classic technique of Baker [J. ACM '94] is the most fundamental approach for designing approximation schemes on planar, or more generally topologically-constrained graphs, and it has been applied in a myriad of different variants and settings throughout the last 30 years. In this work we propose a dynamic variant of Baker's technique, where instead of finding an approximate solution in a given…
▽ More
The classic technique of Baker [J. ACM '94] is the most fundamental approach for designing approximation schemes on planar, or more generally topologically-constrained graphs, and it has been applied in a myriad of different variants and settings throughout the last 30 years. In this work we propose a dynamic variant of Baker's technique, where instead of finding an approximate solution in a given static graph, the task is to design a data structure for maintaining an approximate solution in a fully dynamic graph, that is, a graph that is changing over time by edge deletions and edge insertions. Specifically, we address the two most basic problems -- Maximum Weight Independent Set and Minimum Weight Dominating Set -- and we prove the following: for a fully dynamic $n$-vertex planar graph $G$, one can:
* maintain a $(1-\varepsilon)$-approximation of the maximum weight of an independent set in $G$ with amortized update time $f(\varepsilon)\cdot n^{o(1)}$; and,
* under the additional assumption that the maximum degree of the graph is bounded at all times by a constant, also maintain a $(1+\varepsilon)$-approximation of the minimum weight of a dominating set in $G$ with amortized update time $f(\varepsilon)\cdot n^{o(1)}$.
In both cases, $f(\varepsilon)$ is doubly-exponential in $\mathrm{poly}(1/\varepsilon)$ and the data structure can be initialized in time $f(\varepsilon)\cdot n^{1+o(1)}$. All our results in fact hold in the larger generality of any graph class that excludes a fixed apex-graph as a minor.
△ Less
Submitted 31 October, 2023;
originally announced October 2023.
-
Dynamic treewidth
Authors:
Tuukka Korhonen,
Konrad Majewski,
Wojciech Nadara,
Michał Pilipczuk,
Marek Sokołowski
Abstract:
We present a data structure that for a dynamic graph $G$ that is updated by edge insertions and deletions, maintains a tree decomposition of $G$ of width at most $6k+5$ under the promise that the treewidth of $G$ never grows above $k$. The amortized update time is ${\cal O}_k(2^{\sqrt{\log n}\log\log n})$, where $n$ is the vertex count of $G$ and the ${\cal O}_k(\cdot)$ notation hides factors depe…
▽ More
We present a data structure that for a dynamic graph $G$ that is updated by edge insertions and deletions, maintains a tree decomposition of $G$ of width at most $6k+5$ under the promise that the treewidth of $G$ never grows above $k$. The amortized update time is ${\cal O}_k(2^{\sqrt{\log n}\log\log n})$, where $n$ is the vertex count of $G$ and the ${\cal O}_k(\cdot)$ notation hides factors depending on $k$. In addition, we also obtain the dynamic variant of Courcelle's Theorem: for any fixed property $\varphi$ expressible in the $\mathsf{CMSO}_2$ logic, the data structure can maintain whether $G$ satisfies $\varphi$ within the same time complexity bounds. To a large extent, this answers a question posed by Bodlaender [WG 1993].
△ Less
Submitted 4 April, 2023;
originally announced April 2023.
-
Computing treedepth in polynomial space and linear fpt time
Authors:
Wojciech Nadara,
Michał Pilipczuk,
Marcin Smulewicz
Abstract:
The treedepth of a graph $G$ is the least possible depth of an elimination forest of $G$: a rooted forest on the same vertex set where every pair of vertices adjacent in $G$ is bound by the ancestor/descendant relation. We propose an algorithm that given a graph $G$ and an integer $d$, either finds an elimination forest of $G$ of depth at most $d$ or concludes that no such forest exists; thus the…
▽ More
The treedepth of a graph $G$ is the least possible depth of an elimination forest of $G$: a rooted forest on the same vertex set where every pair of vertices adjacent in $G$ is bound by the ancestor/descendant relation. We propose an algorithm that given a graph $G$ and an integer $d$, either finds an elimination forest of $G$ of depth at most $d$ or concludes that no such forest exists; thus the algorithm decides whether the treedepth of $G$ is at most $d$. The running time is $2^{O(d^2)}\cdot n^{O(1)}$ and the space usage is polynomial in $n$. Further, by allowing randomization, the time and space complexities can be improved to $2^{O(d^2)}\cdot n$ and $d^{O(1)}\cdot n$, respectively. This improves upon the algorithm of Reidl et al. [ICALP 2014], which also has time complexity $2^{O(d^2)}\cdot n$, but uses exponential space.
△ Less
Submitted 5 May, 2022;
originally announced May 2022.
-
Determining 4-edge-connected components in linear time
Authors:
Wojciech Nadara,
Mateusz Radecki,
Marcin Smulewicz,
Marek Sokołowski
Abstract:
In this work, we present the first linear time deterministic algorithm computing the 4-edge-connected components of an undirected graph. First, we show an algorithm listing all 3-edge-cuts in a given 3-edge-connected graph, and then we use the output of this algorithm in order to determine the 4-edge-connected components of the graph.
In this work, we present the first linear time deterministic algorithm computing the 4-edge-connected components of an undirected graph. First, we show an algorithm listing all 3-edge-cuts in a given 3-edge-connected graph, and then we use the output of this algorithm in order to determine the 4-edge-connected components of the graph.
△ Less
Submitted 4 May, 2021;
originally announced May 2021.
-
Approximating pathwidth for graphs of small treewidth
Authors:
Carla Groenland,
Gwenaël Joret,
Wojciech Nadara,
Bartosz Walczak
Abstract:
We describe a polynomial-time algorithm which, given a graph $G$ with treewidth $t$, approximates the pathwidth of $G$ to within a ratio of $O(t\sqrt{\log t})$. This is the first algorithm to achieve an $f(t)$-approximation for some function $f$.
Our approach builds on the following key insight: every graph with large pathwidth has large treewidth or contains a subdivision of a large complete bi…
▽ More
We describe a polynomial-time algorithm which, given a graph $G$ with treewidth $t$, approximates the pathwidth of $G$ to within a ratio of $O(t\sqrt{\log t})$. This is the first algorithm to achieve an $f(t)$-approximation for some function $f$.
Our approach builds on the following key insight: every graph with large pathwidth has large treewidth or contains a subdivision of a large complete binary tree. Specifically, we show that every graph with pathwidth at least $th+2$ has treewidth at least $t$ or contains a subdivision of a complete binary tree of height $h+1$. The bound $th+2$ is best possible up to a multiplicative constant. This result was motivated by, and implies (with $c=2$), the following conjecture of Kawarabayashi and Rossman (SODA'18): there exists a universal constant $c$ such that every graph with pathwidth $Ω(k^c)$ has treewidth at least $k$ or contains a subdivision of a complete binary tree of height $k$.
Our main technical algorithm takes a graph $G$ and some (not necessarily optimal) tree decomposition of $G$ of width $t'$ in the input, and it computes in polynomial time an integer $h$, a certificate that $G$ has pathwidth at least $h$, and a path decomposition of $G$ of width at most $(t'+1)h+1$. The certificate is closely related to (and implies) the existence of a subdivision of a complete binary tree of height $h$. The approximation algorithm for pathwidth is then obtained by combining this algorithm with the approximation algorithm of Feige, Hajiaghayi, and Lee (STOC'05) for treewidth.
△ Less
Submitted 8 December, 2022; v1 submitted 3 August, 2020;
originally announced August 2020.
-
Efficient fully dynamic elimination forests with applications to detecting long paths and cycles
Authors:
Jiehua Chen,
Wojciech Czerwiński,
Yann Disser,
Andreas Emil Feldmann,
Danny Hermelin,
Wojciech Nadara,
Michał Pilipczuk,
Marcin Pilipczuk,
Manuel Sorge,
Bartłomiej Wróblewski,
Anna Zych-Pawlewicz
Abstract:
We present a data structure that in a dynamic graph of treedepth at most $d$, which is modified over time by edge insertions and deletions, maintains an optimum-height elimination forest. The data structure achieves worst-case update time $2^{{\cal O}(d^2)}$, which matches the best known parameter dependency in the running time of a static fpt algorithm for computing the treedepth of a graph. This…
▽ More
We present a data structure that in a dynamic graph of treedepth at most $d$, which is modified over time by edge insertions and deletions, maintains an optimum-height elimination forest. The data structure achieves worst-case update time $2^{{\cal O}(d^2)}$, which matches the best known parameter dependency in the running time of a static fpt algorithm for computing the treedepth of a graph. This improves a result of Dvořák et al. [ESA 2014], who for the same problem achieved update time $f(d)$ for some non-elementary (i.e. tower-exponential) function $f$. As a by-product, we improve known upper bounds on the sizes of minimal obstructions for having treedepth $d$ from doubly-exponential in $d$ to $d^{{\cal O}(d)}$.
As applications, we design new fully dynamic parameterized data structures for detecting long paths and cycles in general graphs. More precisely, for a fixed parameter $k$ and a dynamic graph $G$, modified over time by edge insertions and deletions, our data structures maintain answers to the following queries:
- Does $G$ contain a simple path on $k$ vertices?
- Does $G$ contain a simple cycle on at least $k$ vertices?
In the first case, the data structure achieves amortized update time $2^{{\cal O}(k^2)}$. In the second case, the amortized update time is $2^{{\cal O}(k^4)} + {\cal O}(k \log n)$. In both cases we assume access to a dictionary on the edges of $G$.
△ Less
Submitted 19 July, 2020; v1 submitted 31 May, 2020;
originally announced June 2020.
-
Many visits TSP revisited
Authors:
Łukasz Kowalik,
Shaohua Li,
Wojciech Nadara,
Marcin Smulewicz,
Magnus Wahlström
Abstract:
We study the Many Visits TSP problem, where given a number $k(v)$ for each of $n$ cities and pairwise (possibly asymmetric) integer distances, one has to find an optimal tour that visits each city $v$ exactly $k(v)$ times. The currently fastest algorithm is due to Berger, Kozma, Mnich and Vincze [SODA 2019, TALG 2020] and runs in time and space $\mathcal{O}^*(5^n)$. They also show a polynomial spa…
▽ More
We study the Many Visits TSP problem, where given a number $k(v)$ for each of $n$ cities and pairwise (possibly asymmetric) integer distances, one has to find an optimal tour that visits each city $v$ exactly $k(v)$ times. The currently fastest algorithm is due to Berger, Kozma, Mnich and Vincze [SODA 2019, TALG 2020] and runs in time and space $\mathcal{O}^*(5^n)$. They also show a polynomial space algorithm running in time $\mathcal{O}^*(16^{n+o(n)})$.
In this work, we show three main results: (i) A randomized polynomial space algorithm in time $\mathcal{O}^*(2^nD)$, where $D$ is the maximum distance between two cities. By using standard methods, this results in $(1+ε)$-approximation in time $\mathcal{O}^*(2^nε^{-1})$. Improving the constant $2$ in these results would be a major breakthrough, as it would result in improving the $\mathcal{O}^*(2^n)$-time algorithm for Directed Hamiltonian Cycle, which is a 50 years old open problem. (ii) A tight analysis of Berger et al.'s exponential space algorithm, resulting in $\mathcal{O}^*(4^n)$ running time bound. (iii) A new polynomial space algorithm, running in time $\mathcal{O}(7.88^n)$.
△ Less
Submitted 5 May, 2020;
originally announced May 2020.
-
Jones' Conjecture in subcubic graphs
Authors:
Marthe Bonamy,
François Dross,
Tomáš Masařík,
Wojciech Nadara,
Marcin Pilipczuk,
Michał Pilipczuk
Abstract:
We confirm Jones' Conjecture for subcubic graphs. Namely, if a subcubic planar graph does not contain $k+1$ vertex-disjoint cycles, then it suffices to delete $2k$ vertices to obtain a forest.
We confirm Jones' Conjecture for subcubic graphs. Namely, if a subcubic planar graph does not contain $k+1$ vertex-disjoint cycles, then it suffices to delete $2k$ vertices to obtain a forest.
△ Less
Submitted 3 December, 2019;
originally announced December 2019.
-
Decreasing the maximum average degree by deleting an independent set or a d-degenerate subgraph
Authors:
Wojciech Nadara,
Marcin Smulewicz
Abstract:
The maximum average degree $\mathrm{mad}(G)$ of a graph $G$ is the maximum average degree over all subgraphs of $G$. In this paper we prove that for every $G$ and positive integer $k$ such that $\mathrm{mad}(G) \ge k$ there exists $S \subseteq V(G)$ such that $\mathrm{mad}(G - S) \le \mathrm{mad}(G) - k$ and $G[S]$ is $(k-1)$-degenerate. Moreover, such $S$ can be computed in polynomial time. In pa…
▽ More
The maximum average degree $\mathrm{mad}(G)$ of a graph $G$ is the maximum average degree over all subgraphs of $G$. In this paper we prove that for every $G$ and positive integer $k$ such that $\mathrm{mad}(G) \ge k$ there exists $S \subseteq V(G)$ such that $\mathrm{mad}(G - S) \le \mathrm{mad}(G) - k$ and $G[S]$ is $(k-1)$-degenerate. Moreover, such $S$ can be computed in polynomial time. In particular there exists an independent set $I$ in $G$ such that $\mathrm{mad}(G-I) \le \mathrm{mad}(G)-1$ and an induced forest $F$ such that $\mathrm{mad}(G-F) \le \mathrm{mad}(G) - 2$.
△ Less
Submitted 21 March, 2020; v1 submitted 24 September, 2019;
originally announced September 2019.
-
Improved bounds for the excluded-minor approximation of treedepth
Authors:
Wojciech Czerwiński,
Wojciech Nadara,
Marcin Pilipczuk
Abstract:
Treedepth, a more restrictive graph width parameter than treewidth and pathwidth, plays a major role in the theory of sparse graph classes. We show that there exists a constant $C$ such that for every positive integers $a,b$ and a graph $G$, if the treedepth of $G$ is at least $Cab$, then the treewidth of $G$ is at least $a$ or $G$ contains a subcubic (i.e., of maximum degree at most $3$) tree of…
▽ More
Treedepth, a more restrictive graph width parameter than treewidth and pathwidth, plays a major role in the theory of sparse graph classes. We show that there exists a constant $C$ such that for every positive integers $a,b$ and a graph $G$, if the treedepth of $G$ is at least $Cab$, then the treewidth of $G$ is at least $a$ or $G$ contains a subcubic (i.e., of maximum degree at most $3$) tree of treedepth at least $b$ as a subgraph.
As a direct corollary, we obtain that every graph of treedepth $Ω(k^3)$ is either of treewidth at least $k$, contains a subdivision of full binary tree of depth $k$, or contains a path of length $2^k$. This improves the bound of $Ω(k^5 \log^2 k)$ of Kawarabayashi and Rossman [SODA 2018].
We also show an application of our techniques for approximation algorithms of treedepth: given a graph $G$ of treedepth $k$ and treewidth $t$, one can in polynomial time compute a treedepth decomposition of $G$ of width $\mathcal{O}(kt \log^{3/2} t)$. This improves upon a bound of $\mathcal{O}(kt^2 \log t)$ stemming from a tradeoff between known results.
The main technical ingredient in our result is a proof that every tree of treedepth $d$ contains a subcubic subtree of treedepth at least $d \cdot \log_3 ((1+\sqrt{5})/2)$.
△ Less
Submitted 18 September, 2019; v1 submitted 30 April, 2019;
originally announced April 2019.
-
Experimental evaluation of kernelization algorithms to Dominating Set
Authors:
Wojciech Nadara
Abstract:
The theoretical notions of graph classes with bounded expansion and that are nowhere dense are meant to capture structural sparsity of real world networks that can be used to design efficient algorithms. In the area of sparse graphs, the flagship problems are Dominating Set and its generalization r-Dominating Set. They have been precursors for model checking of first order logic on sparse graph cl…
▽ More
The theoretical notions of graph classes with bounded expansion and that are nowhere dense are meant to capture structural sparsity of real world networks that can be used to design efficient algorithms. In the area of sparse graphs, the flagship problems are Dominating Set and its generalization r-Dominating Set. They have been precursors for model checking of first order logic on sparse graph classes. On class of graphs of bounded expansions the r-Dominating Set problem admits a constant factor approximation, a fixed-parameter algorithm, and an efficient preprocessing routine: the so-called linear kernel. This should be put in constrast with general graphs where Dominating Set is APX-hard and W[2]-complete. In this paper we provide an experimental evaluation of kernelization algorithm for Dominating Set in sparse graph classes and compare it with previous approaches designed to the preprocessing for Dominating Set.
△ Less
Submitted 19 November, 2018;
originally announced November 2018.
-
Empirical Evaluation of Approximation Algorithms for Generalized Graph Coloring and Uniform Quasi-Wideness
Authors:
Wojciech Nadara,
Marcin Pilipczuk,
Roman Rabinovich,
Felix Reidl,
Sebastian Siebertz
Abstract:
The notions of bounded expansion and nowhere denseness not only offer robust and general definitions of uniform sparseness of graphs, they also describe the tractability boundary for several important algorithmic questions. In this paper we study two structural properties of these graph classes that are of particular importance in this context, namely the property of having bounded generalized col…
▽ More
The notions of bounded expansion and nowhere denseness not only offer robust and general definitions of uniform sparseness of graphs, they also describe the tractability boundary for several important algorithmic questions. In this paper we study two structural properties of these graph classes that are of particular importance in this context, namely the property of having bounded generalized coloring numbers and the property of being uniformly quasi-wide. We provide experimental evaluations of several algorithms that approximate these parameters on real-world graphs. On the theoretical side, we provide a new algorithm for uniform quasi-wideness with polynomial size guarantees in graph classes of bounded expansion and show a lower bound indicating that the guarantees of this algorithm are close to optimal in graph classes with fixed excluded minor.
△ Less
Submitted 24 September, 2019; v1 submitted 27 February, 2018;
originally announced February 2018.