Kleene star
Unary operation on string sets / From Wikipedia, the free encyclopedia
Dear Wikiwand AI, let's keep it short by simply answering these key questions:
Can you list the top facts and stats about Kleene star?
Summarize this article for a 10 year old
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. In mathematics, it is more commonly known as the free monoid construction. The application of the Kleene star to a set is written as . It is widely used for regular expressions, which is the context in which it was introduced by Stephen Kleene to characterize certain automata, where it means "zero or more repetitions".
- If is a set of strings, then is defined as the smallest superset of that contains the empty string and is closed under the string concatenation operation.
- If is a set of symbols or characters, then is the set of all strings over symbols in , including the empty string .
The set can also be described as the set containing the empty string and all finite-length strings that can be generated by concatenating arbitrary elements of , allowing the use of the same element multiple times. If is either the empty set ∅ or the singleton set , then ; if is any other finite set or countably infinite set, then is a countably infinite set.[1] As a consequence, each formal language over a finite or countably infinite alphabet is countable, since it is a subset of the countably infinite set .
The operators are used in rewrite rules for generative grammars.