e01.org

regular language

In theoretical computer science and formal language theory, a regular language (also called a rational language) is a formal language that can be defined by a regular expression, in the strict sense in theoretical computer science (as opposed to many modern regular expression engines, which are augmented with features that allow the recognition of non-regular languages). Alternatively, a regular language can be defined as a language recognised by a finite automaton. The equivalence of regular expressions and finite automata is known as Kleene's theorem (after American mathematician Stephen Cole Kleene). In the Chomsky hierarchy, regular languages are the languages generated by Type-3 grammars.

In theoretical computer science and formal language theory, a regular language (also called a rational language) is a formal language that can be defined by a regular expression, in the strict sense in theoretical computer science (as opposed to many modern regular expression engines, which are augmented with features that allow the recognition of non-regular languages). Alternatively, a regular language can be defined as a language recognised by a finite automaton. The equivalence of regular expressions and finite automata is known as Kleene's theorem (after American mathematician Stephen Cole Kleene). In the Chomsky hierarchy, regular languages are the languages generated by Type-3 grammars. Disjointness: is L A ∩ L B = ? Emptiness: is L A = ? Universality: is L A = Σ * ? Membership: given a ∈ Σ * , is a ∈ L B ? For regular expressions, the universality problem is NP-complete already for a singleton alphabet. For larger alphabets, that problem is PSPACE-complete. If regular expressions are extended to allow also a squaring operator, with "A 2 " denoting the same as "AA", still just regular languages can be described, but the universality problem has an exponential space lower bound, and is in fact complete for exponential space with respect to polynomial-time reduction. For a fixed finite alphabet, the theory of the set of all languages – together with strings, membership of a string in a language, and for each character, a function to append the character to a string (and no other operations) – is decidable, and its minimal elementary substructure consists precisely of regular languages. For a binary alphabet, the theory is called S2S. == Location in the Chomsky hierarchy == To locate the regular languages in the Chomsky hierarchy, one notices that every regular language is context-free. The converse is not true: for example, the language consisting of all strings having the same number of as as bs is context-free but not regular. To prove that a language is not regular, one often uses the Myhill–Nerode theorem and the pumping lemma. Other approaches include using the closure properties of regular languages or quantifying Kolmogorov complexity. Important subclasses of regular languages include: Finite languages, those containing only a finite number of words. These are regular languages, as one can create a regular expression that is the union of every word in the language. Star-free languages, those that can be described by a regular expression constructed from the empty symbol, letters, concatenation and all Boolean operators (see algebra of sets) including complementation but not the Kleene star: this class includes all finite languages. S_L(z) = \sum_{n \ge 0} s_L(n) z^n \ . The generating function of a language L is a rational function if L is regular. Hence for every regular language L the sequence s_L(n)_{n \geq 0} is constant-recursive; that is, there exist an integer constant n_0 , complex constants \lambda_1,\,\ldots,\,\lambda_k and complex polynomials p_1(x),\,\ldots,\,p_k(x) such that for every n \geq n_0 the number s_L(n) of words of length n in L is s_L(n)=p_1(n)\lambda_1^n+\dotsb+p_k(n)\lambda_k^n . Thus, non-regularity of certain languages L' can be proved by counting the words of a given length in L' . Consider, for example, the Dyck language of strings of balanced parentheses. The number of words of length 2n in the Dyck language is equal to the Catalan number C_n\sim\frac{4^n}{n^{3/2}\sqrt{\pi}} , which is not of the form p(n)\lambda^n , witnessing the non-regularity of the Dyck language. Care must be taken since some of the eigenvalues \lambda_i could have the same magnitude. For example, the number of words of length n in the language of all even binary words is not of the form p(n)\lambda^n , but the number of words of even or odd length are of this form; the corresponding eigenvalues are 2,-2 . In general, for every regular language there exists a constant d such that for all a , the number of words of length dm+a is asymptotically C_a m^{p_a} \lambda_a^m . The zeta function of a language L is \zeta_L(z) = \exp \left({ \sum_{n \ge 0} s_L(n) \frac{z^n}{n} }\right) . The zeta function of a regular language is not in general rational, but that of an arbitrary cyclic language is.

