L *和Σ*之间的差异

时间:2012-07-30 09:41:57

标签: context-free-grammar automata formal-languages

有人可以解释Σ*L*之间的确切区别 L是一种语言,Σ是语言L的字母表?

谢谢

1 个答案:

答案 0 :(得分:4)

Σ是一组字符。

L是一组字符串。

它最终取决于L的定义方式。如果L = {w |在Σ}中,所有L'字(字符串)都是来自Σ和L *≡Σ*的单个字符。但是,如果L的定义不同(例如下面)L *≠Σ*。

初步说明:您可能还看到ε代表空字符串,而不是λ。符号是可以互换的。

q.f。 http://en.wikipedia.org/wiki/Kleene_star

If V is a set of strings then V* is defined as the smallest superset of
V that contains λ (the empty string) and is closed under the string
concatenation operation.

If V is a set of symbols or characters then V* is the set of all strings
over symbols in V, including the empty string.
     

...

Example of Kleene star applied to set of strings:
    {"ab", "c"}* = {λ, "ab", "c", "abab", "abc", "cab", "cc", "ababab",
                    "ababc", "abcab", "abcc", "cabab", "cabc", "ccab",
                    "ccc", ...}.

请注意,“aa”和“bb”在生成的字符串中不会出现。

Σ*限制性较小:

Example of Kleene star applied to set of characters:
    {'a', 'b', 'c'}* = {λ, "a", "b", "c", "aa", "ab", "ac", "ba", "bb",
                       "bc", "ca", "cb", "cc", ...}. 
相关问题