The basics of the Automata Theory.
Based on the book “Introduction to Automata Theory, Languages, and Computation”.
An alphabet is a finite, non-empty set of symbols.
[insert a set of all ASCII characters]
A word (string) is a finite sequence of symbols chosen from a given alphabet.
— the number of positions for symbols in a given word
Distinction between the expressions ‘the number of symbols’ and ‘the number of positions’:
the word has 2 symbols, but 5 positions, meaning the word is of length 5.
We can define sets of all words of a given length.
Notation: — all words of length with symbols chosen from .
The slight confusion about and : the difference is in the semantics — the former is an Alphabet whilst the latter is the set of all words of length equal to one.
However, usually the notation is used and the context tells whether it’s one or the other.
Let and be words of length and respectively and be defined as following:
then
Also, for any word :
Given an alphabet a set is a language over .
A set of some selected words from all possible words over a given Alphabet.
The only important constraint on what can be a language is that all alphabets are finite. Thus languages, although they can have an infinite number of strings, are restricted to consist of strings drawn from one fixed, finite alphabet.
In automata theory a problem is the question of deciding whether a given string is a member of some particular language. More precisely, if is an alphabet, and is a language over , them the problem is:
Given a string in , decide whether or not is in .
Is a given number prime? can be expressed as a problem:
Is bin(
)
in the language which consists of all prime numbers in their binary string form.