References

  1. ^ 4. ⇒ 2. see Hopcroft, Ullman (1979), Theorem 9.1, p.218 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  2. ^ M. Weyer: Chapter 12 - Decidability of S1S and S2S, p. 219, Theorem 12.26. In: Erich Grädel, Wolfgang Thomas, Thomas Wilke (Eds.): Automata, Logics, and Infinite Games: A Guide to Current Research. Lecture Notes in Computer Science 2500, Springer 2002. Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  3. ^ 3. ⇔ 10. by the Myhill–Nerode theorem Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  4. ^ u ~ v is defined as: uw ∈ L if and only if vw ∈ L for all w ∈ Σ * Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  5. ^ 3. ⇔ 11. see the proof in the Syntactic monoid article, and see p. 160 in Holcombe, W.M.L. (1982). Algebraic automata theory . Cambridge Studies in Advanced Mathematics. Vol. 1. Cambridge University Press . ISBN 0-521-60492-3 . Zbl 0489.68046 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  6. ^ Stephen Cole Kleene (Dec 1951). Representation of Events in Nerve Nets and Finite Automata (PDF) (Research Memorandum). U.S. Air Force / RAND Corporation. Here: p.46 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  7. ^ Chomsky 1959, Footnote 10, p.150 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  8. ^ Fellows, Michael R. ; Langston, Michael A. (1991). "Constructivity issues in graph algorithms". In Myers, J. Paul Jr.; O'Donnell, Michael J. (eds.). Constructivity in Computer Science, Summer Symposium, San Antonio, Texas, USA, June 19-22, Proceedings . Lecture Notes in Computer Science. Vol. 613. Springer. pp. 150– 158. doi : 10.1007/BFB0021088 . ISBN 978-3-540-55631-2 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  9. ^ Hopcroft, Ullman (1979), Chapter 3, Exercise 3.4g, p. 72 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  10. ^ Hopcroft, Ullman (1979), Theorem 3.8, p.64; see also Theorem 3.10, p.67 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  11. ^ Check if L A ∩ L B = L A . Deciding this property is NP-hard in general; see File:RegSubsetNP.pdf for an illustration of the proof idea. Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  12. ^ Aho, Hopcroft, Ullman (1974), Exercise 10.14, p.401 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  13. ^ Aho, Hopcroft, Ullman (1974), Theorem 10.14, p399 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  14. ^ Hopcroft, Ullman (1979), Theorem 13.15, p.351 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  15. ^ A.R. Meyer & L.J. Stockmeyer (Oct 1972). The Equivalence Problem for Regular Expressions with Squaring Requires Exponential Space (PDF) . 13th Annual IEEE Symp. on Switching and Automata Theory. pp. 125– 129. Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  16. ^ L. J. Stockmeyer; A. R. Meyer (1973). "Word Problems Requiring Exponential Time". Proc. 5th ann. symp. on Theory of computing (STOC) (PDF) . ACM. pp. 1– 9. Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  17. ^ Hopcroft, Ullman (1979), Corollary p.353 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  18. ^ Weyer, Mark (2002). "Decidability of S1S and S2S" . Automata, Logics, and Infinite Games . Lecture Notes in Computer Science. Vol. 2500. Springer. pp. 207– 230. doi : 10.1007/3-540-36387-4_12 . ISBN 978-3-540-00388-5 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  19. ^ Furst, Merrick; Saxe, James B. ; Sipser, Michael (1984). "Parity, circuits, and the polynomial-time hierarchy". Mathematical Systems Theory . 17 (1): 13– 27. doi : 10.1007/BF01744431 . MR 0738749 . S2CID 14677270 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  20. ^ Cook, Stephen; Nguyen, Phuong (2010). Logical foundations of proof complexity (1. publ. ed.). Ithaca, NY: Association for Symbolic Logic. p. 75. ISBN 978-0-521-51729-4 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  21. ^ Sipser (1997) p.349 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  22. ^ "How to prove that a language is not regular?" . cs.stackexchange.com . Retrieved 10 April 2018 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  23. ^ Eilenberg (1974), p. 16 (Example II, 2.8) and p. 25 (Example II, 5.2). Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  24. ^ Hromkovič, Juraj (2004). Theoretical computer science: Introduction to Automata, Computability, Complexity, Algorithmics, Randomization, Communication, and Cryptography . Springer. pp. 76– 77. ISBN 3-540-14015-8 . OCLC 53007120 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  25. ^ A finite language should not be confused with a (usually infinite) language generated by a finite automaton. Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  26. ^ Volker Diekert; Paul Gastin (2008). "First-order definable languages" (PDF) . In Jörg Flum; Erich Grädel; Thomas Wilke (eds.). Logic and automata: history and perspectives . Amsterdam University Press. ISBN 978-90-5356-576-6 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  27. ^ Flajolet & Sedgweick, section V.3.1, equation (13). Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  28. ^ "Number of words in the regular language $(00)^*$" . cs.stackexchange.com . Retrieved 10 April 2018 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  29. ^ "Proof of theorem for arbitrary DFAs" . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  30. ^ "Number of words of a given length in a regular language" . cs.stackexchange.com . Retrieved 10 April 2018 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  31. ^ Flajolet & Sedgewick (2002) Theorem V.3 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  32. ^ Berstel, Jean; Reutenauer, Christophe (1990). "Zeta functions of formal languages". Trans. Am. Math. Soc . 321 (2): 533– 546. doi : 10.1090/s0002-9947-1990-0998123-x . Zbl 0797.68092 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  33. ^ 1. ⇒ 2. by Thompson's construction algorithm Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  34. ^ Berstel & Reutenauer (2011) p.222 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  35. ^ Straubing, Howard (1994). Finite automata, formal logic, and circuit complexity . Progress in Theoretical Computer Science. Basel: Birkhäuser. p. 8 . ISBN 3-7643-3719-2 . Zbl 0816.68086 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  36. ^ Berstel & Reutenauer (2011) p.47 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  37. ^ Sakarovitch, Jacques (2009). Elements of automata theory . Translated from the French by Reuben Thomas. Cambridge: Cambridge University Press . p. 86. ISBN 978-0-521-84425-3 . Zbl 1188.68177 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  38. ^ 2. ⇒ 1. by Kleene's algorithm or using Arden's lemma Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  39. ^ 2. ⇒ 3. by the powerset construction Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  40. ^ 3. ⇒ 2. since the former definition is stronger than the latter Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  41. ^ 2. ⇒ 4. see Hopcroft, Ullman (1979), Theorem 9.2, p.219 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  42. ^ Jean-Paul Allouche; Jeffrey Shallit (2003). Automatic Sequences: Theory, Applications, Generalizations . Cambridge University Press. p. 129. ISBN 978-0-521-82332-6 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  43. ^ Horst Bunke; Alberto Sanfeliu (January 1990). Syntactic and Structural Pattern Recognition: Theory and Applications . World Scientific. p. 248. ISBN 978-9971-5-0566-0 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  44. ^ Noam Chomsky (1959). "On Certain Formal Properties of Grammars" (PDF) . Information and Control . 2 (2): 137– 167. doi : 10.1016/S0019-9958(59)90362-6 . Here: Definition 8, p.149 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  45. ^ Samuel Eilenberg. Automata, languages, and machines . Academic Press. in two volumes "A" (1974, ISBN 9780080873749 ) and "B" (1976, ISBN 9780080873756 ), the latter with two chapters by Bret Tilson. Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  46. ^ a b c J. Hartmanis, P. L. Lewis II, and R. E. Stearns. Hierarchies of memory-limited computations. Proceedings of the 6th Annual IEEE Symposium on Switching Circuit Theory and Logic Design , pp. 179–190. 1965. Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  47. ^ a b Honkala, Juha (1989). "A necessary condition for the rationality of the zeta function of a regular language" . Theor. Comput. Sci . 66 (3): 341– 347. doi : 10.1016/0304-3975(89)90159-x . Zbl 0675.68034 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  48. ^ a b c Mark V. Lawson (2003). Finite Automata . CRC Press. pp. 98– 103. ISBN 978-1-58488-255-8 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  49. ^ a b Ruslan Mitkov (2003). The Oxford Handbook of Computational Linguistics . Oxford University Press. p. 754. ISBN 978-0-19-927634-9 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  50. ^ Kenneth Rosen (2011). Discrete Mathematics and Its Applications 7th edition . McGraw-Hill Science. pp. 873– 880. Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  51. ^ Sheng Yu (1997). "Regular languages" . In Grzegorz Rozenberg; Arto Salomaa (eds.). Handbook of Formal Languages: Volume 1. Word, Language, Grammar . Springer. p. 41. ISBN 978-3-540-60420-4 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  52. ^ Salomaa (1981) p.27 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  53. ^ Salomaa (1981) p.28 Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
  54. ^ Robert Sedgewick; Kevin Daniel Wayne (2011). Algorithms . Addison-Wesley Professional. p. 794. ISBN 978-0-321-57351-3 . Wikipedia revision 1378659155, retrieved 2026-11-18 · 1794956400.0
source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"regular language". 1791203166. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1378659155

JSON record · API collection · citation policy