Description
1. [5 points] Let Σ = { a, b }. Consider the following language:
� = { ww | w ∈ Σ* }
Determine whether the complement � = ( Σ* – � ) of this language is a Finite
State Language. To prove whether � is finite state or not, you may use any
approach or combination of approaches we have discussed in class. (If this
exact fact is stated in the text, you cannot simply reference the statement in
the text.) There are several ways to do this. After you have solved it “your
way”, you might want to see how many other ways you can think of for extra
practice.
2. [2 points] Is the following grammar is ambiguous?
G = ( V, Σ, R, E ), V = { E }, Σ = { atom, +, x, (, ) } and
R = { E -> atom | E + E | E x E | ( E ) }
Briefly justify your answer.
3. [5 points] Show a CFG for the language Lists over the alphabet
Σ = { atom, (, ) }, consisting of all strings over Σ of
the following forms:
atom
list: where a list is any sequence between a matched pair of
parentheses of any number ( ≥ zero ) of atom’s or lists.
E.g., Lists contains:
atom , () , ( atom ) , ( atom atom ) , ( atom () ) , ( (atom) () ) , etc.
E.g., Lists does not contain:
)( , atom ) , ( ( ) , ε, atom ) atom , ( atom ) atom , etc.
Total: 12 points
eof
Custom Work, Just for You!
Can’t find the tutorial you need? No worries! We create custom, original work at affordable prices! We specialize in Computer Science, Software, Mechanical, and Electrical Engineering, as well as Health Sciences, Statistics, Discrete Math, Social Sciences, Law, and English.
Custom/Original Work Essays cost as low as $10 per page.
Programming Custom Work starts from $50.
Get top-quality help now!