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.
The operators are used in rewrite rules for generative grammars.
Contents
Definition and notation
Given
define recursively the set
If V is a formal language, then V_{i}, the ith power of the set V, is a shorthand for the concatenation of set V with itself i times. That is, V_{i} can be understood to be the set of all strings that can be represented as the concatenation of i strings in V.
The definition of Kleene star on V is
That is, it is the collection of all possible finitelength strings generated from the symbols in V.
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 V_{0} term in the above union. In other words, the Kleene plus on V is
Additionally, the Kleene Star is used in Optimality Theory.
Examples
Example of Kleene star applied to set of strings:
Example of Kleene star applied to set of characters:
Example of Kleene star applied to the empty set:
Example of Kleene plus applied to the empty set:
Note that for every set L, L ^{+} equals the concatenation of L with L ^{*} . In contrast, L ^{*} can be written as . The operators L ^{+} and L ^{*} describe the same set if and only if the set L under consideration contains the empty word.
Generalization
Full article ▸
