4,020 research outputs found
Random Access to Grammar Compressed Strings
Grammar based compression, where one replaces a long string by a small
context-free grammar that generates the string, is a simple and powerful
paradigm that captures many popular compression schemes. In this paper, we
present a novel grammar representation that allows efficient random access to
any character or substring without decompressing the string.
Let be a string of length compressed into a context-free grammar
of size . We present two representations of
achieving random access time, and either
construction time and space on the pointer machine model, or
construction time and space on the RAM. Here, is the inverse of
the row of Ackermann's function. Our representations also efficiently
support decompression of any substring in : we can decompress any substring
of length in the same complexity as a single random access query and
additional time. Combining these results with fast algorithms for
uncompressed approximate string matching leads to several efficient algorithms
for approximate string matching on grammar-compressed strings without
decompression. For instance, we can find all approximate occurrences of a
pattern with at most errors in time , where is the number of occurrences of in . Finally, we
generalize our results to navigation and other operations on grammar-compressed
ordered trees.
All of the above bounds significantly improve the currently best known
results. To achieve these bounds, we introduce several new techniques and data
structures of independent interest, including a predecessor data structure, two
"biased" weighted ancestor data structures, and a compact representation of
heavy paths in grammars.Comment: Preliminary version in SODA 201
Efficient LZ78 factorization of grammar compressed text
We present an efficient algorithm for computing the LZ78 factorization of a
text, where the text is represented as a straight line program (SLP), which is
a context free grammar in the Chomsky normal form that generates a single
string. Given an SLP of size representing a text of length , our
algorithm computes the LZ78 factorization of in time
and space, where is the number of resulting LZ78 factors.
We also show how to improve the algorithm so that the term in the
time and space complexities becomes either , where is the length of the
longest LZ78 factor, or where is a quantity
which depends on the amount of redundancy that the SLP captures with respect to
substrings of of a certain length. Since where
is the alphabet size, the latter is asymptotically at least as fast as
a linear time algorithm which runs on the uncompressed string when is
constant, and can be more efficient when the text is compressible, i.e. when
and are small.Comment: SPIRE 201
Satisfiability Games for Branching-Time Logics
The satisfiability problem for branching-time temporal logics like CTL*, CTL
and CTL+ has important applications in program specification and verification.
Their computational complexities are known: CTL* and CTL+ are complete for
doubly exponential time, CTL is complete for single exponential time. Some
decision procedures for these logics are known; they use tree automata,
tableaux or axiom systems. In this paper we present a uniform game-theoretic
framework for the satisfiability problem of these branching-time temporal
logics. We define satisfiability games for the full branching-time temporal
logic CTL* using a high-level definition of winning condition that captures the
essence of well-foundedness of least fixpoint unfoldings. These winning
conditions form formal languages of \omega-words. We analyse which kinds of
deterministic {\omega}-automata are needed in which case in order to recognise
these languages. We then obtain a reduction to the problem of solving parity or
B\"uchi games. The worst-case complexity of the obtained algorithms matches the
known lower bounds for these logics. This approach provides a uniform, yet
complexity-theoretically optimal treatment of satisfiability for branching-time
temporal logics. It separates the use of temporal logic machinery from the use
of automata thus preserving a syntactical relationship between the input
formula and the object that represents satisfiability, i.e. a winning strategy
in a parity or B\"uchi game. The games presented here work on a Fischer-Ladner
closure of the input formula only. Last but not least, the games presented here
come with an attempt at providing tool support for the satisfiability problem
of complex branching-time logics like CTL* and CTL+
- …