Lesson

Glossary of Concepts and Symbols

Definitions and notation for alphabets, words, languages and finite automata, linked to explanations and practice.

Last updated:


Using the glossary

This glossary covers the concepts and notation of words and languages, deterministic finite automata and their combination.
Each entry links to the section that explains the concept, with examples.

Alphabet

Σ\Sigma

A finite, nonempty set of symbols, such as {a,b}\{a,b\} or {0,1}\{0,1\}⁠.

Explained in the section “Alphabet and words”.

Word (string)

w∈Σ∗w\in\Sigma^*

A finite sequence of symbols from the alphabet. Its length ∣w∣|w| is the number of symbols.

Explained in the section “Alphabet and words”.

Empty word

ε\varepsilon

The word with no symbols, of length 00⁠. It is a word, unlike the empty language, which has no words.

Explained in the section “Alphabet and words”.

Length of a word

∣w∣|w|

The number of letters in the word, defined by recursion on the last letter:
∣ε∣=0|\varepsilon|=0 and ∣ua∣=∣u∣+1|ua|=|u|+1⁠. For example ∣abb∣=3|abb|=3⁠.

Explained in the section “The length of a word”.

Letter count

#a(w)\#_a(w)

The number of occurrences of the letter aa in the word ww⁠.
For example #b(abb)=2\#_b(abb)=2 and #a(abb)=1\#_a(abb)=1⁠.

Explained in the section “Counting a letter”.

Concatenation

uvuv

Placing one word right after another (also written u⋅vu\cdot v⁠); for languages, also written L1⋅L2L_1\cdot L_2 or L1∘L2L_1\circ L_2⁠:
L1L2={uv∣u∈L1,v∈L2}L_1L_2=\{uv\mid u\in L_1,v\in L_2\}⁠. Order matters.

Explained in the section “Concatenation of words”.

Power

wn, Lnw^n,\ L^n

wnw^n is the word ww repeated nn times: w0=εw^0=\varepsilon and wn=wn−1⋅ww^n=w^{n-1}\cdot w⁠, for example (ab)3=ababab(ab)^3=ababab⁠.
In the same way LnL^n is the concatenation of nn languages equal to LL⁠, with L0={ε}L^0=\{\varepsilon\}⁠.

Explained in the section “Powers of a word”.

Reversal

wRw^R

The word ww written from end to start: εR=ε\varepsilon^R=\varepsilon and (ua)R=a⋅uR(ua)^R=a\cdot u^R⁠, for example (abb)R=bba(abb)^R=bba⁠.
It holds that (uv)R=vRuR(uv)^R=v^Ru^R⁠.

Explained in the section “The reverse of a word”.

Formal language

L⊆Σ∗L\subseteq\Sigma^*

Any set of words over an alphabet, finite or infinite.

Explained in the section “What is a formal language”.

Union, intersection, difference, symmetric difference and complement of languages

L1∪L2, L1∩L2, L1−L2L_1\cup L_2,\ L_1\cap L_2,\ L_1-L_2

L1△L2, LCL_1\triangle L_2,\ L^C

Languages are sets of words, so the set operations apply: the words in at least one language, in both, in the first but not the second, in exactly one, and (for the complement) the words of Σ∗\Sigma^* that are not in the language.

Explained in the section “Languages are sets, so set operations apply”.

Kleene star

L∗L^*

All concatenations of any number of words of LL⁠, including none, so ε∈L∗\varepsilon\in L^* always.

Explained in the section “Operations that build languages from languages”.

Positive closure (plus)

L+L^+

All concatenations of one or more words of LL⁠: L+=⋃n=1∞Ln=L∪L2∪L3∪⋯L^+=\bigcup_{n=1}^{\infty}L^n=L\cup L^2\cup L^3\cup\cdots⁠. Unlike L∗L^*⁠, the word ε\varepsilon belongs to L+L^+ only if it belongs to LL⁠.

Explained in the section “Operations that build languages from languages”.

Predicate

P(w)P(w)

A statement about a word ww that is true or false, for example “ww is a legal name”.
A predicate determines a language: LP={w∣P(w)}L_P=\{w\mid P(w)\}⁠, the set of words that satisfy it.

Explained in the section “Decision problems”.

Decision problem

w∈L  ?w\in L\;?

A yes/no question about an input, given by a predicate. For a language LL⁠, the question whether a given word belongs to LL is called the membership problem.

Explained in the section “Decision problems”.

Deterministic finite automaton (DFA)

M=(Q,Σ,δ,q0,F)M=(Q,\Sigma,\delta,q_0,F)

A machine with finitely many states and exactly one transition for every state and symbol; it accepts a word if the run ends in an accepting state.

Explained in the lesson on deterministic finite automata.

State

q∈Qq\in Q

One of the states of an automaton (there are finitely many); it stands for what must be remembered about the input read so far.

Explained in the lesson on deterministic finite automata.

Initial state

q0∈Qq_0\in Q

The state in which the run starts, before any letter has been read.

Explained in the lesson on deterministic finite automata.

Accepting state

F⊆QF\subseteq Q

A state such that if the run on a word ends in it, the word is accepted.
FF is the set of accepting states.

Explained in the lesson on deterministic finite automata.

Transition function

δ:Q×Σ→Q\delta:Q\times\Sigma\to Q

