In the Edge Bipartization problem one is given an undirected graph $G$ and an integer $k$, and the question is whether $k$ edges can be deleted from $G$ so that it becomes bipartite. In 2006, Guo et al. [J. Comput. Syst. Sci., 72(8):1386-1396, 2006] proposed an algorithm solving this problem in time $O(2^k m^2)$; today, this algorithm is a textbook example of an application of the iterative compression technique. Despite extensive progress in the understanding of the parameterized complexity of graph separation problems in the recent years, no significant improvement upon this result has been yet reported.
We present an algorithm for Edge Bipartization that works in time $O(1.977^k nm)$, which is the first algorithm with the running time dependence on the parameter better than $2^k$. To this end, we combine the general iterative compression strategy of Guo et al. [J. Comput. Syst. Sci., 72(8):1386-1396, 2006], the technique proposed by Wahlstrom [SODA 2014, 1762-1781] of using a polynomial-time solvable relaxation in the form of a Valued Constraint Satisfaction Problem to guide a bounded-depth branching algorithm, and an involved Measure & Conquer analysis of the recursion tree.
We study the complexity of graph modification problems with respect to homomorphism-based colouring properties of edge-coloured graphs. A homomorphism from edge-coloured graph $G$ to edge-coloured graph $H$ is a vertex-mapping from $G$ to $H$ that preserves adjacencies and edge-colours. We consider the property of having a homomorphism to a fixed edge-coloured graph $H$. The question we are interested in is: given an edge-coloured graph $G$, can we perform $k$ graph operations so that the resulting graph admits a homomorphism to $H$? The operations we consider are vertex-deletion, edge-deletio…
Consider the following "local" cut-detection problem in a directed graph: We are given a starting vertex $s$ and need to detect whether there is a cut with at most $k$ edges crossing the cut such that the side of the cut containing $s$ has at most $Δ$ interior edges. If we are given query access to the input graph, then this problem can in principle be solved in sublinear time without reading the whole graph and with query complexity depending on $k$ and $Δ$. We design an elegant randomized procedure that solves a slack variant of this problem with $O(k^2 Δ)$ queries, improving in particular a…
We consider the incremental computation of the betweenness centrality of all vertices in a large complex network modeled as a graph G = (V, E), directed or undirected, with positive real edge-weights. The current widely used algorithm to compute the betweenness centrality of all vertices in G is the Brandes algorithm that runs in O(mn + n^2 log n) time, where n = |V| and m = |E|. We present an incremental algorithm that updates the betweenness centrality score of all vertices in G when a new edge is added to G, or the weight of an existing edge is reduced. Our incremental algorithm runs in O(m…
Many real-world phenomena exhibit strong hierarchical structure. Consequently, in many real-world directed social networks vertices do not play equal role. Instead, vertices form a hierarchy such that the edges appear mainly from upper levels to lower levels. Discovering hierarchies from such graphs is a challenging problem that has gained attention. Formally, given a directed graph, we want to partition vertices into levels such that ideally there are only edges from upper levels to lower levels. From computational point of view, the ideal case is when the underlying directed graph is acyclic…
We study algorithms for spectral graph sparsification. The input is a graph $G$ with $n$ vertices and $m$ edges, and the output is a sparse graph $\tilde{G}$ that approximates $G$ in an algebraic sense. Concretely, for all vectors $x$ and any $ε>0$, $\tilde{G}$ satisfies $$ (1-ε) x^T L_G x \leq x^T L_{\tilde{G}} x \leq (1+ε) x^T L_G x, $$ where $L_G$ and $L_{\tilde{G}}$ are the Laplacians of $G$ and $\tilde{G}$ respectively. We show that the fastest known algorithm for computing a sparsifier with $O(n\log n/ε^2)$ edges can actually run in $\tilde{O}(m\log^2 n)$ time, an $O(\log n)$ factor fast…
We design the first subexponential-time (parameterized) algorithms for several cut and cycle-hitting problems on $H$-minor free graphs. In particular, we obtain the following results (where $k$ is the solution-size parameter). 1. $2^{O(\sqrt{k}\log k)} \cdot n^{O(1)}$ time algorithms for Edge Bipartization and Odd Cycle Transversal; 2. a $2^{O(\sqrt{k}\log^4 k)} \cdot n^{O(1)}$ time algorithm for Edge Multiway Cut and a $2^{O(r \sqrt{k} \log k)} \cdot n^{O(1)}$ time algorithm for Vertex Multiway Cut, where $r$ is the number of terminals to be separated; 3. a $2^{O((r+\sqrt{k})\log^4 (rk))} \cd…
In the Bicluter Editing problem the input is a graph $G$ and an integer $k$, and the goal is to decide whether $G$ can be transformed into a bicluster graph by adding and removing at most $k$ edges. In this paper we give an algorithm for Bicluster Editing whose running time is $O^*(3.116^k)$.
We consider the fundamental problems of determining the rooted and global edge and vertex connectivities (and computing the corresponding cuts) in directed graphs. For rooted (and hence also global) edge connectivity with small integer capacities we give a new randomized Monte Carlo algorithm that runs in time $\tilde{O}(n^2)$. For rooted edge connectivity this is the first algorithm to improve on the $Ω(n^3)$ time bound in the dense-graph high-connectivity regime. Our result relies on a simple combination of sampling coupled with sparsification that appears new, and could lead to further trad…
Finding central nodes is a fundamental problem in network analysis. Betweenness centrality is a well-known measure which quantifies the importance of a node based on the fraction of shortest paths going though it. Due to the dynamic nature of many today's networks, algorithms that quickly update centrality scores have become a necessity. For betweenness, several dynamic algorithms have been proposed over the years, targeting different update types (incremental- and decremental-only, fully-dynamic). In this paper we introduce a new dynamic algorithm for updating betweenness centrality after an …
Given an $n$-vertex $m$-edge graph $G$ with non negative edge-weights, the girth of $G$ is the weight of a shortest cycle in $G$. For any graph $G$ with polynomially bounded integer weights, we present a deterministic algorithm that computes, in $\tilde{\cal O}(n^{5/3}+m)$-time, a cycle of weight at most twice the girth of $G$. Our approach combines some new insights on the previous approximation algorithms for this problem (Lingas and Lundell, IPL'09; Roditty and Tov, TALG'13) with Hitting Set based methods that are used for approximate distance oracles and date back from (Thorup and Zwick, J…
Connectivity related concepts are of fundamental interest in graph theory. The area has received extensive attention over four decades, but many problems remain unsolved, especially for directed graphs. A directed graph is 2-edge-connected (resp., 2-vertex-connected) if the removal of any edge (resp., vertex) leaves the graph strongly connected. In this paper we present improved algorithms for computing the maximal 2-edge- and 2-vertex-connected subgraphs of a given directed graph. These problems were first studied more than 35 years ago, with $\widetilde{O}(mn)$ time algorithms for graphs wit…
We give an algorithm for computing exact maximum flows on graphs with $m$ edges and integer capacities in the range $[1, U]$ in $\widetilde{O}(m^{\frac{3}{2} - \frac{1}{328}} \log U)$ time. For sparse graphs with polynomially bounded integer capacities, this is the first improvement over the $\widetilde{O}(m^{1.5} \log U)$ time bound from [Goldberg-Rao JACM `98]. Our algorithm revolves around dynamically maintaining the augmenting electrical flows at the core of the interior point method based algorithm from [Mądry JACM `16]. This entails designing data structures that, in limited settings, re…
A maximum priority matching is a matching in an undirected graph that maximizes a priority score defined with respect to given vertex priorities. An earlier paper showed how to find maximum priority matchings in unweighted graphs. This paper describes an algorithm for bipartite graphs that is faster when the number of distinct priority classes is limited. For graphs with $k$ distinct priority classes it runs in $O(kmn^{1/2})$ time, where $n$ is the number of vertices in the graph and $m$ is the number of edges.
Consider the problem of maintaining source sink reachability($st$-Reachability), single source reachability(SSR) and strongly connected component(SCC) in an edge decremental directed graph. In particular, we design a randomized algorithm that maintains with high probability: 1) $st$-Reachability in $\tilde{O}(mn^{4/5})$ total update time. 2) $st$-Reachability in a total update time of $\tilde{O}(n^{8/3})$ in a dense graph. 3) SSR in a total update time of $\tilde{O}(m n^{9/10})$. 4) SCC in a total update time of $\tilde{O}(m n^{9/10})$. For all the above problems, we improve upon the previous …
Generative network models play an important role in algorithm development, scaling studies, network analysis, and realistic system benchmarks for graph data sets. The commonly used graph-based benchmark model R-MAT has some drawbacks concerning realism and the scaling behavior of network properties. A complex network model gaining considerable popularity builds random hyperbolic graphs, generated by distributing points within a disk in the hyperbolic plane and then adding edges between points whose hyperbolic distance is below a threshold. We present in this paper a fast generation algorithm f…
We study the problem of computing a minimum cut in a simple, undirected graph and give a deterministic $O(m \log^2 n \log\log^2 n)$ time algorithm. This improves both on the best previously known deterministic running time of $O(m \log^{12} n)$ (Kawarabayashi and Thorup, STOC 2015) and the best previously known randomized running time of $O(m \log^{3} n)$ (Karger, J.ACM 2000) for this problem, though Karger's algorithm can be further applied to weighted graphs. Moreover, our result extends to balanced directed graphs, where the balance of a directed graph captures how close the graph is to bei…
In the Cograph Deletion (resp., Cograph Editing) problem the input is a graph $G$ and an integer $k$, and the goal is to decide whether there is a set of edges of size at most $k$ whose removal from $G$ (resp., removal and addition to $G$) results in a graph that does not contain an induced path with four vertices. In this paper we give algorithms for Cograph Deletion and Cograph Editing whose running times are $O^*(2.303^k)$ and $O^*(4.329^k)$, respectively.
The maximum edge-weight clique problem is to find a clique whose sum of edge-weight is the maximum for a given edge-weighted undirected graph. The problem is NP-hard and some branch-and-bound algorithms have been proposed. In this paper, we propose a new exact algorithm based on branch-and-bound. It assigns edge-weights to vertices and calculates upper bounds using vertex coloring. By some computational experiments, we confirmed our algorithm is faster than previous algorithms.
We consider the problem of finding \textit{semi-matching} in bipartite graphs which is also extensively studied under various names in the scheduling literature. We give faster algorithms for both weighted and unweighted case. For the weighted case, we give an $O(nm\log n)$-time algorithm, where $n$ is the number of vertices and $m$ is the number of edges, by exploiting the geometric structure of the problem. This improves the classical $O(n^3)$ algorithms by Horn [Operations Research 1973] and Bruno, Coffman and Sethi [Communications of the ACM 1974]. For the unweighted case, the bound could …
2-joins are edge cutsets that naturally appear in the decomposition of several classes of graphs closed under taking induced subgraphs, such as balanced bipartite graphs, even-hole-free graphs, perfect graphs and claw-free graphs. Their detection is needed in several algorithms, and is the slowest step for some of them. The classical method to detect a 2-join takes $O(n^3m)$ time where $n$ is the number of vertices of the input graph and $m$ the number of its edges. To detect \emph{non-path} 2-joins (special kinds of 2-joins that are needed in all of the known algorithms that use 2-joins), the…
We devise new cut sparsifiers that are related to the classical sparsification of Nagamochi and Ibaraki [Algorithmica, 1992], which is an algorithm that, given an unweighted graph $G$ on $n$ nodes and a parameter $k$, computes a subgraph with $O(nk)$ edges that preserves all cuts of value up to $k$. We put forward the notion of a friendly cut sparsifier, which is a minor of $G$ that preserves all friendly cuts of value up to $k$, where a cut in $G$ is called friendly if every node has more edges connecting it to its own side of the cut than to the other side. We present an algorithm that, give…
We show a deterministic algorithm for computing edge connectivity of a simple graph with $m$ edges in $m^{1+o(1)}$ time. Although the fastest deterministic algorithm by Henzinger, Rao, and Wang [SODA'17] has a faster running time of $O(m\log^{2}m\log\log m)$, we believe that our algorithm is conceptually simpler. The key tool for this simplication is the expander decomposition. We exploit it in a very straightforward way compared to how it has been previously used in the literature.
In a directed graph $G=(V,E)$ with a capacity on every edge, a \emph{bottleneck path} (or \emph{widest path}) between two vertices is a path maximizing the minimum capacity of edges in the path. For the single-source all-destination version of this problem in directed graphs, the previous best algorithm runs in $O(m+n\log n)$ ($m=|E|$ and $n=|V|$) time, by Dijkstra search with Fibonacci heap [Fredman and Tarjan 1987]. We improve this time bound to $O(m\sqrt{\log n})$, thus it is the first algorithm which breaks the time bound of classic Fibonacci heap when $m=o(n\sqrt{\log n})$. It is a Las-Ve…
The problem of space-efficient depth-first search (DFS) is reconsidered. A particularly simple and fast algorithm is presented that, on a directed or undirected input graph $G=(V,E)$ with $n$ vertices and $m$ edges, carries out a DFS in $O(n+m)$ time with $n+\sum_{v\in V_{\ge 3}}\lceil{\log_2(d_v-1)}\rceil +O(\log n)\le n+m+O(\log n)$ bits of working memory, where $d_v$ is the (total) degree of $v$, for each $v\in V$, and $V_{\ge 3}=\{v\in V\mid d_v\ge 3\}$. A slightly more complicated variant of the algorithm works in the same time with at most $n+({4/5})m+O(\log n)$ bits. It is also shown th…
In this work we revisit the fundamental Single-Source Shortest Paths (SSSP) problem with possibly negative edge weights. A recent breakthrough result by Bernstein, Nanongkai and Wulff-Nilsen established a near-linear $O(m \log^8(n) \log(W))$-time algorithm for negative-weight SSSP, where $W$ is an upper bound on the magnitude of the smallest negative-weight edge. In this work we improve the running time to $O(m \log^2(n) \log(nW) \log\log n)$, which is an improvement by nearly six log-factors. Some of these log-factors are easy to shave (e.g. replacing the priority queue used in Dijkstra's alg…
The All-Pairs Min-Cut problem (aka All-Pairs Max-Flow) asks to compute a minimum $s$-$t$ cut (or just its value) for all pairs of vertices $s,t$. We study this problem in directed graphs with unit edge/vertex capacities (corresponding to edge/vertex connectivity). Our focus is on the $k$-bounded case, where the algorithm has to find all pairs with min-cut value less than $k$, and report only those. The most basic case $k=1$ is the Transitive Closure (TC) problem, which can be solved in graphs with $n$ vertices and $m$ edges in time $O(mn)$ combinatorially, and in time $O(n^ω)$ where $ω<2.38$ i…
In the $k$-cut problem, we are given an edge-weighted graph $G$ and an integer $k$, and have to remove a set of edges with minimum total weight so that $G$ has at least $k$ connected components. The current best algorithms are an $O(n^{(2-o(1))k})$ randomized algorithm due to Karger and Stein, and an $\smash{\tilde{O}}(n^{2k})$ deterministic algorithm due to Thorup. Moreover, several $2$-approximation algorithms are known for the problem (due to Saran and Vazirani, Naor and Rabani, and Ravi and Sinha). It has remained an open problem to (a) improve the runtime of exact algorithms, and (b) to g…
Graph sketching has emerged as a powerful technique for processing massive graphs that change over time (i.e., are presented as a dynamic stream of edge updates) over the past few years, starting with the work of Ahn, Guha and McGregor (SODA'12) on graph connectivity via sketching. In this paper we consider the problem of designing spectral approximations to graphs, or spectral sparsifiers, using a small number of linear measurements, with the additional constraint that the sketches admit an efficient recovery scheme. Prior to our work, sketching algorithms were known with near optimal $\tilde…
The \textsc{Bipartite Contraction} problem is to decide, given a graph $G$ and a parameter $k$, whether we can can obtain a bipartite graph from $G$ by at most $k$ edge contractions. The fixed-parameter tractability of the problem was shown by [Heggernes et al. 2011], with an algorithm whose running time has double-exponential dependence on $k$. We present a new randomized FPT algorithm for the problem, which is both conceptually simpler and achieves an improved $2^{O(k^2)} n m$ running time, i.e., avoiding the double-exponential dependence on $k$. The algorithm can be derandomized using stand…
Let $H=(V,E)$ be an edge-weighted hypergraph of rank $r$. Kogan and Krauthgamer extended Benczúr and Karger's random sampling scheme for cut sparsification from graphs to hypergraphs. The sampling requires an algorithm for computing the approximate strengths of edges. In this note we extend the algorithm for graphs to hypergraphs and describe a near-linear time algorithm to compute approximate strengths of edges; we build on a sparsification result for hypergraphs from our recent work. Combined with prior results we obtain faster algorithms for finding $(1+ε)$-approximate mincuts when the rank…
We present a new fully dynamic algorithm for maintaining betweenness centrality (BC) of vertices in a directed graph $G=(V,E)$ with positive edge weights. BC is a widely used parameter in the analysis of large complex networks. We achieve an amortized $O((ν^*)^2 \log^2 n)$ time per update, where $n = |V| $ and $ν^*$ bounds the number of distinct edges that lie on shortest paths through any single vertex. This result improves on the amortized bound for fully dynamic BC in [Pontecorvi-Ramachandran2015] by a logarithmic factor. Our algorithm uses new data structures and techniques that are extens…
For a graph class $\mathcal{C}$, the $\mathcal{C}$-Edge-Deletion problem asks for a given graph $G$ to delete the minimum number of edges from $G$ in order to obtain a graph in $\mathcal{C}$. We study the $\mathcal{C}$-Edge-Deletion problem for $\mathcal{C}$ the permutation graphs, interval graphs, and other related graph classes. It follows from Courcelle's Theorem that these problems are fixed parameter tractable when parameterized by treewidth. In this paper, we present concrete FPT algorithms for these problems. By giving explicit algorithms and analyzing these in detail, we obtain algorit…
We present an algorithm that, with high probability, generates a random spanning tree from an edge-weighted undirected graph in $\tilde{O}(n^{4/3}m^{1/2}+n^{2})$ time (The $\tilde{O}(\cdot)$ notation hides $\operatorname{polylog}(n)$ factors). The tree is sampled from a distribution where the probability of each tree is proportional to the product of its edge weights. This improves upon the previous best algorithm due to Colbourn et al. that runs in matrix multiplication time, $O(n^ω)$. For the special case of unweighted graphs, this improves upon the best previously known running time of $\ti…
One of the most basic graph problems, All-Pairs Shortest Paths (APSP) is known to be solvable in $n^{3-o(1)}$ time, and it is widely open whether it has an $O(n^{3-ε})$ time algorithm for $ε> 0$. To better understand APSP, one often strives to obtain subcubic time algorithms for structured instances of APSP and problems equivalent to it, such as the Min-Plus matrix product. A natural structured version of Min-Plus product is Monotone Min-Plus product which has been studied in the context of the Batch Range Mode [SODA'20] and Dynamic Range Mode [ICALP'20] problems. This paper improves the known…
The degree splitting problem requires coloring the edges of a graph red or blue such that each node has almost the same number of edges in each color, up to a small additive discrepancy. The directed variant of the problem requires orienting the edges such that each node has almost the same number of incoming and outgoing edges, again up to a small additive discrepancy. We present deterministic distributed algorithms for both variants, which improve on their counterparts presented by Ghaffari and Su [SODA'17]: our algorithms are significantly simpler and faster, and have a much smaller discrep…
In Maximum $k$-Vertex Cover (Max $k$-VC), the input is an edge-weighted graph $G$ and an integer $k$, and the goal is to find a subset $S$ of $k$ vertices that maximizes the total weight of edges covered by $S$. Here we say that an edge is covered by $S$ iff at least one of its endpoints lies in $S$. We present an FPT approximation scheme (FPT-AS) that runs in $(1/ε)^{O(k)} poly(n)$ time for the problem, which improves upon Gupta et al.'s $(k/ε)^{O(k)} poly(n)$-time FPT-AS [SODA'18, FOCS'18]. Our algorithm is simple: just use brute force to find the best $k$-vertex subset among the $O(k/ε)$ ve…
We consider the problem of maintaining a $(1-ε)$-approximation to the densest subgraph (DSG) in an undirected multigraph as it undergoes edge insertions and deletions (the fully dynamic setting). Sawlani and Wang [SW20] developed a data structure that, for any given $ε> 0$, maintains a $(1-ε)$-approximation with $O(\log^4 n/ε^6)$ worst-case update time for edge operations, and $O(1)$ query time for reporting the density value. Their data structure was the first to achieve near-optimal approximation, and improved previous work that maintained a $(1/4 - ε)$ approximation in amortized polylogarit…
We provide a simple new randomized contraction approach to the global minimum cut problem for simple undirected graphs. The contractions exploit 2-out edge sampling from each vertex rather than the standard uniform edge sampling. We demonstrate the power of our new approach by obtaining better algorithms for sequential, distributed, and parallel models of computation. Our end results include the following randomized algorithms for computing edge connectivity with high probability: -- Two sequential algorithms with complexities $O(m \log n)$ and $O(m+n \log^3 n)$. These improve on a long line o…
In the Coloured Clustering problem, we wish to colour vertices of an edge coloured graph to produce as many stable edges as possible, i.e., edges with the same colour as their ends. In this paper, we reveal that the problem is in fact a maximum subgraph problem concerning monochromatic subgraphs and alternating paths, and demonstrate the usefulness of such connection in studying these problems. We obtain a faster algorithm to solve the problem for edge-bicoloured graphs by reducing the problem to a minimum cut problem. On the other hand, we push the NP-completeness of the problem to edge-trico…
The maximum multicommodity flow problem is a natural generalization of the maximum flow problem to route multiple distinct flows. Obtaining a $1-ε$ approximation to the multicommodity flow problem on graphs is a well-studied problem. In this paper we present an adaptation of recent advances in single-commodity flow algorithms to this problem. As the underlying linear systems in the electrical problems of multicommodity flow problems are no longer Laplacians, our approach is tailored to generate specialized systems which can be preconditioned and solved efficiently using Laplacians. Given an un…
A tournament is a directed graph T such that every pair of vertices are connected by an arc. A feedback vertex set is a set S of vertices in T such that T - S is acyclic. In this article we consider the Feedback Vertex Set problem in tournaments. Here input is a tournament T and integer k, and the task is to determine whether T has a feedback vertex set of size at most k. We give a new algorithm for Feedback Vertex Set in Tournaments. The running time of our algorithm is upper bounded by O(1.618^k + n^{O(1)}) and by O(1.46^n). Thus our algorithm simultaneously improves over the fastest known p…
We design two incremental algorithms for computing an inclusion-minimal completion of an arbitrary graph into a cograph. The first one is able to do so while providing an additional property which is crucial in practice to obtain inclusion-minimal completions using as few edges as possible : it is able to compute a minimum-cardinality completion of the neighbourhood of the new vertex introduced at each incremental step. It runs in $O(n+m')$ time, where $m'$ is the number of edges in the completed graph. This matches the complexity of the algorithm in [Lokshtanov, Mancini and Papadopoulos 2010]…