The Basics

by Jerry Sky

The basics of the Automata Theory.


Based on the book “Introduction to Automata Theory, Languages, and Computation”.


1. Alphabets

An alphabet is a finite, non-empty set of symbols.

1.1. Examples


2. Words (Strings)

A word (string) is a finite sequence of symbols chosen from a given alphabet.

2.1. Examples

2.2. Length of a word

— 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 1101111011 has 2 symbols, but 5 positions, meaning the word is of length 5.

2.3. Powers of an Alphabet

We can define sets of all words of a given length.

Notation: Σk\Sigma^k — all words of length kk with symbols chosen from Σ\Sigma.

The slight confusion about Σ\Sigma and Σ1\Sigma^1: 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 Σ\Sigma notation is used and the context tells whether it’s one or the other.

2.3.1. Notation of set of words of all lengths

2.4. Concatenation

Let xx and yy be words of length nn and mm respectively and be defined as following:

then xy=x1x2xny1y2ym xy = x_1x_2 \dots x_n y_1y_2 \dots y_m

Also, for any word ww: ϵw=wϵ=w \epsilon w = w \epsilon = w


3. Languages

Given an alphabet Σ\Sigma a set LΣL \subseteq \Sigma^* is a language over Σ\Sigma.

A set of some selected words from all possible words over a given Alphabet.

3.1. Examples

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.


4. Problems

In automata theory a problem is the question of deciding whether a given string is a member of some particular language. More precisely, if Σ\Sigma is an alphabet, and LL is a language over Σ\Sigma, them the problem LL is:
Given a string ww in Σ\Sigma^*, decide whether or not ww is in LL.

4.1. Example

Is a given number xx prime? can be expressed as a problem:

Is bin(xx) in the language LpL_p which consists of all prime numbers in their binary string form.