Gives the next state from a state and a symbol. It is extended to words by δ∗(q,ε)=q\delta^*(q,\varepsilon)=q and δ∗(q,wa)=δ(δ∗(q,w),a)\delta^*(q,wa)=\delta(\delta^*(q,w),a)⁠:
δ∗(q,w)\delta^*(q,w) is the state reached after reading the whole word ww starting at qq⁠.

Explained in the lesson on deterministic finite automata.

Run

q0→q1→⋯→qnq_0\to q_1\to\cdots\to q_n

The sequence of states an automaton passes through while reading a word w=a1a2⋯anw=a_1a_2\cdots a_n letter by letter, starting at the initial state, with qi=δ(qi−1,ai)q_i=\delta(q_{i-1},a_i)⁠.
The last state is δ∗(q0,w)\delta^*(q_0,w)⁠, and the word is accepted if it is accepting.

Explained in the lesson on deterministic finite automata.

Regular language

L=L(M)L=L(M)

A language recognized by some deterministic finite automaton.

Explained in the lesson on deterministic finite automata.

Trap state (absorbing state, dead state)

q∈Q: δ(q,a)=q  ∀a∈Σq\in Q:\ \delta(q,a)=q\ \ \forall a\in\Sigma

A state whose every transition returns to itself, so a run that enters it never leaves.
If it is not accepting it is also called a dead state: the word can no longer be accepted.
If it is accepting, the word is already accepted whatever follows.

Explained in the lesson on deterministic finite automata.

Complement automaton

AC=(Q,Σ,δ,q0,Q−F)A^C=(Q,\Sigma,\delta,q_0,Q-F)

The same deterministic and complete automaton with the set of accepting states replaced by the set of non-accepting states; it recognizes Σ∗−L(A)\Sigma^*-L(A)⁠.

Explained in the lesson “Combining Automata”.

Product automaton

QA×QBQ_A\times Q_B

Runs two automata over the same alphabet in parallel, keeping a pair of states.
Its set of accepting states is chosen according to the operation (intersection, union, difference, symmetric difference).

Explained in the lesson “Combining Automata”.

Reachable state

∃w∈Σ∗: δ∗(q0,w)=q\exists w\in\Sigma^*:\ \delta^*(q_0,w)=q

A state in which the run on some word ends. Removing the states that are not reachable does not change the language.

Explained in the lesson “Minimizing Automata by Table Filling”.

Distinguishing word

δ∗(p,w)∈F  ⟺  δ∗(q,w)∉F\delta^*(p,w)\in F \iff \delta^*(q,w)\notin F

A word that leads from one of two states to an accepting state and from the other to a non-accepting state.
ε\varepsilon distinguishes every accepting state from every non-accepting state.

Explained in the lesson “Minimizing Automata by Table Filling”.

Equivalent automata

L(M1)=L(M2)L(M_1)=L(M_2)

Two automata over the same alphabet that recognize the same language:
on every word they give the same answer. Minimization replaces an automaton by a smaller equivalent one.

Explained in the lesson “Minimizing Automata by Table Filling”.

Equivalent states

p≡qp\equiv q

Two states that have no distinguishing word. They can be merged without changing the language.

Explained in the lesson “Minimizing Automata by Table Filling”.

Quotient automaton

δ′([q],x)=[δ(q,x)]\delta'\bigl([q],x\bigr)=\bigl[\delta(q,x)\bigr]

An automaton whose states are the classes of equivalent states; it recognizes the same language as the original automaton.

Explained in the lesson “Minimizing Automata by Table Filling”.

Minimization and table filling

Making a DFA smaller without changing its language: remove the unreachable states, fill a table of pairs in rounds (round 0 marks a pair of an accepting and a non-accepting state; round kk marks a pair that a letter leads to a marked pair), and merge the unmarked pairs into the quotient automaton.

Explained in the lesson “Minimizing Automata by Table Filling”.

Indistinguishable words

x≡Ly  ⟺  ∀z∈Σ∗: (xz∈L  ⟺  yz∈L)x\equiv_L y \iff \forall z\in\Sigma^*:\ \bigl(xz\in L \iff yz\in L\bigr)

Two words for which no word zz⁠, appended at the end, puts exactly one of them in LL⁠.
If the runs of a DFA for LL on two words end in the same state, the words are indistinguishable.

Explained in the lesson “Myhill–Nerode: What a State Remembers”.

Myhill–Nerode classes and the smallest automaton

δL([x],c)=[xc]\delta_L\bigl([x],c\bigr)=[xc]

The classes of the relation ≡L\equiv_L⁠; the class of a word xx is written [x][x]⁠.
If there are nn words, every two of them distinguishable, every DFA for the language has at least nn states.
For a language that has a DFA, the number of classes is the number of states of the smallest DFA, and the DFA whose states are the classes is the smallest DFA, unique up to renaming.

Explained in the lesson “Myhill–Nerode: What a State Remembers”.

Prefixes, suffixes and substrings of a language

Pref(L), Suff(L), Sub(L)\mathrm{Pref}(L),\ \mathrm{Suff}(L),\ \mathrm{Sub}(L)

The languages of all prefixes, all suffixes and all substrings (consecutive stretches of letters) of words of LL⁠; each includes ε\varepsilon⁠.

Explained in the section “Languages: Operations and Equalities”.