Demonstration venue · read-only. Every page can be browsed; the buttons that would change it are switched off. Create an account to run TaxoReview on your own data. A simulation from public publication records: the people listed were not invited and did not agree to review.
? Tutorial for this page

Pawel Gawrychowski

dblp:49/3088 · DBLP profile ↗
← Back
167ranked-venue papers
96as first author
60since 2021 · last 2026
0000-0002-6993-5440ORCID · verified

Domains — the database's venue-derived domains; a paper can count in several

Theory of computation · 119 · 69 first-author · 41 since 2021Graphics, computer vision, multimedia, augmented reality and games · 29 · 15 first-author · 11 since 2021Databases, data management, data science and information retrieval · 16 · 11 first-author · 8 since 2021Systems, architecture and hardware · 2 · 1 first-authorApplied, interdisciplinary, general and emerging computing · 1 · 1 since 2021

Expertise — from the expertise taxonomy: the topics of the expert's papers under the CCF categories. A weight counts papers with recency: 1 for a paper about the topic, 0.3 when the topic is its context, halved every five years.

Theoretical computer science
44 papers
Algorithms and data structures · 45% Graph algorithms and graph theory · 27% Computational complexity · 9%
Databases, data mining, and information retrieval
1 paper
Data mining · 67% Query processing and optimization · 33%

Topics — the 30 heaviest of 86, each with the papers that count most for it

TopicWeightPapersLastEvidence papers
Algorithms and data structures › sequence algorithms
string algorithms
6.7142026
Suffix Random Access via Function Inversion: A Key for Asymmetric Streaming String Algorithms · ICALP 2026
Faster two-dimensional pattern matching with k mismatches · SODA 2025
Optimal Square Detection Over General Alphabets · SODA 2023
Algorithms and data structures › sequence algorithms › string algorithms
string matching
4.182026
Suffix Random Access via Function Inversion: A Key for Asymmetric Streaming String Algorithms · ICALP 2026
Faster two-dimensional pattern matching with k mismatches · SODA 2025
Optimal Square Detection Over General Alphabets · SODA 2023
Graph algorithms and graph theory
distance oracle
2.162023
Almost Optimal Exact Distance Oracles for Planar Graphs · J. ACM 2023
Almost optimal distance oracles for planar graphs · STOC 2019
Better Tradeoffs for Exact Distance Oracles in Planar Graphs · SODA 2018
Computational geometry
voronoi diagram
1.842023
Almost Optimal Exact Distance Oracles for Planar Graphs · J. ACM 2023
Voronoi Diagrams on Planar Graphs, and Computing the Diameter in Deterministic Õ(n5/3) Time · SIAM J. Comput. 2021
Better Tradeoffs for Exact Distance Oracles in Planar Graphs · SODA 2018
Graph algorithms and graph theory › planar graphs
planar graph algorithms
1.742021
Voronoi Diagrams on Planar Graphs, and Computing the Diameter in Deterministic Õ(n5/3) Time · SIAM J. Comput. 2021
Planar Negative k-Cycle · SODA 2021
Voronoi Diagrams on Planar Graphs, and Computing the Diameter in Deterministic Õ(n5/3) Time · SODA 2018
Graph algorithms and graph theory
graph algorithms
1.632023
Almost Optimal Exact Distance Oracles for Planar Graphs · J. ACM 2023
Cut Query Algorithms with Star Contraction · FOCS 2022
Computing quartet distance is equivalent to counting 4-cycles · STOC 2019
Algorithms and data structures › data streams
streaming algorithms
1.622026
Suffix Random Access via Function Inversion: A Key for Asymmetric Streaming String Algorithms · ICALP 2026
Streaming Regular Expression Membership and Pattern Matching · SODA 2022
Algorithms and data structures › data streams › streaming algorithms
streaming pattern matching
1.622026
Suffix Random Access via Function Inversion: A Key for Asymmetric Streaming String Algorithms · ICALP 2026
Streaming Regular Expression Membership and Pattern Matching · SODA 2022
Computational complexity
fine-grained complexity
1.652021
Planar Negative k-Cycle · SODA 2021
Tree Edit Distance Cannot be Computed in Strongly Subcubic Time (Unless APSP Can) · ACM Trans. Algorithms 2020
All non-trivial variants of 3-LDT are equivalent · STOC 2020
Graph algorithms and graph theory › graph algorithms
labeling schemes
1.532025
Optimal Distance Labeling for Permutation Graphs · ICALP 2025
Labeling Schemes for Nearest Common Ancestors through Minor-Universal Trees · SODA 2018
Optimal Distance Labeling Schemes for Trees · PODC 2017
Graph algorithms and graph theory › distance oracle
distance labeling
1.432025
Optimal Distance Labeling for Permutation Graphs · ICALP 2025
Optimal Distance Labeling Schemes for Trees · PODC 2017
Brief Announcement: Sublinear-Space Distance Labeling Using Hubs · PODC 2016
Computational complexity › fine-grained complexity
conditional lower bounds
1.432022
Elastic-Degenerate String Matching via Fast Matrix Multiplication · SIAM J. Comput. 2022
Tree Edit Distance Cannot be Computed in Strongly Subcubic Time (Unless APSP Can) · ACM Trans. Algorithms 2020
Even Faster Elastic-Degenerate String Matching via Fast Matrix Multiplication · ICALP 2019
Graph algorithms and graph theory
planar graphs
1.432023
Almost Optimal Exact Distance Oracles for Planar Graphs · J. ACM 2023
Almost optimal distance oracles for planar graphs · STOC 2019
Near-Optimal Compression for the Planar Graph Metric · SODA 2018
Algorithms and data structures › sequence algorithms › string algorithms › string matching
approximate string matching
1.222025
Faster two-dimensional pattern matching with k mismatches · SODA 2025
Towards Unified Approximate Pattern Matching for Hamming and L_1 Distance · ICALP 2018
Algorithms and data structures › sequence algorithms › string algorithms
tree edit distance
1.132020
Tree Edit Distance Cannot be Computed in Strongly Subcubic Time (Unless APSP Can) · ACM Trans. Algorithms 2020
Tree Edit Distance Cannot be Computed in Strongly Subcubic Time (unless APSP can) · SODA 2018
Edit Distance between Unrooted Trees in Cubic Time · ICALP 2018
Algorithms and data structures
dynamic algorithms
1.122022
Sublinear Dynamic Interval Scheduling (On One or Multiple Machines) · ICALP 2022
Fully dynamic approximation of LIS in polylogarithmic time · STOC 2021
Computational geometry
range searching
1.142020
Submatrix Maximum Queries in Monge and Partial Monge Matrices Are Equivalent to Predecessor Search · ACM Trans. Algorithms 2020
Optimal Encodings for Range Top- k k , Selection, and Min-Max · ICALP (1) 2015
Submatrix Maximum Queries in Monge Matrices Are Equivalent to Predecessor Search · ICALP (1) 2015
Coding theory › source coding
lempel-ziv compression
1.012026
Suffix Random Access via Function Inversion: A Key for Asymmetric Streaming String Algorithms · ICALP 2026
Graph algorithms and graph theory
shortest path
1.032021
Planar Negative k-Cycle · SODA 2021
Improved Bounds for Shortest Paths in Dense Distance Graphs · ICALP 2018
Tree Edit Distance Cannot be Computed in Strongly Subcubic Time (Unless APSP Can) · ACM Trans. Algorithms 2020
Algorithms and data structures › sequence algorithms › string algorithms › string matching
pattern matching with mismatches
0.912025
Faster two-dimensional pattern matching with k mismatches · SODA 2025
Computational geometry › intersection graphs
permutation graphs
0.912025
Optimal Distance Labeling for Permutation Graphs · ICALP 2025
Algorithms and data structures › sequence algorithms › string algorithms › string matching
two-dimensional pattern matching
0.912025
Faster two-dimensional pattern matching with k mismatches · SODA 2025
Mathematical optimization › optimization
monge matrices
0.832020
Submatrix Maximum Queries in Monge and Partial Monge Matrices Are Equivalent to Predecessor Search · ACM Trans. Algorithms 2020
Submatrix Maximum Queries in Monge Matrices Are Equivalent to Predecessor Search · ICALP (1) 2015
Improved Submatrix Maximum Queries in Monge Matrices · ICALP (1) 2014
Computational geometry › voronoi diagram
additively weighted voronoi diagrams
0.822021
Voronoi Diagrams on Planar Graphs, and Computing the Diameter in Deterministic Õ(n5/3) Time · SIAM J. Comput. 2021
Voronoi Diagrams on Planar Graphs, and Computing the Diameter in Deterministic Õ(n5/3) Time · SODA 2018
Data mining › text mining › information extraction
document spanners
0.812024
Revisiting Weighted Information Extraction: A Simpler and Faster Algorithm for Ranked Enumeration · Proc. ACM Manag. Data 2024
Data mining › text mining
information extraction
0.812024
Revisiting Weighted Information Extraction: A Simpler and Faster Algorithm for Ranked Enumeration · Proc. ACM Manag. Data 2024
Query processing and optimization
ranked enumeration
0.812024
Revisiting Weighted Information Extraction: A Simpler and Faster Algorithm for Ranked Enumeration · Proc. ACM Manag. Data 2024
Combinatorics and discrete mathematics
combinatorics on words
0.812024
Optimal Bounds for Distinct Quartics · ICALP 2024
Graph algorithms and graph theory › distance oracle
exact distance queries
0.712023
Almost Optimal Exact Distance Oracles for Planar Graphs · J. ACM 2023
Computational geometry
point location
0.712023
Almost Optimal Exact Distance Oracles for Planar Graphs · J. ACM 2023

Methods — techniques the papers use, named apart from their topics

