SearcharxivSearch

arXiv subjects

Sanjeev Khanna

Publications and source records attributed to Sanjeev Khanna.

At least 19 recordsLinked to original sources

Reachability in Directed Acyclic Graphs with Near-Linear Cut Queries

In the cut-query model, an algorithm is given access to a graph $G = (V, E)$ \emph{only} via cut queries. This model has seen significant attention in the undirected graph setting, with works establishing $O(n)$ cut query algorithms for computing the global minimum cut, $\widetilde{O}(n^{3/2})$ cut query algorithms for all pairs minimum cut, and many more. However, despite this vast array of progress in designing sub-quadratic query algorithms for computing properties of undirected graphs, there has been \emph{no} progress in designing such algorithms in directed graphs. Indeed, even for basic problems like whether a vertex $t$ is reachable from a vertex $s$, the cut query complexity is only known to be bounded in the interval $[Ω(n), O(n^2 / \log n)]$. In this work, we begin a systematic study of these basic problems in directed \emph{acyclic} graphs (DAGs). In this setting, we show that reachability from a single vertex and even topological sorting are both computable in $O(n \log^3 n)$ many cut queries. As a consequence, we also obtain an algorithm which, for any \emph{arbitrary} directed graph $G$, uses only $O(n \log^3 n)$ cut queries and determines whether $G$ contains a cycle.

cs.DS

A Unified Theory of Sparsification

We study the sparsifiability of \emph{real-valued codes}, a unifying abstraction that generalizes both combinatorial and continuous notions of sparsification, including spectral sparsification. In our setting, a code $C \subseteq \mathbb{R}_{\geq 0}^m$ is simply a collection of nonnegative real-valued vectors, and for a parameter $ε> 0$, a \emph{$(1 \pm ε)$-sparsifier} of $C$ is a subset $T \subseteq [m]$, together with weights $w \in \mathbb{R}_{\geq 0}^T$, such that, for every $c \in C$, $\sum_{i \in T} w_i c_i \in (1 \pm ε)\sum_{i=1}^m c_i$. When $C \subseteq \{0,1\}^m$, this specializes to code sparsification, and hence captures CSP sparsification, as studied by Khanna--Putterman--Sudan (SODA 2024, STOC 2025) and Brakensiek--Guruswami (STOC 2025). Similarly, for a graph $G=(V,E)$, if one defines $C=\{c^{(x)}:x\in\mathbb R^V\}\subseteq\mathbb R_{\geq 0}^E$ by $c^{(x)}_{(u,v)}=(x_u-x_v)^2$, then sparsifying $C$ is exactly spectral graph sparsification, as studied by Spielman--Teng (SICOMP 2011). Although the techniques driving combinatorial and continuous sparsification have traditionally been largely disjoint, our main result is a single structural theorem governing the sparsifiability of arbitrary real-valued codes $C\subseteq\mathbb{R}_{\geq 0}^m$. The central parameter is \emph{continuous-valued non-redundancy} ($\mathrm{CVNRD}$), a real-valued analogue of non-redundancy that captures the largest approximately block-diagonal obstruction contained in $C$. Our theorem gives sparsifiers of size nearly-linear in $\mathrm{CVNRD}$, and shows that $\mathrm{CVNRD}$ is also a lower-bound obstruction for the broad class of coordinate-wise unbiased randomized sparsification schemes.

cs.DS

Learning Partition Trees for Nearest Neighbor Search

We study nearest neighbor search from the perspective of data-driven algorithm design: given a dataset $P \subset \mathbb{R}^d$ of size $n$ and sample access to a query distribution over $\mathbb{R}^d$, the goal is to learn a data structure optimized for queries drawn from that specific distribution. We focus on the class of balanced halfspace trees, which naturally abstracts space-partitioning frameworks like locality-sensitive hashing. Assuming Gaussian-like marginal conditions on the dataset and query distribution, we give an efficient algorithm that learns a tree achieving $o(nd)$ query time, provided that a perfect tree exists. At the core of our algorithmic approach is the balanced halfspace cut problem, where we are given a distribution over $\mathbb{R}^d \times \mathbb{R}^d$ and must find a balanced halfspace that minimizes the fraction of cut pairs. We prove that without distributional assumptions, finding the optimal balanced halfspace is NP-hard. To circumvent this computational barrier, we design an efficient improper learning algorithm: if the optimal halfspace cuts an $α$ fraction of pairs, our algorithm outputs a balanced polynomial threshold function of degree $\tilde{O}(1/\varepsilon^2)$ that cuts at most an $O(\sqrt{α+\varepsilon})$ fraction.

