Data Structures & Algorithms

cs.DS

Hot and foundational data structures and algorithms papers on graph algorithms, streaming, approximation, and computational complexity.

Hot in Data Structures & Algorithms

12 papers

Variants of Beam Search for DiskANN

Viraj Agrawal, Kirankumar Shiragur

Graph-based data structures such as DiskANN, HNSW, and NSG constitute the state of the art for large-scale approximate nearest-neighbor (ANN) search. Indyk and Xu introduced the notion of αα-reachable graphs, which include graphs built by DiskANN's slow-preprocessing construction, and proved that greedy search achieves an approximation factor of α+1α−1\tfrac{α+1}{α-1}. Independently, Al-Jazzazi et al. proposed adaptive beam search (ABS) with a relaxation parameter γ>0γ> 0, showing a 2γ\tfrac{2}γ approximation on navigable graphs (α≈1α\approx 1), where greedy search admits no guarantees. In this work, we unify and generalize these results by proving that ABS with parameter γγ on αα-reachable graphs achieves an approximation of α+1α(γ+1)−1\tfrac{α+1}{α(γ+1)-1} for any metric. Moreover, on sorted αα-reachable graphs (introduced by Gollapudi et al.) under the ℓ2\ell_2 metric, we obtain the tighter bound max⁡(αα(γ+1)−1,α2+1α2(γ+1)−1)\max\bigl(\tfracα{α(γ+1)-1}, \tfrac{α^{2}+1}{α^{2}(γ+1)-1}\bigr). Beyond these theoretical results, we design a beam predictor using features inspired by fine-grained analysis of ABS, trained via a constrained objective that minimizes mean distance computations subject to a target recall. On three 100-million-point benchmarks, using graphs built by DiskANN's practical construction, beam predictor lowers mean query latency on SSD-resident indices at matched recall by up to $29.6\%$ relative to classical beam search (CBS). Relative to ABS, it is faster in 1111 of 1515 settings, by up to $6.5\%$, and at most $1.4\%$ slower in the other 44; at $95\%$ recall, its advantage over ABS grows from 0.80.8--$4.2\%$ for 100100 neighbors to 4.64.6--$5.6\%$ for 500500 neighbors. In memory, it needs 1.31.3--$23.7\%$ fewer distance computations than CBS and 0.00.0--$3.9\%$ fewer than ABS.

cs.DSNov 2026

End-to-End Quantum Algorithm for Differential Equations: Application to Simulating a Biomolecular System

Mohsen Bagherimehrab, Daniyaal Farooqi, Gavin K. Brennen, Barry C. Sanders, Alán Aspuru-Guzik

Quantum algorithms for differential equations have the potential for substantial algorithmic speedups over classical methods. However, they rely on certain assumptions and abstract oracle specifications that leave their practical feasibility and computational advantages for realistic applications unclear. Here we formalize the concept of an end-to-end quantum algorithm for differential equations as one that accepts classical inputs and returns classical outputs, and provide implementations for algorithmic primitives in constructing such algorithms. We present a tailored end-to-end quantum algorithm for the linearized Poisson-Boltzmann (LPB) equation, a partial differential equation (PDE) with variable coefficients widely used in simulating a biomolecular system. We explicitly implement all aspects of the algorithm, from preparing an initial state to generating a quantum solution and estimating properties of the system. In particular, we develop a new discrete representation for variable-coefficient PDEs on a grid that enables efficient implementation of the operator oracle, and build on a recent technique based on optimal wavelet preconditioning to generate a quantum solution with a cost independent of the condition number of the discretized operator. We show the algorithm can be implemented by quantum circuits of size polylogarithmic in both the number of grid points NgN_g and the inverse of the desired accuracy ε\varepsilon, with an overall gate cost polylogarithmic in NgN_g and quasilinear in 1/ε1/\varepsilon. We also show the classical preprocessing to construct the circuits has polylogarithmic cost in NgN_g and 1/ε1/\varepsilon. Our work provides a concrete end-to-end quantum algorithm for a PDE of practical value, demonstrates an exponential improvement in scaling with NgN_g over classical methods, and provides a foundation for assessing its potential quantum advantage in practice.

quant-phNov 2026

Efficient Classical Algorithms for Ground Energy Estimation of Fermions with Conjugate-Pair Orbital Interactions

Ziyi Yang, Yexin Zhang, Yuexin Su, Xinzhao Wang, Xiaoyang Wang, Tongyang Li

Estimating the ground energy of interacting fermions is central to quantum many-body physics, and recent quantum algorithms provide polynomial-time guarantees for some structured families. Classical approaches commonly rely on quantum Monte Carlo, where the sign problem is a major obstacle. However, even when a nonnegative expansion without sign problem is available, rigorous guarantees for rapid mixing are still far from well understood. In this paper, we give an efficient classical randomized algorithm for approximating the ground energy of fermionic Hamiltonians with conjugate hopping matrices and conjugate-paired orbital interactions, which includes the attractive Hubbard models. This guarantee not only holds without a physical spectral gap or a weak-coupling assumption, but also covers interactions beyond onsite density attractions. Technically, we first reduce ground-energy estimation to partition-function estimation and then use a discretization with controlled energy error to obtain a nonnegative weighted sum of squared determinant moduli and then apply the Chen--Liu log-concave counting theorem. In addition, we obtain a sharper arithmetic bound by controlling how many independent sampling runs and matrix updates are needed, and using sparse matrices to reduce the cost of each update.

quant-phNov 2026

Exact guarantees and faster algorithms for kk-rollercoasters

Sungmin Kim, Florin Manea

