SearcharxivSearch

arXiv subjects

Surender Baswana

Publications and source records attributed to Surender Baswana.

12 recordsLinked to original sources

Faster Algorithm for Second (s,t)-mincut and Breaking Quadratic barrier for Dual Edge Sensitivity for (s,t)-mincut

We study (s,t)-cuts of second minimum capacity and present the following algorithmic and graph-theoretic results. 1. Vazirani and Yannakakis [ICALP 1992] designed the first algorithm for computing an (s,t)-cut of second minimum capacity using $O(n^2)$ maximum (s,t)-flow computations. For directed integer-weighted graphs, we significantly improve this bound by designing an algorithm that computes an $(s,t)$-cut of second minimum capacity using $O(\sqrt{n})$ maximum (s,t)-flow computations w.h.p. To achieve this result, a close relationship of independent interest is established between $(s,t)$-cuts of second minimum capacity and global mincuts in directed weighted graphs. 2. Minimum+1 (s,t)-cuts have been studied quite well recently [Baswana, Bhanja, and Pandey, ICALP 2022], which is a special case of second (s,t)-mincut. (a) For directed multi-graphs, we design an algorithm that, given any maximum (s,t)-flow, computes a minimum+1 (s,t)-cut, if it exists, in $O(m)$ time. (b) The existing structures for storing and characterizing all minimum+1 (s,t)-cuts occupy $O(mn)$ space. For undirected multi-graphs, we design a DAG occupying only $O(m)$ space that stores and characterizes all minimum+1 (s,t)-cuts. 3. The study of minimum+1 (s,t)-cuts often turns out to be useful in designing dual edge sensitivity oracles -- a compact data structure for efficiently reporting an (s,t)-mincut after insertion/failure of any given pair of query edges. It has been shown recently [Bhanja, ICALP 2025] that any dual edge sensitivity oracle for (s,t)-mincut in undirected multi-graphs must occupy ${\Omega}(n^2)$ space in the worst-case, irrespective of the query time. For simple graphs, we break this quadratic barrier while achieving a non-trivial query time.

cs.DS

The connectivity carcass of a vertex subset in a graph: both odd and even case

Let $G=(V,E)$ be an undirected unweighted multi-graph and $S\subseteq V$ be a subset of vertices. A set of edges with the least cardinality whose removal disconnects $S$, that is, there is no path between at least one pair of vertices from $S$, is called a Steiner mincut for $S$ or simply an $S$-mincut. Connectivity Carcass is a compact data structure storing all $S$-mincuts in $G$ announced by Dinitz and Vainshtein in an extended abstract by Dinitz and Vainshtein in 1994. The complete proof of various results of this data structure for the simpler case when the capacity of $S$-mincut is odd appeared in the year 2000 in SICOMP. Over the last couple of decades, there have been attempts towards the proof for the case when the capacity of $S$-mincut is even, but none of them met a logical end. We present the following results. - We present the first complete, self-contained exposition of the connectivity carcass which covers both even and odd cases of the capacity of $S$-mincut. - We derive the results using an alternate and much simpler approach. In particular, we derive the results using submodularity of cuts -- a well-known property of graphs expressed using a simple inequality. - We also show how the connectivity carcass can be helpful in efficiently answering some basic queries related to $S$-mincuts using some additional insights.

cs.DS

Vital Edges for (s,t)-mincut: Efficient Algorithms, Compact Structures, and Optimal Sensitivity Oracle

