Deleted:Kleene star

From WikiAlpha
Revision as of 00:32, 28 November 2011 by SaveArticleBot (Talk | contribs) (Via SaveArticle)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
The below content is licensed according to Creative Commons Attribution-ShareAlike License contrary to the public domain logo at the foot of the page. It originally appeared on http://en.wikipedia.org. The original article might still be accessible here. You may be able to find a list of the article's previous contributors on the talk page.

In mathematical logic and computer science, the Kleene star (or Kleene operator or Kleene closure) is a unary operation, either on sets of strings or on sets of symbols or characters. The application of the Kleene star to a set V is written as V*. It is widely used for regular expressions, which is the context in which it was introduced by Stephen Kleene to characterise certain automata, where it means "zero or more".
  1. 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. This set can also be described as the set of strings that can be made by concatenating zero or more strings from V.
  2. 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.

That is, V* is the collection of all possible finite-length strings generated from the strings in V.

The operators are used in rewrite rules for generative grammars.

Definition and notation

Given

<math> V_0=\{\lambda\}\,</math>

define recursively the set

<math> V_{i+1}=\{wv \mid w\in V_i \mbox{ and } v \in V\}\,</math> where <math>i \ge 0\,.</math>

If V is a formal language, then V<sub>i</sub>, the i-th power of the set V, is a shorthand for the concatenation of set V with itself i times. That is, V<sub>i</sub> can be understood to be the set of all strings that can be represented as the concatenation of i strings in <math>V</math>.

The definition of Kleene star on V is

<math> V^*=\bigcup_{i \in \N}V_i = \left \{\lambda \right\} \cup V_1 \cup V_2 \cup V_3 \cup \ldots.</math>

Additionally, the Kleene Star is used in Optimality Theory.

Kleene plus

In some formal language studies, (e.g. AFL Theory) a variation on the Kleene star operation called the Kleene plus is used. The Kleene plus omits the <math>V_0</math> term in the above union. In other words, the Kleene plus on <math>V</math> is <math> V^+=\bigcup_{i \in \N \setminus \{0\}}\!\!\!\! V_i = V_1 \cup V_2 \cup V_3 \cup \ldots.</math>

Examples

Example of Kleene star applied to set of strings:

{"ab", "c"}* = {&lambda;, "ab", "c", "abab", "abc", "cab", "cc", "ababab", "ababc", "abcab", "abcc", "cabab", "cabc", "ccab", "ccc", ...}.

Example of Kleene star applied to set of characters:

{'a', 'b', 'c'}* = {&lambda;, "a", "b", "c", "aa", "ab", "ac", "ba", "bb", "bc", "ca", "cb", "cc", ...}.

Example of Kleene star applied to the empty set:

<math>\varnothing ^* =\{\lambda\}.</math>

Example of Kleene plus applied to the empty set:

<math>\varnothing ^+ = \varnothing \varnothing ^* =\{\}= \varnothing. </math>

Note that for every set L, <math>L^+</math> equals the concatenation of L with <math>L^*</math>. In contrast, <math>L^*</math> can be written as <math>\{\lambda\} \cup L^+</math>. The operators <math>L^+</math> and <math>L^*</math> describe the same set if and only if the set L under consideration contains the empty word.

Generalization

Strings form a monoid with concatenation as the binary operation and λ the identity element. The Kleene star is defined for any monoid, not just strings. More precisely, let <math>(M, \cdot)</math> be a monoid, and <math>S \subseteq M</math>. Then <math>S^*</math> is the smallest submonoid of <math>M</math> containing <math>S</math> ; that is, <math>S^*</math> contains the neutral element of <math>M</math>, the set <math>S</math>, and is such that if <math>x,y \in S^*</math>, then <math>x \cdot y \in S^*</math>.

See also

References

The definition of Kleene star is found in virtually every textbook on automata theory. A standard reference is the following:

bs:Kleeneov operator ca:Clausura de Kleene de:Kleenesche und positive Hülle el:Αστέρι Κλέινι es:Clausura de Kleene fa:ستاره کلین fr:Fermeture de Kleene hr:Kleeneov operator it:Star di Kleene ms:Bintang Kleene nl:Kleene-ster ja:クリーネ閉包 pl:Domknięcie Kleene'ego pt:Fecho de Kleene ro:Închidere Kleene ru:Звезда Клини sr:Клинијево затворење fi:Kleenen tähti uk:Зірочка Кліні zh:克莱尼星号