cs.DS

A Near-Optimal Parallel Algorithm for Finding Matroid Bases

We settle the classic question of the parallel complexity of computing a matroid basis, as first posed in the seminal work of Karp, Upfal, and Wigderson (FOCS 1985, JCSS 1988). Our algorithm runs in $O(n^{1/3}\log^{1/3}n)$ rounds, matching the lower bound of KUW up to a $\log^{2/3}(n)$ factor.

cs.DS

An $\widetilde{O} (n^{3/7})$ Round Parallel Algorithm for Matroid Bases

We study the parallel (adaptive) complexity of the classic problem of finding a basis in an $n$-element matroid, given access via an \emph{independence oracle}. In this model, the algorithm may submit polynomially many independence queries in each round, and the central question is: how many rounds are necessary and sufficient to find a basis? Karp, Upfal, and Wigderson (FOCS~1985, JCSS~1988; hereafter KUW) initiated this study, showing that $O(\sqrt{n})$ adaptive rounds suffice for any matroid, and that $\widetildeΩ(n^{1/3})$ rounds are necessary even for partition matroids. This left a substantial gap that persisted for nearly four decades, until Khanna, Putterman, and Song (FOCS~2025; hereafter KPS) achieved $\widetilde O(n^{7/15})$ rounds, the first improvement since~KUW. In this work, we make another conceptual advance beyond KPS, giving a new algorithm that finds a matroid basis in $\widetilde O(n^{3/7})$ rounds. We develop a structural and algorithmic framework that brings a new lens to the analysis of random circuits, moving from reasoning about individual elements to understanding how dependencies span multiple elements simultaneously.

cs.DS

A Faster Deterministic Algorithm for Fully Dynamic Maximal Matching

In the fully dynamic maximal matching problem, the goal is to maintain a maximal matching in a graph undergoing an online sequence of edge insertions and deletions. The problem has been studied extensively in the oblivious-adversary setting, where randomized algorithms with polylogarithmic worst-case and constant amortized update time have been known for some time. A major challenge in this area has been designing an algorithm with non-trivial update time against an adaptive adversary. In a recent breakthrough, Bernstein, Bhattacharya, Kiss, and Saranurak (STOC 2025; hereafter, BBKS25) obtained the first algorithms with sublinear update time for this setting: namely, a randomized algorithm with $\tilde{O}(n^{3/4})$ amortized update time, and a deterministic algorithm with $\tilde{O}(n^{8/9})$ amortized update time. Our main result is a deterministic algorithm for fully dynamic maximal matching with amortized update time $n^{1/2+o(1)}$. A powerful tool in dynamic matching is the use of matching sparsifiers: sparse subgraphs that preserve enough information to recover matchings with desired properties. Sparsifiers, such as the EDCS data structure, have been successfully used for approximate maximum matching. For maximal matching, however, this paradigm is not as natural, since maximality must hold with respect to the entire graph. Nevertheless, BBKS25 showed that EDCS can be repurposed as a verification-and-repair mechanism for fully dynamic maximal matching against adaptive adversaries. We introduce a new deterministic framework, referred to as the subgraph system, which, in contrast to EDCS, is purpose-built for verification and maintenance of maximality. It is also designed to allow efficient recursive refinements leading to stronger and stronger parameters, that yield our deterministic algorithm with $n^{1/2+o(1)}$ amortized update time.

cs.DS

Improved Approximation Algorithms for Capacitated Network Design and Flexible Graph Connectivity

