Efficient Enumeration of Regular Languages
نویسندگان
چکیده
The cross-section enumeration problem is to list all words of length n in a regular language L in lexicographical order. The enumeration problem is to list the first m words in L according to radix order. We present an algorithm for the cross-section enumeration problem that is linear in n. We provide a detailed analysis of the asymptotic running time of our algorithm and that of known algorithms for both enumeration problems. We discuss some shortcomings of the enumeration algorithm found in the Grail computation package. In the practical domain, we modify Mäkinen’s enumeration algorithm to get an algorithm that is usually the most efficient in practice. We performed an extensive performance analysis of the new and previously known enumeration and cross-section enumeration algorithms and found when each algorithm is preferable.
منابع مشابه
T F L T C E F L
We survey recent results on the enumeration of formal languages. In particular, we consider enumeration of regular languages accepted by deterministic and nondeterministic finite automata with n states, regular languages generated by regular expressions of a fixed length, and ω-regular languages accepted by Müller automata. We also survey the uncomputability of enumeration of context-free langu...
متن کاملEfficient enumeration of words in regular languages
The cross-section enumeration problem is to list all words of length n in a regular language L in lexicographical order. The enumeration problem is to list the rst m words in L according to radix order. We present an algorithm for the crosssection enumeration problem that is linear in n + t, where t is the output size. We provide a detailed analysis of the asymptotic running time of our algorit...
متن کاملConstant delay algorithms for regular document spanners
Regular expressions and automata models with capture variables are core tools in rule-based information extraction. These formalisms, also called regular document spanners, use regular languages in order to locate the data that a user wants to extract from a text document, and then store this data into variables. Since document spanners can easily generate large outputs, it is important to have...
متن کاملEnumerating Regular Expressions and Their Languages
In this chapter we discuss the problem of enumerating distinct regular expressions bysize and the regular languages they represent. We discuss various notions of the size of a regularexpression that appear in the literature and their advantages and disadvantages. We consider aformal definition of regular expressions using a context-free grammar.We then show how to enumerate stri...
متن کاملOn Lexicographic Enumeration of Regular and Context-Free Languages
We show that it is possible to e ciently enumerate the words of a regular language in lexicographic order. The time needed for generating the next word is O(n) when enumerating words of length n. We also de ne a class of context-free languages for which e cient enumeration is possible.
متن کامل