English
Related papers

Related papers: Balancing Straight-Line Programs

200 papers

Large language models (LLMs) have shown promising performance across diverse domains. Many practical applications of LLMs, such as code completion and structured data extraction, require adherence to syntactic constraints specified by a…

Machine Learning · Computer Science 2025-08-18 Niels Mündler , Jasper Dekoninck , Martin Vechev

Let $S$ be a string of length $n$ over an alphabet $\Sigma$ and let $Q$ be a subset of $\Sigma$ of size $q \geq 2$. The 'co-occurrence problem' is to construct a compact data structure that supports the following query: given an integer $w$…

Data Structures and Algorithms · Computer Science 2022-11-11 Philip Bille , Inge Li Gørtz , Tord Stordalen

Let G be a context-free grammar (CFG) in Chomsky normal form. We take the number of rules in G to be the size of G. We also assume all CFGs are in Chomsky normal form. We consider the question of, given a string w of length n, what is the…

Formal Languages and Automata Theory · Computer Science 2024-06-04 Lance Fortnow , William Gasarch

General treebank analyses are graph structured, but parsers are typically restricted to tree structures for efficiency and modeling reasons. We propose a new representation and algorithm for a class of graph structures that is flexible…

Computation and Language · Computer Science 2020-06-05 Jonathan K. Kummerfeld , Dan Klein

Algorithms on grammars/transducers with context-free derivations: hypergraph reachability, shortest path, and inside-outside pruning of 'relatively useless' arcs that are unused by any near-shortest paths.

Formal Languages and Automata Theory · Computer Science 2015-02-10 Jonathan Graehl

We analyze how symmetries can be used to compress structures (also known as interpretations) onto a smaller domain without loss of information. This analysis suggests the possibility to solve satisfiability problems in the compressed domain…

Logic in Computer Science · Computer Science 2023-12-15 Pierre Carbonnelle , Gottfried Schenner , Maurice Bruynooghe , Bart Bogaerts , Marc Denecker

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 $\sigma\leq n$, our method builds…

Data Structures and Algorithms · Computer Science 2015-05-18 Maxim Babenko , Paweł Gawrychowski , Tomasz Kociumaka , Tatiana Starikovskaya

We study the classical approximate string matching problem, that is, given strings $P$ and $Q$ and an error threshold $k$, find all ending positions of substrings of $Q$ whose edit distance to $P$ is at most $k$. Let $P$ and $Q$ have…

Data Structures and Algorithms · Computer Science 2011-03-21 Philip Bille

We show how, given a straight-line program with $g$ rules for a binary string $B$ of length $n$, in $O(g^{2 / 3} n^{4 / 3})$ time we can build a linear-space index such that, given $m$ and $c$, in O(1) time we can determine whether there is…

Data Structures and Algorithms · Computer Science 2012-11-16 Travis Gagie

Traditional language processing tools constrain language designers to specific kinds of grammars. In contrast, model-based language specification decouples language design from language processing. As a consequence, model-based language…

Computation and Language · Computer Science 2012-02-03 Luis Quesada , Fernando Berzal , Francisco J. Cortijo

We investigate the global GRAMMAR constraint over restricted classes of context free grammars like deterministic and unambiguous context-free grammars. We show that detecting disentailment for the GRAMMAR constraint in these cases is as…

Artificial Intelligence · Computer Science 2009-06-30 George Katsirelos , Sebastian Maneth , Nina Narodytska , Toby Walsh

We introduce a family of synthetic languages with hierarchical structure -- generated by a broadcast process on trees -- for which the role of context length and reasoning in autoregressive generation can be analyzed precisely. At the heart…

Machine Learning · Computer Science 2026-05-14 Jason Gaitonde , Frederic Koehler , Elchanan Mossel , Joonhyung Shin , Allan Sly

Completeness of a logic program means that the program produces all the answers required by its specification. The cut is an important construct of programming language Prolog. It prunes part of the search space, this may result in a loss…

Logic in Computer Science · Computer Science 2020-01-03 Włodzimierz Drabent

We suggest that straight-line programs designed for algebraic computations should be accompanied by a comprehensive complexity analysis that takes into account both the number of fundamental algebraic operations needed, as well as memory…

Data Structures and Algorithms · Computer Science 2024-04-24 Alice C. Niemeyer , Tomasz Popiel , Cheryl E. Praeger , Daniel Rademacher

We consider a range of simply stated dynamic data structure problems on strings. An update changes one symbol in the input and a query asks us to compute some function of the pattern of length $m$ and a substring of a longer text. We give…

Data Structures and Algorithms · Computer Science 2018-02-20 Raphael Clifford , Allan Grønlund , Kasper Green Larsen , Tatiana Starikovskaya

The reachability problem in multi-pushdown automata (MPDA) has many applications in static analysis of recursive programs. An example is safety verification of multi-threaded recursive programs with shared memory. Since these problems are…

Formal Languages and Automata Theory · Computer Science 2025-12-05 C. Aiswarya , Pascal Baumann , Prakash Saivasan , Lia Schütze , Georg Zetzsche

Decompositional parameters such as treewidth are commonly used to obtain fixed-parameter algorithms for NP-hard graph problems. For problems that are W[1]-hard parameterized by treewidth, a natural alternative would be to use a suitable…

Data Structures and Algorithms · Computer Science 2022-03-01 Cornelius Brand , Esra Ceylan , Christian Hatschka , Robert Ganian , Viktoriia Korchemna

This paper solves an open problem concerning the generative power of nonerasing context-free rewriting systems using a simple mechanism for checking for context dependencies, in the literature known as semi-conditional grammars of degree…

Formal Languages and Automata Theory · Computer Science 2010-04-22 Tomas Masopust

Two formalisms, both based on context-free grammars, have recently been proposed as a basis for a non-uniform random generation of combinatorial objects. The former, introduced by Denise et al, associates weights with letters, while the…

Computation and Language · Computer Science 2012-05-04 Yann Ponty

One of the major open problems in automata and logic is the following: is there an algorithm which inputs a regular tree language and decides if the language can be defined in first-order logic? The goal of this paper is to present this…

Formal Languages and Automata Theory · Computer Science 2017-03-16 Mikołaj Bojańczyk , Henryk Michalewski