We present improved approximation algorithms for some problems in the related areas of Capacitated Network Design and Flexible Graph Connectivity. In the Cap-$k$-ECSS problem, we are given a graph $G=(V,E)$ whose edges have non-negative costs and positive integer capacities, and the goal is to find a minimum-cost edge-set $F$ such that every non-trivial cut of the graph $G'=(V,F)$ has capacity at least $k$. We present an $O(\log k)$-approximation algorithm for the Cap-$k$-ECSS problem, asymptotically improving upon the previous best approximation ratio of $\min(O(\log n),\; O(k))$ whenever $\log(k)=o(\log n)$, where $n$ denotes $|V|$. (See section 1, for a detailed discussion.) In the $(p,q)$-Flexible Graph Connectivity problem, denoted $(p,q)$-FGC, the input is a graph $G(V, E)$ where $E$ is partitioned into safe and unsafe edges, and the goal is to find a minimum cost set of edges $F$ such that the subgraph $G'(V, F)$ remains $p$-edge connected upon removal of any $q$ unsafe edges from $F$. We design a $7$-approximation algorithm for the $(1,q)$-FGC problem, improving on the previous best approximation ratio of $(q+1)$. Both of our results are obtained by using natural LP relaxations strengthened with the knapsack-cover inequalities, and then, during the rounding process, utilizing a recent $O(1)$-approximation algorithm for the Cover$\;$Small$\;$Cuts problem. In the latter problem, the goal is to find a minimum-cost set of links such that each non-trivial cut of capacity less than a specified value is covered by a link. We also show that the problem of covering small cuts inherently arises in another variant of $(p,q)$-FGC. Specifically, we give Cook reductions that preserve approximation ratios within $O(1)$ factors between the $(2,q)$-FGC problem and the 2-Cover$\;$Small$\;$Cuts problem; in the latter problem, each small cut needs to be covered by two links.

cs.DS

Fault-Tolerant Distance Oracles Below the $n \cdot f$ Barrier

Fault-tolerant spanners are fundamental objects that preserve distances in graphs even under edge failures. A long line of work culminating in Bodwin, Dinitz, Robelle (SODA 2022) gives $(2k-1)$-stretch, $f$-fault-tolerant spanners with $O(k^2 f^{\frac{1}{2}-\frac{1}{2k}} n^{1+\frac{1}{k}} + k f n)$ edges for any odd $k$. For any $k = \tilde{O}(1)$, this bound is essentially optimal for deterministic spanners in part due to a known folklore lower bound that \emph{any} $f$-fault-tolerant spanner requires $Ω(nf)$ edges in the worst case. For $f \geq n$, this $Ω(nf)$ barrier means that any $f$-fault tolerant spanners are trivial in size. Crucially however, this folklore lower bound exploits that the spanner \emph{is itself a subgraph}. It does not rule out distance-reporting data structures that may not be subgraphs. This leads to our central question: can one beat the $n \cdot f$ barrier with fault-tolerant distance oracles? We give a strong affirmative answer to this question. As our first contribution, we construct $f$-fault-tolerant distance oracles with stretch $O(\log(n)\log\log(n))$ that require only $\widetilde{O}(n\sqrt{f})$ bits of space; substantially below the spanner barrier of $n \cdot f$. Beyond this, in the regime $n \leq f \leq n^{3/2}$ we show that by using our new \emph{high-degree, low-diameter} decomposition in combination with tools from sparse recovery, we can even obtain stretch $7$ distance oracles in space $\widetilde{O}(n^{3/2}f^{1/3})$ bits. We also show that our techniques are sufficiently general to yield randomized sketches for fault-tolerant ``oblivious'' spanners and fault-tolerant deterministic distance oracles in bounded-deletion streams, with space below the $nf$ barrier in both settings.

cs.DS

An $n^{2+o(1)}$ Time Algorithm for Single-Source Negative Weight Shortest Paths

We present a randomized algorithm for the single-source shortest paths (SSSP) problem on directed graphs with arbitrary real-valued edge weights that runs in $n^{2+o(1)}$ time with high probability. This result yields the first almost linear-time algorithm for the problem on dense graphs ($m = Θ(n^2)$) and improves upon the best previously known bounds for moderately dense graphs ($m = ω(n^{1.306})$). Our approach builds on the hop-reduction via shortcutting framework introduced by Li, Li, Rao, and Zhang (2025), which iteratively augments the graph with shortcut edges to reduce the negative hop count of shortest paths. The central computational bottleneck in prior work is the cost of explicitly constructing these shortcuts in dense regions. We overcome this by introducing a new compression technique using auxiliary Steiner vertices. Specifically, we construct these vertices to represent large neighborhoods compactly in a structured manner, allowing us to efficiently generate and propagate shortcuts while strictly controlling the growth of vertex degrees and graph size.

