Language
Symbol
A symbol is an atomic unit of the language. We usually just use characters starting from or use numbers.
Sentence
A sentence is a sequence of symbols. We usually use as notation for a sentence. That is, for example, .
Language
Language is a set of sentences. Usually noted as .
At Operator
We can use to take the th symbol of sentence , starting from zero. For example,
Vocabulary
A vocabulary is a set of symbols. Usually noted as .
Length of the Sentence
The length of a sentence is how many symbols it has. Noted as for sentence .
Empty Sentence
An empty sentence is a sentence with no words. It is unique and often noted as , .
Concatenation
The concatenation of two sentences and is denoted as .
Prefix and Suffix
is a suffix of if and only if there exists such that, .
is a prefix of if and only if there exists such that, .
Substring
is a substring of if and only if there exists such and that, .
Sentence with Single Symbol
If a sentence has only one symbol, we can use the symbol to denote the sentence. For example, can be a sentence with one symbol .
Repeat
If a sentence is times concatenation to , then we note, .
We define, .
Reverse
is the reverse of sentence , where , but
Concatenation with Vocabulary
If we concatenate a sentence to a vocabulary , it yields a language set.
Language Concatenation
The concatenation of two language and yields a new language, such that every sentence is a concatenation of a sentence in and a sentence in .
Similarly, if the concatenation happens multiple times, we note it as exponentiation.
Vocabulary as Language
We define,
As the corresponding language set of a vocabulary. We still note this language .
Closure
The star closure of a language results in all the possible sentence that can be built by concatenation.
That is,
For positive closure, it removes the empty sentence.