Unit 8 - Languages and Automata Flashcards
An alphabet is
a finite and non-empty
set of symbols
an alphabet is often denoted with
Σ (Greek letter Sigma)
the empty word is denoted with
ε (“epsilon”)
if w and w’ are both words over Σ, then w·w’ is the word over Σ obtained by
concatenation of w and w’. We will often write just ww’ to abbreviate w·w’.
for all words w, the concatenations εw and wε are
the same word w.
A language over an alphabet Σ is
a subset of Σ*
Consider the alphabet
Σ = {a, b, c, d},
and the set:
L = { a·w·a | w ∈ Σ∗ }
L contains:
all words that start with a, continue with 0 or more symbols in Σ, and end with a.
L1 = {ε} is
L2 = ∅ is
L1 is the language that only contains the empty word ε;
L2 is the empty language, that does not contain any word.
A deterministic finite-state automaton (DFA) is a 5-tuple
(Q, Σ, δ, q0, F) where:
- Q is a finite set of states;
- Σ is a finite set of input symbols, called the alphabet;
- δ : (Q × Σ) → Q is the transition function (δ is the Greek letter delta);
- q0 ∈ Q is the initial state;
- F ⊆ Q is the set of final (or accepting) states.
A non-deterministic finite-state automaton (NFA) is a 5-
tuple (Q, Σ, δ, q0, F) just like in DFA — with one difference:
δ ⊆ (Q × Σ) × Q is the transition relation.
True or false all DFAs are also NFAs
True
True or false all NFAs are also DFAs
False
The main advantage of NFAs over DFAs is that
NFAs are more flexible and allow to define more compact automata, with less states and transitions