Let G be a directed weighted graph (DiGraph) on n vertices and m edges with source s and sink t. An edge in G is vital if its removal reduces the capacity of (s,t)-mincut. Since the seminal work of Ford and Fulkerson, a long line of work has been done on computing the most vital edge and all vital edges of G. Unfortunately, after 60 years, the existing results are for undirected or unweighted graphs. We present the following result for DiGraph, which solves an open problem stated by Ausiello et al. 1. There is an algorithm that computes all vital edges as well as the most vital edge of G using O(n) maxflow computations. Vital edges play a crucial role in the design of Sensitivity Oracle (SO) for (s,t)-mincut. For directed graphs, the only existing SO is for unweighted graphs by Picard and Queyranne. We present the first and optimal SO for DiGraph. 2. (a) There is an O(n) space SO that can report in O(1) time the capacity of (s,t)-mincut and (b) an O($n^2$) space SO that can report an (s,t)-mincut in O(n) time after failure/insertion of an edge. For unweighted graphs, Picard and Queyranne designed an O(m) space DAG that stores and characterizes all mincuts for all vital edges. Conversely, there is a set containing at most n-1 (s,t)-cuts such that at least one mincut for every vital edge belongs to the set. We generalize these results for DiGraph. 3. (a) There is a set containing at most n-1 (s,t)-cuts such that at least one mincut for every vital edge is present in the set. (b) We design two compact structures for storing and characterizing all mincuts for all vital edges, (i) O(m) space DAG for partial characterization and (ii) O(mn) space structure for complete characterization. To arrive at our results, we develop new techniques, especially a generalization of maxflow-mincut theorem by Ford and Fulkerson, which might be of independent interest.

cs.DS

Sensitivity Oracles for All-Pairs Mincuts

Let $G=(V,E)$ be an undirected unweighted graph on $n$ vertices and $m$ edges. We address the problem of sensitivity oracle for all-pairs mincuts in $G$ defined as follows. Build a compact data structure that, on receiving any pair of vertices $s,t\in V$ and failure (or insertion) of any edge as query, can efficiently report the mincut between $s$ and $t$ after the failure (or the insertion). To the best of our knowledge, there exists no data structure for this problem which takes $o(mn)$ space and a non-trivial query time. We present the following results. - Our first data structure occupies ${\cal O}(n^2)$ space and guarantees ${\cal O}(1)$ query time to report the value of resulting $(s,t)$-mincut upon failure (or insertion) of any edge. Moreover, the set of vertices defining a resulting $(s,t)$-mincut after the update can be reported in ${\cal O}(n)$ time which is worst-case optimal. - Our second data structure optimizes space at the expense of increased query time. It takes ${\cal O}(m)$ space -- which is also the space taken by $G$. The query time is ${\cal O}(\min(m,n c_{s,t}))$ where $c_{s,t}$ is the value of the mincut between $s$ and $t$ in $G$. This query time is faster by a factor of $Ω(\min(m^{1/3},\sqrt{n}))$ compared to the best known deterministic algorithm to compute a $(s,t)$-mincut from scratch. - If we are only interested in knowing if failure (or insertion) of an edge changes the value of $(s,t)$-mincut, we can distribute our ${\cal O}(n^2)$ space data structure evenly among $n$ vertices. For any failed (or inserted) edge we only require the data structures stored at its endpoints to determine if the value of $(s,t)$-mincut has changed for any $s,t \in V$.

cs.DS

Joint Seat Allocation 2018: An algorithmic perspective

Until 2014, admissions to the Indian Institutes of Technology (IITs) were conducted under one umbrella, whereas the admissions to the non-IIT Centrally Funded Government Institutes (CFTIs) were conducted under a different umbrella, the Central Seat Allocation Board. In 2015, a new Multi-Round Multi-Run Deferred Acceptance joint seat allocation process was implemented, improving the efficiency and productivity of concerned stakeholders. The process brings all CFTIs under one umbrella for admissions: 100 institutes and approximately 39000 seats in 2018. In this scheme, each candidate submits a single choice list over all available programs, and receives no more than a single seat from the system, based on the choices and the ranks in the relevant merit lists. Significantly, overbooking of seats is forbidden. In this report, we provide details of our safe, fair and optimal algorithm. Novel features include the ability to handle multiple merit lists, seat guarantee across multiple rounds, implementing reservation, and de-reservation rules, handling escalation of ranks due to a revision of marks by state boards during the allocation process, and dealing with last minute de-recognition of other backward caste categories. A notable rule required the allocation of supernumerary seats to females, provided the program did not have a sufficient desired percentage, while, at the same time, not reducing the number of seats available to non-females. Looking forward, we posit first that it is inevitable that different colleges will prefer different mechanisms of judging merit, and assigning relative rank. We believe the ability of our algorithm to gracefully handle multiple merit lists gives us hope to express optimism that all undergraduate admissions in the country, beyond the CFTIs, can beneficially use the suggested scheme.

