SearcharxivSearch

arXiv subjects

Egor Gorbachev

Publications and source records attributed to Egor Gorbachev.

7 recordsLinked to original sources

The Sync Heap: Delete First, Ask Questions Later

Heaps (priority queues) are among the best-studied data structures in computer science. In this paper, we critically revisit the textbook assumption that in the comparison model at least one of the two standard heap operations of inserting an element and deleting the minimum must take logarithmic time. By decoupling the deletion itself from the act of revealing the identity of the deleted element to the user, we avoid the sorting barrier and obtain a novel trade-off between the complexities of heap operations. This shows that the logarithmic barrier is not inherently the cost of deleting the minimum but rather the information cost of immediately learning which element was deleted. In the special case when the user inspects the heap state only constantly many times, we show that both insertions and deletions can be supported in constant amortized time. As an application, this yields a runtime improvement from $\mathcal{O}(n \log n)$ to the optimal $\mathcal{O}(n)$ for a textbook unit-time scheduling problem. We obtain our results by designing a new data structure, the sync heap, which gains speed by rearranging and compacting its operations until queries force it to synchronize and reveal its state. As a key component, we use the soft heap introduced by Chazelle as part of his minimum spanning tree algorithm. Our data structure is simple, comparison-based, and deterministic, and our results are asymptotically optimal.

cs.DS

Bottleneck Paths Reduce to Deterministic Graphical Games and a Counterexample to a Claimed Linear-Time Algorithm

Chechik, Kaplan, Thorup, Zamir, and Zwick (STACS 2016) claimed a simple deterministic linear-time comparison-based algorithm for solving deterministic two-player, turn-based, zero-sum terminal-payoff games, also known as deterministic graphical games (DGGs). We give a counterexample to their algorithm. We also give a deterministic linear-time reduction from the directed $s$-$t$ bottleneck path (BP) problem to the DGG problem. Consequently, a linear-time comparison-based algorithm for computing the value of a designated start vertex in a DGG would yield a linear-time comparison-based algorithm for directed $s$-$t$ BP. Whether directed $s$-$t$ BP admits such an algorithm has remained open since Gabow and Tarjan gave their $\mathcal{O}(m\log^* n)$-time algorithm. Thus, a positive resolution of the open question for DGGs would also resolve the corresponding open question for directed $s$-$t$ BP.

cs.DS

Bounded Weighted Edit Distance: Dynamic Algorithms and Matching Lower Bounds

