COMP 3803 - Assignment 2
COMP 3803 - Assignment 2
• Your assignment must be submitted as one single PDF file through cuLearn.
• Late assignments will not be accepted. I will not reply to emails of the
type “my internet connection broke down at 23:57” or “my scanner stopped
working at 23:58”, or “my dog ate my laptop charger”.
• You are encouraged to collaborate on assignments, but at the level of discussion only.
When writing your solutions, you must do so in your own words.
• Past experience has shown conclusively that those who do not put adequate effort into
the assignments do not learn the material and have a probability near 1 of doing poorly
on the exams.
• When writing your solutions, you must follow the guidelines below.
Question 2: Give regular expressions describing the following languages. In all cases, the
alphabet is {0, 1}. Justify your answers.
1
Question 3: Use the construction given in class to convert the regular expression
Question 4: Use the construction given in class to convert the following DFA to a regular
expression.
a, b a
1 2
b
a
b
4. {am bn : m ≥ 0, n ≥ 0, m 6= n}. (Using the Pumping Lemma for this one is a bit tricky.
You can avoid using the Pumping Lemma by combining results about the closure under
regular operations.)
2. Let n be the maximum length of any string in A. Prove that every deterministic finite
automaton (DFA) that accepts A has at least n + 1 states. (Hint: How is the pumping
length chosen in the proof of the Pumping Lemma?)