cs.DS

Techno-Economic Assessment of Wind-Powered Green Hydrogen Production for US Industrial Decarbonization

This study evaluates the techno-economic feasibility of supplying industrial thermal loads with green hydrogen produced via water electrolysis using two pathways off-grid systems powered by co-located wind turbines and battery energy storage (BESS), and on-grid systems that procure electricity directly from the wind farm power node and operate electrolysers in response to real-time locational marginal prices (LMPs).The optimization results show that off-grid wind-to-hydrogen configurations in high-resource regions can achieve levelized costs of hydrogen (LCOH) on the order of \$7/kg, driven by high wind capacity factors and optimized BESS sizing that ensures operational continuity .Similarly in, on-grid, price-responsive operation achieves LCOH values of \$0.5/kg, reflecting sensitivity to electricity market volatility. Overall, the results suggest that Midwest wind-rich regions can support competitive green hydrogen production for industrial heat, with grid-connected electrolysers remaining attractive in locations with frequent low LMP periods. This dual-path analysis provides a transparent framework for industrial hydrogen deployment and highlights practical transition strategies for decarbonizing U.S. manufacturing.

physics.soc-ph

On the Parallel Complexity of Finding a Matroid Basis

A fundamental question in parallel computation, posed by Karp, Upfal, and Wigderson (FOCS 1985, JCSS 1988), asks: \emph{given only independence-oracle access to a matroid on $n$ elements, how many rounds are required to find a basis using only polynomially many queries?} This question generalizes, among others, the complexity of finding bases of linear spaces, partition matroids, and spanning forests in graphs. In their work, they established an upper bound of $O(\sqrt{n})$ rounds and a lower bound of $\widetildeΩ(n^{1/3})$ rounds for this problem, and these bounds have remained unimproved since then. In this work, we make the first progress in narrowing this gap by designing a parallel algorithm that finds a basis of an arbitrary matroid in $\tilde{O}(n^{7/15})$ rounds (using polynomially many independence queries per round) with high probability, surpassing the long-standing $O(\sqrt{n})$ barrier. Our approach introduces a novel matroid decomposition technique and other structural insights that not only yield this general result but also lead to a much improved new algorithm for the class of \emph{partition matroids} (which underlies the $\widetildeΩ(n^{1/3})$ lower bound of Karp, Upfal, and Wigderson). Specifically, we develop an $\tilde{O}(n^{1/3})$-round algorithm, thereby settling the round complexity of finding a basis in partition matroids.

cs.DS

Optimal Parallel Basis Finding in Graphic and Related Matroids

We study the parallel complexity of finding a basis of a graphic matroid under independence-oracle access. Karp, Upfal, and Wigderson (FOCS 1985, JCSS 1988) initiated the study of this problem and established two algorithms for finding a spanning forest: one running in $O(\log m)$ rounds with $m^{Θ(\log m)}$ queries, and another, for any $d \in \mathbb{Z}^+$, running in $O(m^{2/d})$ rounds with $Θ(m^d)$ queries. A key open question they posed was whether one could simultaneously achieve polylogarithmic rounds and polynomially many queries. We give a deterministic algorithm that uses $O(\log m)$ adaptive rounds and $\mathrm{poly}(m)$ non-adaptive queries per round to return a spanning forest on $m$ edges, and complement this result with a matching $Ω(\log m)$ lower bound for any (even randomized) algorithm with $\mathrm{poly}(m)$ queries per round. Thus, the adaptive round complexity for graphic matroids is characterized exactly, settling this long-standing problem. Beyond graphs, we show that our framework also yields an $O(\log m)$-round, $\mathrm{poly}(m)$-query algorithm for any binary matroid satisfying a smooth circuit counting property, implying, among others, an optimal $O(\log m)$-round parallel algorithms for finding bases of cographic matroids.

cs.DS

A Polynomial Space Lower Bound for Diameter Estimation in Dynamic Streams

