Definieren Sie in einer gegebenen Sprache L
Welche Mengen von Ganzzahlen können die Längenmengen einer regulären Sprache sein?
Definieren Sie in einer gegebenen Sprache L
Welche Mengen von Ganzzahlen können die Längenmengen einer regulären Sprache sein?
Antworten:
Zunächst eine Beobachtung, die nicht entscheidend, aber zweckmäßig ist: Die Menge S
Deshalb suchen wir nach den möglichen Längenmengen für Wörter über einem Singleton-Alphabet. In einem Singleton-Alphabet ist die Sprache die Länge, die in Unary geschrieben ist: L S ( L ) = { n ∈ N ∣ a n ∈ L }
Sei L
Sei F
L S ( L ) = F ∪ { kr + x ∣ x ∈ G , k ∈ N }
Umgekehrt seien h
In englischer Sprache sind die Längenmengen regulärer Sprachen die Mengen ganzer Zahlen, die oberhalb eines bestimmten Wertes periodisch¹ sind .
¹
Zum Aufhängen auf einen gut etablierten Begriff , periodische Mittel die charakteristische Funktion des Satzes (der eine Funktion ist N → { f ein l s e , t r u e }
Any finite subset {ℓ1,…,ℓn}⊂N
Now for the infinite sets. I'll give a short analysis, though the final answer might not be explicit enough. I won't elaborate unless you ask me to, because I think it's intuitive and because I don't have much time now.
Let r1,r2
Thus, the possible sets of integers that can be the length-set of a regular language are the ones that are finite subsets of N
Here, we are using that regular languages are built, by definition, by applying the rules for constructing a regular expression a finite number of times. Note that we can start with any finite subset of N
According to the pumping lemma for regular languages, there exists an n
This gives us one test for sets: a set cannot be the length set of a regular language unless all its elements can be expressed as some arbitrary set of integers no greater than a fixed n
In other words, it looks like the possible sets of language lengths for regular languages is the closure with respect to set union (as discussed under EDIT and EDIT2, thanks to commenters) of sets described as follows: {a+bn|n∈N}∪S
EDIT: A little more discussion. Certainly all finite sets of integers are length sets. Also, the union of two length sets must also be a length set, as must be the complement of any length set (hence intersection, hence difference). The reason for this is that the regular languages are closed under these operations. Therefore, the answer I give above is (possibly) incomplete; in reality, any union of such sets is also the length set of some regular language (note that I have abandoned requiring intersection, complement, difference, etc., since these are covered by the fact that regular languages are closed under these properties, as discussed in EDIT3; I think that only union is actually necessary, even if the others are right, which might not be the case).
EDIT2: Even more discussion. The answer I give is basically where you'd end up if you took Janoma's answer a little further; the bn
EDIT3: In light of Janoma's comment, let's forget closure properties of language length sets that I discuss in the first EDIT. Since the regular languages have these closure properties, and since every regular language has a DFA, it follows that the pumping lemma for regular languages applies to all unions, intersections, complements, and differences of regular languages, and we'll leave it at that; no need to even consider any of these, except union, which I still think might be necessary to make my original (modified, thanks to input from Gilles) correct. So, my final answer is this: what I say in the original version, plus the closure of language length sets with respect to set union.