|
|
Line 1: |
Line 1: |
| In [[theoretical computer science]], more precisely in the theory of [[formal languages]], the '''star height''' is a measure for the structural complexity
| | Friends contact him Royal Cummins. The preferred pastime for him and his kids is to drive and now he is attempting to make money with it. Interviewing is what she does in her day occupation but quickly her husband and her will begin their personal company. He currently lives in Arizona and his parents live nearby.<br><br>my web blog :: [http://gojocinema.com/profile.php?u=PoThielen gojocinema.com] |
| of [[Regular_expression#Formal_language_theory|regular expressions]]: The star height equals the maximum nesting depth of stars appearing in the regular expression.
| |
| The concept of star height was first defined and studied by Eggan (1963). | |
| | |
| ==Formal definition==
| |
| More formally, the star height of a [[Regular_expression#Formal_language_theory|regular expression]]
| |
| ''E'' over a finite [[alphabet]] ''A'' is inductively defined as follows:
| |
| | |
| * <math>\scriptstyle h\left(\emptyset\right)\,=\,0</math>, <math>\scriptstyle h\left(\varepsilon\right)\,=\,0</math>, and <math>\scriptstyle h\left(a\right)\,=\,0</math> for all alphabet symbols ''a'' in ''A''.
| |
| * <math>\scriptstyle h\left(E F\right)\,=\, h\left(E\, \mid\, F\right)\,=\,\max \left(\, h(E), h(F)\,\right)</math>
| |
| * <math>\scriptstyle h\left(E^*\right)\,=\,h(E)+1.</math>
| |
| | |
| Here, <math>\scriptstyle \emptyset</math> is the special regular expression denoting the empty set and ε the special one denoting the [[empty word]];
| |
| ''E'' and ''F'' are arbitrary regular expressions.
| |
| | |
| The star height ''h''(''L'') of a regular language ''L'' is defined as the minimum star height among all regular expressions representing ''L''.
| |
| The intuition is here that if the language ''L'' has large star height, then it is in some sense inherently complex, since it cannot be described
| |
| by means of an "easy" regular expression, of low star height.
| |
| | |
| ==Examples==
| |
| While computing the star height of a regular expression is easy, determining the star height of a language can be sometimes tricky.
| |
| For illustration, the regular expression
| |
| <!--:''(b ∪ aa<sup>*</sup>b)<sup>*</sup>aa<sup>*</sup>''-->
| |
| :<math>\scriptstyle \left(b\, \mid\, a a^*b\right)^*a a^* </math>
| |
| over the alphabet ''A = {a,b}''
| |
| has star height 2. However, the described language is just the set of all words ending in an ''a'': thus the language can also be described by the expression
| |
| <!--:''(a∪b)<sup>*</sup>a'',-->
| |
| :<math>\scriptstyle (a\, \mid\, b)^*a</math>
| |
| which is only of star height 1. To prove that this language indeed has star height 1, one still needs to rule out that it could be described by a regular
| |
| expression of lower star height. For our example, this can be done by an indirect proof: One proves that a language of star height 0
| |
| contains only finitely many words. Since the language under consideration is infinite, it cannot be of star height 0.
| |
| | |
| The star height of a [[group language]] is computable: for example, the star height of the language over {''a'',''b''} in which the number of occurrences of ''a'' and ''b'' are congruent modulo 2<sup>''n''</sup> is ''n''.<ref name=Sak342>Sakarovitch (2009) p.342</ref>
| |
| | |
| ==Eggan's theorem==
| |
| In his seminal study of the star height of regular languages, {{harvtxt|Eggan|1963}} established a relation between the theories of regular expressions, finite automata, and of [[directed graph]]s. In subsequent years, this relation became known as ''Eggan's theorem'', cf. {{harvtxt|Sakarovitch|2009}}. We recall a few concepts from [[graph theory]] and [[automata theory]].
| |
|
| |
| In graph theory, the [[cycle rank]] ''r''(''G'') of a directed graph ''G'' = (''V'', ''E'') is inductively defined as follows:
| |
| * If ''G'' is acyclic, then ''r''(''G'') = 0.
| |
| * If ''G'' is strongly connected and ''E'' is nonempty, then
| |
| ::<math>r(G) = 1 + \min_{v\in V} r(G-v),\,</math>{{pad|4em}}where G - v is the digraph resulting from deletion of vertex v and all edges beginning or ending at v.
| |
| * If ''G'' is not strongly connected, then ''r''(''G'') is equal to the maximum cycle rank among all strongly connected components of ''G''.
| |
| | |
| In automata theory, a [[nondeterministic finite automaton]] [[nondeterministic finite automaton#Variations of NFA|with ε-moves]] (ε-NFA) is defined as a [[n-tuple|5-tuple]], (''Q'', Σ, ''δ'', ''q<sub>0</sub>'', ''F''), consisting of
| |
| * a finite [[Set (mathematics)|set]] of states ''Q''
| |
| * a finite set of [[input symbol]]s Σ
| |
| * a set of labeled edges ''δ'', referred to as ''transition relation'': ''Q'' × (Σ ∪{ε}) × ''Q''. Here ε denotes the [[empty word]].
| |
| * an ''initial'' state ''q''<sub>0</sub> ∈ ''Q''
| |
| * a set of states ''F'' distinguished as ''accepting states'' ''F'' ⊆ ''Q''.
| |
| A word ''w'' ∈ Σ<sup>*</sup> is accepted by the ε-NFA if there exists a [[directed path]] from the initial state ''q''<sub>0</sub> to some final state in ''F'' using edges from ''δ'', such that the [[concatenation]] of all labels visited along the path yields the word ''w''. The set of all words over Σ<sup>*</sup> accepted by the automaton is the ''language'' accepted by the automaton ''A''.
| |
| | |
| When speaking of digraph properties of a nondeterministic finite automaton ''A'' with state set ''Q'', we naturally address the digraph with vertex set ''Q'' induced by its transition relation. Now the theorem is stated as follows.
| |
|
| |
| :'''Eggan's Theorem''': The star height of a regular language ''L'' equals the minimum [[cycle rank]] among all [[nondeterministic finite automaton]]s [[nondeterministic finite automaton#Variations of NFA|with ε-moves]] accepting ''L''. | |
| | |
| Proofs of this theorem are given by {{harvtxt|Eggan|1963}}, and more recently by {{harvtxt|Sakarovitch|2009}}.
| |
| | |
| ==Generalized star height==
| |
| The above definition assumes that regular expressions are built from the elements of the alphabet ''A''
| |
| using only the standard operators [[set union]], [[concatenation]], and [[Kleene star]]. ''Generalized regular expressions'' are defined just as regular expressions, but here also the [[set complement]] operator is allowed
| |
| (the complement is always taken with respect to the set of all words over A). If we alter the definition such that taking complements does not increase the star height, that is,
| |
| | |
| :<math>\scriptstyle h\left(E^c\right)\,=\,h(E)</math>
| |
| | |
| we can define the '''generalized star height''' of a regular language ''L'' as the minimum star height among all ''generalized'' regular expressions
| |
| representing ''L''.
| |
| | |
| Note that, whereas it is immediate that a language of (ordinary) star height 0 can contain only finitely many words, there exist infinite
| |
| languages having generalized star height 0. For instance, the regular expression
| |
| :<math>\scriptstyle (a\, \mid\, b)^*a,</math>
| |
| which we saw in the example above, can be equivalently described by the generalized regular expression
| |
| :<math>\scriptstyle \emptyset^c a</math>, | |
| since the complement of the empty set is precisely the set of all words over ''A''. Thus the set of all words over the alphabet ''A'' ending in the letter ''a'' has star height one, while its
| |
| generalized star height equals zero.
| |
| | |
| Languages of generalized star height zero are also called [[star-free language]]s. It can be shown that a language ''L'' is star-free if and only if its [[syntactic monoid]] is [[aperiodic monoid|aperiodic]] ({{harvtxt|Schützenberger|1965}}).
| |
| | |
| ==See also==
| |
| *[[Star height problem]]
| |
| *[[Generalized star height problem]].
| |
| | |
| ==References==
| |
| {{reflist}}
| |
| * {{ Citation | first=Lawrence C. |last=Eggan |title=Transition graphs and the star-height of regular events | journal=[[Michigan Mathematical Journal]] | volume=10 | issue=4 | pages= 385–397 | year= 1963 | doi=10.1307/mmj/1028998975 }}
| |
| * {{Citation | author=Schützenberger M.P. |authorlink=Marcel-Paul Schützenberger | title=On finite monoids having only trivial subgroups | journal=[[Information and Control]]| year=1965| volume=8 | issue=2 | pages=190–194 | doi=10.1016/S0019-9958(65)90108-7 | zbl=0131.02001 | issn=0019-9958 }}
| |
| * {{Citation | last=Cohen | first=Rina S. | title=Techniques for establishing star height of regular sets | journal=[[Theory of Computing Systems]] | issn=1432-4350 | volume=5 | issue=2 |year=1971 |doi=10.1007/BF01702866 | pages=97–114 | zbl=0218.94028 }}
| |
| * {{Citation | journal=[[Journal of Computer and System Sciences]] | volume= 4 | issue=3 | year=1970 | pages= 260–280 | doi=10.1016/S0022-0000(70)80024-1 | title=General properties of star height of regular events| first1=Rina S. |last1=Cohen | first2=J.A. |last2=Brzozowski | zbl=0245.94038| issn=0022-0000 }}
| |
| * {{Citation | last=Sakarovitch | first=Jacques | title=Elements of automata theory | others=Translated from the French by Reuben Thomas | location=Cambridge | publisher=[[Cambridge University Press]] | year=2009 | isbn=978-0-521-84425-3 | zbl=1188.68177 }}
| |
| * {{Citation | zbl=0487.68064 | last=Salomaa | first=Arto | authorlink=Arto Salomaa | title=Jewels of formal language theory | location=Rockville, Maryland | publisher=Computer Science Press | year=1981 | isbn=0-914894-69-2 }}
| |
| | |
| [[Category:Formal languages]]
| |