reduction · 1.7conditional lower bounds · 1.2planar separators · 1.0string synchronizing sets · 1.0function inversion · 1.0string periodicity · 1.0fast matrix multiplication · 1.0fast fourier transform · 1.0quasilinear-time algorithm · 0.9combinatorial lower and upper bounds · 0.9shortest path enumeration · 0.8rounding technique · 0.8linear programming · 0.8
YearPublicationVenuePosition
2026 Balancing Two-Dimensional Straight-Line Programs
abstract
We consider building, given a straight-line program (SLP) consisting of g productions deriving a two-dimensional string T of size N× N, a structure capable of providing random access to any character of T. For one-dimensional strings, it is now known how to build a structure of size 𝒪(g) that provides random access in 𝒪(log N) time. In fact, it is known that this can be obtained by building an equivalent SLP of size 𝒪(g) and depth 𝒪(log N) [Ganardi, Jeż, Lohrey, JACM 2021]. We consider the analogous question for two-dimensional strings: can we build an equivalent SLP of roughly the same size and small depth? We show that the answer is negative: there exists an infinite family of two-dimensional strings of size N× N described by a 2D SLP of size g such that any 2D SLP of depth 𝒪(log N) describing the same string must be of size Ω(g⋅ N/log³N). We complement this with an upper bound showing how to construct such a 2D SLP of size 𝒪(g⋅ N). Next, we observe that one can naturally define a generalization of 2D SLP, which we call 2D SLP with holes. We show that a known general balancing theorem by [Ganardi, Jeż, Lohrey, JACM 2021] immediately implies that, given a 2D SLP of size g deriving a string of size N× N, we can construct a 2D SLP with holes of depth 𝒪(log N) and size 𝒪(g). This allows us to conclude that there is a structure of size 𝒪(g) providing random access in 𝒪(log N) time for such a 2D SLP. Further, this can be extended (analogously as for a 1D SLP) to obtain a structure of size 𝒪(g log^ε N) providing random access in 𝒪(log N/log log N) time, for any ε > 0. The same (optimal) random access time was very recently achieved by [De and Kempa, SODA 2026], but with a significantly larger structure of size 𝒪(g log^{2+ε} N).
Itai Boneh, Estéban Gabory, Pawel Gawrychowski, Adam Górkiewicz
CPM3
2026 Optimal Structure for Prefix-Substring Queries
abstract
The prefix-substring matching problem [Gu, Farach, and Beigel, SODA 1994] consists in preprocessing a string s of length n for the following queries: given a triple (i, j, k) ∈ {0, … , |s|}³ with 1 ≤ j ≤ k, representing a prefix s[1:i] and a substring s[j:k] of s, find the longest prefix of s that is a suffix of s[1:i]s[j:k]. This is an useful primitive in e.g. dynamic text indexing, compressed pattern matching, and pattern matching on block graphs. The border tree uses some basic periodicity properties to answer such queries in 𝒪(log n) time after 𝒪(n) time preprocessing of s. We design a linear-space structure that answers such queries in constant time after 𝒪(n) time preprocessing of s over a polynomial alphabet, which is worst-case optimal.
Pawel Gawrychowski, Florin Manea, Jonas Richardsen
CPM1
2026 String Matching in (Block) Graphs: A Full Classification by Walk Length
abstract
We consider directed graphs in which the nodes are labeled with strings. A walk in such a graph naturally corresponds to the concatenation of the visited nodes' labels. These graphs are widely used in bioinformatics to compactly describe large collections of highly similar genomes. Given such a graph G = (V,E) and a pattern of length m, we seek a walk whose corresponding string has an occurrence of the pattern. We call this the SMLG problem. Amir et al. [J. Algorithms, 2000] showed that SMLG can be solved in 𝒪(m |E| + N) time, where N is the total length of all node labels. Equi et al. [ACM Trans. Algorithms, 2023] showed that this is essentially optimal (under SETH). The existing lower bound assumes that the sought walk is of length Θ(|V|). Thus, we might be able to bypass this lower bound by restricting the walk length to b-1, which naturally reduces to having as input a directed graph whose set of nodes is partitioned into b blocks. Then, we seek a walk in this graph that starts in the first block and ends in the last block. We call this the b-SMBG problem. Equi et al. [Algorithmica, 2023] showed that, if we impose no restriction on b, the existing algorithm of Amir et al. is essentially optimal for b-SMBG (again under SETH). We provide a more fine-grained classification that essentially settles the complexity of b-SMBG parameterized by b: 1) For b = 2, Pissis [SOSA 2025] already provided a simple 𝒪(m + |E|+N)-time algorithm. 2) We design a new 𝒪̃(m + |E| + N)-time algorithm for b = 3. As a direct implication of this result, the SMLG problem for b ≤ 3 (walks of length at most 2) also admits near-linear-time complexity. 3) There is no 𝒪((m |E|)^{1-ε} + N)-time combinatorial algorithm, for any b ≥ 4 and ε > 0. 4) There is an algorithm working in 𝒪(max(|V|, m)^ω+N) time, where ω is the matrix multiplication exponent, which is conditionally optimal for graphs with b ≥ 4 blocks. 5) Under SETH, no 𝒪((m |E|)^{1-ε} + N)-time algorithm exists, for any b = ω(log |V|) and ε > 0. Although our motivation is primarily of a theoretical nature, we stress that our algorithms are simple to implement. As such, they may contribute to practical advancements in applications where the SMLG problem is an important primitive, such as in the analysis of pangenome graphs.
Sebastian Angrick, Ben Bals, Pawel Gawrychowski, Solon P. Pissis, Yuki Yonemoto
ESA3
2026 Online Approximate Circular Pattern Matching in Small Space
abstract
In approximate circular pattern matching the goal is to compute all approximate occurrences of all rotations of a pattern P in a text T. We study this problem under the two most fundamental string distance metrics, the Hamming distance and the edit distance, in the setting where the text arrives online and the available space is limited. Specifically, we wish to report each ending position j of an approximate occurrence before symbol T[j+1] arrives, using sublinear space on top of having read-only access to P and (the seen prefix of) T. For both variants, we present algorithms that use O(poly(k)) extra space and process each arriving symbol in O(poly(k)) time. Notably, with an overhead, our algorithms can be lifted to the asymmetric streaming setting, where we only have read-only access to the pattern for free and account for all extra space.
Panagiotis Charalampopoulos, Taha El Ghazi, Jonas Ellert, Pawel Gawrychowski, Tatiana Starikovskaya
ESA4
2026 Near-Optimal and Efficient Encoding for Two-Dimensional Range Minimum Queries
abstract
We consider the 2D RMQ encoding problem: given an m× n array of mn elements over a total order, encode it such that, for any query rectangle, the position of its maximum element can be reported without accessing the original array. For m ≤ n, it is known how to encode the array in 𝒪(mn min{m, log n}) bits with 𝒪(1)-time queries [Brodal et al., Algorithmica 2012], and also how to obtain an asymptotically optimal encoding consisting of 𝒪(mn log m) bits [Brodal et al., ESA 2013]. However, the latter approach does not prove any guarantee on the query time, and it appears to be inherently sequential: it requires scanning the whole encoding to answer a query. We design a different encoding that uses near-optimal space while allowing for efficient queries. More concretely, for every parameter κ ∈ [1, log log n], our encoding uses 𝒪(κ mn(log m + log log n)) bits and answers 2D RMQ queries in 𝒪(log^{1/κ} n) time.
Pawel Gawrychowski, Adam Górkiewicz, S. Srinivasa Rao 0001
ESA1
2026 Suffix Random Access via Function Inversion: A Key for Asymmetric Streaming String Algorithms
abstract
Many string processing problems can be phrased in the streaming setting, where the input arrives symbol by symbol and we have sublinear working space. The area of streaming algorithms for string processing has flourished since the seminal work of Porat and Porat [FOCS 2009]. Unfortunately, problems with efficient solutions in the classical setting often do not admit efficient solutions in the streaming setting. As a bridge between these two settings, Saks and Seshadhri [SODA 2013] introduced the asymmetric streaming model (see also [Andoni, Krauthgamer, and Onak; FOCS 2010]). Here, one is given read-only access to a (typically short) reference string R of length m, while a (typically long) text T arrives as a stream. We provide a generic technique to reduce fundamental string problems in the asymmetric streaming model to the online read-only model, lifting several existing algorithms and generally improving upon the state of the art. Most notably, we obtain asymmetric streaming algorithms for exact and approximate pattern matching (under both the Hamming and edit distances), and for relative Lempel-Ziv compression, a popular scheme for measuring and exploiting redundancy in repetitive text collections. At the heart of our approach lies a novel tool that facilitates efficient computation in the asymmetric streaming model: the suffix random access data structure. In its simplest variant, it maintains constant-time random access to the longest suffix of (the seen prefix of) T that occurs in R. Let τ be a parameter that denotes the size of the data structure. A straightforward approach maintains the data structure in {O}(m/τ) time per arriving symbol of T. We drastically improve this tradeoff and reveal fundamental barriers via a bidirectional reduction between suffix random access and function inversion, a central problem in cryptography: - By leveraging Fiat and Naor’s function inversion data structure [SIAM J. Comput. 2000], we achieve Õ(1+m³/τ⁶) update time. In particular, for τ = √m, we obtain Õ(1) update time, improving over the Ω(√m) bound of the straightforward solution. - We establish an unconditional Ω̃(m/τ³) lower bound on the update time. Additionally, we show that achieving update time o(m³/τ⁷) would imply a breakthrough in function inversion. On the way to our upper bound, we propose a variant of the string synchronizing sets ([Kempa and Kociumaka; STOC 2019]) with a local sparsity condition that, as we show, admits an efficient streaming construction algorithm. We believe that our framework and techniques will find broad applications in the development of small-space string algorithms.
Panagiotis Charalampopoulos, Taha El Ghazi, Jonas Ellert, Pawel Gawrychowski, Tatiana Starikovskaya
ICALP4
2026 Compressed consecutive pattern matching
Pawel Gawrychowski, Garance Gourdel, Tatiana Starikovskaya, Teresa Anna Steiner
Inf. Syst.1
2026 On the complexity of indeterminate strings matching
Pawel Gawrychowski, Samah Ghazawi, Gad M. Landau
Theor. Comput. Sci.1
2025 Minimal Generators in Optimal Time
abstract
A walk of length n on a string S of length m is a function f : {1, … , n} → {1, … , m} such that ∀ i ∈ {2, … , n} : |f(i) - f(i - 1)| ≤ 1. The walk generates the string T of length n defined by {∀ i ∈ {1, … , n} : T[i] = S[f(i)]}. Intuitively, this can be seen as walking n steps in S and outputting the encountered symbols, where in each step we either remain at the same position, or move one position to the left or to the right. The minimal generator of a string T is the shortest string S such that a walk on S generates T. Recently, it was shown that each string admits exactly one (up to reversal) minimal generator (Pratt-Hartmann, CPM 2024). However, no efficient algorithm for computing the minimal generator was known. We provide an optimal algorithm for this task, taking {O}(n) time for a string of length n over general unordered alphabet, i.e., accessing the string only by equality comparisons of symbols. The main challenge is to detect substrings of the form axbx̃axb and replace them with axb, where a,b are symbols and x is a string with reversal x̃. We solve this problem with a non-trivial adaptation of Manacher’s classic algorithm for computing maximal palindromic substrings (Manacher, J. ACM 1975). To obtain the final algorithm, we solve small subinstances of the problem in optimal time by adapting the "Four Russians" technique to strings over general unordered alphabet, which may be of independent interest.
Jonas Ellert, Pawel Gawrychowski, Tatiana Starikovskaya
CPM2
2025 Faster Approximate Elastic-Degenerate String Matching - Part B
Pawel Gawrychowski, Adam Górkiewicz, Pola Marciniak, Solon P. Pissis, Karol Pokorski
CPM1
2025 Better Indexing for Rectangular Pattern Matching
Pawel Gawrychowski, Adam Górkiewicz
ESA1
2025 Core-Sparse Monge Matrix Multiplication: Improved Algorithm and Applications
Pawel Gawrychowski, Egor Gorbachev, Tomasz Kociumaka
ESA1
2025 Optimal Distance Labeling for Permutation Graphs
abstract
A permutation graph is the intersection graph of a set of segments between two parallel lines. In other words, they are defined by a permutation $π$ on $n$ elements, such that $u$ and $v$ are adjacent if an only if $uπ(v)$. We consider the problem of computing the distances in such a graph in the setting of informative labeling schemes. The goal of such a scheme is to assign a short bitstring $\ell(u)$ to every vertex $u$, such that the distance between $u$ and $v$ can be computed using only $\ell(u)$ and $\ell(v)$, and no further knowledge about the whole graph (other than that it is a permutation graph). This elegantly captures the intuition that we would like our data structure to be distributed, and often leads to interesting combinatorial challenges while trying to obtain lower and upper bounds that match up to the lower-order terms. For distance labeling of permutation graphs on $n$ vertices, Katz, Katz, and Peleg [STACS 2000] showed how to construct labels consisting of $\mathcal{O}(\log^{2} n)$ bits. Later, Bazzaro and Gavoille [Discret. Math. 309(11)] obtained an asymptotically optimal bounds by showing how to construct labels consisting of $9\log{n}+\mathcal{O}(1)$ bits, and proving that $3\log{n}-\mathcal{O}(\log{\log{n}})$ bits are necessary. This however leaves a quite large gap between the known lower and upper bounds. We close this gap by showing how to construct labels consisting of $3\log{n}+\mathcal{O}(\log\log n)$ bits.
Pawel Gawrychowski, Wojciech Janczewski
ICALP1
2025 Faster two-dimensional pattern matching with k mismatches
abstract
The classical pattern matching asks for locating all occurrences of one string, called the pattern, in another, called the text, where a string is simply a sequence of characters. Due to the potential practical applications, it is desirable to seek approximate occurrences, for example by bounding the number of mismatches. This problem has been extensively studied, and by now we have a good understanding of the best possible time complexity as a function of n (length of the text), m (length of the pattern), and k (number of mismatches). In particular, we know that for , we can achieve quasi-linear time complexity [Gawrychowski and Uznański, ICALP 2018].
Jonas Ellert, Pawel Gawrychowski, Adam Górkiewicz, Tatiana Starikovskaya
SODA2
2025 Two-Player Communication Complexity of Pattern Matching
Pawel Gawrychowski, Wojciech Janczewski
SPIRE1
2024 Online Context-Free Recognition in OMv Time
Bartlomiej Dudek 0001, Pawel Gawrychowski
CPM2
2024 Faster Sliding Window String Indexing in Streams
abstract
The classical string indexing problem asks to preprocess the input string S for efficient pattern matching queries. Bille, Fischer, Gørtz, Pedersen, and Stordalen [CPM 2023] generalized this to the {streaming sliding window string indexing} problem, where the input string S arrives as a stream, and we are asked to maintain an index of the last w characters, called the window. Further, at any point in time, a pattern P might appear, again given as a stream, and all occurrences of P in the current window must be output. We require that the time to process each character of the text or the pattern is worst-case. It appears that standard string indexing structures, such as suffix trees, do not provide an efficient solution in such a setting, as to obtain a good worst-case bound, they necessarily need to work right-to-left, and we cannot reverse the pattern while keeping a worst-case guarantee on the time to process each of its characters. Nevertheless, it is possible to obtain a bound of 𝒪(log w) (with high probability) by maintaining a hierarchical structure of multiple suffix trees. We significantly improve this upper bound by designing a black-box reduction to maintain a suffix tree under prepending characters to the current text. By plugging in the known results, this allows us to obtain a bound of 𝒪(log log w +log log σ) (with high probability), where σ is the size of the alphabet. Further, we introduce an even more general problem, called the {streaming dynamic window string indexing}, where the goal is to maintain the current text under adding and deleting characters at either end and design a similar black-box reduction.
Philip Bille, Pawel Gawrychowski, Inge Li Gørtz, Simon R. Tarnow
CPM2
2024 Compressed Consecutive Pattern Matching†
abstract
Originating from the work of Navarro and Thankachan [TCS 2016], the problem of consecutive pattern matching is a variant of the fundamental pattern matching problem, where one is given a text and a pair of patterns, and must compute their consecutive occurrences in the text. Assuming that the text is given as a straight-line program, we develop an algorithm that computes all consecutive occurrences in optimal time.
Pawel Gawrychowski, Garance Gourdel, Tatiana Starikovskaya, Teresa Anna Steiner
DCC1
2024 Finding Perfect Matchings in Bridgeless Cubic Multigraphs Without Dynamic (2-)connectivity
Pawel Gawrychowski, Mateusz Wasylkiewicz
ESA1
2024 Optimal Bounds for Distinct Quartics
Panagiotis Charalampopoulos, Pawel Gawrychowski, Samah Ghazawi
ICALP2
2024 Enumerating m-Length Walks in Directed Graphs with Constant Delay
Duncan Adamson, Pawel Gawrychowski, Florin Manea
LATIN (1)2
2024 Minimum Cut in O(mlog 2 n) Time
abstract
Abstract We give a randomized algorithm that finds a minimum cut in an undirected weighted m-edge n-vertex graph G with high probability in $$O(m \log ^2 n)$$ O ( m log 2 n ) time. This is the first improvement to Karger’s celebrated $$O(m \log ^3 n)$$ O ( m log 3 n ) time algorithm from 1996. Our main technical contribution is a deterministic $$O(m \log n)$$ O ( m log n ) time algorithm that, given a spanning tree T of G, finds a minimum cut of G that 2-respects (cuts two edges of) T.
Pawel Gawrychowski, Shay Mozes, Oren Weimann
Theory Comput. Syst.1
2024 Revisiting Weighted Information Extraction: A Simpler and Faster Algorithm for Ranked Enumeration
abstract
Information extraction from textual data, where the query is represented by a finite transducer and the task is to enumerate all results without repetition, and its extension to the weighted case, where each output element has a weight and the output elements are to be enumerated sorted by their weights, are important and well studied problems in database theory. On the one hand, the first framework already covers the well-known case of regular document spanners, while the latter setting covers several practically relevant tasks that cannot be described in the unweighted setting. It is known that in the unweighted case this problem can be solved with linear time preprocessing O(|D|) and output-linear delay O(|s|) in data complexity, where D is the input data and s is the current output element. For the weighted case, Bourhis, Grez, Jachiet, and Riveros [ICDT 2021] recently designed an algorithm with linear time preprocessing, but the delay of O(|s| · log|D|) depends on the size of the data. We first show how to leverage the existing results on enumerating shortest paths to obtain a simple alternative algorithm with linear preprocessing and a delay of O(|s i | + min\ log i, log|D| ) for the i th output element s i (in data complexity); thus, substantially improving the previous algorithm. Next, we develop a technically involved rounding technique that allows us to devise an algorithm with linear time preprocessing and output-linear delay O(|s|) with high probability. To this end, we combine tools from algebra, high-dimensional geometry, and linear programming.
Pawel Gawrychowski, Florin Manea, Markus L. Schmid
Proc. ACM Manag. Data1
2024 Slowing down top trees for better worst-case compression
Bartlomiej Dudek 0001, Pawel Gawrychowski
Theor. Comput. Sci.2
2023 Optimal Near-Linear Space Heaviest Induced Ancestors
Panagiotis Charalampopoulos, Bartlomiej Dudek 0001, Pawel Gawrychowski, Karol Pokorski
CPM3
2023 Order-Preserving Squares in Strings
abstract
A fundamental concept related to strings is that of repetitions. It has been extensively studied in many versions, from both purely combinatorial and algorithmic angles. One of the most basic questions is how many distinct squares, i.e., distinct strings of the form UU, a string of length n can contain as fragments. It turns out that this is always 𝒪(n), and the bound cannot be improved to sublinear in n [Fraenkel and Simpson, JCTA 1998]. Several similar questions about repetitions in strings have been considered, and by now we seem to have a good understanding of their repetitive structure. For higher-dimensional strings, the basic concept of periodicity has been successfully extended and applied to design efficient algorithms - it is inherently more complex than for regular strings. Extending the notion of repetitions and understanding the repetitive structure of higher-dimensional strings is however far from complete. Quartics were introduced by Apostolico and Brimkov [TCS 2000] as analogues of squares in two dimensions. Charalampopoulos, Radoszewski, Rytter, Waleń, and Zuba [ESA 2020] proved that the number of distinct quartics in an n×n 2D string is 𝒪(n²log²n) and that they can be computed in 𝒪(n²log²n) time. Gawrychowski, Ghazawi, and Landau [SPIRE 2021] constructed an infinite family of n×n 2D strings with Ω(n²log n) distinct quartics. This brings the challenge of determining asymptotically tight bounds. Here, we settle both the combinatorial and the algorithmic aspects of this question: the number of distinct quartics in an n×n 2D string is 𝒪(n²log n) and they can be computed in the worst-case optimal 𝒪(n²log n) time. As expected, our solution heavily exploits the periodic structure implied by occurrences of quartics. However, the two-dimensional nature of the problem introduces some technical challenges. Somewhat surprisingly, we overcome the final challenge for the combinatorial bound using a result of Marcus and Tardos [JCTA 2004] for permutation avoidance on matrices.
Pawel Gawrychowski, Samah Ghazawi, Gad M. Landau
CPM1
2023 Compressed Indexing for Consecutive Occurrences
abstract
International audience
Pawel Gawrychowski, Garance Gourdel, Tatiana Starikovskaya, Teresa Anna Steiner
CPM1
2023 Substring Complexity in Sublinear Space
abstract
Shannon's entropy is a definitive lower bound for statistical compression. Unfortunately, no such clear measure exists for the compressibility of repetitive strings. Thus, ad hoc measures are employed to estimate the repetitiveness of strings, e.g., the size $z$ of the Lempel-Ziv parse or the number $r$ of equal-letter runs of the Burrows-Wheeler transform. A more recent one is the size $γ$ of a smallest string attractor. Let $T$ be a string of length $n$. A string attractor of $T$ is a set of positions of $T$ capturing the occurrences of all the substrings of $T$. Unfortunately, Kempa and Prezza [STOC 2018] showed that computing $γ$ is NP-hard. Kociumaka et al. [LATIN 2020] considered a new measure of compressibility that is based on the function $S_T(k)$ counting the number of distinct substrings of length $k$ of $T$, also known as the substring complexity of $T$. This new measure is defined as $δ= \sup\{S_T(k)/k, k\geq 1\}$ and lower bounds all the relevant ad hoc measures previously considered. In particular, $δ\leq γ$ always holds and $δ$ can be computed in $\mathcal{O}(n)$ time using $Θ(n)$ working space. Kociumaka et al. showed that one can construct an $\mathcal{O}(δ\log \frac{n}δ)$-sized representation of $T$ supporting efficient direct access and efficient pattern matching queries on $T$. Given that for highly compressible strings, $δ$ is significantly smaller than $n$, it is natural to pose the following question: Can we compute $δ$ efficiently using sublinear working space? We address this algorithmic challenge by showing the following bounds to compute $δ$: $\mathcal{O}(\frac{n^3\log b}{b^2})$ time using $\mathcal{O}(b)$ space, for any $b\in[1,n]$, in the comparison model; or $\tilde{\mathcal{O}}(n^2/b)$ time using $\tilde{\mathcal{O}}(b)$ space, for any $b\in[\sqrt{n},n]$, in the word RAM model.
Giulia Bernardini 0001, Gabriele Fici, Pawel Gawrychowski, Solon P. Pissis
ISAAC3
2023 Optimal Square Detection Over General Alphabets
abstract
Squares (fragments of the form xx, for some string x) are arguably the most natural type of repetition in strings. The basic algorithmic question concerning squares is to check if a given string of length n is square-free, that is, does not contain a fragment of such form. Main and Lorentz [J. Algorithms 1984] designed an
Jonas Ellert, Pawel Gawrychowski, Garance Gourdel
SODA2
2023 On the Number of Factors in the LZ-End Factorization
Pawel Gawrychowski, Maria Kosche, Florin Manea
SPIRE1
2023 Better Distance Labeling for Unweighted Planar Graphs
abstract
Abstract A distance labeling scheme is an assignment of labels, that is, binary strings, to all nodes of a graph, so that the distance between any two nodes can be computed from their labels without any additional information about the graph. The goal is to minimize the maximum length of a label as a function of the number of nodes. A major open problem in this area is to determine the complexity of distance labeling in unweighted planar (undirected) graphs. It is known that, in such a graph on n nodes, some labels must consist of $$\varOmega (n^{1/3})$$ Ω ( n 1 / 3 ) bits, but the best known labeling scheme constructs labels of length $$O(\sqrt{n}\log n)$$ O ( n log n ) (Gavoille, Peleg, Pérennes, and Raz in J Algorithms 53:85–112, 2004). For weighted planar graphs with edges of length polynomial in n, we know that labels of length $$\varOmega (\sqrt{n}\log n)$$ Ω ( n log n ) are necessary (Abboud and Dahlgaard in FOCS, 2016). Surprisingly, we do not know if distance labeling for weighted planar graphs with edges of length polynomial in n is harder than distance labeling for unweighted planar graphs. We prove that this is indeed the case by designing a distance labeling scheme for unweighted planar graphs on n nodes with labels consisting of $$O(\sqrt{n})$$ O ( n ) bits with a simple and (in our opinion) elegant method. We also show how to extend this to graphs with small weight and (unweighted) graphs with bounded genus. We augment the construction for unweighted planar graphs with a mechanism (based on Voronoi diagrams) that allows us to compute the distance between two nodes in only polylogarithmic time while increasing the length to $$O(\sqrt{n\log n})$$ O ( n log n ) . The previous scheme required $$\varOmega (\sqrt{n})$$ Ω ( n ) time to answer a query in this model.
Pawel Gawrychowski, Przemyslaw Uznanski
Algorithmica1
2023 Almost Optimal Exact Distance Oracles for Planar Graphs
abstract
We consider the problem of preprocessing a weighted directed planar graph in order to quickly answer exact distance queries. The main tension in this problem is between space S and query time Q , and since the mid-1990s all results had polynomial time-space tradeoffs, e.g., Q = ~ Θ( n/√ S ) or Q = ~Θ( n 5/2 /S 3/2 ). In this article we show that there is no polynomial tradeoff between time and space and that it is possible to simultaneously achieve almost optimal space n 1+ o (1) and almost optimal query time n o (1) . More precisely, we achieve the following space-time tradeoffs: n 1+ o (1) space and log 2+ o (1) n query time, n log 2+ o (1) n space and n o (1) query time, n 4/3+ o (1) space and log 1+ o (1) n query time. We reduce a distance query to a variety of point location problems in additively weighted Voronoi diagrams and develop new algorithms for the point location problem itself using several partially persistent dynamic tree data structures.
Panagiotis Charalampopoulos, Pawel Gawrychowski, Yaowei Long, Shay Mozes, Seth Pettie, Oren Weimann, Christian Wulff-Nilsen
J. ACM2
2022 Finding the KT Partition of a Weighted Graph in Near-Linear Time
abstract
In a breakthrough work, Kawarabayashi and Thorup (J. ACM'19) gave a near-linear time deterministic algorithm to compute the weight of a minimum cut in a simple graph G = (V,E). A key component of this algorithm is finding the (1+ε)-KT partition of G, the coarsest partition {P_1, …, P_k} of V such that for every non-trivial (1+ε)-near minimum cut with sides {S, ̄{S}} it holds that P_i is contained in either S or ̄{S}, for i = 1, …, k. In this work we give a near-linear time randomized algorithm to find the (1+ε)-KT partition of a weighted graph. Our algorithm is quite different from that of Kawarabayashi and Thorup and builds on Karger’s framework of tree-respecting cuts (J. ACM'00). We describe a number of applications of the algorithm. (i) The algorithm makes progress towards a more efficient algorithm for constructing the polygon representation of the set of near-minimum cuts in a graph. This is a generalization of the cactus representation, and was initially described by Benczúr (FOCS'95). (ii) We improve the time complexity of a recent quantum algorithm for minimum cut in a simple graph in the adjacency list model from Õ(n^{3/2}) to Õ(√{mn}), when the graph has n vertices and m edges. (iii) We describe a new type of randomized algorithm for minimum cut in simple graphs with complexity 𝒪(m + n log⁶ n). For graphs that are not too sparse, this matches the complexity of the current best 𝒪(m + n log² n) algorithm which uses a different approach based on random contractions. The key technical contribution of our work is the following. Given a weighted graph G with m edges and a spanning tree T of G, consider the graph H whose nodes are the edges of T, and where there is an edge between two nodes of H iff the corresponding 2-respecting cut of T is a non-trivial near-minimum cut of G. We give a 𝒪(m log⁴ n) time deterministic algorithm to compute a spanning forest of H.
Simon Apers, Pawel Gawrychowski, Troy Lee
APPROX/RANDOM2
2022 The Dynamic k-Mismatch Problem
abstract
The text-to-pattern Hamming distances problem asks to compute the Hamming distances between a given pattern of length $m$ and all length-$m$ substrings of a given text of length $n\ge m$. We focus on the $k$-mismatch version of the problem, where a distance needs to be returned only if it does not exceed a threshold $k$. We assume $n\le 2m$ (in general, one can partition the text into overlapping blocks). In this work, we show data structures for the dynamic version of this problem supporting two operations: An update performs a single-letter substitution in the pattern or the text, and a query, given an index $i$, returns the Hamming distance between the pattern and the text substring starting at position $i$, or reports that it exceeds $k$. First, we show a data structure with $\tilde{O}(1)$ update and $\tilde{O}(k)$ query time. Then we show that $\tilde{O}(k)$ update and $\tilde{O}(1)$ query time is also possible. These two provide an optimal trade-off for the dynamic $k$-mismatch problem with $k \le \sqrt{n}$: we prove that, conditioned on the strong 3SUM conjecture, one cannot simultaneously achieve $k^{1-Ω(1)}$ time for all operations. For $k\ge \sqrt{n}$, we give another lower bound, conditioned on the Online Matrix-Vector conjecture, that excludes algorithms taking $n^{1/2-Ω(1)}$ time per operation. This is tight for constant-sized alphabets: Clifford et al. (STACS 2018) achieved $\tilde{O}(\sqrt{n})$ time per operation in that case, but with $\tilde{O}(n^{3/4})$ time per operation for large alphabets. We improve and extend this result with an algorithm that, given $1\le x\le k$, achieves update time $\tilde{O}(\frac{n}{k} +\sqrt{\frac{nk}{x}})$ and query time $\tilde{O}(x)$. In particular, for $k\ge \sqrt{n}$, an appropriate choice of $x$ yields $\tilde{O}(\sqrt[3]{nk})$ time per operation, which is $\tilde{O}(n^{2/3})$ when no threshold $k$ is provided.
Raphaël Clifford, Pawel Gawrychowski, Tomasz Kociumaka, Daniel P. Martin 0001, Przemyslaw Uznanski
CPM2
2022 Cut Query Algorithms with Star Contraction
abstract
We study the complexity of determining the edge connectivity of a simple graph with cut queries. We show that (i) there is a bounded-error randomized algorithm that computes edge connectivity with $O(n)$ cut queries, and (ii) there is a bounded-error quantum algorithm that computes edge connectivity with $\tilde{O}(\sqrt{}$n) cut queries. To prove these results we introduce a new technique, called star contraction, to randomly contract edges of a graph while preserving non-trivial minimum cuts. In star contraction vertices randomly contract an edge incident on a small set of randomly chosen “center” vertices. In contrast to the related 2-out contraction technique of Ghaffari, Nowicki, and Thorup [SODA’20], star contraction only contracts vertex-disjoint star subgraphs, which allows it to be efficiently implemented via cut queries. The $O(n)$ bound from item (i) was not known even for the simpler problem of connectivity, and it improves the $O(n\log^{3}n)$ upper bound by Rubinstein, Schramm, and Weinberg [ITCS’18]. The bound is tight under the reasonable conjecture that the randomized communication complexity of connectivity is $\Omega(n\log n)$, an open question since the seminal work of Babai, Frankl, and Simon [FOCS’86]. The bound also excludes using edge connectivity on simple graphs to prove a superlinear randomized query lower bound for minimizing a symmetric submodular function. The quantum algorithm from item (ii) gives a nearlyquadratic separation with the randomized complexity, and addresses an open question of Lee, Santha, and Zhang [SODA’21]. The algorithm can alternatively be viewed as computing the edge connectivity of a simple graph with $\tilde{O}(\sqrt{}$n) matrix-vector multiplication queries to its adjacency matrix. Finally, we demonstrate the use of star contraction outside of the cut query setting by designing a one-pass semi-streaming algorithm for computing edge connectivity in the complete vertex arrival setting. This contrasts with the edge arrival setting where two passes are required.
Simon Apers, Yuval Efron, Pawel Gawrychowski, Troy Lee, Sagnik Mukhopadhyay, Danupon Nanongkai
FOCS3
2022 Sublinear Dynamic Interval Scheduling (On One or Multiple Machines)
abstract
We revisit the complexity of the classical Interval Scheduling in the dynamic setting. In this problem, the goal is to maintain a set of intervals under insertions and deletions and report the size of the maximum size subset of pairwise disjoint intervals after each update. Nontrivial approximation algorithms are known for this problem, for both the unweighted and weighted versions [Henzinger, Neumann, Wiese, SoCG 2020]. Surprisingly, it was not known if the general exact version admits an exact solution working in sublinear time, that is, without recomputing the answer after each update. Our first contribution is a structure for Dynamic Interval Scheduling with amortized $\tilde{\mathcal{O}}(n^{1/3})$ update time. Then, building on the ideas used for the case of one machine, we design a sublinear solution for any constant number of machines: we describe a structure for Dynamic Interval Scheduling on $m\geq 2$ machines with amortized $\tilde{\mathcal{O}}(n^{1 - 1/m})$ update time. We complement the above results by considering Dynamic Weighted Interval Scheduling on one machine, that is maintaining (the weight of) the maximum weight subset of pairwise disjoint intervals. We show an almost linear lower bound (conditioned on the hardness of Minimum Weight $k$-Clique) for the update/query time of any structure for this problem. Hence, in the weighted case one should indeed seek approximate solutions.
Pawel Gawrychowski, Karol Pokorski
ICALP1
2022 Streaming Regular Expression Membership and Pattern Matching
abstract
Regular expression search is a key primitive in myriads of applications, from web scrapping to bioinformatics. A regular expression is a formalism for compactly describing a set of strings, built recursively from single characters using three operators: concatenation, union, and Kleene star. Two basic algorithmic problems concerning such expressions are membership and pattern matching. In the regular expression membership problem, we are given a regular expression R and a string T of length n, and must decide whether T matches R. In the regular expression pattern matching problem, the task to find the substrings of T that match R. By now we have a good understanding of the complexity of regular expression membership and pattern matching in the classical setting. However, only some special cases have been considered in the practically relevant streaming setting: dictionary matching and wildcard pattern matching. In the dictionary matching problem, we are given a dictionary of d strings of length at most m and a string T, and must find substrings of T that match one of the dictionary strings. In the wildcard pattern matching problem, we are given a string P of length m that contains d wildcards, where a wildcard is a special symbol that matches any character of the alphabet, and a string T, and must find all substrings of T that match P. Both problems can be solved in the streaming model by a randomised Monte Carlo algorithm that uses (d log m) space [Golan and Porat (ESA 2017), Golan, Kopelowitz and Porat (Algorithmica 2019)]. In the general case, we cannot hope for a streaming algorithm with space complexity smaller than the length of R for either variant of regular expression search. The main contribution of this paper is that we identify the number of unions and Kleene stars, denoted by d, as the parameter that allows for an efficient streaming algorithm. This parameter has been previously considered in the classical setting, and it has been observed that in practice it is significantly smaller than the length of R. We design general randomised Monte Carlo algorithms for both problems that use (d3 polylog n) space in the streaming setting. A crucial technical ingredient of our algorithms is an adaptation of the general framework for evaluating a circuit with addition and convolution gates in a space-efficient manner [Lokshtanov and Nederlof (STOC 2010), Bringmann (SODA 2017)], initially designed as a key component of a pseudopolynomial time algorithm for the subset sum problem. We show how to replace the Extended Generalised Riemann Hypothesis in [Bringmann (SODA 2017)] by an application of the Bombieri–Vinogradov theorem to achieve the same bounds (but unconditionally), which might be of independent interest.
Bartlomiej Dudek 0001, Pawel Gawrychowski, Garance Gourdel, Tatiana Starikovskaya
SODA2
2022 Pattern Matching on Grammar-Compressed Strings in Linear Time
abstract
The most fundamental problem considered in algorithms for text processing is pattern matching: given a pattern p of length m and a text t of length n, does p occur in t? Multiple versions of this basic question have been considered, and by now we know algorithms that are fast both in practice and in theory. However, the rapid increase in the amount of generated and stored data brings the need of designing algorithms that operate directly on compressed representations of data. In the compressed pattern matching problem we are given a compressed representation of the text, with n being the length of the compressed representation and N being the length of the text, and an uncompressed pattern of length m. The most challenging (and yet relevant when working with highly repetitive data, say biological information) scenario is when the chosen compression method is capable of describing a string of exponential length (in the size of its representation). An elegant formalism for such a compression method is that of straight-line programs, which are simply context-free grammars describing exactly one string. While it has been known that compressed pattern matching problem can be solved in O(m + n log N) time for this compression method, designing a linear-time algorithm remained open. We resolve this open question by presenting an O(n + m) time algorithm that, given a context-free grammar of size n that produces a single string t and a pattern p of length m, decides whether p occurs in t as a substring. To this end, we devise improved solutions for the weighted ancestor problem and the substring concatenation problem.
Moses Ganardi, Pawel Gawrychowski
SODA2
2022 On the Hardness of Computing the Edit Distance of Shallow Trees
Panagiotis Charalampopoulos, Pawel Gawrychowski, Shay Mozes, Oren Weimann
SPIRE2
2022 Matching Patterns with Variables Under Edit Distance
Pawel Gawrychowski, Florin Manea, Stefan Siemer
SPIRE1
2022 Fast and Longest Rollercoasters
abstract
Abstract For $$k\ge 3$$ k≥3 , ak-rollercoasteris a sequence of numbers whose every maximal contiguous subsequence, that is increasing or decreasing, has length at leastk; 3-rollercoasters are called simply rollercoasters. Given a sequence of distinct real numbers, we are interested in computing its maximum-length (not necessarily contiguous) subsequence that is ak-rollercoaster. Biedl et al. (in: ICALP, volume 107 of LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, pp 18:1–18:15, 2018) have shown that each sequence ofndistinct real numbers contains a rollercoaster of length at least $$\lceil n/2\rceil $$ ⌈n/2⌉ for $$n>7$$ n>7 , and that a longest rollercoaster contained in such a sequence can be computed in $$O(n\log n)$$ O(nlogn) -time (or faster, in $$O(n \log \log n)$$ O(nloglogn) time, when the input sequence is a permutation of $$\{1,\ldots ,n\}$$ {1,…,n} ). They have also shown that every sequence of $$n\geqslant (k-1)^2+1$$ n⩾(k-1)2+1 distinct real numbers contains ak-rollercoaster of length at least $$\frac{n}{2(k-1)}-\frac{3k}{2}$$ n2(k-1)-3k2 , and gave an $$O(nk\log n)$$ O(nklogn) -time (respectively, $$O(n k\log \log n)$$ O(nkloglogn) -time) algorithm computing a longestk-rollercoaster in a sequence of lengthn(respectively, a permutation of $$\{1,\ldots ,n\}$$ {1,…,n} ). In this paper, we give an $$O(nk^2)$$ O(nk2) -time algorithm computing the length of a longestk-rollercoaster contained in a sequence ofndistinct real numbers; hence, for constantk, our algorithm computes the length of a longestk-rollercoaster in optimal linear time. The algorithm can be easily adapted to output the respectivek-rollercoaster. In particular, this improves the results of Biedl et al. (2018), by showing that a longest rollercoaster can be computed in optimal linear time. We also present an algorithm computing the length of a longestk-rollercoaster in $$O(n \log ^2 n)$$ O(nlog2n) -time, that is, subquadratic even for large values of $$k\le n$$ k≤n . Again, the rollercoaster can be easily retrieved. Finally, we show an $$\Omega (n \log k)$$ Ω(nlogk) lower bound for the number of comparisons in any comparison-based algorithm computing the length of a longestk-rollercoaster.
Pawel Gawrychowski, Florin Manea, Radoslaw Serafin
Algorithmica1
2022 Streaming Dictionary Matching with Mismatches
abstract
In the k-mismatch problem we are given a pattern of length n and a text and must find all locations where the Hamming distance between the pattern and the text is at most k. A series of recent breakthroughs have resulted in an ultra-efficient streaming algorithm for this problem that requires only $$\mathcal {O}(k \log \frac{n}{k})$$ space and $$\mathcal {O}(\log \frac{n}{k} (\sqrt{k \log k} + \log ^3 n))$$ time per letter (Clifford, Kociumaka, Porat, SODA 2019). In this work, we consider a strictly harder problem called dictionary matching with k mismatches. In this problem, we are given a dictionary of d patterns, where the length of each pattern is at most n, and must find all substrings of the text that are within Hamming distance k from one of the patterns. We develop a streaming algorithm for this problem with $$\mathcal {O}(k d \log ^k d \mathop {\mathrm {polylog} {\,n}})$$ space and $$\mathcal {O}(k \log ^{k} d \mathop {\mathrm {polylog} {\,n}} + |\mathrm {output}|)$$ time per position of the text. The algorithm is randomised and outputs correct answers with high probability. On the lower bound side, we show that any streaming algorithm for dictionary matching with k mismatches requires $$\varOmega (k d)$$ bits of space.
Pawel Gawrychowski, Tatiana Starikovskaya
Algorithmica1
2022 The Theory of Universal Graphs for Infinite Duration Games
abstract
We introduce the notion of universal graphs as a tool for constructing algorithms solving games of infinite duration such as parity games and mean payoff games. In the first part we develop the theory of universal graphs, with two goals: showing an equivalence and normalisation result between different recently introduced related models, and constructing generic value iteration algorithms for any positionally determined objective. In the second part we give four applications: to parity games, to mean payoff games, to a disjunction between a parity and a mean payoff objective, and to disjunctions of several mean payoff objectives. For each of these four cases we construct algorithms achieving or improving over the best known time and space complexity.
Thomas Colcombet, Nathanaël Fijalkow, Pawel Gawrychowski, Pierre Ohlmann
Log. Methods Comput. Sci.3
2022 Elastic-Degenerate String Matching via Fast Matrix Multiplication
abstract
An elastic-degenerate (ED) string is a sequence of $n$ sets of strings of total length $N$ which was recently proposed to model a set of similar sequences. The ED string matching (EDSM) problem is to find all occurrences of a pattern of length $m$ in an ED text. The EDSM problem has recently received some attention in the combinatorial pattern matching community, and an $\mathcal{O}(nm^{1.5}\sqrt{\log m} + N)$-time algorithm is known [Aoyama et al., CPM 2018]. The standard assumption in the prior work on this question is that $N$ is substantially larger than both $n$ and $m$, and thus we would like to have a linear dependency on the former. Under this assumption, the natural open problem is whether we can decrease the 1.5 exponent in the time complexity, similarly as in the related (but, to the best of our knowledge, not equivalent) word break problem [Backurs and Indyk, FOCS 2016]. Our starting point is a conditional lower bound for the EDSM problem. We use the popular combinatorial Boolean matrix multiplication (BMM) conjecture stating that there is no truly subcubic combinatorial algorithm for BMM [Abboud and Williams, FOCS 2014]. By designing an appropriate reduction, we show that a combinatorial algorithm solving the EDSM problem in $\mathcal{O}(nm^{1.5-\epsilon} + N)$ time, for any $\epsilon>0$, refutes this conjecture. Our reduction should be understood as an indication that decreasing the exponent requires fast matrix multiplication. String periodicity and fast Fourier transform are two standard tools in string algorithms. Our main technical contribution is that we successfully combine these tools with fast matrix multiplication to design a noncombinatorial $\tilde{\mathcal{O}}(nm^{\omega-1}+N)$-time algorithm for EDSM, where $\omega$ denotes the matrix multiplication exponent and the $\tilde{\mathcal{O}}(\cdot)$ notation suppresses polylog factors. To the best of our knowledge, we are the first to combine these tools. In particular, using the fact that $\omega<2.373$ [Alman and Williams, SODA 2021; Le Gall, ISSAC 2014; Williams, STOC 2012], we obtain an $\mathcal{O}(nm^{1.373} + N)$-time algorithm for EDSM. An important building block in our solution that might find applications in other problems is a method of selecting a small set of length-$\ell$ substrings of the pattern, called anchors, so that any occurrence of a string from an ED text set contains at least one but not too many (on average) such anchors inside.
Giulia Bernardini 0001, Pawel Gawrychowski, Nadia Pisanti, Solon P. Pissis, Giovanna Rosone
SIAM J. Comput.2
2022 Fault-tolerant distance labeling for planar graphs
Aviv Bar-Natan, Panagiotis Charalampopoulos, Pawel Gawrychowski, Shay Mozes, Oren Weimann
Theor. Comput. Sci.3
2021 An Almost Optimal Edit Distance Oracle
abstract
We consider the problem of preprocessing two strings S and T, of lengths m and n, respectively, in order to be able to efficiently answer the following queries: Given positions i,j in S and positions a,b in T, return the optimal alignment score of S[i..j] and T[a..b]. Let N = mn. We present an oracle with preprocessing time N^{1+o(1)} and space N^{1+o(1)} that answers queries in log^{2+o(1)}N time. In other words, we show that we can efficiently query for the alignment score of every pair of substrings after preprocessing the input for almost the same time it takes to compute just the alignment of S and T. Our oracle uses ideas from our distance oracle for planar graphs [STOC 2019] and exploits the special structure of the alignment graph. Conditioned on popular hardness conjectures, this result is optimal up to subpolynomial factors. Our results apply to both edit distance and longest common subsequence (LCS). The best previously known oracle with construction time and size 𝒪(N) has slow Ω(√N) query time [Sakai, TCS 2019], and the one with size N^{1+o(1)} and query time log^{2+o(1)}N (using a planar graph distance oracle) has slow Ω(N^{3/2}) construction time [Long & Pettie, SODA 2021]. We improve both approaches by roughly a √ N factor.
Panagiotis Charalampopoulos, Pawel Gawrychowski, Shay Mozes, Oren Weimann
ICALP2
2021 Matching Patterns with Variables Under Hamming Distance
abstract
A pattern $α$ is a string of variables and terminal letters. We say that $α$ matches a word $w$, consisting only of terminal letters, if $w$ can be obtained by replacing the variables of $α$ by terminal words. The matching problem, i.e., deciding whether a given pattern matches a given word, was heavily investigated: it is NP-complete in general, but can be solved efficiently for classes of patterns with restricted structure. In this paper, we approach this problem in a generalized setting, by considering approximate pattern matching under Hamming distance. More precisely, we are interested in what is the minimum Hamming distance between $w$ and any word $u$ obtained by replacing the variables of $α$ by terminal words. Firstly, we address the class of regular patterns (in which no variable occurs twice) and propose efficient algorithms for this problem, as well as matching conditional lower bounds. We show that the problem can still be solved efficiently if we allow repeated variables, but restrict the way the different variables can be interleaved according to a locality parameter. However, as soon as we allow a variable to occur more than once and its occurrences can be interleaved arbitrarily with those of other variables, even if none of them occurs more than once, the problem becomes intractable.
Pawel Gawrychowski, Florin Manea, Stefan Siemer
MFCS1
2021 Fault-Tolerant Distance Labeling for Planar Graphs
Aviv Bar-Natan, Panagiotis Charalampopoulos, Pawel Gawrychowski, Shay Mozes, Oren Weimann
SIROCCO3
2021 Shorter Labels for Routing in Trees
abstract
A routing labeling scheme assigns a binary string, called a label, to each node in a network, and chooses a distinct port number from {1, …, d} for every edge outgoing from a node of degree d. Then, given the labels of u and w and no other information about the network, it should be possible to determine the port number corresponding to the first edge on the shortest path from u to w. In their seminal paper, Thorup and Zwick [SPAA 2001] designed several routing methods for general weighted networks. An important technical ingredient in their paper that according to the authors “may be of independent practical and theoretical interest” is a routing labeling scheme for trees of arbitrary degrees. For a tree on n nodes, their scheme constructs labels consisting of (1 + o(1)) log n bits such that the sought port number can be computed in constant time. Looking closer at their construction, the labels consist of bits. Given that the only known lower bound is log n + Ω(log log n), a natural question that has been asked for other labeling problems in trees is to determine the asymptotics of the smaller-order term. We make the first (and significant) progress in 19 years on determining the correct second-order term for the length of a label in a routing labeling scheme for trees on n nodes. We design such a scheme with labels of length .
Pawel Gawrychowski, Wojciech Janczewski, Jakub Lopuszanski
SODA1
2021 Planar Negative k-Cycle
abstract
Given an edge-weighted directed graph G, the Negative-k-Cycle problem asks whether G contains a negative-weight cycle with at most k edges. For k = 3 the problem is known as the NegativeTriangle problem and is equivalent to all-pairs shortest paths (and to min-plus matrix multiplication) and solvable in O(n3) time. In this paper, we consider the case of directed planar graphs. We show that the Negative-k-Cycle problem can be solved in min{O(nk2 log n), O(n2)} time. Assuming the min-plus convolution conjecture, we then show, for k > n1/3 that there is no algorithm polynomially faster than , and for k ≤ n1/3 that our O(nk2 log n) upper bound is essentially tight. The latter gives the first non-trivial tight bounds for a planar graph problem in P. Our lower bounds are obtained by introducing a natural problem on matrices that generalizes both min-plus matrix multiplication and min-plus convolution, and whose complexity lies between the complexities of these two problems.
Pawel Gawrychowski, Shay Mozes, Oren Weimann
SODA1
2021 Lower Bounds for the Number of Repetitions in 2D Strings
Pawel Gawrychowski, Samah Ghazawi, Gad M. Landau
SPIRE1
2021 Efficiently Testing Simon's Congruence
abstract
Simon's congruence $\sim_k$ is defined as follows: two words are $\sim_k$-equivalent if they have the same set of subsequences of length at most $k$. We propose an algorithm which computes, given two words $s$ and $t$, the largest $k$ for which $s\sim_k t$. Our algorithm runs in linear time $O(|s|+|t|)$ when the input words are over the integer alphabet $\{1,\ldots,|s|+|t|\}$ (or other alphabets which can be sorted in linear time). This approach leads to an optimal algorithm in the case of general alphabets as well. Our results are based on a novel combinatorial approach and a series of efficient data structures.
Pawel Gawrychowski, Maria Kosche, Tore Koss, Florin Manea, Stefan Siemer
STACS1
2021 Fully dynamic approximation of LIS in polylogarithmic time
abstract
We revisit the problem of maintaining the longest increasing subsequence (LIS) of an array under (i) inserting an element, and (ii) deleting an element of an array. In a recent breakthrough, Mitzenmacher and Seddighin [STOC 2020] designed an algorithm that maintains an O((1/є)O(1/є))-approximation of LIS under both operations with worst-case update time Õ(nє), for any constant є>0 (Õ hides factors polynomial in logn, where n is the length of the input). We exponentially improve on their result by designing an algorithm that maintains an (1+є) approximation of LIS under both operations with worst-case update time Õ(є−5). Instead of working with the grid packing technique introduced by Mitzenmacher and Seddighin, we take a different approach building on a new tool that might be of independent interest: LIS sparsification.
Pawel Gawrychowski, Wojciech Janczewski
STOC1
2021 Incomplete Directed Perfect Phylogeny in Linear Time
Giulia Bernardini 0001, Paola Bonizzoni, Pawel Gawrychowski
WADS3
2021 Strictly In-Place Algorithms for Permuting and Inverting Permutations
Bartlomiej Dudek 0001, Pawel Gawrychowski, Karol Pokorski
WADS2
2021 Better Distance Labeling for Unweighted Planar Graphs
Pawel Gawrychowski, Przemyslaw Uznanski
WADS1
2021 Top Tree Compression of Tries
abstract
We present a compressed representation of tries based on top tree compression [ICALP 2013] that works on a standard, comparison-based, pointer machine model of computation and supports efficient prefix search queries. Namely, we show how to preprocess a set of strings of total length n over an alphabet of size $$\sigma$$ into a compressed data structure of worst-case optimal size $$O(n/\log _\sigma n)$$ that given a pattern string P of length m determines if P is a prefix of one of the strings in time $$O(\min (m\log \sigma ,m + \log n))$$ . We show that this query time is in fact optimal regardless of the size of the data structure. Existing solutions either use $$\Omega (n)$$ space or rely on word RAM techniques, such as tabulation, hashing, address arithmetic, or word-level parallelism, and hence do not work on a pointer machine. Our result is the first solution on a pointer machine that achieves worst-case o(n) space. Along the way, we develop several interesting data structures that work on a pointer machine and are of independent interest. These include an optimal data structures for random access to a grammar-compressed string and an optimal data structure for a variant of the level ancestor problem.
Philip Bille, Pawel Gawrychowski, Inge Li Gørtz, Gad M. Landau, Oren Weimann
Algorithmica2
2021 Block trees
Djamal Belazzougui, Manuel Cáceres, Travis Gagie, Pawel Gawrychowski, Juha Kärkkäinen, Gonzalo Navarro 0001, Alberto Ordóñez Pereira, Simon J. Puglisi, Yasuo Tabei
J. Comput. Syst. Sci.4
2021 Voronoi Diagrams on Planar Graphs, and Computing the Diameter in Deterministic Õ(n5/3) Time
abstract
We present an explicit and efficient construction of additively weighted Voronoi diagrams on planar graphs. Let $G$ be a planar graph with $n$ vertices and $b$ sites that lie on a constant number of faces. We show how to preprocess $G$ in $\tilde O(nb^2)$ time so that one can compute any additively weighted Voronoi diagram for these sites in $\tilde O(b)$ time. We use this construction to compute the diameter of a directed planar graph with real arc lengths in $\tilde{O}(n^{5/3})$ time. This improves the recent breakthrough result of Cabello [ SODA 2017, SIAM, Philadelphia, 2017, pp. 2143--2152], both by improving the running time (from $\tilde{O}(n^{11/6})$), and by providing a deterministic algorithm. It is in fact the first truly subquadratic deterministic algorithm for this problem. Our use of Voronoi diagrams to compute the diameter follows that of Cabello, but he used abstract Voronoi diagrams, which makes his diameter algorithm more involved, more expensive, and randomized. As in Cabello's work, our algorithm can compute, for every vertex $v$, both the farthest vertex from $v$ (i.e., the eccentricity of $v$), and the sum of distances from $v$ to all other vertices. Hence, our algorithm can also compute the radius, median, and Wiener index (sum of all pairwise distances) of a planar graph within the same time bounds. Our construction of Voronoi diagrams for planar graphs is of independent interest.
Pawel Gawrychowski, Haim Kaplan, Shay Mozes, Micha Sharir, Oren Weimann
SIAM J. Comput.1
2021 Tight upper and lower bounds on suffix tree breadth
Golnaz Badkobeh, Pawel Gawrychowski, Juha Kärkkäinen, Simon J. Puglisi, Bella Zhukova
Theor. Comput. Sci.2
2020 On Two Measures of Distance Between Fully-Labelled Trees
abstract
The last decade brought a significant increase in the amount of data and a variety of new inference methods for reconstructing the detailed evolutionary history of various cancers. This brings the need of designing efficient procedures for comparing rooted trees representing the evolution of mutations in tumor phylogenies. Bernardini et al. [CPM 2019] recently introduced a notion of the rearrangement distance for fully-labelled trees motivated by this necessity. This notion originates from two operations: one that permutes the labels of the nodes, the other that affects the topology of the tree. Each operation alone defines a distance that can be computed in polynomial time, while the actual rearrangement distance, that combines the two, was proven to be NP-hard. We answer two open question left unanswered by the previous work. First, what is the complexity of computing the permutation distance? Second, is there a constant-factor approximation algorithm for estimating the rearrangement distance between two arbitrary trees? We answer the first one by showing, via a two-way reduction, that calculating the permutation distance between two trees on n nodes is equivalent, up to polylogarithmic factors, to finding the largest cardinality matching in a sparse bipartite graph. In particular, by plugging in the algorithm of Liu and Sidford [ArXiv 2020], we obtain an 𝒪̃(n^{4/3+o(1}) time algorithm for computing the permutation distance between two trees on n nodes. Then we answer the second question positively, and design a linear-time constant-factor approximation algorithm that does not need any assumption on the trees.
Giulia Bernardini 0001, Paola Bonizzoni, Pawel Gawrychowski
CPM3
2020 On Indeterminate Strings Matching
abstract
Given two indeterminate equal-length strings p and t with a set of characters per position in both strings, we obtain a determinate string p_w from p and a determinate string t_w from t by choosing one character per position. Then, we say that p and t match when p_w and t_w match for some choice of the characters. While the most standard notion of a match for determinate strings is that they are simply identical, in certain applications it is more appropriate to use other definitions, with the prime examples being parameterized matching, order-preserving matching, and the recently introduced Cartesian tree matching. We provide a systematic study of the complexity of string matching for indeterminate equal-length strings, for different notions of matching. We use n to denote the length of both strings, and r to be an upper-bound on the number of uncertain characters per position. First, we provide the first polynomial time algorithm for the Cartesian tree version that runs in deterministic 𝒪(nlog² n) and expected 𝒪(nlog nlog log n) time using 𝒪(nlog n) space, for constant r. Second, we establish NP-hardness of the order-preserving version for r=2, thus solving a question explicitly stated by Henriques et al. [CPM 2018], who showed hardness for r=3. Third, we establish NP-hardness of the parameterized version for r=2. As both parameterized and order-preserving indeterminate matching reduce to the standard determinate matching for r=1, this provides a complete classification for these three variants.
Pawel Gawrychowski, Samah Ghazawi, Gad M. Landau
CPM1
2020 Dynamic Longest Common Substring in Polylogarithmic Time
abstract
The longest common substring problem consists in finding a longest string that appears as a (contiguous) substring of two input strings. We consider the dynamic variant of this problem, in which we are to maintain two dynamic strings S and T, each of length at most n, that undergo substitutions of letters, in order to be able to return a longest common substring after each substitution. Recently, Amir et al. [ESA 2019] presented a solution for this problem that needs only 𝒪̃(n^(2/3)) time per update. This brought the challenge of determining whether there exists a faster solution with polylogarithmic update time, or (as is the case for other dynamic problems), we should expect a polynomial (conditional) lower bound. We answer this question by designing a significantly faster algorithm that processes each substitution in amortized log^𝒪(1) n time with high probability. Our solution relies on exploiting the local consistency of the parsing of a collection of dynamic strings due to Gawrychowski et al. [SODA 2018], and on maintaining two dynamic trees with labeled bicolored leaves, so that after each update we can report a pair of nodes, one from each tree, of maximum combined weight, which have at least one common leaf-descendant of each color. We complement this with a lower bound of Ω(log n/ log log n) for the update time of any polynomial-size data structure that maintains the LCS of two dynamic strings, even allowing amortization and randomization.
Panagiotis Charalampopoulos, Pawel Gawrychowski, Karol Pokorski
ICALP2
2020 Minimum Cut in O(m log² n) Time
abstract
We give a randomized algorithm that finds a minimum cut in an undirected weighted $m$-edge $n$-vertex graph $G$ with high probability in $O(m \log^2 n)$ time. This is the first improvement to Karger's celebrated $O(m \log^3 n)$ time algorithm from 1996. Our main technical contribution is a deterministic $O(m \log n)$ time algorithm that, given a spanning tree $T$ of $G$, finds a minimum cut of $G$ that 2-respects (cuts two edges of) $T$.
Pawel Gawrychowski, Shay Mozes, Oren Weimann
ICALP1
2020 Counting 4-Patterns in Permutations Is Equivalent to Counting 4-Cycles in Graphs
abstract
Permutation $σ$ appears in permutation $π$ if there exists a subsequence of $π$ that is order-isomorphic to $σ$. The natural question is to check if $σ$ appears in $π$, and if so count the number of occurrences. We know that for any fixed length~k, we can check if a given pattern of length k appears in a permutation of length n in time linear in n, but being able to count all such occurrences in $f(k)\cdot n^{o(k/\log k)}$ time would refute the exponential time hypothesis (ETH). This motivates a systematic study of the complexity of counting occurrences for different patterns of fixed small length k. We investigate this question for k=4. Very recently, Even-Zohar and Leng [arXiv 2019] identified two types of 4-patterns. For the first type they designed an $Õ(n)$ time algorithm, while for the second they were able to provide an $Õ(n^{1.5})$ time algorithm. This brings up the question whether the permutations of the second type are inherently harder than the first type. We establish a connection between counting 4-patterns of the second type and counting 4-cycles in a sparse undirected graph. By designing two-way reductions we show that the complexities of both problems are the same, up to polylogarithmic factors. This allows us to provide a reasonable argument for why there is a difference in the complexities for counting 4-patterns of the two types. In particular, even for the simpler problem of detecting a 4-cycle in a graph on m edges, the best known algorithm works in $O(m^{4/3})$ time. Our reductions imply that an $O(n^{4/3-\varepsilon})$ time algorithm for counting occurrences would imply an exciting breakthrough for counting (and hence also detecting) 4-cycles. In the other direction, by plugging in the fastest known algorithm for counting 4-cycles, we obtain an algorithm for counting occurrences of any 4-pattern in $O(n^{1.48})$ time.
Bartlomiej Dudek 0001, Pawel Gawrychowski
ISAAC2
2020 A Faster Subquadratic Algorithm for the Longest Common Increasing Subsequence Problem
abstract
The Longest Common Increasing Subsequence (LCIS) is a variant of the classical Longest Common Subsequence (LCS), in which we additionally require the common subsequence to be strictly increasing. While the well-known "Four Russians" technique can be used to find LCS in subquadratic time, it does not seem applicable to LCIS. Recently, Duraj [STACS 2020] used a completely different method based on the combinatorial properties of LCIS to design an $\mathcal{O}(n^2(\log\log n)^2/\log^{1/6}n)$ time algorithm. We show that an approach based on exploiting tabulation can be used to construct an asymptotically faster $\mathcal{O}(n^2 \log\log n/\sqrt{\log n})$ time algorithm. As our solution avoids using the specific combinatorial properties of LCIS, it can be also adapted for the Longest Common Weakly Increasing Subsequence (LCWIS).
Anadi Agrawal, Pawel Gawrychowski
ISAAC2
2020 Efficient Labeling for Reachability in Directed Acyclic Graphs
Maciej Duleba, Pawel Gawrychowski, Wojciech Janczewski
ISAAC2
2020 Value Iteration Using Universal Graphs and the Complexity of Mean Payoff Games
Nathanaël Fijalkow, Pawel Gawrychowski, Pierre Ohlmann
MFCS2
2020 Generalised Pattern Matching Revisited
abstract
In the problem of Generalised Pattern Matching (GPM) [STOC'94, Muthukrishnan and Palem], we are given a text T of length n over an alphabet Σ_T, a pattern P of length m over an alphabet Σ_P, and a matching relationship ⊆ Σ_T × Σ_P, and must return all substrings of T that match P (reporting) or the number of mismatches between each substring of T of length m and P (counting). In this work, we improve over all previously known algorithms for this problem: - For ? being the maximum number of characters that match a fixed character, we show two new Monte Carlo algorithms, a reporting algorithm with time ?(? n log n log m) and a (1-ε)-approximation counting algorithm with time ?(ε^-1 ? n log n log m). We then derive a (1-ε)-approximation deterministic counting algorithm for GPM with ?(ε^-2 ? n log⁶ n) time. - For ? being the number of pairs of matching characters, we demonstrate Monte Carlo algorithms for reporting and (1-ε)-approximate counting with running time ?(√? n log m √{log n}) and ?(√{ε^-1 ?} n log m √{log n}), respectively, as well as a (1-ε)-approximation deterministic algorithm for the counting variant of GPM with ?(ε^-1 √{?} n log^{7/2} n) time. - Finally, for ℐ being the total number of disjoint intervals of characters that match the m characters of the pattern P, we show that both the reporting and the counting variants of GPM can be solved exactly and deterministically in ?(n√{ℐ log m} +n log n) time. At the heart of our new deterministic upper bounds for ? and ? lies a faster construction of superimposed codes, which solves an open problem posed in [FOCS'97, Indyk] and can be of independent interest. To conclude, we demonstrate first lower bounds for GPM. We start by showing that any deterministic or Monte Carlo algorithm for GPM must use Ω(?) time, and then proceed to show higher lower bounds for combinatorial algorithms. These bounds show that our algorithms are almost optimal, unless a radically new approach is developed.
Bartlomiej Dudek 0001, Pawel Gawrychowski, Tatiana Starikovskaya
STACS2
2020 Existential Length Universality
abstract
We study the following natural variation on the classical universality problem: given a language $L(M)$ represented by $M$ (e.g., a DFA/RE/NFA/PDA), does there exist an integer $\ell \geq 0$ such that $Σ^\ell \subseteq L(M)$? In the case of an NFA, we show that this problem is NEXPTIME-complete, and the smallest such $\ell$ can be doubly exponential in the number of states. This particular case was formulated as an open problem in 2009, and our solution uses a novel and involved construction. In the case of a PDA, we show that it is recursively unsolvable, while the smallest such $\ell$ is not bounded by any computable function of the number of states. In the case of a DFA, we show that the problem is NP-complete, and $e^{\sqrt{n \log n} (1+o(1))}$ is an asymptotically tight upper bound for the smallest such $\ell$, where $n$ is the number of states. Finally, we prove that in all these cases, the problem becomes computationally easier when the length $\ell$ is also given in binary in the input: it is polynomially solvable for a DFA, PSPACE-complete for an NFA, and co-NEXPTIME-complete for a PDA.
Pawel Gawrychowski, Martin Lange 0001, Narad Rampersad, Jeffrey Shallit, Marek Szykula
STACS1
2020 All non-trivial variants of 3-LDT are equivalent
abstract
The popular 3-SUM conjecture states that there is no strongly subquadratic time algorithm for checking if a given set of integers contains three distinct elements that sum up to zero. A closely related problem is to check if a given set of integers contains distinct x 1, x 2, x 3 such that x 1+x 2=2x 3. This can be reduced to 3-SUM in almost-linear time, but surprisingly a reverse reduction establishing 3-SUM hardness was not known.
Bartlomiej Dudek 0001, Pawel Gawrychowski, Tatiana Starikovskaya
STOC2
2020 Tree Edit Distance Cannot be Computed in Strongly Subcubic Time (Unless APSP Can)
abstract
The edit distance between two rooted ordered trees with n nodes labeled from an alphabet Ʃ is the minimum cost of transforming one tree into the other by a sequence of elementary operations consisting of deleting and relabeling existing nodes, as well as inserting new nodes. Tree edit distance is a well-known generalization of string edit distance. The fastest known algorithm for tree edit distance runs in cubic O ( n 3 ) time and is based on a similar dynamic programming solution as string edit distance. In this article, we show that a truly subcubic O ( n 3-ε ) time algorithm for tree edit distance is unlikely: For |Ʃ| = Ω ( n ), a truly subcubic algorithm for tree edit distance implies a truly subcubic algorithm for the all pairs shortest paths problem. For |Ʃ| = O (1), a truly subcubic algorithm for tree edit distance implies an O ( n k-ε ) algorithm for finding a maximum weight k -clique. Thus, while in terms of upper bounds string edit distance and tree edit distance are highly related, in terms of lower bounds string edit distance exhibits the hardness of the strong exponential time hypothesis (Backurs, Indyk STOC’15) whereas tree edit distance exhibits the hardness of all pairs shortest paths. Our result provides a matching conditional lower bound for one of the last remaining classic dynamic programming problems.
Karl Bringmann, Pawel Gawrychowski, Shay Mozes, Oren Weimann
ACM Trans. Algorithms2
2020 Submatrix Maximum Queries in Monge and Partial Monge Matrices Are Equivalent to Predecessor Search
abstract
We present an optimal data structure for submatrix maximum queries in n × n Monge matrices. Our result is a two-way reduction showing that the problem is equivalent to the classical predecessor problem in a universe of polynomial size. This gives a data structure of O ( n ) space that answers submatrix maximum queries in O (log log n ) time, as well as a matching lower bound, showing that O (log log n ) query-time is optimal for any data structure of size O ( n polylog( n )). Our result settles the problem, improving on the O (log 2 n ) query time in SODA’12, and on the O (log n ) query-time in ICALP’14. In addition, we show that partial Monge matrices can be handled in the same bounds as full Monge matrices. In both previous results, partial Monge matrices incurred additional inverse-Ackermann factors.
Pawel Gawrychowski, Shay Mozes, Oren Weimann
ACM Trans. Algorithms1
2020 Compressed range minimum queries
Pawel Gawrychowski, Seungbum Jo, Shay Mozes, Oren Weimann
Theor. Comput. Sci.1
2020 Universal reconstruction of a string
Pawel Gawrychowski, Tomasz Kociumaka, Jakub Radoszewski, Wojciech Rytter, Tomasz Walen
Theor. Comput. Sci.1
2019 How to Exploit Periodicity (Invited Talk)
abstract
Periodicity is a fundamental combinatorial property of strings. We say that p is a period of a string s[1..n] when s[i]=s[i+p] for every i such that both s[i] and s[i+p] are defined. While this notion is interesting on its own, it can be often used as a tool for designing efficient algorithms. At a high level, such algorithms often operate differently depending on whether a given string does or does not have a small period, where small usually means smaller than half of its length (or, say, quarter). In other words, we design an algorithm that is efficient if the given string is repetitive, and another algorithm that is efficient if the given string is non-repetitive, in every case carefully exploiting either the periodicity or the fact that input looks sufficiently “random”, and then choose the appropriate algorithm depending on the input. Of course, in some cases, one needs to proceed in a more complex manner, for example by classifying the whole string look at its substrings and process each of them differently depending on its structure. I will survey results, mostly connected to different version of pattern matching, that are based on this paradigm. This will include the recent generalization of periodicity that can be applied in approximate pattern matching, and some examples of how the notion of periodicity can be applied to design a better data structure.
Pawel Gawrychowski
CPM1
2019 Quasi-Periodicity in Streams
abstract
In this work, we show two streaming algorithms for computing the length of the shortest cover of a string of length n. We start by showing a two-pass algorithm that uses O(log^2 n) space and then show a one-pass streaming algorithm that uses O(sqrt{n log n}) space. Both algorithms run in near-linear time. The algorithms are randomized and compute the answer incorrectly with probability inverse-polynomial in n. We also show that there is no sublinear-space streaming algorithm for computing the length of the shortest seed of a string.
Pawel Gawrychowski, Jakub Radoszewski, Tatiana Starikovskaya
CPM1
2019 Streaming Dictionary Matching with Mismatches
Pawel Gawrychowski, Tatiana Starikovskaya
CPM1
2019 Even Faster Elastic-Degenerate String Matching via Fast Matrix Multiplication
abstract
An elastic-degenerate (ED) string is a sequence of n sets of strings of total length N, which was recently proposed to model a set of similar sequences. The ED string matching (EDSM) problem is to find all occurrences of a pattern of length m in an ED text. The EDSM problem has recently received some attention in the combinatorial pattern matching community, and an O(nm^{1.5}sqrt{log m} + N)-time algorithm is known [Aoyama et al., CPM 2018]. The standard assumption in the prior work on this question is that N is substantially larger than both n and m, and thus we would like to have a linear dependency on the former. Under this assumption, the natural open problem is whether we can decrease the 1.5 exponent in the time complexity, similarly as in the related (but, to the best of our knowledge, not equivalent) word break problem [Backurs and Indyk, FOCS 2016]. Our starting point is a conditional lower bound for the EDSM problem. We use the popular combinatorial Boolean matrix multiplication (BMM) conjecture stating that there is no truly subcubic combinatorial algorithm for BMM [Abboud and Williams, FOCS 2014]. By designing an appropriate reduction we show that a combinatorial algorithm solving the EDSM problem in O(nm^{1.5-epsilon} + N) time, for any epsilon>0, refutes this conjecture. Of course, the notion of combinatorial algorithms is not clearly defined, so our reduction should be understood as an indication that decreasing the exponent requires fast matrix multiplication. Two standard tools used in algorithms on strings are string periodicity and fast Fourier transform. Our main technical contribution is that we successfully combine these tools with fast matrix multiplication to design a non-combinatorial O(nm^{1.381} + N)-time algorithm for EDSM. To the best of our knowledge, we are the first to do so.
Giulia Bernardini 0001, Pawel Gawrychowski, Nadia Pisanti, Solon P. Pissis, Giovanna Rosone
ICALP2
2019 Top Tree Compression of Tries
Philip Bille, Pawel Gawrychowski, Inge Li Gørtz, Gad M. Landau, Oren Weimann
ISAAC2
2019 RLE Edit Distance in Near Optimal Time
abstract
We show that the edit distance between two run-length encoded strings of compressed lengths $m$ and $n$ respectively, can be computed in $\mathcal{O}(mn\log(mn))$ time. This improves the previous record by a factor of $\mathcal{O}(n/\log(mn))$. The running time of our algorithm is within subpolynomial factors of being optimal, subject to the standard SETH-hardness assumption. This effectively closes a line of algorithmic research first started in 1993.
Raphaël Clifford, Pawel Gawrychowski, Tomasz Kociumaka, Daniel P. Martin 0001, Przemyslaw Uznanski
MFCS2
2019 Minimal Absent Words in Rooted and Unrooted Trees
Gabriele Fici, Pawel Gawrychowski
SPIRE2
2019 Fast and Longest Rollercoasters
Pawel Gawrychowski, Florin Manea, Radoslaw Serafin
STACS1
2019 Almost optimal distance oracles for planar graphs
abstract
We present new tradeoffs between space and query-time for exact distance oracles in directed weighted planar graphs. These tradeoffs are almost optimal in the sense that they are within polylogarithmic, subpolynomial or arbitrarily small polynomial factors from the naïve linear space, constant query-time lower bound. These tradeoffs include: (i) an oracle with space O(n1+є) and query-time Õ(1) for any constant є>0, (ii) an oracle with space Õ(n) and query-time O(nє) for any constant є>0, and (iii) an oracle with space n1+o(1) and query-time no(1).
Panagiotis Charalampopoulos, Pawel Gawrychowski, Shay Mozes, Oren Weimann
STOC2
2019 Computing quartet distance is equivalent to counting 4-cycles
abstract
The quartet distance is a measure of similarity used to compare two unrooted phylogenetic trees on the same set of n leaves, defined as the number of subsets of four leaves related by a different topology in both trees. After a series of previous results, Brodal et al. [SODA 2013] presented an algorithm that computes this number in O(ndlogn) time, where d is the maximum degree of a node. For the related triplet distance between rooted phylogenetic trees, the same authors were able to design an O(nlogn) time algorithm, that is, with running time independent of d. This raises the question of achieving such complexity for computing the quartet distance, or at least improving the dependency on d.
Bartlomiej Dudek 0001, Pawel Gawrychowski
STOC2
2019 Tight Tradeoffs for Real-Time Approximation of Longest Palindromes in Streams
abstract
We consider computing a longest palindrome in the streaming model, where the symbols arrive one-by-one and we do not have random access to the input. While computing the answer exactly using sublinear space is not possible in such a setting, one can still hope for a good approximation guarantee. Our contribution is twofold. First, we provide lower bounds on the space requirements for randomized approximation algorithms processing inputs of length n. We rule out Las Vegas algorithms, as they cannot achieve sublinear space complexity. For Monte Carlo algorithms, we prove a lower bound of $$\varOmega ( M \log \min \{|\varSigma |,M\})$$ bits of memory; here $$M=n/E$$ for approximating the answer with additive error E, and $$M= \log n/\log (1+\varepsilon )$$ for approximating the answer with multiplicative error $$(1 + \varepsilon )$$ . Second, we design four real-time algorithms for this problem. Three of them are Monte Carlo approximation algorithms for additive error, “small” and “big” multiplicative errors, respectively. Each algorithm uses $$\mathcal {O}(M)$$ words of memory. Thus the obtained lower bounds are asymptotically tight up to a logarithmic factor. The fourth algorithm is deterministic and finds a longest palindrome exactly if it is short. This algorithm can be run in parallel with a Monte Carlo algorithm to obtain better results in practice. Overall, both the time and space complexity of finding a longest palindrome in a stream are essentially settled.
Pawel Gawrychowski, Oleg Merkurev, Arseny M. Shur, Przemyslaw Uznanski
Algorithmica1
2019 Hide and seek with repetitions
Pawel Gawrychowski, Florin Manea, Robert Mercas, Dirk Nowotka
J. Comput. Syst. Sci.1
2018 Slowing Down Top Trees for Better Worst-Case Compression
abstract
We consider the top tree compression scheme introduced by Bille et al. [ICALP 2013] and construct an infinite family of trees on n nodes labeled from an alphabet of size sigma, for which the size of the top DAG is Theta(n/log_sigma n log log_sigma n). Our construction matches a previously known upper bound and exhibits a weakness of this scheme, as the information-theoretic lower bound is Omega(n/log_sigma n}). This settles an open problem stated by Lohrey et al. [arXiv 2017], who designed a more involved version achieving the lower bound. We show that this can be also guaranteed by a very minor modification of the original scheme: informally, one only needs to ensure that different parts of the tree are not compressed too quickly. Arguably, our version is more uniform, and in particular, the compression procedure is oblivious to the value of sigma.
Bartlomiej Dudek 0001, Pawel Gawrychowski
CPM2
2018 Near-Optimal Distance Emulator for Planar Graphs
abstract
Given a graph G and a set of terminals T, a distance emulator of G is another graph H (not necessarily a subgraph of G) containing T, such that all the pairwise distances in G between vertices of T are preserved in H. An important open question is to find the smallest possible distance emulator. We prove that, given any subset of k terminals in an n-vertex undirected unweighted planar graph, we can construct in O~(n) time a distance emulator of size O~(min(k^2,sqrt{k * n})). This is optimal up to logarithmic factors. The existence of such distance emulator provides a straightforward framework to solve distance-related problems on planar graphs: Replace the input graph with the distance emulator, and apply whatever algorithm available to the resulting emulator. In particular, our result implies that, on any unweighted undirected planar graph, one can compute all-pairs shortest path distances among k terminals in O~(n) time when k=O(n^{1/3}).
Hsien-Chih Chang, Pawel Gawrychowski, Shay Mozes, Oren Weimann
ESA2
2018 Edit Distance with Block Operations
abstract
We consider the problem of edit distance in which block operations are allowed, i.e. we ask for the minimal number of (block) operations that are needed to transform a string s to t. We give O(log n) approximation algorithms, where n is the total length of the input strings, for the variants of the problem which allow the following sets of operations: block move; block move and block delete; block move and block copy; block move, block copy, and block uncopy. The results still hold if we additionally allow any of the following operations: character insert, character delete, block reversal, or block involution (involution is a generalisation of the reversal). Previously, algorithms only for the first and last variant were known, and they had approximation ratios O(log n log^*n) and O(log n (log^*n)^2), respectively. The edit distance with block moves is equivalent, up to a constant factor, to the common string partition problem, in which we are given two strings s, t and the goal is to partition s into minimal number of parts such that they can be permuted in order to obtain t. Thus we also obtain an O(log n) approximation for this problem (compared to the previous O(log n log^* n)). The results use a simplification of the previously used technique of locally consistent parsing, which groups short substrings of a string into phrases so that similar substrings are guaranteed to be grouped in a similar way. Instead of a sophisticated parsing technique relying on a deterministic coin tossing, we use a simple one based on a partition of the alphabet into two subalphabets. In particular, this lowers the running time from O(n log^* n) to O(n). The new algorithms (for block copy or block delete) use a similar algorithm, but the analysis is based on a specially tuned combinatorial function on sets of numbers.
Michal Ganczorz, Pawel Gawrychowski, Artur Jez, Tomasz Kociumaka
ESA2
2018 Edit Distance between Unrooted Trees in Cubic Time
abstract
Edit distance between trees is a natural generalization of the classical edit distance between strings, in which the allowed elementary operations are contraction, uncontraction and relabeling of an edge. Demaine et al. [ACM Trans. on Algorithms, 6(1), 2009] showed how to compute the edit distance between rooted trees on $n$ nodes in $\mathcal{O}(n^{3})$ time. However, generalizing their method to unrooted trees seems quite problematic, and the most efficient known solution remains to be the previous $\mathcal{O}(n^{3}\log n)$ time algorithm by Klein [ESA 1998]. Given the lack of progress on improving this complexity, it might appear that unrooted trees are simply more difficult than rooted trees. We show that this is, in fact, not the case, and edit distance between unrooted trees on $n$ nodes can be computed in $\mathcal{O}(n^{3})$ time. A significantly faster solution is unlikely to exist, as Bringmann et al. [SODA 2018] proved that the complexity of computing the edit distance between rooted trees cannot be decreased to $\mathcal{O}(n^{3-ε})$ unless some popular conjecture fails, and the lower bound easily extends to unrooted trees. We also show that for two unrooted trees of size $m$ and $n$, where $m\le n$, our algorithm can be modified to run in $\mathcal{O}(nm^2(1+\log\frac nm))$. This, again, matches the complexity achieved by Demaine et al. for rooted trees, who also showed that this is optimal if we restrict ourselves to the so-called decomposition algorithms.
Bartlomiej Dudek 0001, Pawel Gawrychowski
ICALP2
2018 Improved Bounds for Shortest Paths in Dense Distance Graphs
abstract
We study the problem of computing shortest paths in so-called dense distance graphs. Every planar graph $G$ on $n$ vertices can be partitioned into a set of $O(n/r)$ edge-disjoint regions (called an $r$-division) with $O(r)$ vertices each, such that each region has $O(\sqrt{r})$ vertices (called boundary vertices) in common with other regions. A dense distance graph of a region is a complete graph containing all-pairs distances between its boundary nodes. A dense distance graph of an $r$-division is the union of the $O(n/r)$ dense distance graphs of the individual pieces. Since the introduction of dense distance graphs by Fakcharoenphol and Rao, computing single-source shortest paths in dense distance graphs has found numerous applications in fundamental planar graph algorithms. Fakcharoenphol and Rao proposed an algorithm (later called FR-Dijkstra) for computing single-source shortest paths in a dense distance graph in $O\left(\frac{n}{\sqrt{r}}\log{n}\log{r}\right)$ time. We show an $O\left(\frac{n}{\sqrt{r}}\left(\frac{\log^2{r}}{\log^2\log{r}}+\log{n}\log^ε{r}\right)\right)$ time algorithm for this problem, which is the first improvement to date over FR-Dijkstra for the important case when $r$ is polynomial in $n$. In this case, our algorithm is faster by a factor of $O(\log^2{\log{n}})$ and implies improved upper bounds for such planar graph problems as multiple-source multiple-sink maximum flow, single-source all-sinks maximum flow, and (dynamic) exact distance oracles.
Pawel Gawrychowski, Adam Karczmarz
ICALP1
2018 A Faster Construction of Greedy Consensus Trees
abstract
A consensus tree is a phylogenetic tree that captures the similarity between a set of conflicting phylogenetic trees. The problem of computing a consensus tree is a major step in phylogenetic tree reconstruction. It also finds applications in predicting a species tree from a set of gene trees. This paper focuses on two of the most well-known and widely used oconsensus tree methods: the greedy consensus tree and the frequency difference consensus tree. Given $k$ conflicting trees each with $n$ leaves, the previous fastest algorithms for these problems were $O(k n^2)$ for the greedy consensus tree [J. ACM 2016] and $\tilde O(\min \{ k n^2, k^2n\})$ for the frequency difference consensus tree [ACM TCBB 2016]. We improve these running times to $\tilde O(k n^{1.5})$ and $\tilde O(k n)$ respectively.
Pawel Gawrychowski, Gad M. Landau, Wing-Kin Sung, Oren Weimann
ICALP1
2018 A Faster FPTAS for #Knapsack
abstract
Given a set W = {w_1,..., w_n} of non-negative integer weights and an integer C, the #Knapsack problem asks to count the number of distinct subsets of W whose total weight is at most C. In the more general integer version of the problem, the subsets are multisets. That is, we are also given a set {u_1,..., u_n} and we are allowed to take up to u_i items of weight w_i. We present a deterministic FPTAS for #Knapsack running in O(n^{2.5}epsilon^{-1.5}log(n epsilon^{-1})log (n epsilon)) time. The previous best deterministic algorithm [FOCS 2011] runs in O(n^3 epsilon^{-1} log(n epsilon^{-1})) time (see also [ESA 2014] for a logarithmic factor improvement). The previous best randomized algorithm [STOC 2003] runs in O(n^{2.5} sqrt{log (n epsilon^{-1})} + epsilon^{-2} n^2) time. Therefore, for the case of constant epsilon, we close the gap between the O~(n^{2.5}) randomized algorithm and the O~(n^3) deterministic algorithm. For the integer version with U = max_i {u_i}, we present a deterministic FPTAS running in O(n^{2.5}epsilon^{-1.5}log(n epsilon^{-1} log U)log (n epsilon) log^2 U) time. The previous best deterministic algorithm [TCS 2016] runs in O(n^3 epsilon^{-1}log(n epsilon^{-1} log U) log^2 U) time.
Pawel Gawrychowski, Liran Markin, Oren Weimann
ICALP1
2018 Towards Unified Approximate Pattern Matching for Hamming and L_1 Distance
abstract
Computing the distance between a given pattern of length n and a text of length m is defined as calculating, for every m-substring of the text, the distance between the pattern and the substring. This naturally generalizes the standard notion of exact pattern matching to incorporate dissimilarity score. For both Hamming and L_{1} distance only relatively slow O~(n sqrt{m}) solutions are known for this generalization. This can be overcome by relaxing the question. For Hamming distance, the usual relaxation is to consider the k-bounded variant, where distances exceeding k are reported as infty, while for L_{1} distance asking for a (1 +/- epsilon)-approximation seems more natural. For k-bounded Hamming distance, Amir et al. [J. Algorithms 2004] showed an O~(n sqrt{k}) time algorithm, and Clifford et al. [SODA 2016] designed an O~((m+k^{2})* n/m) time solution. We provide a smooth time trade-off between these bounds by exhibiting an O~((m+k sqrt{m})* n/m) time algorithm. We complement the trade-off with a matching conditional lower bound, showing that a significantly faster combinatorial algorithm is not possible, unless the combinatorial matrix multiplication conjecture fails. We also exhibit a series of reductions that together allow us to achieve essentially the same complexity for k-bounded L_1 distance. Finally, for (1 +/- epsilon)-approximate L_1 distance, the running time of the best previously known algorithm of Lipsky and Porat [Algorithmica 2011] was O(epsilon^{-2} n). We improve this to O~(epsilon^{-1}n), thus essentially matching the complexity of the best known algorithm for (1 +/- epsilon)-approximate Hamming distance.
Pawel Gawrychowski, Przemyslaw Uznanski
ICALP1
2018 Fast Entropy-Bounded String Dictionary Look-Up with Mismatches
abstract
We revisit the fundamental problem of dictionary look-up with mismatches. Given a set (dictionary) of $d$ strings of length $m$ and an integer $k$, we must preprocess it into a data structure to answer the following queries: Given a query string $Q$ of length $m$, find all strings in the dictionary that are at Hamming distance at most $k$ from $Q$. Chan and Lewenstein (CPM 2015) showed a data structure for $k = 1$ with optimal query time $O(m/w + occ)$, where $w$ is the size of a machine word and $occ$ is the size of the output. The data structure occupies $O(w d \log^{1+\varepsilon} d)$ extra bits of space (beyond the entropy-bounded space required to store the dictionary strings). In this work we give a solution with similar bounds for a much wider range of values $k$. Namely, we give a data structure that has $O(m/w + \log^k d + occ)$ query time and uses $O(w d \log^k d)$ extra bits of space.
Pawel Gawrychowski, Gad M. Landau, Tatiana Starikovskaya
MFCS1
2018 Near-Optimal Compression for the Planar Graph Metric
abstract
The Planar Graph Metric Compression Problem is to compactly encode the distances among k nodes in a planar graph of size n. Two naïve solutions are to store the graph using O(n) bits, or to explicitly store the distance matrix with O(k2 log n) bits. The only lower bounds are from the seminal work of Gavoille, Peleg, Prennes, and Raz [SODA’01], who rule out compressions into a polynomially smaller number of bits, for weighted planar graphs, but leave a large gap for unweighted planar graphs. For example, when , the upper bound is O(n) and their constructions imply an Ω(n3/4) lower bound. This gap is directly related to other major open questions in labeling schemes, dynamic algorithms, and compact routing. Our main result is a new compression of the planar graph metric into bits, which is optimal up to log factors. Our data structure circumvents an Õ(k2) lower bound of Krauthgamer, Nguyen, and Zondiner [SIDMA’14] for compression using minors, and the lower bound of Gavoille et al. for compression of weighted planar graphs. This is an unexpected and decisive proof that weights can make planar graphs inherently more complex. Moreover, we design a new Subset Distance Oracle for planar graphs with space, and Õ(n3/4) query time. Our work carries strong messages to related fields. In particular, the famous O(n1/2) vs. Ω(n1/3) gap for distance labeling schemes in planar graphs cannot be resolved with the current lower bound techniques. On the positive side, we introduce the powerful tool of unit-monge to planar graph algorithms.
Amir Abboud, Pawel Gawrychowski, Shay Mozes, Oren Weimann
SODA2
2018 Tree Edit Distance Cannot be Computed in Strongly Subcubic Time (unless APSP can)
abstract
The edit distance between two rooted ordered trees with n nodes labeled from an alphabet Σ is the minimum cost of transforming one tree into the other by a sequence of elementary operations consisting of deleting and relabeling existing nodes, as well as inserting new nodes. Tree edit distance is a well known generalization of string edit distance. The fastest known algorithm for tree edit distance runs in cubic O(n3) time and is based on a similar dynamic programming solution as string edit distance. In this paper we show that a truly subcubic O(n3–ε) time algorithm for tree edit distance is unlikely: For |Σ| = Ω(n), a truly subcubic algorithm for tree edit distance implies a truly subcubic algorithm for the all pairs shortest paths problem. For |Σ| = O(1), a truly subcubic algorithm for tree edit distance implies an O(nk–ε) algorithm for finding a maximum weight k-clique. Thus, while in terms of upper bounds string edit distance and tree edit distance are highly related, in terms of lower bounds string edit distance exhibits the hardness of the strong exponential time hypothesis [Backurs, Indyk STOC’15] whereas tree edit distance exhibits the hardness of all pairs shortest paths. Our result provides a matching conditional lower bound for one of the last remaining classic dynamic programming problems.
Karl Bringmann, Pawel Gawrychowski, Shay Mozes, Oren Weimann
SODA2
2018 Optimal Dynamic Strings
abstract
In this paper, we study the fundamental problem of maintaining a dynamic collection of strings under the following operations: •• make_string – add a string of constant length,•• concat – concatenate two strings,•• split – split a string into two at a given position,•• compare – find the lexicographical order (less, equal, greater) between two strings,•• LCP – calculate the longest common prefix of two strings. We develop a generic framework for dynamizing the recompression method recently introduced by Jeż [J. ACM, 2016]. It allows us to present an efficient data structure for the above problem, where an update requires only O(log n) worst-case time with high probability, with n being the total length of all strings in the collection, and a query takes constant worst-case time. On the lower bound side, we prove that even if the only possible query is checking equality of two strings, either updates or queries must take amortized Ω(log n) time; hence our implementation is optimal.
Pawel Gawrychowski, Adam Karczmarz, Tomasz Kociumaka, Jakub Lacki, Piotr Sankowski
SODA1
2018 Labeling Schemes for Nearest Common Ancestors through Minor-Universal Trees
abstract
Preprocessing a tree for finding the nearest common ancestor of two nodes is a basic tool with multiple applications. Quite a few linear-space constant-time solutions are known and the problem seems to be well-understood. This is however not so clear if we want to design a labeling scheme. In this model, the structure should be distributed: every node receives a distinct binary string, called its label, so that given the labels of two nodes (and no further information about the topology of the tree) we can compute the label of their nearest common ancestor. The goal is to make the labels as short as possible. Alstrup, Gavoille, Kaplan, and Rauhe [Theor. Comput. Syst. 37(3):441–456 2004] showed that O(log n)-bit labels are enough, with a somewhat large constant. More recently, Alstrup, Halvorsen, and Larsen [SODA 2014] refined this to only 2.772 log n, and provided a lower bound of 1.008 log n. We connect the question of designing a labeling scheme for nearest common ancestors to the existence of a tree, called a minor-universal tree, that contains every tree on n nodes as a topological minor. Even though it is not clear if a labeling scheme must be based on such a notion, we argue that all already existing schemes can be reformulated as such. Further, we show that this notion allows us to easily obtain clean and good bounds on the length of the labels. As the main upper bound, we show that 2.318 log n-bit labels are enough. Surprisingly, the notion of a minor-universal tree for binary trees on n nodes has been already used in a different context by Hrubes et al. [CCC 2010], and Young, Chu, and Wong [J. ACM 46(3):416–435, 1999] introduced a very closely related (but not equivalent) notion of a universal tree. On the lower bound side, we show that any minor-universal tree for trees on n nodes must contain at least Ω(n2.174) nodes. This highlights a natural limitation for all approaches based on defining a minor-universal tree. We complement the existential results with a generic transformation that allows us, for any labeling scheme for nearest common ancestors based on a minor-universal tree, to decrease the query time to constant, while increasing the length of the labels only by lower order terms.
Pawel Gawrychowski, Fabian Kuhn, Jakub Lopuszanski, Konstantinos Panagiotou, Pascal Su
SODA1
2018 Voronoi Diagrams on Planar Graphs, and Computing the Diameter in Deterministic Õ(n5/3) Time
abstract
We present an efficient construction of additively weighted Voronoi diagrams on planar graphs. Let G be a planar graph with n vertices and b sites that lie on a constant number of faces. We show how to preprocess G in Õ(nb2) time1 so that one can compute any additively weighted Voronoi diagram for these sites in Õ(b) time. We use this construction to compute the diameter of a directed planar graph with real arc lengths in Õ(n5/3) time. This improves the recent breakthrough result of Cabello (SODA’17), both by improving the running time (from Õ(n11/6)), and by providing a deterministic algorithm. It is in fact the first truly subquadratic deterministic algorithm for this problem. Our use of Voronoi diagrams to compute the diameter follows that of Cabello, but he used abstract Voronoi diagrams, which makes his diameter algorithm more involved, more expensive, and randomized. As in Cabello's work, our algorithm can also compute the Wiener index of a planar graph (i.e., the sum of all pairwise distances) within the same bound. Our construction of Voronoi diagrams for planar graphs is of independent interest. It has already been used to obtain fast exact distance oracles for planar graphs [Cohen-Addad et al., FOCS’17].
Pawel Gawrychowski, Haim Kaplan, Shay Mozes, Micha Sharir, Oren Weimann
SODA1
2018 Better Tradeoffs for Exact Distance Oracles in Planar Graphs
abstract
We present an O(n1.5)-space distance oracle for directed planar graphs that answers distance queries in O(log n) time. Our oracle both significantly simplifies and significantly improves the recent oracle of Cohen-Addad, Dahlgaard and Wulff-Nilsen [FOCS 2017], which uses O(n5/3)-space and answers queries in O(log n) time. We achieve this by designing an elegant and efficient point location data structure for Voronoi diagrams on planar graphs. We further show a smooth tradeoff between space and query-time. For any S ∊ [n, n2], we show an oracle of size S that answers queries in Õ(max{1, n1.5/S}) time. This new tradeoff is currently the best (up to polylogarithmic factors) for the entire range of S and improves by polynomial factors over all previously known tradeoffs for the range S ∊ [n, n5/3].
Pawel Gawrychowski, Shay Mozes, Oren Weimann, Christian Wulff-Nilsen
SODA1
2018 Tighter Bounds and Optimal Algorithms for All Maximal α-gapped Repeats and Palindromes - Finding All Maximal α-gapped Repeats and Palindromes in Optimal Worst Case Time on Integer Alphabets
abstract
An α-gapped repeat (α ≥ 1) in a word w is a factor uvu of w such that |u v| ≤ α|u|; the two occurrences of u are called arms of this α-gapped repeat. An α-gapped repeat is called maximal if its arms cannot be extended simultaneously with the same character to the right nor to the left. We show that the number of all maximal α-gapped repeats occurring in words of length n is upper bounded by 18α n. In the case of α-gapped palindromes, i.e., factors $uv{{u}^{\intercal }}$ with |u v|≤ α|u|, we show that the number of all maximal α-gapped palindromes occurring in words of length n is upper bounded by 28α n + 7n. Both upper bounds allow us to construct algorithms finding all maximal α-gapped repeats and/or all maximal α-gapped palindromes of a word of length n on an integer alphabet of size $n^{\mathcal {O}(1)}$ in ${\mathcal {O}(\alpha n)}$ time. The presented running times are optimal since there are words that have Θ(α n) maximal α-gapped repeats/palindromes.
Pawel Gawrychowski, Tomohiro I, Shunsuke Inenaga, Dominik Köppl, Florin Manea
Theory Comput. Syst.1
2018 Speeding up dynamic programming in the line-constrained k-median
Pawel Gawrychowski, Lukasz Zatorski
Theory Comput. Syst.1
2018 The nearest colored node in a tree
Pawel Gawrychowski, Gad M. Landau, Shay Mozes, Oren Weimann
Theor. Comput. Sci.1
2017 A Family of Approximation Algorithms for the Maximum Duo-Preservation String Mapping Problem
abstract
In the Maximum Duo-Preservation String Mapping problem we are given two strings and wish to map the letters of the former to the letters of the latter as to maximise the number of duos. A duo is a pair of consecutive letters that is mapped to a pair of consecutive letters in the same order. This is complementary to the well-studied Minimum Common String Partition problem, where the goal is to partition the former string into blocks that can be permuted and concatenated to obtain the latter string. Maximum Duo-Preservation String Mapping is APX-hard. After a series of improvements, Brubach [WABI 2016] showed a polynomial-time 3.25-approximation algorithm. Our main contribution is that, for any eps>0, there exists a polynomial-time (2+eps)-approximation algorithm. Similarly to a previous solution by Boria et al. [CPM 2016], our algorithm uses the local search technique. However, this is used only after a certain preliminary greedy procedure, which gives us more structure and makes a more general local search possible. We complement this with a specialised version of the algorithm that achieves 2.67-approximation in quadratic time.
Bartlomiej Dudek 0001, Pawel Gawrychowski, Piotr Ostropolski-Nalewaja
CPM2
2017 Dispersion on Trees
abstract
In the $k$-dispersion problem, we need to select $k$ nodes of a given graph so as to maximize the minimum distance between any two chosen nodes. This can be seen as a generalization of the independent set problem, where the goal is to select nodes so that the minimum distance is larger than 1. We design an optimal $O(n)$ time algorithm for the dispersion problem on trees consisting of $n$ nodes, thus improving the previous $O(n\log n)$ time solution from 1997. We also consider the weighted case, where the goal is to choose a set of nodes of total weight at least $W$. We present an $O(n\log^2n)$ algorithm improving the previous $O(n\log^4 n)$ solution. Our solution builds on the search version (where we know the minimum distance $λ$ between the chosen nodes) for which we present tight $Θ(n\log n)$ upper and lower bounds.
Pawel Gawrychowski, Nadav Krasnopolsky, Shay Mozes, Oren Weimann
ESA1
2017 Optimal Distance Labeling Schemes for Trees
abstract
Labeling schemes seek to assign a short label to each node in a network, so that a function on two nodes (such as distance or adjacency) can be computed by examining their labels alone. For the particular case of trees, following a long line of research, optimal bounds (up to low order terms) were recently obtained for adjacency labeling [FOCS '15], nearest common ancestor labeling [SODA '14], and ancestry labeling [SICOMP '06]. In this paper we obtain optimal bounds for distance labeling. We present labels of size 1/4\log^2n+o(\log^2n), matching (up to low order terms) the recent 1/4\log^2n-\Oh(\log n) lower bound [ICALP '16].
Ofer Freedman, Pawel Gawrychowski, Patrick K. Nicholson, Oren Weimann
PODC2
2017 Sparse Suffix Tree Construction in Optimal Time and Space
abstract
Suffix tree (and the closely related suffix array) are fundamental structures capturing all substrings of a given text essentially by storing all its suffixes in the lexicographical order. In some applications, such as sparse text indexing, we work with a subset of b interesting suffixes, which are stored in the so-called sparse suffix tree. Because the size of this structure is Θ(b), it is natural to seek a construction algorithm using only O(b) words of space assuming read-only random access to the text. We design a linear-time Monte Carlo algorithm for this problem, hence resolving an open question explicitly stated by Bille et al. [TALG 2016]. The best previously known algorithm by I et al. [STACS 2014] works in O(n log b) time. As opposed to previous solutions, which were based on the divide-and-conquer paradigm, our solution proceeds in n/b rounds. In the r-th round, we consider all suffixes starting at positions congruent to r modulo n/b. By maintaining rolling hashes, we can lexicographically sort all interesting suffixes starting at such positions, and then we can merge them with the already considered suffixes. For efficient merging, we also need to answer LCE queries efficiently (and in small space). By plugging in the structure of Bille et al. [CPM 2015] we obtain O(n + b log b) time complexity. We improve this structure by a recursive application of the so-called difference covers, which then implies a linear-time sparse suffix tree construction algorithm. We complement our Monte Carlo algorithm with a deterministic verification procedure. The verification takes time, which improves upon the bound of O(n log b) obtained by I et al. [STACS 2014]. This is obtained by first observing that the pruning done inside the previous solution has a rather clean description using the notion of graph spanners with small multiplicative stretch. Then, we are able to decrease the verification time by applying difference covers twice. Combined with the Monte Carlo algorithm, this gives us an and O(b)-space Las Vegas algorithm.
Pawel Gawrychowski, Tomasz Kociumaka
SODA1
2017 Distinct Squares in Circular Words
Mika Amit, Pawel Gawrychowski
SPIRE2
2017 Optimal Query Time for Encoding Range Majority
Pawel Gawrychowski, Patrick K. Nicholson
WADS1
2016 Faster Longest Common Extension Queries in Strings over General Alphabets
abstract
Longest common extension queries (often called longest common prefix queries) constitute a fundamental building block in multiple string algorithms, for example computing runs and approximate pattern matching. We show that a sequence of q LCE queries for a string of size n over a general ordered alphabet can be realized in O(q log log n + n log* n) time making only O(q + n) symbol comparisons. Consequently, all runs in a string over a general ordered alphabets can be computed in O(n log log n) time making O(n) symbol comparisons. Our results improve upon a solution by Kosolobov (Information Processing Letters, 2016), who designed an algorithm with O(n log^⅔ n) running time and conjectured that O(n) time is possible. Our paper makes a significant progress towards resolving this conjecture. Our techniques extend to the case of general unordered alphabets, when the time increases to O(q log n + n log* n). The main tools are difference covers and a variant of the disjoint-sets data structure by La Poutré (SODA 1990).
Pawel Gawrychowski, Tomasz Kociumaka, Wojciech Rytter, Tomasz Walen
CPM1
2016 The Nearest Colored Node in a Tree
abstract
We start a systematic study of data structures for the nearest colored node problem on trees. Given a tree with colored nodes and weighted edges, we want to answer queries (v,c) asking for the nearest node to node v that has color c. This is a natural generalization of the well-known nearest marked ancestor problem. We give an O(n)-space O(log log n)-query solution and show that this is optimal. We also consider the dynamic case where updates can change a node's color and show that in O(n) space we can support both updates and queries in O(log n) time. We complement this by showing that O(polylog n) update time implies Omega(log n \ log log n) query time. Finally, we consider the case where updates can change the edges of the tree (link-cut operations). There is a known (top-tree based) solution that requires update time that is roughly linear in the number of colors. We show that this solution is probably optimal by showing that a strictly sublinear update time implies a strictly subcubic time algorithm for the classical all pairs shortest paths problem on a general graph. We also consider versions where the tree is rooted, and the query asks for the nearest ancestor/descendant of node v that has color c, and present efficient data structures for both variants in the static and the dynamic setting.
Pawel Gawrychowski, Gad M. Landau, Shay Mozes, Oren Weimann
CPM1
2016 Tight Tradeoffs for Real-Time Approximation of Longest Palindromes in Streams
abstract
We consider computing a longest palindrome in the streaming model, where the symbols arrive one-by-one and we do not have random access to the input. While computing the answer exactly using sublinear space is not possible in such a setting, one can still hope for a good approximation guarantee. Our contribution is twofold. First, we provide lower bounds on the space requirements for randomized approximation algorithms processing inputs of length n. We rule out Las Vegas algorithms, as they cannot achieve sublinear space complexity. For Monte Carlo algorithms, we prove a lower bounds of Omega(M log min {|Sigma|, M}) bits of memory; here M=n/E for approximating the answer with additive error E, and M= log n / log (1 + epsilon) for approximating the answer with multiplicative error (1 + epsilon). Second, we design three real-time algorithms for this problem. Our Monte Carlo approximation algorithms for both additive and multiplicative versions of the problem use O(M) words of memory. Thus the obtained lower bounds are asymptotically tight up to a logarithmic factor. The third algorithm is deterministic and finds a longest palindrome exactly if it is short. This algorithm can be run in parallel with a Monte Carlo algorithm to obtain better results in practice. Overall, both the time and space complexity of finding a longest palindrome in a stream are essentially settled.
Pawel Gawrychowski, Oleg Merkurev, Arseny M. Shur, Przemyslaw Uznanski
CPM1
2016 LZ77 Factorisation of Trees
abstract
We generalise the fundamental concept of LZ77 factorisation from strings to trees. A tree is represented as a collection of edge-disjoint fragments that either consist of one node or has already occurred earlier (in the BFS order). Similarly as for strings, such a collection uniquely determines the tree, so by minimising the number of fragments we obtain a compressed representation of the tree. We show that our generalisation has several useful properties of the standard LZ77 factorisation: it can be computed in polynomial time and its simpler variant in linear time; its size is not larger than the smallest grammar for a tree; it can be transformed (in linear time) into a tree grammar of size O(rg log(n/(rg))), where n is the size of the tree, g the size of the smallest grammar for this tree and r the maximal arity of the nodes in the tree, which matches a recent bound of Jez and Lohrey [STACS 2014], but with a simpler and more modular proof.
Pawel Gawrychowski, Artur Jez
FSTTCS1
2016 Speeding up Dynamic Programming in the Line-Constrained k-median
Pawel Gawrychowski, Lukasz Zatorski
IWOCA1
2016 Brief Announcement: Sublinear-Space Distance Labeling Using Hubs
abstract
A distance labeling scheme is an assignment of bit-labels to the vertices of an undirected, unweighted graph such that the distance between any pair of vertices can be decoded solely from their labels. We propose a series of new labeling schemes within the framework of so-called hub labeling (HL, also known as landmark labeling or 2-hop-cover labeling), in which each node u stores its distance to all nodes from an appropriately chosen set of hubs S(u) ⊆ V. For a queried pair of nodes (u,v), the length of a shortest u--v-path passing through a hub node from S(u)∩S(v) is then used as an upper bound on the distance between u and v.
Pawel Gawrychowski, Adrian Kosowski, Przemyslaw Uznanski
PODC1
2016 Bookmarks in Grammar-Compressed Strings
Patrick Hagge Cording, Pawel Gawrychowski, Oren Weimann
SPIRE2
2016 Efficiently Finding All Maximal alpha-gapped Repeats
abstract
For alpha >=1, an alpha-gapped repeat in a word w is a factor uvu of w such that |uv| <= alpha * |u|; the two occurrences of a factor u in such a repeat are called arms. Such a repeat is called maximal if its arms cannot be extended simultaneously with the same symbol to the right nor to the left. We show that the number of all maximal alpha-gapped repeats occurring in words of length n is upper bounded by 18 * alpha * n, allowing us to construct an algorithm finding all maximal alpha-gapped repeats of a word on an integer alphabet of size n^{O}(1)} in {O}(alpha * n) time. This result is optimal as there are words that have Theta(alpha * n) maximal alpha-gapped repeats. Our techniques can be extended to get comparable results in the case of alpha-gapped palindromes, i.e., factors uvu^{T} with |uv| <= alpha |u|.
Pawel Gawrychowski, Tomohiro I, Shunsuke Inenaga, Dominik Köppl, Florin Manea
STACS1
2016 Sublinear-Space Distance Labeling Using Hubs
Pawel Gawrychowski, Adrian Kosowski, Przemyslaw Uznanski
DISC1
2016 Computing minimal and maximal suffixes of a substring
Maxim A. Babenko, Pawel Gawrychowski, Tomasz Kociumaka, Ignat I. Kolesnichenko, Tatiana Starikovskaya
Theor. Comput. Sci.2
2016 Longest common extensions in trees
Philip Bille, Pawel Gawrychowski, Inge Li Gørtz, Gad M. Landau, Oren Weimann
Theor. Comput. Sci.2
2016 Order-preserving pattern matching with k mismatches
Pawel Gawrychowski, Przemyslaw Uznanski
Theor. Comput. Sci.1
2015 Alphabet-Dependent String Searching with Wexponential Search Trees
Johannes Fischer 0001, Pawel Gawrychowski
CPM2
2015 Longest Common Extensions in Trees
Philip Bille, Pawel Gawrychowski, Inge Li Gørtz, Gad M. Landau, Oren Weimann
CPM2
2015 Encodings of Range Maximum-Sum Segment Queries and Applications
Pawel Gawrychowski, Patrick K. Nicholson
CPM1
2015 Queries on LZ-Bounded Encodings
abstract
We describe a data structure that stores a strings in space similar to that of its Lempel-Ziv encoding and efficiently supports access, rank and select queries. These queries are fundamental for implementing succinct and compressed data structures, such as compressed trees and graphs. We show that our data structure can be built in a scalable manner and is both small and fast in practice compared to other data structures supporting such queries.
Djamal Belazzougui, Travis Gagie, Pawel Gawrychowski, Juha Kärkkäinen, Alberto Ordóñez Pereira, Simon J. Puglisi, Yasuo Tabei
DCC3
2015 Approximating LZ77 via Small-Space Multiple-Pattern Matching
Johannes Fischer 0001, Travis Gagie, Pawel Gawrychowski, Tomasz Kociumaka
ESA3
2015 Longest α-Gapped Repeat and Palindrome
Pawel Gawrychowski, Florin Manea
FCT1
2015 Submatrix Maximum Queries in Monge Matrices Are Equivalent to Predecessor Search
Pawel Gawrychowski, Shay Mozes, Oren Weimann
ICALP (1)1
2015 Optimal Encodings for Range Top- k k , Selection, and Min-Max
Pawel Gawrychowski, Patrick K. Nicholson
ICALP (1)1
2015 Strong Inapproximability of the Shortest Reset Word
Pawel Gawrychowski, Damian Straszak
MFCS (1)1
2015 Wavelet Trees Meet Suffix Trees
abstract
We present an improved wavelet tree construction algorithm and discuss its applications to a number of rank/select problems for integer keys and strings. Given a string of length n over an alphabet of size σ ≤ n, our method builds the wavelet tree in time, improving upon the state-of-the-art algorithm by a factor of . As a consequence, given an array of n integers we can construct in time a data structure consisting of (n) machine words and capable of answering rank/select queries for the subranges of the array in (log n/log log n) time. This is a log log n-factor improvement in query time compared to Chan and Pâtraşcu (SODA 2010) and a -factor improvement in construction time compared to Brodal et al. (Theor. Comput. Sci. 2011). Next, we switch to stringological context and propose a novel notion of wavelet suffix trees. For a string w of length n, this data structure occupies (n) words, takes time to construct, and simultaneously captures the combinatorial structure of substrings of w while enabling efficient top-down traversal and binary search. In particular, with a wavelet suffix tree we are able to answer in (log |x|) time the following two natural analogues of rank/select queries for suffixes of substrings: 1.1) For substrings x and y of w (given by their endpoints) count the number of suffixes of x that are lexicographically smaller than y;2.2) For a substring x of w (given by its endpoints) and an integer k, find the k-th lexicographically smallest suffix of x. We further show that wavelet suffix trees allow to compute a run-length-encoded Burrows-Wheeler transform of a substring X of w (again, given by its endpoints) in (s log |x|) time, where s denotes the length of the resulting run-length encoding. This answers a question by Cormode and Muthukrishnan (SODA 2005), who considered an analogous problem for Lempel-Ziv compression. All our algorithms, except for the construction of wavelet suffix trees, which additionally requires (n) time in expectation, are deterministic and operate in the word RAM model.
Maxim A. Babenko, Pawel Gawrychowski, Tomasz Kociumaka, Tatiana Starikovskaya
SODA2
2015 Tight Bound for the Number of Distinct Palindromes in a Tree
Pawel Gawrychowski, Tomasz Kociumaka, Wojciech Rytter, Tomasz Walen
SPIRE1
2015 Computing the Longest Unbordered Substring
Pawel Gawrychowski, Gregory Kucherov, Benjamin Sach, Tatiana Starikovskaya
SPIRE1
2015 Universal Reconstruction of a String
Pawel Gawrychowski, Tomasz Kociumaka, Jakub Radoszewski, Wojciech Rytter, Tomasz Walen
WADS1
2015 Limit Behavior of the Multi-agent Rotor-Router System
Jérémie Chalopin, Shantanu Das 0001, Pawel Gawrychowski, Adrian Kosowski, Arnaud Labourel, Przemyslaw Uznanski
DISC3
2014 Computing Minimal and Maximal Suffixes of a Substring Revisited
Maxim A. Babenko, Pawel Gawrychowski, Tomasz Kociumaka, Tatiana Starikovskaya
CPM2
2014 Order-Preserving Pattern Matching with k Mismatches
Pawel Gawrychowski, Przemyslaw Uznanski
CPM1
2014 Weighted Ancestors in Suffix Trees
Pawel Gawrychowski, Moshe Lewenstein, Patrick K. Nicholson
ESA1
2014 Improved Submatrix Maximum Queries in Monge Matrices
Pawel Gawrychowski, Shay Mozes, Oren Weimann
ICALP (1)1
2014 Euclidean TSP with Few Inner Points in Linear Space
Pawel Gawrychowski, Damian Rusak
ISAAC1
2014 LZ77-Based Self-indexing with Faster Pattern Matching
Travis Gagie, Pawel Gawrychowski, Juha Kärkkäinen, Yakov Nekrich, Simon J. Puglisi
LATIN2
2014 Testing Generalised Freeness of Words
abstract
Pseudo-repetitions are a natural generalisation of the classical notion of repetitions in sequences: they are the repeated concatenation of a word and its encoding under a certain morphism or antimorphism (anti-/morphism, for short). We approach the problem of deciding efficiently, for a word w and a literal anti-/morphism f, whether w contains an instance of a given pattern involving a variable x and its image under f, i.e., f(x). Our results generalise both the problem of finding fixed repetitive structures (e.g., squares, cubes) inside a word and the problem of finding palindromic structures inside a word. For instance, we can detect efficiently a factor of the form xx^Rxxx^R, or any other pattern of such type. We also address the problem of testing efficiently, in the same setting, whether the word w contains an arbitrary pseudo-repetition of a given exponent.
Pawel Gawrychowski, Florin Manea, Dirk Nowotka
STACS1
2014 Validating the Knuth-Morris-Pratt Failure Function, Fast and Online
abstract
Let $\pi'_{w}$ denote the failure function of the Knuth-Morris-Pratt algorithm for a word w. In this paper we study the following problem: given an integer array $A'[1 \mathinner {\ldotp \ldotp }n]$ , is there a word w over an arbitrary alphabet Σ such that $A'[i]=\pi'_{w}[i]$ for all i? Moreover, what is the minimum cardinality of Σ required? We give an elementary and self-contained $\mathcal{O}(n\log n)$ time algorithm for this problem, thus improving the previously known solution (Duval et al. in Conference in honor of Donald E. Knuth, 2007), which had no polynomial time bound. Using both deeper combinatorial insight into the structure of π′ and advanced algorithmic tools, we further improve the running time to $\mathcal{O}(n)$ .
Pawel Gawrychowski, Artur Jez, Lukasz Jez
Theory Comput. Syst.1
2013 Discovering Hidden Repetitions in Words
Pawel Gawrychowski, Florin Manea, Dirk Nowotka
CiE1
2013 Converting SLP to LZ78 in almost Linear Time
Hideo Bannai, Pawel Gawrychowski, Shunsuke Inenaga, Masayuki Takeda
CPM2
2013 Beating $\mathcal{O}(nm)$ in Approximate LZW-Compressed Pattern Matching
Pawel Gawrychowski, Damian Straszak
ISAAC1
2013 Minimal Discriminating Words Problem Revisited
Pawel Gawrychowski, Gregory Kucherov, Yakov Nekrich, Tatiana Starikovskaya
SPIRE1
2013 Finding Pseudo-repetitions
abstract
Pseudo-repetitions are a natural generalization of the classical notion of repetitions in sequences. We solve fundamental algorithmic questions on pseudo-repetitions by application of insightful combinatorial results on words. More precisely, we efficiently decide whether a word is a pseudo-repetition and find all the pseudo-repetitive factors of a word.
Pawel Gawrychowski, Florin Manea, Robert Mercas, Dirk Nowotka, Catalin Tiseanu
STACS1
2013 Optimal Pattern Matching in LZW Compressed Strings
abstract
We consider the following variant of the classical pattern matching problem: given an uncompressed pattern p [1.. m ] and a compressed representation of a string t [1.. N ], does p occur in t ? When t is compressed using the LZW method, we are able to detect the occurrence in optimal linear time, thus answering a question of Amir et al. [1994]. Previous results implied solutions with complexities O ( n log m + m ) Amir et al. [1994], O ( n + m 1+ε ) [Kosaraju 1995], or (randomized) O ( n log Nn + m ) [Farach and Thorup 1995], where n is the size of the compressed representation of t . Our algorithm is conceptually simple and fully deterministic.
Pawel Gawrychowski
ACM Trans. Algorithms1
2012 Simple and Efficient LZW-Compressed Multiple Pattern Matching
Pawel Gawrychowski
CPM1
2012 A Faster Grammar-Based Self-index
Travis Gagie, Pawel Gawrychowski, Juha Kärkkäinen, Yakov Nekrich, Simon J. Puglisi
LATA2
2012 Faster Algorithm for Computing the Edit Distance between SLP-Compressed Strings
Pawel Gawrychowski
SPIRE1
2012 Tying up the loose ends in fully LZW-compressed pattern matching
abstract
We consider a natural generalization of the classical pattern matching problem: given compressed representations of a pattern p[1..M] and a text t[1..N] of sizes m and n, respectively, does p occur in t? We develop an optimal linear time solution for the case when p and t are compressed using the LZW method. This improves the previously known O((n+m)log(n+m)) time solution of Gasieniec and Rytter, and essentially closes the line of research devoted to tudying LZW-compressed exact pattern matching.
Pawel Gawrychowski
STACS1
2011 Pattern Matching in Lempel-Ziv Compressed Strings: Fast, Simple, and Deterministic
Pawel Gawrychowski
ESA1
2011 Faster Approximate Pattern Matching in Compressed Repetitive Texts
Travis Gagie, Pawel Gawrychowski, Simon J. Puglisi
ISAAC2
2011 On Minimising Automata with Errors
Pawel Gawrychowski, Artur Jez, Andreas Maletti
MFCS1
2011 Optimal pattern matching in LZW compressed strings
abstract
We consider the following variant of the classical pattern matching problem: given an uncompressed pattern s[1 ‥ m] and a compressed representation of a string t[1 ‥ N], does s occur in t? When t is compressed using the LZW method, we are able to detect the occurrence in optimal linear time, thus answering a question of Amir, Benson, and Farach [2]. Previous results implied solutions with complexities O(n log m + m) [2], O(n + m1+ε) [14], or (randomized) [8], where n is the size of the compressed representation of t. Our algorithm is simple and fully deterministic.
Pawel Gawrychowski
SODA1
2011 Chrobak Normal Form Revisited, with Applications
Pawel Gawrychowski
CIAA1
2010 Grammar-Based Compression in a Streaming Model
Travis Gagie, Pawel Gawrychowski
LATA2
2010 On the problem of freeness of multiplicative matrix semigroups
Pawel Gawrychowski, Marin Gutan, Andrzej Kisielewicz 0001
Theor. Comput. Sci.1
2009 Minimax Trees in Linear Time with Applications
Pawel Gawrychowski, Travis Gagie
IWOCA1
2009 Hyper-minimisation Made Efficient
Pawel Gawrychowski, Artur Jez
MFCS1
2008 Finding the Growth Rate of a Regular of Context-Free Language in Polynomial Time
Pawel Gawrychowski, Dalia Krieger, Narad Rampersad, Jeffrey Shallit
Developments in Language Theory1
2008 2-Synchronizing Words
Pawel Gawrychowski, Andrzej Kisielewicz 0001
LATA1
2006 A Combinatorial Approach to Collapsing Words
Alessandra Cherubini, Pawel Gawrychowski, Andrzej Kisielewicz 0001, Brunetto Piochi
MFCS2