We study the space complexity of estimating the diameter of a subset of points in an arbitrary metric space in the dynamic (turnstile) streaming model. The input is given as a stream of updates to a frequency vector $x \in \mathbb{Z}_{\geq 0}^n$, where the support of $x$ defines a multiset of points in a fixed metric space $M = ([n], \mathsf{d})$. The goal is to estimate the diameter of this multiset, defined as $\max\{\mathsf{d}(i,j) : x_i, x_j > 0\}$, to a specified approximation factor while using as little space as possible. In insertion-only streams, a simple $O(\log n)$-space algorithm achieves a 2-approximation. In sharp contrast to this, we show that in the dynamic streaming model, any algorithm achieving a constant-factor approximation to diameter requires polynomial space. Specifically, we prove that a $c$-approximation to the diameter requires $n^{Ω(1/c)}$ space. Our lower bound relies on two conceptual contributions: (1) a new connection between dynamic streaming algorithms and linear sketches for {\em scale-invariant} functions, a class that includes diameter estimation, and (2) a connection between linear sketches for diameter and the {\em minrank} of graphs, a notion previously studied in index coding. We complement our lower bound with a nearly matching upper bound, which gives a $c$-approximation to the diameter in general metrics using $n^{O(1/c)}$ space.

cs.DS

Sparse Navigable Graphs for Nearest Neighbor Search: Algorithms and Hardness

We initiate the study of approximation algorithms and computational barriers for constructing sparse $α$-navigable graphs [IX23, DGM+24], a core primitive underlying recent advances in graph-based nearest neighbor search. Given an $n$-point dataset $P$ with an associated metric $\mathsf{d}$ and a parameter $α\geq 1$, the goal is to efficiently build the sparsest graph $G=(P, E)$ that is $α$-navigable: for every distinct $s, t \in P$, there exists an edge $(s, u) \in E$ with $\mathsf{d}(u, t) < \mathsf{d}(s, t)/α$. We consider two natural sparsity objectives: minimizing the maximum out-degree and minimizing the total size. We first show a strong negative result: the slow-preprocessing version of DiskANN (analyzed in [IX23] for low-doubling metrics) can yield solutions whose sparsity is $\widetildeΩ(n)$ times larger than optimal, even on Euclidean instances. We then show a tight approximation-preserving equivalence between the Sparsest Navigable Graph problem and the classic Set Cover problem, obtaining an $O(n^3)$-time $(\ln n + 1)$-approximation algorithm, as well as establishing NP-hardness of achieving an $o(\ln n)$-approximation. Building on this equivalence, we develop faster $O(\ln n)$-approximation algorithms. The first runs in $\widetilde{O}(n \cdot \mathrm{OPT})$ time and is thus much faster when the optimal solution is sparse. The second, based on fast matrix multiplication, is a bicriteria algorithm that computes an $O(\ln n)$-approximation to the sparsest $2α$-navigable graph, running in $\widetilde{O}(n^ω)$ time. Finally, we complement our upper bounds with a query complexity lower bound, showing that any $o(n)$-approximation requires examining $Ω(n^2)$ distances. This result shows that in the regime where $\mathrm{OPT} = \widetilde{O}(n)$, our $\widetilde{O}(n \cdot \mathrm{OPT})$-time algorithm is essentially best possible.

cs.DS

A Theory of Spectral CSP Sparsification

We initiate the study of spectral sparsification for instances of Constraint Satisfaction Problems (CSPs). In particular, we introduce a notion of the \emph{spectral energy} of a fractional assignment for a Boolean CSP instance, and define a \emph{spectral sparsifier} as a weighted subset of constraints that approximately preserves this energy for all fractional assignments. Our definition not only strengthens the combinatorial notion of a CSP sparsifier but also extends well-studied concepts such as spectral sparsifiers for graphs and hypergraphs. Recent work by Khanna, Putterman, and Sudan [SODA 2024] demonstrated near-linear sized \emph{combinatorial sparsifiers} for a broad class of CSPs, which they term \emph{field-affine CSPs}. Our main result is a polynomial-time algorithm that constructs a spectral CSP sparsifier of near-quadratic size for all field-affine CSPs. This class of CSPs includes graph (and hypergraph) cuts, XORs, and more generally, any predicate which can be written as $P(x_1, \dots x_r) = \mathbf{1}[\sum a_i x_i \neq b \mod p]$. Based on our notion of the spectral energy of a fractional assignment, we also define an analog of the second eigenvalue of a CSP instance. We then show an extension of Cheeger's inequality for all even-arity XOR CSPs, showing that this second eigenvalue loosely captures the ``expansion'' of the underlying CSP. This extension specializes to the case of Cheeger's inequality when all constraints are even XORs and thus gives a new generalization of this powerful inequality which converts the combinatorial notion of expansion to an analytic property.

