8: Tutorial Stuff Flashcards
How do you convert an NFA to a DFA?
To make a DFA M from an NFA N = (A, S, F, s0, T). The alphabet of M is A.
- Begin with a new start state S0 labelled by {s0} ∪ {s : there exists a path labelled only by ϵ-arrows from s0 to s}.
- For each newly constructed state Si, and for each a ∈ A:
(a) For each s ∈ Si, find all states s’ that can be reached from s by reading (ϵ ^ i)a(ϵ ^ j) (for any i and j).
(b) Let Sj be the set of all of these states s’. (The set Sj may be the empty
set ∅) Put an arrow labelled a from Si to Sj . - Repeat Step 2 until every new state Si has one arrow leaving it for each letter a ∈ A.
- Make each state Si that contains at least one state from T into an accept state for M.
How do you convert from a regular expression to a language?
You can just define the language as being equal to the regular expression, e.g. L((a + b* + ϵ)(c + d)) or L2 = 010.
How do you convert a language to an NFA?
??
How do you convert from a language to a regular expression?
By breaking down the parts of each word into atomic subsections before notating them as a regular expression. Note only regular languages can be converted into regular expressions.
What is Kleene’s theorem?
A language is described by a regular expression if and only if there is a DFA which defines it.
What is the proof of Kleene’s theorem?
??
How can you use Kleene’s theorem to convert from automata to regular expressions (of the languages they accept)?
??
How can you use Kleene’s theorem to convert from languages to automata?
??
How do you prove if a language is regular?
Find a regular expression to express it to show it to be regular, or use the pumping lemma to show it isn’t.
How do you convert from a language to a PDA?
??
What are derivations of CFGs?
??
How do you find CFG derivations?
??
How do you convert from languages to CFGs?
??
How do you convert from a CFG to a PDA?
??
How do you show whether a language is context-free?
??