Введение
Унарная операция над множествами строк
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. 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.
В математической логике и информатике звезда Клине (или оператор Клине, или замыкание Клине) — это унарная операция, применяемая либо к множествам строк, либо к множествам символов или знаков. В математике она чаще известна как построение свободного моноида. Применение звезды Клине к множеству записывается как . Она широко используется в регулярных выражениях, в контексте которых она была введена Стивеном Клине для описания определенных автоматов, где она означает «ноль или более повторений». Если — множество строк, то определяется как наименьшее надмножество , содержащее пустую строку и замкнутое относительно операции конкатенации строк. Если — множество символов или знаков, то — это множество всех строк, составленных из символов из , включая пустую строку.
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. 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.
Множество также можно описать как множество, содержащее пустую строку и все строки конечной длины, которые могут быть сгенерированы конкатенацией произвольных элементов , допускающей многократное использование одного и того же элемента. Если является либо пустым множеством ∅, либо одноэлементным множеством { }, то ; если — любое другое конечное или счетно бесконечное множество, то — счетно бесконечное множество. Как следствие, каждый формальный язык над конечным или счетно бесконечным алфавитом счётен, поскольку он является подмножеством счётного бесконечного множества .
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. 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.
Эти операторы используются в правилах переписывания для порождающих грамматик.
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. 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.
Обобщение
Строки образуют моноид с конкатенацией в качестве бинарной операции и ε в качестве нейтрального элемента. Звезда Клине определяется для любого моноида, а не только для строк. Более точно, пусть (M, ⋅) – моноид, а S ⊆ M. Тогда S* является наименьшим субмоноидом M, содержащим S; то есть, S* содержит нейтральный элемент M, множество S, и таким образом, если x, y ∈ S*, то x ⋅ y ∈ S*. Более того, звезда Клине обобщается путем включения операции * (и объединения) в саму алгебраическую структуру посредством понятия полного звездного полукольца.