cs.DS

Near-optimal Hypergraph Sparsification in Insertion-only and Bounded-deletion Streams

We study the problem of constructing hypergraph cut sparsifiers in the streaming model where a hypergraph on $n$ vertices is revealed either via an arbitrary sequence of hyperedge insertions alone ({\em insertion-only} streaming model) or via an arbitrary sequence of hyperedge insertions and deletions ({\em dynamic} streaming model). For any $ε\in (0,1)$, a $(1 \pm ε)$ hypergraph cut-sparsifier of a hypergraph $H$ is a reweighted subgraph $H'$ whose cut values approximate those of $H$ to within a $(1 \pm ε)$ factor. Prior work shows that in the static setting, one can construct a $(1 \pm ε)$ hypergraph cut-sparsifier using $\tilde{O}(nr/ε^2)$ bits of space [Chen-Khanna-Nagda FOCS 2020], and in the setting of dynamic streams using $\tilde{O}(nr\log m/ε^2)$ bits of space [Khanna-Putterman-Sudan FOCS 2024]; here the $\tilde{O}$ notation hides terms that are polylogarithmic in $n$, and we use $m$ to denote the total number of hyperedges in the hypergraph. Up until now, the best known space complexity for insertion-only streams has been the same as that for the dynamic streams. This naturally poses the question of understanding the complexity of hypergraph sparsification in insertion-only streams. Perhaps surprisingly, in this work we show that in \emph{insertion-only} streams, a $(1 \pm ε)$ cut-sparsifier can be computed in $\tilde{O}(nr/ε^2)$ bits of space, \emph{matching the complexity} of the static setting. As a consequence, this also establishes an $Ω(\log m)$ factor separation between the space complexity of hypergraph cut sparsification in insertion-only streams and dynamic streams, as the latter is provably known to require $Ω(nr \log m)$ bits of space.

cs.DS

Correlation Clustering and (De)Sparsification: Graph Sketches Can Match Classical Algorithms

Correlation clustering is a widely-used approach for clustering large data sets based only on pairwise similarity information. In recent years, there has been a steady stream of better and better classical algorithms for approximating this problem. Meanwhile, another line of research has focused on porting the classical advances to various sublinear algorithm models, including semi-streaming, Massively Parallel Computation (MPC), and distributed computing. Yet, these latter works typically rely on ad-hoc approaches that do not necessarily keep up with advances in approximation ratios achieved by classical algorithms. Hence, the motivating question for our work is this: can the gains made by classical algorithms for correlation clustering be ported over to sublinear algorithms in a \emph{black-box manner}? We answer this question in the affirmative by introducing the paradigm of graph de-sparsification.

cs.DS

Streaming Maximal Matching with Bounded Deletions

We initiate the study of the Maximal Matching problem in bounded-deletion graph streams. In this setting, a graph $G$ is revealed as an arbitrary sequence of edge insertions and deletions, where the number of insertions is unrestricted but the number of deletions is guaranteed to be at most $K$, for some given parameter $K$. The single-pass streaming space complexity of this problem is known to be $Θ(n^2)$ when $K$ is unrestricted, where $n$ is the number of vertices of the input graph. In this work, we present new randomized and deterministic algorithms and matching lower bound results that together give a tight understanding (up to poly-log factors) of how the space complexity of Maximal Matching evolves as a function of the parameter $K$: The randomized space complexity of this problem is $\tildeΘ(n \cdot \sqrt{K})$, while the deterministic space complexity is $\tildeΘ(n \cdot K)$. We further show that if we relax the maximal matching requirement to an $α$-approximation to Maximum Matching, for any constant $α> 2$, then the space complexity for both, deterministic and randomized algorithms, strikingly changes to $\tildeΘ(n + K)$.

cs.DS