For k≥3k\ge3, a kk-rollercoaster is a sequence of distinct values whose maximal increasing and decreasing runs all have length at least kk. We discover the maximum guaranteed length fk(n)f_k(n) of kk-rollercoasters appearing as subsequences of nn-point permutations. In particular, letting q=k−1q=k-1, we prove that fk(n)=⌈n/q⌉f_k(n)= \lceil n/q\rceil for n≥2q2n\ge2q^2, fk(n)=2q−⌊2q2−n⌋f_k(n)= 2q-\lfloor \sqrt{2q^2-n}\rfloor for q2<n<2q2q^2<n<2q^2 and fk(n)=0f_k(n)= 0 otherwise. We prove that the guarantees are tight by constructing an nn-point permutation whose longest kk-rollercoaster has exactly fk(n)f_k(n) points. Our proof extends Seidenberg's argument [Journal of the London Mathematical Society, 1959] for proving the Erdős--Szekeres theorem by representing points in a subsequence with respect to the lengths of longest monotonic (increasing and decreasing) subsequences that reach each point. The combinatorial proof yields a deterministic comparison-based algorithm that finds a rollercoaster of length at least fk(n)f_k(n) in O(nlog⁡fk(n))O(n\log f_k(n)) time and O(n)O(n) space for n>q2n>q^2. Independently, we give an O(nklog⁡k)O(nk\log k)-time, O(nk)O(nk)-space algorithm for a longest kk-rollercoaster, improving the previous O(nk2)O(nk^2) bound. We use the dynamic program of Gawrychowski et al. [STACS 2019, Algorithmica 2022], and process its weighted predecessor queries through monotone subsequences with finger-search trees. Both algorithms return such subsequences.

cs.DMNov 2026

Batch-Dynamic Coreness and Applications with Logarithmic Work via Balanced Pressures

Quinten De Man, Laxman Dhulipala, Kishen N Gowda, Zhongqi Wang

We give a parallel algorithm that maintains a one-sided (2+ε)(2+\varepsilon)-approximation of all core numbers under batches of edge insertions and deletions. For fixed ε>0\varepsilon>0, the expected amortized work is O(log⁡n)O(\log n) per edge update, and each batch has deterministic polylogarithmic depth. This improves on the previously known (4+ε)(4+\varepsilon)-approximation and O(log⁡2n)O(\log^2 n) amortized work bounds. This approximation factor approaches the factor-two limit for polylogarithmic update and query time under the OMv conjecture. Our algorithm is based on assigning each vertex a "pressure" and splits each edge's unit load smoothly between its endpoints according to their pressures. After each batch of updates, our dynamic algorithm adjusts the pressures of vertices in parallel to restore balance between the pressures and loads. We show that by maintaining balanced pressures we can obtain good approximations of core numbers. Our construction also gives a (1+ε)(1+\varepsilon)-approximation of the densest-subgraph value with logarithmic expected amortized work and supports batch-dynamic maximal matching, clique counting, forest decomposition, and coloring in low-arboricity graphs with improved or matching work bounds. We give a practical implementation of our batch-dynamic coreness algorithm and find that it is able to achieve smaller empirical error than the state-of-the-art parallel batch-dynamic implementation, while running faster. On six real-world graphs, it runs 32×32\times faster than that implementation in geometric mean and 4.1×4.1\times faster than a state-of-the-art heuristic baseline. On three graphs with up to 1.8 billion edges, it is 9.2×9.2\times faster than the heuristic baseline.

cs.DSNov 2026

Read these in full, for free

A free account opens every paper as clean text, gives you 5 AI explanations and a project to keep what you find.

Foundational Classics

1 paper

Truly Subquadratic 3SUM and Truly Subcubic APSP via Triangles in Sparse Lopsided Graphs

Classic

Josh Alman, Virginia Vassilevska Williams

We give the first polynomial improvements over the textbook algorithms for 33SUM and All-Pairs Shortest Paths (APSP): we show how to deterministically solve 33SUM on nn integers of polynomial size in O(n1.9992)O(n^{1.9992}) time and APSP on directed nn-vertex graphs with polynomially bounded integer weights in O(n2.9995)O(n^{2.9995}) time. This refutes the 33SUM and APSP hypotheses. Using known reductions, we also refute the real-valued versions of the 33SUM and APSP hypotheses, the Exact Triangle hypothesis, the Zero-Weight kk-Clique hypotheses, and the three rectangular hinted Online Matrix--Vector conjectures of van den Brand, Nanongkai, and Saranurak, and we give polynomial speedups for a variety of other problems. All of these results follow from a single new algorithm for thin matrix products. Let XX be an N×DN\times D integer matrix and YY a D×ND\times N integer matrix with D≤N1/18D\le N^{1/18}, and let WW be any set of at most N2/DN^2/\sqrt D positions. We compute the entries (XY)[I,J](XY)[I,J], (I,J)∈W(I,J)\in W, in O(N2/D0.063)O(N^2/D^{0.063}) operations, which is polynomially less than the time needed to write down XYXY or to compute N2/DN^2/\sqrt D inner products one by one. We design this algorithm by modifying a variant of Coppersmith's rectangular matrix multiplication algorithm, built from a ten-multiplication identity of Schönhage, to perform only the operations needed for the entries in WW, and show that few operations are needed. Interpreted as a graph algorithm, this solves the All-Edges Sparse Triangle problem in truly subquadratic time on sparse lopsided tripartite graphs where two parts have nn vertices but one part has nεn^{\varepsilon} vertices for ε<0.12\varepsilon<0.12. By known reductions, Exact Triangle, and hence 33SUM and APSP, reduce to this problem. We also give a data structure version that answers queries for single entries of XYXY, not known in advance.

cs.DSOct 2026
Cited by 20