cs.CY

Fault Tolerant and Fully Dynamic DFS in Undirected Graphs: Simple Yet Efficient

We present an algorithm for a fault tolerant Depth First Search (DFS) Tree in an undirected graph. This algorithm is drastically simpler than the current state-of-the-art algorithms for this problem, uses optimal space and optimal preprocessing time, and still achieves better time complexity. This algorithm also leads to a better time complexity for maintaining a DFS tree in a fully dynamic environment.

cs.DS

Dynamic DFS Tree in Undirected Graphs: breaking the $O(m)$ barrier

Depth first search (DFS) tree is a fundamental data structure for solving various problems in graphs. It is well known that it takes $O(m+n)$ time to build a DFS tree for a given undirected graph $G=(V,E)$ on $n$ vertices and $m$ edges. We address the problem of maintaining a DFS tree when the graph is undergoing {\em updates} (insertion and deletion of vertices or edges). We present the following results for this problem. (a) Fault tolerant DFS tree: There exists a data structure of size ${O}(m ~polylog~ n)$ such that given any set ${\cal F}$ of failed vertices or edges, a DFS tree of the graph $G\setminus {\cal F}$ can be reported in ${O}(n|{\cal F}| ~polylog~ n)$ time. (b) Fully dynamic DFS tree: There exists a fully dynamic algorithm for maintaining a DFS tree that takes worst case ${O}(\sqrt{mn} ~polylog~ n)$ time per update for any arbitrary online sequence of updates. (c) Incremental DFS tree: Given any arbitrary online sequence of edge insertions, we can maintain a DFS tree in ${O}(n ~polylog~ n)$ worst case time per edge insertion. These are the first $o(m)$ worst case time results for maintaining a DFS tree in a dynamic environment. Moreover, our fully dynamic algorithm provides, in a seamless manner, the first deterministic algorithm with $O(1)$ query time and $o(m)$ worst case update time for the dynamic subgraph connectivity, biconnectivity, and 2-edge connectivity.

cs.DS

Incremental DFS algorithms: a theoretical and experimental study

Depth First Search (DFS) tree is a fundamental data structure for solving graph problems. The DFS tree of a graph $G$ with $n$ vertices and $m$ edges can be built in $O(m+n)$ time. Till date, only a few algorithms have been designed for maintaining incremental DFS. For undirected graphs, the two algorithms, namely, ADFS1 and ADFS2 [ICALP14] achieve total $O(n^{3/2}\sqrt{m})$ and $O(n^2)$ time respectively. For DAGs, the only non-trivial algorithm, namely, FDFS [IPL97] requires total $O(mn)$ time. In this paper, we carry out extensive experimental and theoretical evaluation of existing incremental DFS algorithms in random and real graphs, and derive the following results. 1- For insertion of uniformly random sequence of $n \choose 2$ edges, ADFS1, ADFS2 and FDFS perform equally well and are found to take $Θ(n^2)$ time experimentally. This is quite surprising because the worst case bounds of ADFS1 and FDFS are greater than $Θ(n^2)$ by a factor of $\sqrt{m/n}$ and $m/n$ respectively. We complement this result by probabilistic analysis of these algorithms proving $\tilde{O}(n^2)$ bound on the update time. Here, we derive results about the structure of a DFS tree in random graphs, which are of independent interest. 2- These insights led us to design an extremely simple incremental DFS algorithm for both undirected and directed graphs. This algorithm theoretically matches and experimentally outperforms the state-of-the-art in dense random graphs. It can also be used as a single-pass semi-streaming algorithm for incremental DFS and strong connectivity in random graphs. 3- Even for real graphs, both ADFS1 and FDFS perform much better than their theoretical bounds. Here again, we present two simple algorithms for incremental DFS for directed and undirected real graphs. In fact, our algorithm for directed graphs almost always matches the performance of FDFS.

cs.DS

An efficient strongly connected components algorithm in the fault tolerant model

