Homework 6
Last updated: Mon, 13 Oct 2025 11:53:06 -0400
Out: Mon Oct 13, 12:00pm EDT (noon) Due: Mon Oct 20, 12:00pm EDT (noon)
Note: Assignments are not officially "released" until—
and are subject to change without notice up to— the indicated "Out" date and time. If an assignment is posted early, students may look ahead but are responsible for ensuring that they are always working with the most recent version of the homework.
This assignment explores non-regular languages.
Homework Problems
Second Chance! Regular Langs Closed Under MAKECS? (up to 12 extra points)
More Induction Practice (up to 12 extra points)
Proving That a Language is Not a Regular Language (12 points)
README (2 point)
Total: 26 (out of 14) points
Submitting
Submit your solution to this assignment in Gradescope hw6. Please assign each page to the correct problem and make sure your solutions are legible.
A submission must also include a README containing the required information.
1 Second Chance! Regular Langs Closed Under MAKECS?
NOTE: You may only attempt this extra credit if you scored 8 or lower on the Are Regular Languages Closed Under \mathrm{MAKECS}? Problem in Homework 3. (You may not answer both extra credit questions.)
Many Homework 3 submissions contained invalid or incorrect or incomplete answers to the Are Regular Languages Closed Under \mathrm{MAKECS}? Problem. But students have been requesting a second chance to demonstrate their knowledge of the course topics, so we are giving that chance in the form of extra credit for this assignment.
For this first extra credit problem, you should re-do the Are Regular Languages Closed Under \mathrm{MAKECS}? Problem from Homework 3.
Your answer to this question should be submitted as a part of your Homework 6 submission, as a completely new answer, but you will only receive the extra credit if the submitted answer improves on or fixes the problems from your previous Homework 3 submission.
Note that you must answer this question in the context of Homework 3. This means:
The proof should begin by stating the IF-THEN Statement that is being proved. Any modification to the required Statement to Prove will result in an invalid proof.
Then, the proof itself should be in a properly formatted Statements / Justifications Table (as described in Chapter 1.2 of the HMU textbook), where the Statement to Prove from above should be the last Statement that is proved.
Each line of the proof must be properly justified and logically follow from previous steps. Any extraneous statements or comments will make the proof invalid.
Be careful to only use acceptable Justifications. Any extraneous sentences or comments or external theorems not covered will make the proof invalid.
Since the question was from hw3, you may only use DFA constructions and theorems about DFAs to answer the question.
Also, the only acceptable Justification for a statement like "DFA M recognizes language L" is a properly formatted Examples Table with correctly labeled columns and proper explanations for each example if necessary.
You may not use theorems about concatentation or finite languages or anything that came after Homework 3.
2 More Induction Practice
NOTE: You may only attempt this extra credit if you scored 9 or higher on the Are Regular Languages Closed Under \mathrm{MAKECS}? Problem in Homework 3. You may not answer both extra credit questions.
The proof from class that used regular expressions to prove that the regular languages are closed under the reverse operation included one unjustified statement, which is that the union and reverse operations commute. That is, changing the order in which the operations are applied to a language does not change the final result.
This questions asks you to prove this property, for extra credit.
Specifically, prove the following statement,
\texttt{rev}(A\cup B) = \texttt{rev}(A) \cup \texttt{rev}(B)
where A and B are any language and \texttt{rev}(L)= L^\mathcal{R} from class.
Note: this proof should apply to any languages and should not be restricted to regular languages. This means that the proof should not use DFAs or regular expressions, or anything else associated with regular languages.
The proof should be by induction on the size of one of the languages. As usual, make sure to state what value the induction is on. In this problem, it will be especially important to use recursion properly, that is, a recursive piece of a definition (or function, or proof) must be on a "smaller" piece of the problem.
You might find it useful to first re-define \texttt{rev} recursively, on the size of the input.
You might also find it useful to prove the following (related) lemma:
\texttt{rev}(L\cup\{s\}) = \texttt{rev}(L)\cup \texttt{rev}(\{s\})
where L is any language and s is a single string.
3 Proving That a Language is Not a Regular Language
Here is a language:
L_{nneq} = \left\{x\!\!\mathtt{\neq}\!\!y\mid x\textrm{ and }y\textrm{ are binary numbers and the overall statement is } \mathrm{False}\right\}
Assume the alphabet is \Sigma = \left\{0,1,\mathtt{\neq}\right\}.
Come up with examples, both in the language and not in the language, to make sure you understand the question (come up with enough examples until you understand the language).
Show that language L_{nneq} is not a regular language.
Use the Pumping Lemma and proof by contradiction. Make sure your proof has all the correct components. It should also be presented as a Statements and Justifications Table that starts with assuming the negation of the Statement to Prove. Then, the proof should proceed according to a standard proof, EXCEPT the proof should eventually have two statements that contradict each other. This contradiction allows you to conclude that the original statement to prove is true.
The key to the contradiction is finding a counterexample that is in the language, but does not satisfy the conditions of the pumping lemma. Proving this should be a separate part of the proof that is referenced from the main proof table. This part of the solution should analyze all possible splittings of the counterexample into three pieces, as described by the pumping lemma, and check whether there is any split where the middle piece is "pumpable" and the resulting string is still in the language.
Interesting sidenote: This problem is feels similar to the DFAs Can Do "Real" Computation problem from Homework 1. But there, the language was regular. Here, by rearranging the characters making up the strings in the language, we now have a non-regular language that cannot be recognized by DFAs or NFAs!