BETA ZEN
Star-free language
Texto da Wikipédia (en), licença CC BY-SA. O BETARUBI mostra o verbete inteiro nesta página — a leitura não continua fora do site.
In theoretical computer science and formal language theory, a regular language is said to be star-free if it can be described by a regular expression constructed from the letters of the alphabet, the empty word, the empty set symbol, all boolean operators – including complementation – and concatenation but no Kleene star.[1] The condition is equivalent to having generalized star height zero.
It turns out some class of transformers exactly corresponds to star-free languages[2].
Examples
All finite languages are star-free. But no having stars does not mean that we are stuck to finite languages. Indeed, we can use the complementation to build infinite languages. Actually, the language of all finite words over an alphabet is star-free because it is the complement of the empty set, .
Then, the language of words over the alphabet that do not have consecutive a's can be defined as , first constructing the language of words consisting of with an arbitrary prefix and suffix, and then taking its complement, which must be all words which do not contain the substring .
An example of a regular language which is not star-free is ,[3] i.e. the language of strings consisting of an even number of "a". However, for where , the language can be defined as , taking the set of all words and removing from it words starting with , ending in or containing or . However, when , this definition does not create .
Characterisations
Via aperiod syntact monoids
Marcel-Paul Schützenberger characterized star-free languages as those with aperiodic syntactic monoids.[4][5] Said differently, they are characterised as languages accepted by some aperiodic finite-state automaton (known as counter-free languages)[6].
Logical characterisation
They can also be characterized logically as languages definable in FO[<], the first-order logic over the natural numbers with the less-than relation[7]. First-order variables denote positions in words and < means that a position is strictly before another one. Here are some examples.
- The language (all words) is captured by the tautology (no constraints on the words)
- The language of that have no consecutive a's is defined by the FO[<] formula meaning for all positions and , if contains letter and if is the position after ( is after but there is no positions in between and ), then there is does not contain letter .
They can also be characterized by formulas in linear temporal logic.[8] Here are some examples.
- Again, The language is captured by the tautology
- The language of that have no consecutive a's is defined by the formula in linear temporal logic where is the meaning is as follows: always (operator ), if there is letter then at the next step (operator ) there is no letter .
Algorithms
Membership
All star-free languages are in uniform AC0. More precisely, given a star-free language , deciding whether a word belongs to is in uniform AC0.
Non-emptiness
It takes non-elementary time to decide whether a star-free language over two letters is empty. More precisely, the non-emptiness problem of starfree language is defined as follows.
- Input: a string in the symbols of , empty set, concatenation, union, intersection, and complement.
- Output: Whether this language contains any element.
This problem is decidable, but only in nonelementary time. As immediate corollaries, it is decidable but nonelementary to decide whether two starfree languages are equal, are disjoint, or contain one another.[9]
See also
Notes
- ↑ Lawson (2004) p.235
- ↑ Yang, Andy; Chiang, David; Angluin, Dana (2024-12-16). "Masked Hard-Attention Transformers Recognize Exactly the Star-Free Languages". Advances in Neural Information Processing Systems. 37: 10202–10235. doi:10.52202/079017-0327.
- ↑ Arto Salomaa (1981). Jewels of Formal Language Theory. Computer Science Press. p. 53. ISBN 978-0-914894-69-8.
- ↑ Marcel-Paul Schützenberger (1965). "On finite monoids having only trivial subgroups" (PDF). Information and Computation. 8 (2): 190–194. doi:10.1016/s0019-9958(65)90108-7.
- ↑ Lawson (2004) p.262
- ↑ McNaughton, Robert; Papert, Seymour (1971). Counter-free Automata. Research Monograph. Vol. 65. With an appendix by William Henneman. MIT Press. ISBN 0-262-13076-9. Zbl 0232.94024.
- ↑ Straubing, Howard (1994). Finite automata, formal logic, and circuit complexity. Progress in Theoretical Computer Science. Basel: Birkhäuser. p. 79. ISBN 3-7643-3719-2. Zbl 0816.68086.
- ↑ Kamp, Johan Antony Willem (1968). Tense Logic and the Theory of Linear Order. University of California at Los Angeles (UCLA).
- ↑ Stockmeyer, Larry Joseph (1974). The complexity of decision problems in automata theory and logic (PhD thesis). Massachusetts Institute of Technology.
References
- Lawson, Mark V. (2004). Finite automata. Chapman and Hall/CRC. ISBN 1-58488-255-7. Zbl 1086.68074.
- Diekert, Volker; Gastin, Paul (2008). "First-order definable languages". In Jörg Flum; Erich Grädel; Thomas Wilke (eds.). Logic and automata: history and perspectives (PDF). Amsterdam University Press. ISBN 978-90-5356-576-6.