In this paper we study the problem of maintaining the strongly connected components of a graph in the presence of failures. In particular, we show that given a directed graph $G=(V,E)$ with $n=|V|$ and $m=|E|$, and an integer value $k\geq 1$, there is an algorithm that computes in $O(2^{k}n\log^2 n)$ time for any set $F$ of size at most $k$ the strongly connected components of the graph $G\setminus F$. The running time of our algorithm is almost optimal since the time for outputting the SCCs of $G\setminus F$ is at least $Ω(n)$. The algorithm uses a data structure that is computed in a preprocessing phase in polynomial time and is of size $O(2^{k} n^2)$. Our result is obtained using a new observation on the relation between strongly connected components (SCCs) and reachability. More specifically, one of the main building blocks in our result is a restricted variant of the problem in which we only compute strongly connected components that intersect a certain path. Restricting our attention to a path allows us to implicitly compute reachability between the path vertices and the rest of the graph in time that depends logarithmically rather than linearly in the size of the path. This new observation alone, however, is not enough, since we need to find an efficient way to represent the strongly connected components using paths. For this purpose we use a mixture of old and classical techniques such as the heavy path decomposition of Sleator and Tarjan and the classical Depth-First-Search algorithm. Although, these are by now standard techniques, we are not aware of any usage of them in the context of dynamic maintenance of SCCs. Therefore, we expect that our new insights and mixture of new and old techniques will be of independent interest.

cs.DS

Fully dynamic maximal matching in O(log n) update time

We present an algorithm for maintaining maximal matching in a graph under addition and deletion of edges. Our data structure is randomized that takes O(log n) expected amortized time for each edge update where n is the number of vertices in the graph. While there is a trivial O(n) algorithm for edge update, the previous best known result for this problem for a graph with n vertices and m edges is O({(n+ m)}^{0.7072})which is sub-linear only for a sparse graph. For the related problem of maximum matching, Onak and Rubinfield designed a randomized data structure that achieves O(log^2 n) amortized time for each update for maintaining a c-approximate maximum matching for some large constant c. In contrast, we can maintain a factor two approximate maximum matching in O(log n) expected time per update as a direct corollary of the maximal matching scheme. This in turn also implies a two approximate vertex cover maintenance scheme that takes O(log n) expected time per update.

cs.DS

Maintaining Approximate Maximum Weighted Matching in Fully Dynamic Graphs

We present a fully dynamic algorithm for maintaining approximate maximum weight matching in general weighted graphs. The algorithm maintains a matching ${\cal M}$ whose weight is at least $1/8 M^{*}$ where $M^{*}$ is the weight of the maximum weight matching. The algorithm achieves an expected amortized $O(\log n \log \mathcal C)$ time per edge insertion or deletion, where $\mathcal C$ is the ratio of the weights of the highest weight edge to the smallest weight edge in the given graph. Using a simple randomized scaling technique, we are able to obtain a matching whith expected approximation ratio 4.9108.

cs.DS

Faster Streaming algorithms for graph spanners

Given an undirected graph $G=(V,E)$ on $n$ vertices, $m$ edges, and an integer $t\ge 1$, a subgraph $(V,E_S)$, $E_S\subseteq E$ is called a $t$-spanner if for any pair of vertices $u,v \in V$, the distance between them in the subgraph is at most $t$ times the actual distance. We present streaming algorithms for computing a $t$-spanner of essentially optimal size-stretch trade offs for any undirected graph. Our first algorithm is for the classical streaming model and works for unweighted graphs only. The algorithm performs a single pass on the stream of edges and requires $O(m)$ time to process the entire stream of edges. This drastically improves the previous best single pass streaming algorithm for computing a $t$-spanner which requires $θ(mn^{\frac{2}{t}})$ time to process the stream and computes spanner with size slightly larger than the optimal. Our second algorithm is for {\em StreamSort} model introduced by Aggarwal et al. [FOCS 2004], which is the streaming model augmented with a sorting primitive. The {\em StreamSort} model has been shown to be a more powerful and still very realistic model than the streaming model for massive data sets applications. Our algorithm, which works of weighted graphs as well, performs $O(t)$ passes using $O(\log n)$ bits of working memory only. Our both the algorithms require elementary data structures.

cs.DS