The edit distance $ed(X,Y)$ of two strings $X,Y\in \Sigma^*$ is the minimum number of character edits (insertions, deletions, and substitutions) needed to transform $X$ into $Y$. Its weighted counterpart $ed^w(X,Y)$ minimizes the total cost of edits, which are specified using a function $w$, normalized so that each edit costs at least one. The textbook dynamic-programming procedure, given strings $X,Y\in \Sigma^{\le n}$ and oracle access to $w$, computes $ed^w(X,Y)$ in $O(n^2)$ time. Nevertheless, one can achieve better running times if the computed distance, denoted $k$, is small: $O(n+k^2)$ for unit weights [Landau and Vishkin; JCSS'88] and $\tilde{O}(n+\sqrt{nk^3})$ for arbitrary weights [Cassis, Kociumaka, Wellnitz; FOCS'23]. In this paper, we study the dynamic version of the weighted edit distance problem, where the goal is to maintain $ed^w(X,Y)$ for strings $X,Y\in \Sigma^{\le n}$ that change over time, with each update specified as an edit in $X$ or $Y$. Very recently, Gorbachev and Kociumaka [STOC'25] showed that the unweighted distance $ed(X,Y)$ can be maintained in $\tilde{O}(k)$ time per update after $\tilde{O}(n+k^2)$-time preprocessing; here, $k$ denotes the current value of $ed(X,Y)$. Their algorithm generalizes to small integer weights, but the underlying approach is incompatible with large weights. Our main result is a dynamic algorithm that maintains $ed^w(X,Y)$ in $\tilde{O}(k^{3-\gamma})$ time per update after $\tilde{O}(nk^\gamma)$-time preprocessing. Here, $\gamma\in [0,1]$ is a real trade-off parameter and $k\ge 1$ is an integer threshold fixed at preprocessing time, with $\infty$ returned whenever $ed^w(X,Y)>k$. We complement our algorithm with conditional lower bounds showing fine-grained optimality of our trade-off for $\gamma \in [0.5,1)$ and justifying our choice to fix $k$.

cs.DS

Core-Sparse Monge Matrix Multiplication: Improved Algorithm and Applications

Min-plus matrix multiplication is used in many problems operating on distances in graphs or solvable by dynamic programming. Assuming the APSP hypothesis, there is no subcubic-time algorithm for the min-plus product of two general $n\times n$ matrices, but structured matrices admit faster solutions. Planar graph algorithms often use Monge matrices, which have an $O(n^2)$-time min-plus multiplication procedure. Many results for sequence alignment problems, such as edit distance and longest increasing subsequence, apply simple unit-Monge matrices, whose min-plus product can be computed in $O(n\log n)$ time [Tiskin, SODA'10]. Russo [SPIRE'11] identified the core size $\delta$ as the structural parameter behind the underlying matrix representation and showed an $O((n+\delta)\log^3 n)$-time min-plus multiplication procedure for arbitrary Monge matrices. In this work, we prove a linear bound on the core size of the product matrix in terms of the core sizes of the input matrices and show how to solve the core-sparse Monge matrix multiplication problem in $O((n+\delta)\log n)$ time, matching the complexity for simple unit-Monge matrices, where $\delta = O(n)$. As witnessed by the recent work of Gorbachev and Kociumaka [STOC'25] for edit distance with integer weights, our generalization opens up the possibility of speed-ups for weighted sequence alignment problems. Furthermore, our multiplication algorithm can efficiently recover the witness for any entry of the output matrix. This allows us, for example, to preprocess an integer array of size $n$ in $\tilde{O}(n)$ time so that the longest increasing subsequence of any sub-array can be reconstructed in $\tilde{O}(\ell)$ time, where $\ell$ is the length of the reported subsequence. In comparison, Karthik C. S. and Rahul [arXiv, 2024] recently achieved $\tilde{O}(\ell+n^{1/2})$-time reporting after $\tilde{O}(n^{3/2})$-time preprocessing.

cs.DS

Bounded Edit Distance: Optimal Static and Dynamic Algorithms for Small Integer Weights

The edit distance of two strings is the minimum number of insertions, deletions, and substitutions needed to transform one string into the other. The textbook algorithm determines the edit distance of length-$n$ strings in $O(n^2)$ time, which is optimal up to subpolynomial factors under Orthogonal Vectors Hypothesis. In the bounded version of the problem, parameterized by the edit distance $k$, the algorithm of Landau and Vishkin [JCSS'88] achieves $O(n+k^2)$ time, which is optimal as a function of $n$ and $k$. The dynamic version of the problem asks to maintain the edit distance of two strings that change dynamically, with each update modeled as an edit. A folklore approach supports updates in $\tilde O(k^2)$ time, where $\tilde O(\cdot)$ hides polylogarithmic factors. Recently, Charalampopoulos, Kociumaka, and Mozes [CPM'20] showed an algorithm with update time $\tilde O(n)$, which is optimal under OVH in terms of $n$. The update time of $\tilde O(\min\{n,k^2\})$ raised an exciting open question of whether $\tilde O(k)$ is possible; we answer it affirmatively. Our solution relies on tools originating from weighted edit distance, where the weight of each edit depends on the edit type and the characters involved. The textbook algorithm supports weights, but the Landau-Vishkin approach does not, and a simple $O(nk)$-time procedure long remained the fastest for bounded weighted edit distance. Only recently, Das et al. [STOC'23] provided an $O(n+k^5)$-time algorithm, whereas Cassis, Kociumaka, and Wellnitz [FOCS'23] presented an $\tilde O(n+\sqrt{nk^3})$-time solution and a matching conditional lower bound. In this paper, we show that, for integer edit weights between $0$ and $W$, weighted edit distance can be computed in $\tilde O(n+Wk^2)$ time and maintained dynamically in $\tilde O(W^2k)$ time per update. Our static algorithm can also be implemented in $\tilde O(n+k^{2.5})$ time.

cs.DS

A Fine-grained Classification of Subquadratic Patterns for Subgraph Listing and Friends

In an $m$-edge host graph $G$, all triangles can be listed in time $O(m^{1.5})$ [Itai, Rodeh '78], and all $k$-cycles can be listed in time $O(m^{2-1/{\lceil k/2 \rceil}} + t)$ where $t$ is the output size [Alon, Yuster, Zwick '97]. These classic results also hold for the colored problem variant, where the nodes of the host graph $G$ are colored by nodes in the pattern graph $H$, and we are only interested in subgraphs of $G$ that are isomorphic to the pattern $H$ and respect the colors. We study the problem of listing all $H$-subgraphs in the colored setting, for fixed pattern graphs $H$. As our main result, we determine all pattern graphs $H$ such that all $H$-subgraphs can be listed in subquadratic time $O(m^{2-\varepsilon} + t)$, where $t$ is the output size. Moreover, for each such subquadratic pattern $H$ we determine the smallest exponent $c(H)$ such that all $H$-subgraphs can be listed in time $O(m^{c(H)} + t)$. This is a vast generalization of the classic results on triangles and cycles. To prove this result, we design new listing algorithms and prove conditional lower bounds based on standard hypotheses from fine-grained complexity theory. In our algorithms, we use a new ingredient that we call hyper-degree splitting, where we split tuples of nodes into high degree and low degree depending on their number of common neighbors. We also show the same results for two related problems: finding an $H$-subgraph of minimum total edge-weight in time $O(m^{c(H)})$, and enumerating all $H$-subgraphs in $O(m^{c(H)})$ preprocessing time and constant delay. Again we determine all pattern graphs $H$ that have complexity $c(H) < 2$, and for each such subquadratic pattern we determine the optimal complexity $c(H)$.

cs.DS

Combinatorial Designs Meet Hypercliques: Higher Lower Bounds for Klee's Measure Problem and Related Problems in Dimensions $d\ge 4$

Klee's measure problem (computing the volume of the union of $n$ axis-parallel boxes in $\mathbb{R}^d$) is well known to have $n^{\frac{d}{2}\pm o(1)}$-time algorithms (Overmars, Yap, SICOMP'91; Chan FOCS'13). Only recently, a conditional lower bound (without any restriction to ``combinatorial'' algorithms) could be shown for $d=3$ (K\"unnemann, FOCS'22). Can this result be extended to a tight lower bound for dimensions $d\ge 4$? In this paper, we formalize the technique of the tight lower bound for $d=3$ using a combinatorial object we call prefix covering design. We show that these designs, which are related in spirit to combinatorial designs, directly translate to conditional lower bounds for Klee's measure problem and various related problems. By devising good prefix covering designs, we give the following lower bounds for Klee's measure problem in $\mathbb{R}^d$, the depth problem for axis-parallel boxes in $\mathbb{R}^d$, the largest-volume/max-perimeter empty (anchored) box problem in $\mathbb{R}^{2d}$, and related problems: - $\Omega(n^{1.90476})$ for $d=4$, - $\Omega(n^{2.22222})$ for $d=5$, - $\Omega(n^{d/3 + 2\sqrt{d}/9-o(\sqrt{d})})$ for general $d$, assuming the 3-uniform hyperclique hypothesis. For Klee's measure problem and the depth problem, these bounds improve previous lower bounds of $\Omega(n^{1.777...}), \Omega(n^{2.0833...})$ and $\Omega(n^{d/3 + 1/3 + \Theta(1/d)})$ respectively. Our improved prefix covering designs were obtained by (1) exploiting a computer-aided search using problem-specific insights as well as SAT solvers, and (2) showing how to transform combinatorial covering designs known in the literature to strong prefix covering designs. In contrast, we show that our lower bounds are close to best possible using this proof technique.

cs.CG