Source author record

Shay Golan

Explore this author’s publications, collaborators and research topics. This catalog record has not been claimed by its author.

ResearcherUnclaimed source record

Catalog footprint

Research overview

7works
1topics
4close collaborators

Published work

7 publications

preprint2022arXiv

An Improved Algorithm for The kk-Dyck Edit Distance Problem

A Dyck sequence is a sequence of opening and closing parentheses (of various types) that is balanced. The Dyck edit distance of a given sequence of parentheses SS is the smallest number of edit operations (insertions, deletions, and substitutions) needed to transform SS into a Dyck sequence. We consider the threshold Dyck edit distance problem, where the input is a sequence of parentheses SS and a positive integer kk, and the goal is to compute the Dyck edit distance of SS only if the distance is at most kk, and otherwise report that the distance is larger than kk. Backurs and Onak [PODS'16] showed that the threshold Dyck edit distance problem can be solved in O(n+k16)O(n+k^{16}) time. In this work, we design new algorithms for the threshold Dyck edit distance problem which costs O(n+k4.544184)O(n+k^{4.544184}) time with high probability or O(n+k4.853059)O(n+k^{4.853059}) deterministically. Our algorithms combine several new structural properties of the Dyck edit distance problem, a refined algorithm for fast (min⁡,+)(\min,+) matrix product, and a careful modification of ideas used in Valiant's parsing algorithm.

preprint2020arXiv

Approximating Text-to-Pattern Hamming Distances

We revisit a fundamental problem in string matching: given a pattern of length m and a text of length n, both over an alphabet of size σσ, compute the Hamming distance between the pattern and the text at every location. Several (1+ε)(1+ε)-approximation algorithms have been proposed in the literature, with running time of the form O(ε−O(1)nlog⁡nlog⁡m)O(ε^{-O(1)}n\log n\log m), all using fast Fourier transform (FFT). We describe a simple (1+ε)(1+ε)-approximation algorithm that is faster and does not need FFT. Combining our approach with additional ideas leads to numerous new results: - We obtain the first linear-time approximation algorithm; the running time is O(ε−2n)O(ε^{-2}n). - We obtain a faster exact algorithm computing all Hamming distances up to a given threshold k; its running time improves previous results by logarithmic factors and is linear if k≤mk\le\sqrt m. - We obtain approximation algorithms with better εε-dependence using rectangular matrix multiplication. The time-bound is O~(n)Õ(n) when the pattern is sufficiently long: m≥ε−28m\ge ε^{-28}. Previous algorithms require O~(ε−1n)Õ(ε^{-1}n) time. - When k is not too small, we obtain a truly sublinear-time algorithm to find all locations with Hamming distance approximately (up to a constant factor) less than k, in O((n/kΩ(1)+occ)no(1))O((n/k^{Ω(1)}+occ)n^{o(1)}) time, where occ is the output size. The algorithm leads to a property tester, returning true if an exact match exists and false if the Hamming distance is more than δmδm at every location, running in O~(δ−1/3n2/3+δ−1n/m)Õ(δ^{-1/3}n^{2/3}+δ^{-1}n/m) time. - We obtain a streaming algorithm to report all locations with Hamming distance approximately less than k, using O~(ε−2k)Õ(ε^{-2}\sqrt k) space. Previously, streaming algorithms were known for the exact problem with Õ(k) space or for the approximate problem with O~(ε−O(1)m)Õ(ε^{-O(1)}\sqrt m) space.

preprint2020arXiv

Improved Circular kk-Mismatch Sketches

The shift distance sh(S1,S2)\mathsf{sh}(S_1,S_2) between two strings S1S_1 and S2S_2 of the same length is defined as the minimum Hamming distance between S1S_1 and any rotation (cyclic shift) of S2S_2. We study the problem of sketching the shift distance, which is the following communication complexity problem: Strings S1S_1 and S2S_2 of length nn are given to two identical players (encoders), who independently compute sketches (summaries) sk(S1)\mathtt{sk}(S_1) and sk(S2)\mathtt{sk}(S_2), respectively, so that upon receiving the two sketches, a third player (decoder) is able to compute (or approximate) sh(S1,S2)\mathsf{sh}(S_1,S_2) with high probability. This paper primarily focuses on the more general kk-mismatch version of the problem, where the decoder is allowed to declare a failure if sh(S1,S2)>k\mathsf{sh}(S_1,S_2)>k, where kk is a parameter known to all parties. Andoni et al. (STOC'13) introduced exact circular kk-mismatch sketches of size O~(k+D(n))\widetilde{O}(k+D(n)), where D(n)D(n) is the number of divisors of nn. Andoni et al. also showed that their sketch size is optimal in the class of linear homomorphic sketches. We circumvent this lower bound by designing a (non-linear) exact circular kk-mismatch sketch of size O~(k)\widetilde{O}(k); this size matches communication-complexity lower bounds. We also design (1±ε)(1\pm \varepsilon)-approximate circular kk-mismatch sketch of size O~(min⁡(ε−2k,ε−1.5n))\widetilde{O}(\min(\varepsilon^{-2}\sqrt{k}, \varepsilon^{-1.5}\sqrt{n})), which improves upon an O~(ε−2n)\widetilde{O}(\varepsilon^{-2}\sqrt{n})-size sketch of Crouch and McGregor (APPROX'11).

preprint2020arXiv

Locally Consistent Parsing for Text Indexing in Small Space

We consider two closely related problems of text indexing in a sub-linear working space. The first problem is the Sparse Suffix Tree (SST) construction of a set of suffixes BB using only O(∣B∣)O(|B|) words of space. The second problem is the Longest Common Extension (LCE) problem, where for some parameter 1≤τ≤n1\leτ\le n, the goal is to construct a data structure that uses O(nτ)O(\frac {n}τ) words of space and can compute the longest common prefix length of any pair of suffixes. We show how to use ideas based on the Locally Consistent Parsing technique, that was introduced by Sahinalp and Vishkin [STOC '94], in some non-trivial ways in order to improve the known results for the above problems. We introduce new Las-Vegas and deterministic algorithms for both problems. We introduce the first Las-Vegas SST construction algorithm that takes O(n)O(n) time. This is an improvement over the last result of Gawrychowski and Kociumaka [SODA '17] who obtained O(n)O(n) time for Monte-Carlo algorithm, and O(nlog⁡∣B∣)O(n\sqrt{\log |B|}) time for Las-Vegas algorithm. In addition, we introduce a randomized Las-Vegas construction for an LCE data structure that can be constructed in linear time and answers queries in O(τ)O(τ) time. For the deterministic algorithms, we introduce an SST construction algorithm that takes O(nlog⁡n∣B∣)O(n\log \frac{n}{|B|}) time (for ∣B∣=Ω(log⁡n)|B|=Ω(\log n)). This is the first almost linear time, O(n⋅polylog⁡n)O(n\cdot poly\log{n}), deterministic SST construction algorithm, where all previous algorithms take at least Ω(min⁡{n∣B∣,n2∣B∣})Ω\left(\min\{n|B|,\frac{n^2}{|B|}\}\right) time. For the LCE problem, we introduce a data structure that answers LCE queries in O(τlog⁡∗n)O(τ\sqrt{\log^*n}) time, with O(nlog⁡τ)O(n\logτ) construction time (for τ=O(nlog⁡n)τ=O(\frac{n}{\log n})). This data structure improves both query time and construction time upon the results of Tanimura et al. [CPM '16].

preprint2020arXiv

The Streaming k-Mismatch Problem: Tradeoffs between Space and Total Time

We revisit the kk-mismatch problem in the streaming model on a pattern of length mm and a streaming text of length nn, both over a size-σσ alphabet. The current state-of-the-art algorithm for the streaming kk-mismatch problem, by Clifford et al. [SODA 2019], uses O~(k)\tilde O(k) space and O~(k)\tilde O\big(\sqrt k\big) worst-case time per character. The space complexity is known to be (unconditionally) optimal, and the worst-case time per character matches a conditional lower bound. However, there is a gap between the total time cost of the algorithm, which is O~(nk)\tilde O(n\sqrt k), and the fastest known offline algorithm, which costs O~(n+min⁡(nkm,σn))\tilde O\big(n + \min\big(\frac{nk}{\sqrt m},σn\big)\big) time. Moreover, it is not known whether improvements over the O~(nk)\tilde O(n\sqrt k) total time are possible when using more than O(k)O(k) space. We address these gaps by designing a randomized streaming algorithm for the kk-mismatch problem that, given an integer parameter k≤s≤mk\le s \le m, uses O~(s)\tilde O(s) space and costs O~(n+min⁡(nk2m,nks,σnms))\tilde O\big(n+\min\big(\frac {nk^2}m,\frac{nk}{\sqrt s},\frac{σnm}s\big)\big) total time. For s=ms=m, the total runtime becomes O~(n+min⁡(nkm,σn))\tilde O\big(n + \min\big(\frac{nk}{\sqrt m},σn\big)\big), which matches the time cost of the fastest offline algorithm. Moreover, the worst-case time cost per character is still O~(k)\tilde O\big(\sqrt k\big).

preprint2020arXiv

Time-Space Tradeoffs for Finding a Long Common Substring

We consider the problem of finding, given two documents of total length nn, a longest string occurring as a substring of both documents. This problem, known as the Longest Common Substring (LCS) problem, has a classic O(n)O(n)-time solution dating back to the discovery of suffix trees (Weiner, 1973) and their efficient construction for integer alphabets (Farach-Colton, 1997). However, these solutions require Θ(n)Θ(n) space, which is prohibitive in many applications. To address this issue, Starikovskaya and Vildhøj (CPM 2013) showed that for n2/3≤s≤n1−o(1)n^{2/3} \le s \le n^{1-o(1)}, the LCS problem can be solved in O(s)O(s) space and O(n2s)O(\frac{n^2}{s}) time. Kociumaka et al. (ESA 2014) generalized this tradeoff to 1≤s≤n1 \leq s \leq n, thus providing a smooth time-space tradeoff from constant to linear space. In this paper, we obtain a significant speed-up for instances where the length LL of the sought LCS is large. For 1≤s≤n1 \leq s \leq n, we show that the LCS problem can be solved in O(s)O(s) space and O~(n2L⋅s+n)\tilde{O}(\frac{n^2}{L\cdot s}+n) time. The result is based on techniques originating from the LCS with Mismatches problem (Flouri et al., 2015; Charalampopoulos et al., CPM 2018), on space-efficient locally consistent parsing (Birenzwige et al., SODA 2020), and on the structure of maximal repetitions (runs) in the input documents.

preprint2017arXiv

Streaming Pattern Matching with d Wildcards

In the pattern matching with dd wildcards problem one is given a text TT of length nn and a pattern PP of length mm that contains dd wildcard characters, each denoted by a special symbol ′?′'?'. A wildcard character matches any other character. The goal is to establish for each mm-length substring of TT whether it matches PP. In the streaming model variant of the pattern matching with dd wildcards problem the text TT arrives one character at a time and the goal is to report, before the next character arrives, if the last mm characters match PP while using only o(m)o(m) words of space. In this paper we introduce two new algorithms for the dd wildcard pattern matching problem in the streaming model. The first is a randomized Monte Carlo algorithm that is parameterized by a constant 0≤δ≤10\leq δ\leq 1. This algorithm uses O~(d1−δ)\tilde{O}(d^{1-δ}) amortized time per character and O~(d1+δ)\tilde{O}(d^{1+δ}) words of space. The second algorithm, which is used as a black box in the first algorithm, is a randomized Monte Carlo algorithm which uses O(d+log⁡m)O(d+\log m) worst-case time per character and O(dlog⁡m)O(d\log m) words of space.

Research graph

See the researcher in context

Open full explorer

Inspect adjacent papers, topics, institutions and collaborators without losing the researcher page.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.