Homework 9
Last updated: Mon, 22 Apr 2024 11:53:28 -0400
Out: Mon Apr 17, 12:00pm EST (noon) Due: Wed Apr 24, 12:00pm EST (noon)
This assignment continues explore decidability, and also begins to look at undecidability.
Homework Problems
Computing Chomsky Normal Form (12 points)
Countably or Uncountably Infinite? (6 + 6 = 12 points)
CS420 is Undecidable? (12 points)
One more Undecidable Problem (12 points)
README (2 points)
Total: 50 26 points
Submitting
Submit your solution to this assignment in Gradescope hw9. 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 Computing Chomsky Normal Form
Recall that a CFG is in Chomsky Normal Form (CNF) if all rules have the form:
A \rightarrow BC |
A \rightarrow \texttt{a} |
where \texttt{a} must be a terminal, A, B, C are variables, and B and C are not the start variable.
In addition, a grammar in CNF may include a rule A\rightarrow \varepsilon if A is the start variable.
Convert the following context-free grammar to Chomsky Normal Form using the algorithm described in class.
S\rightarrow \texttt{0} T \texttt{1}
T\rightarrow \texttt{0}T\mid \varepsilon
S\rightarrow \texttt{\#}
The start variable of the CFG is S and the set of terminals is \{\texttt{0},\texttt{1},\texttt{\#}\}
2 Countably or Uncountably Infinite?
In class, we learned about how infinite sets can have different sizes. Specifically, they can be either countable or uncountable.
One example we saw in class is that the set of all natural numbers is countably infinite. Now prove that the set of all pairs of natural numbers has the same size as the set of natural numbers!
In contrast, an uncountably infinite set is larger than a countably infinite set.
Prove that the set of all infinite mathematical series is uncountably infinite.
An infinite mathematical series has the form \sum_{i=1}^\infty ....
For example, the infinite series \sum_{i=1}^\infty i=1 + 2 + 3 + \cdots
Another example could be the infinite series \sum_{i=1}^\infty 1/i=1/1 + 1/2 + 1/3 + \cdots
The proof must be a proof by contradiction and use diagonalization.
3 CS420 is Undecidable?
Note: This problem has been moved to Homework 10.
Prove that the following language is undecidable:
\textit{CS420} = \left\{\left\langle M\right\rangle\mid M\textrm{ is a \textsf{TM} where }\texttt{CS420}\in L(M)\right\}
Your proof should be a proof by contradiction and should reduce from EQ_TM HALT_\textsf{TM}. It should also use the "modify the TM" technique from class.
4 One more Undecidable Problem
Note: This problem has been moved to Homework 10.
Now let’s go the other way. Re-prove that EQ_\textsf{TM} is undecidable.
Your proof must reduce from the undecidable \textit{CS420} language from the CS420 is Undecidable? problem. (You may assume that the \textit{CS420} language is undecidable, even if you were unable to answer the earlier questions.) The proof must be a proof by contradiction.