There were 79 scores (72 nonzero scores and 7 zeros for people who cheated on the exam):
| Code | Comment |
|---|---|
| A1 | The language of unbalanced parentheses contains more strings than that. (Example of bad claim: L = { (m )n | m ≠ n } ). |
| A2 | The unbalanced parentheses language ∩ (* )* yields the complement of { (n )n | n ≥ 0 }. |
| A3 | Bad closure law. (Examples of bad claims: The intersection of two nonregular languages is nonregular; A language with a nonregular subset must be nonregular). |
| A4 | Languages are regular or not regular, not strings or automata. |
| A5 | Bad use of pumping lemma: You don't get to choose x, y, z or their lengths. Either that, or you missed the other cases. |
| A6 | Bad use of pumping lemma: You need to show that the pumped/unpumped string must be ∉ L, not “may” be ∉ L. |
| A7 | The language of balanced strings is not regular. |
| A8 | Bad use of pumping lemma: You want the pumped/unpumped string to be ∉ L; yours is ∈ L. |
| A9 | Finite automata don’t have stacks. |
| A10 | Bad use of pumping lemma: You should start with a string w ∈ L, not w ∉ L. |
| A11 | Bad use of pumping lemma: Your statement of the lemma is incorrect. |
| A12 | Bad use of pumping lemma: You didn’t guarantee that |w| > the constant provided by the lemma. |
| A13 | You showed that a particular automaton doesn’t accept L. You need to show that no automaton accepts L. |
| A14 | You argued the wrong language to be nonregular. E.g., you showed that the language of balanced strings is not regular. |
| A15 | You need more of a proof. |
| A16 | Are you confusing (m )n with m and n? |
| A17 | Σ* is regular. |
| A18 | Is that the constant provided by the lemma? |
It might help if you think of the Pumping Lemma as (claiming the existence of) a function on languages that yields a natural number and a function on strings: PumpingLemma: Language → N × (Σ* → Σ* × Σ* × Σ*). If L is regular, then PumpingLemma(L) = (K, f). The lemma promises that for every w ∈ L where |w| > K, the function f will return an ordered triple of strings with certain guaranteed properties: f(w) = (x, y, z), w = xyz, |xy| ≤ K, |y| > 0, and every xykz ∈ L. On the other hand, the lemma says nothing about how f behaves on w of lengths ≤ K, and it doesn’t give you any information about x, y, or z other than the relationships mentioned above. So you can’t base your analysis on the assumption that y has length 1, for example, unless you also analyze the cases where y has a length other than 1.
Or it might help to think of the contrapositive of the Pumping Lemma: If for every constant K > 0, there exists a string w ∈ L such that for all x, y, z ∈Σ* where w = xyz, |xy| ≤ K, and |y| > 0, there exists an exponent k such that xykz ∉ L, then L is not regular.
A number of people tried to take a DFA M for L and build an NFA N for Ends(L) by replacing intermediate transitions in M with e-moves. This turns out to be tricker than it seems because of transitions into and out of start and final states. For example, depending on the details of the construction, you might have turned the first automaton below into the second. Ends(L) for the left hand automaton is { ab, ac, bb, bc }, but the right hand automaton accepts (a ∪ c)*.
Let First(L) be the set of first characters of strings in L and let Last(L) be the set of last characters of L. Then Ends(L) is a subset of the concatenation First(L) Last(L), but possibly a strict subset. Example: L = { aaa, bbb }, First(L) = Last(L) = { a, b }, Ends(L) = { aa, bb }, First(L) Last(L) = { aa, ab, ba, bb }.
You can’t prove regularity using the pumping lemma. The lemma has the form if regular then pumping condition. The converse, if pumping condition then regular, is false.
The union of an infinite number of regular sets doesn’t have to be regular. For example, { e }, { ab }, { aabb }, { aaabbb }, ... are each regular sets (since they have only one element each), but their union is the language { anbn | n ≥ 0 }, which is not regular.
For our problem, for each xzy ∈L, the singleton string language { xy } is regular, but this doesn’t prove that Ends(L) is regular.
For any language L (even non-regular ones), the subset of L restricted to strings of length n ≥ 0 is regular (since it’s finite). For example, { e }, { e, ab }, { e, ab, aabb }, { e, ab, aabb, aaabbb }, ... are each regular sets, but the limit set { anbn | n ≥ 0 } isn’t.
So you can’t prove that a language is regular by looking at its length-restricted subsets. In particular, you can’t prove that Ends(L) is regular by induction on the length of strings in L.
| Code | Comment |
|---|---|
| D1 | You should getting the pumping lemma constant before you select w. |
| D2 | You can’t choose a specific value for the pumping lemma constant (like 5). |
| D3 | You need to set w as a function of the pumping lemma constant; you can’t just use w = aabb, for example. |
| D4 | You want to specify how p and q are related when you choose w = apbq (see D10 below.) |
| D5 | You can discuss cases like y = a, but you need to generalize to y having the form a+. (Similar for b vs. b+ and ab vs. a+b+.) |
| D6 | When y has the form a+, z can have the form a*b+. |
| D7 | If you discuss the possibility of y having the form b+ or a+b+, then you need to cover three cases: those two plus the case where y has the form a+. |
| D8 | With w = apbq, if you only specify p + q > K (where K is the pumping lemma constant), then you need to analyze three cases, because y can the form a+, a+b+, or b+. If you specify p > K, then a+ is the only possibility. |
| D9 | When y has the form a+, pumping upward to xy2z, xy3z, etc. doesn’t lead to a contradiction, since all those strings are in L. |
| D10 | When y has the form a+, you need p = q in w = apbq to get a contradiction; you need p ≥ q to get xyz ∈ L, and you need p-1 < q (i.e., p ≤ q) to get xy0z ∉ L. |
| D11 | You can’t get a contradiction by arguing that |xy| > K or |xyk| > K; there’s no way to argue the first point and the second point isn’t relevant. |
Let L be the language denoted by (ab ∪ aba)*; there are five equivalence classes under L. The classes [e] and ∅ are trivial; the other three classes are nontrivial.
| Equivalence Class | Completion |
|---|---|
| [a] | (b ∪ ba) L |
| [ab] | (e ∪ a) L |
| [aba] | (b ∪ e) L |
| [e] | L |
| ∅ | None |