CS317, Finite Automata & Regular Expressions, Chapter 2: Finite Automata, Finite Automata
Associativity of union
((R | S) | T) ≡ (R | (S | T))
Associativity of concatenation
((RS)T) ≡ (R(ST))
Right distributive law
(M + N) L = LM + LN
Commutativity of union.
(R | S) ≡ (S | R)
Can any regular language be converted into a finite automaton that accepts it?
Yes
∅
a Regular Expression denoting an empty set of strings. (L (∅) = { })
ε
a Regular Expression that indicates the language containing an empty string. (L (ε) = {ε}) ≡ ∅* ≡ ε*
x
a Regular Expression where L={x} = {x}
Any context-free language is generated by _____________.
a context-free grammar in Chomsky Normal Form
Any language that can be generated by some context-free grammar is called ___________
a context-free language
String
a finite sequence of symbols taken from ∑.
Q
a finite set of states.
∑
a finite set of symbols, called the alphabet of the automaton.
Chomsky Normal Form
a is any terminal A, B and C are variables. We permit the rules S-> epsilon where S is the start variable. A-> BC A->a
Each rule in a CFG appears as a line in the grammar compromising of a ____________________.
symbol and a string separated by an arrow
Initially the input appears on ___________.
tape 1, the others start out blank
If k is the number of states in an NFA then...
the NFA has 2^k subsets of states.
q₀
the initial state from where any input is processed (q₀ ∈ Q).
The tape contains only ____________________________.
the input string and is blank everywhere else
To read the information that it has written, the machine _____________________________________________.
the machine can move its head back over it
Length of a String
the number of symbols present in a string. (Denoted by |S|).
δ
the transition function.
Two machines are equivalent if...
they recognize the same language
The transition function is changed _____________________________________________________________________.
to allow for reading, writing, and moving the heads on some or all of the tapes simultaneously
A string w is derived ambiguously in context-free grammar G if it has ___________ leftmost derivations.
two or more
The machine continues computing ____________________________________________.
until it decides to produce an output
Left distributive law
L (M + N) = LM + LN
Union ( | )
L(R | S) = L(R) ∪ L(S). Identity: R ε = ε R = R Annihilator: ∅ L = L ∅ = ∅
(LR)*L =
L(RL)*
Concatenation
L(RS) Identity: R + ∅ = ∅ + R = R
Another name for substitution rules...
Productions
Idempotent law
R | R ≡ R
Sometimes we can generate the same string in several different ways, this is called _______.
ambiguity
An enumerator is a Turing machine with _____________________________________________.
an attached printer
Alphabet
any finite set of symbols.
The Turing machine can use the printer ____________________________________________________________________.
as an output device to print strings
Every NFA can...
be converted into an equivalent DFA
The outputs accept and reject are obtained _____________________________________________.
by entering designated accepting and rejecting states
Turing machines are ___________ under concatenation.
closed
Turing machines are ___________ under homomorphism.
closed
Turing machines are ___________ under intersection.
closed
Turing machines are ___________ under star.
closed
Turing machines are ___________ under union.
closed
A deterministic context-free grammar is a _________________________________.
context-free grammar such that every valid string has a forced handle
Collections of languages associated with context-free grammars are called ___________.
context-free languages
To show the existance of a DFA that represents an NFA we must...
convert the NFA into a DFA that simulate the NFA.
Formal definition of a pushdown automaton
1) Q is a finite set called the states 2) Sigma is a finite set called the alphabet. 3) Gamma is the stack alphabet 4) scriptS is the transition function. 5) q_0 in Q is the start state 6) F in Q is the set of accept states.
N accepts w if...
1) The machine starts out in the start state 2) Each state is one of the allowable next states. 3) The last state is one of the accept states
M accepts A if...
1) The start sequence is the same as a the first state. 2) Each transition is in the transition function. 3) The last state is in the set of accept states
Formal definition of a context-free grammar
1) V is a finite set called the variables 2) Sigma is a finite set, disjoint from V, called the terminals. 3) R is a finite set of rules, with each rule being a variable and a string of variables and terminals. 4) S in V is the start variable.
Procedures from generating a string in the CFL
1) Write down the start variable. 2) Find a variable that is written down and a rule that starts with that variable. 3) Repeat step 2 until no variables remain.
Formal definition of a regular language
1) a for some a in the alphabet 2) epsilon 3) empty string 4) R1 union R2 (where R1 and R2 are regular expression) 5) R1 concatenate R2 (where R1 and R2 are regular expression) 6) R1* (where R1 is a regular expression)
(a + b)*
= (a*b*)* = (a* + b*)* = (a + b*)* = a*(ba*)*
Definition of a Finite Automata
A 5-tuple with : 1) A finite set of states 2) A finite set called the alphabet 3) A transition function 4) Start state 5) Set of accept states
Definition of a nondeterministic finite automaton
A 5-tuple with : 1) A finite set of states 2) A finite set called the alphabet 3) A transition function 4) Start state 5) Set of accept states
Union
A U B = { x | x in A or x in B}
Concatenation
A cat B = {xy | x in A and y in B}
Star
A* = {x1x2,...,xk | k>= 0 and each xi in A}
Regular languages are ________ star
Closed
Regular languages are ________ under concatenation
Closed
Regular languages are ________ under union
Closed
To construct a DFA from an NFA we must...
Get the inverse of: 1) the set of states 2) the transition function 3) the start state 4) the accept states
In a nondeterministic finite automaton...
Several choices may exist for the next state at any point.
Kleene Star
The set ∑* is the infinite set of all possible strings of all possible lengths over ∑ including λ. ≡ R*R* ≡ (R*)* ≡ ε + RR* ≡ ε + R*R
Kleene Closure/Plus
The set ∑+ is the infinite set of all possible strings of all possible lengths over ∑ excluding λ. ≡ RR* ≡ R*R ≡ (RR* | ε)
F
a set of final state/states of Q (F ⊆ Q).
Pattern
a set of objects with some recognizable property
Language
a subset of ∑* for some alphabet ∑. It can be finite or infinite.
A Turing machine _________________ that a real computer can do.
can do everything
Variables are often represented by _________.
capital letters
The class of regular languages is ________ under the concatentation operation
closed
The class of regular languages is ________ under the star operation
closed
The class of regular languages is ________ under the union operation
closed
The sequence of substitutions to obtain a string called a ______________.
derivation
The language of a deterministic pushdown automaton is called a _________________________.
deterministic context-free language
Regular expressions and finite automata are ________ in their descriptive power
equivalent
If a Turing machine doesn't enter an accepting or a rejecting state it will ______________________.
go on forever, never haulting
A Turing machine ___________________________________________.
has unlimited and unrestricted memory
Every time the Turing machine wants to add a string to the list it ______________________________________________.
it sends the string to the printer
Each tape has ______________________________________________.
its own head for reading and writing
If the machine needs to store information it ______________________________________.
may write this information on the tape
A Turing machine is much __________________________ model of a general purpose computer.
more accurate
Context-Free Grammars are ____________.
more powerful methods of describing languages
The class of DCFLs is _______________ under complementation.
not closed
One variable is designated as the start variables it usually occurs ____________________.
on the left hand side of the topmost rule
To show that two Turing machines are equivalent we must show that _________________________________.
one can simulate the other
Derivations can also be represented visually as __________.
parse trees
A Turing machine has a tape head that can ___________________.
read and write symbols and move around on the tape
If a languages is recognized by an NFA then it is also...
recognized by a DFA.
Nondeterministic automata give an alternative way of characterizing...
regular languages
A multitape Turing machine is an ordinary Turing machine with __________________________.
several tapes
Every multitape Turing machine has an equivalent _____________________________________________.
single-tape Turing machine
A language is Turing-recognizable if and only if __________________________________________.
some Multitape Turing machine recognizes it
A language is Turing-recognizable if ______________________________________________.
some enumerator enumerates it
A language is decidable if and only if ______________________________________________.
some nondeterministic Turing machine decides it
A language is regular if and only if...
some nondeterministic finite automaton recognizes it
A context-free language is free if and only if ______________.
some push-down automaton recognizes it
If a language is context-free then _______________________________.
some pushdown automaton recognizes it
A language is regular if and only if _______________.
some regular expression describes it