87 research outputs found
Sofic-Dyck shifts
We define the class of sofic-Dyck shifts which extends the class of
Markov-Dyck shifts introduced by Inoue, Krieger and Matsumoto. Sofic-Dyck
shifts are shifts of sequences whose finite factors form unambiguous
context-free languages. We show that they correspond exactly to the class of
shifts of sequences whose sets of factors are visibly pushdown languages. We
give an expression of the zeta function of a sofic-Dyck shift
Recognizing well-parenthesized expressions in the streaming model
Motivated by a concrete problem and with the goal of understanding the sense
in which the complexity of streaming algorithms is related to the complexity of
formal languages, we investigate the problem Dyck(s) of checking matching
parentheses, with different types of parenthesis.
We present a one-pass randomized streaming algorithm for Dyck(2) with space
\Order(\sqrt{n}\log n), time per letter \polylog (n), and one-sided error.
We prove that this one-pass algorithm is optimal, up to a \polylog n factor,
even when two-sided error is allowed. For the lower bound, we prove a direct
sum result on hard instances by following the "information cost" approach, but
with a few twists. Indeed, we play a subtle game between public and private
coins. This mixture between public and private coins results from a balancing
act between the direct sum result and a combinatorial lower bound for the base
case.
Surprisingly, the space requirement shrinks drastically if we have access to
the input stream in reverse. We present a two-pass randomized streaming
algorithm for Dyck(2) with space \Order((\log n)^2), time \polylog (n) and
one-sided error, where the second pass is in the reverse direction. Both
algorithms can be extended to Dyck(s) since this problem is reducible to
Dyck(2) for a suitable notion of reduction in the streaming model.Comment: 20 pages, 5 figure
The descriptive complexity approach to LOGCFL
Building upon the known generalized-quantifier-based first-order
characterization of LOGCFL, we lay the groundwork for a deeper investigation.
Specifically, we examine subclasses of LOGCFL arising from varying the arity
and nesting of groupoidal quantifiers. Our work extends the elaborate theory
relating monoidal quantifiers to NC1 and its subclasses. In the absence of the
BIT predicate, we resolve the main issues: we show in particular that no single
outermost unary groupoidal quantifier with FO can capture all the context-free
languages, and we obtain the surprising result that a variant of Greibach's
``hardest context-free language'' is LOGCFL-complete under quantifier-free
BIT-free projections. We then prove that FO with unary groupoidal quantifiers
is strictly more expressive with the BIT predicate than without. Considering a
particular groupoidal quantifier, we prove that first-order logic with majority
of pairs is strictly more expressive than first-order with majority of
individuals. As a technical tool of independent interest, we define the notion
of an aperiodic nondeterministic finite automaton and prove that FO
translations are precisely the mappings computed by single-valued aperiodic
nondeterministic finite transducers.Comment: 10 pages, 1 figur
Improved Streaming Algorithm for Dyck(s) Recognition
Keeping in mind, that any context free language can be mapped to a subset of Dyck languages and by seeing various
database applications of Dyck, mainly verifying the well-formedness of XML file, we study the randomized streaming
algorithms for the recognition of Dyck(s) languages, with s different types of parenthesis. The main motivation of this
work is well known space bound for any T-pass streaming algorithm is
(√n/T).
Let x be the input stream of length n with maximum height hmax. Here we present a single-pass randomized streaming
algorithms to decide the membership of x in Dyck(s) using Counting Bloomfilter (CBF) with space O (hmax) bits,
ploylog(n) time per letter with two-sided error probability. Two-sided error is because of the false negative and false
positives of counting bloomfilter. This algorithms denies the necessity of streaming reduction of Dyck(s) into Dyck(2),
that reduces the space even further by the factor of O (log s), compared to those uses streaming reduction.
We also present an improved single-pass randomized streaming algorithm for recognizing Dyck(2) with space O (√n)
bits, which is the proven lower bound. Time bound is same polylog(n), as other existing algorithms and error is one-sided.
In this algorithm, we extended the existing approach of periodically compressing stack information. Existing approach
uses two stacks and a linear hash function, instead of this we are using three stacks and same linear hash function to
achieve space lower bound of O (√n).
We also present another single-pass streaming algorithm with O (hmax) space that uses counting bloomfilter and
directly acts on Dyck(s
Low-Latency Sliding Window Algorithms for Formal Languages
Low-latency sliding window algorithms for regular and context-free languages
are studied, where latency refers to the worst-case time spent for a single
window update or query. For every regular language it is shown that there
exists a constant-latency solution that supports adding and removing symbols
independently on both ends of the window (the so-called two-way variable-size
model). We prove that this result extends to all visibly pushdown languages.
For deterministic 1-counter languages we present a
latency sliding window algorithm for the two-way variable-size model where
refers to the window size. We complement these results with a conditional lower
bound: there exists a fixed real-time deterministic context-free language
such that, assuming the OMV (online matrix vector multiplication) conjecture,
there is no sliding window algorithm for with latency
for any , even in the most restricted sliding window model (one-way
fixed-size model). The above mentioned results all refer to the unit-cost RAM
model with logarithmic word size. For regular languages we also present a
refined picture using word sizes , ,
and .Comment: A short version will be presented at the conference FSTTCS 202
- …