\documentclass[12pt]{article} \usepackage{amsmath} \usepackage{comment} \renewcommand{\P}{{\rm P}} \newcommand{\GEN}{{\rm GEN}} \newcommand{\DTIME}{{\rm DTIME}} \newcommand{\NP}{{\rm NP}} \newcommand{\DM}{{\rm DM}} \newcommand{\VC}{{\rm VC}} \newcommand{\IS}{{\rm ISAAC}} \newcommand{\thCOL}{{\rm 3COL}} \newcommand{\fourCOL}{{\rm 4COL}} \newcommand{\lf}{\left\lfloor} \newcommand{\rf}{\right\rfloor} \newcommand{\lc}{\left\lceil} \newcommand{\rc}{\right\rceil} \newcommand{\Ceil}[1]{\left\lceil {#1}\right\rceil} \newcommand{\ceil}[1]{\left\lceil {#1}\right\rceil} \newcommand{\floor}[1]{\left\lfloor{#1}\right\rfloor} \newcommand{\goes}{\rightarrow} \newcommand{\nth}{n^{th}} \newcommand{\N}{\sf{N}} \newcommand{\Q}{\sf{Q}} \newcommand{\R}{\sf{R}} \newcommand{\C}{\sf{C}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\es}{\emptyset} \newcommand{\st}{\mathrel{:}} \newcommand{\e}{\varepsilon} \usepackage{tikz} \usetikzlibrary{automata,positioning,arrows} \begin{document} \centerline{\bf Optional Project} \centerline{\bf Morally Due May, 11:00AM} \centerline{\bf Dead Cat Day: May 15, 11:00AM} \bigskip \centerline{\bf WARNING: The Final is ON May 15 at 10:30AM} \centerline{\bf ADVICE: Hand it in ON the Moral Due Date} This is an OPTIONAL PROJECT. It would be more accurate to say its an OPTIONAL HW. I will not look at it until after the final is graded and the final grades have been determined. \begin{enumerate} \item If you have a D in the course and do a VERY GOOD JOB on the optional project then I will bump your grade to a C-. \item If you have an F in the course and you do a VERY GOOD JOB on the optional project then I will bump your grade to a D. \item The following has actually happened. DON"T BE THIS GUY. A guy does badly on the midterm, does not do the project, gets a D in the course, and THEN asks me if he could do some kind of optional project to bring his grade up to a C. The answer was of course NO. DO NOT BE THAT GUY. \item The following has actually happened. DON"T BE THIS GUY. A guy does a terrible job on the optional project but since he DID IT he thinks that is all he needs for his bump up. It is not. He kept his F. \item Students often ask me for sample problems. Consider this to be a set of sample problems whether you do it or not. \item Should you do this if you are in no danger of failing the course? Yes- its a good study aid. \item Can this bump your grade from a C to a B or a B to an A or some such? NO. I will only look at those from the D and F students. \end{enumerate} \newpage \begin{enumerate} \item (0 points but if you don't answer this one you may get a 0 on the project) What is your name. PRINT CLEARLY \newpage \item (10 points) \begin{enumerate} \item (5 points) Give an algorithm that will, given an NFA $M$ of size $n$, return a DFA $D$ such that $L(D)=L(M)$. \item (5 points) Give a function $f$ such that, in the algorithm you just gave, if $M$ has $n$ states then $D$ has $O(f(n))$ states. \end{enumerate} \newpage \item (10 points) \begin{enumerate} \item (5 points) Give an algorithm that will, given a regex $\alpha$ of size $n$, return an NFA $N$ such that $L(\alpha)=L(M)$. \item (5 points) Give a function $f$ such that, in the algorithm you just gave, if $\alpha$ is of length $n$ then $N$ has $O(f(n))$ states. \end{enumerate} \newpage \item (10 points) \begin{enumerate} \item (5 points) Give an algorithm that will, given a DFA $M$ of sizes $n$, return a CFG $G$ such that $L(G)=L(M)$ \item (5 points) Give a function $f$ such that, in the algorithm you just gave, if $M$ has $n$ states then $G$ has $O(f(n))$ rules. (The grammar need not be in CNF.) \end{enumerate} \newpage \item (10 points) Give an algorithm that will, given $t$, return a Chomsky Normal Form CFG (we allow $A\goes BCD$ and $A\goes e$) for the set $$\{e,a,a^2,\ldots,a^{2^t-1}\}$$ The number of nonterminals has to be $O(t)$. \newpage \item (10 points) Let $L = \{ a^i \colon i\ne 1,000,000\}$. We want an NFA for this language that has substantially less than $1,000,000$ states. DO NOT give me that NFA. JUST give me the relevant $x,y,t$ and the set of primes that are needed. How many states does your NFA have? (Do NOT worry about off-by-1 errors for $t$ or number-of-states.) \bigskip GIVE $x$ HERE: \bigskip GIVE $y$ HERE: \bigskip GIVE $t$ HERE: \bigskip GIVE THE PRIMES HERE: \bigskip GIVE THE NUMBER OF STATES HERE: \newpage \item (10 points) Consider the following statement \bigskip {\it If $L\in \NP$ then $\overline{L}\in \NP$.} \bigskip State if it is TRUE, FALSE, or UNKNOWN TO SCIENCE If you answer TRUE then prove if. If you answer its FALSE then give a counterexample. If you answer UNKNOWN TO SCIENCE then you do not need to do anything more. \newpage \item (10 points) Consider the following statement \bigskip {\it If $L\in \Sigma_1$ then $\overline{L}\in\Sigma_1$. } \bigskip State if it is TRUE, FALSE, or UNKNOWN TO SCIENCE If you answer TRUE then prove if. If you answer its FALSE then give a counterexample. If you answer UNKNOWN TO SCIENCE then you do not need to do anything more. \newpage \item (10 points) \begin{enumerate} \item (5 points) Give a set that is undecidable but does not involve Turing Machines. \item (5 points) Give ANOTHER set that is undecidable but does not involve Turing Machines. \end{enumerate} \newpage \item (10 points) Give five NP-complete sets. \newpage \item (10 points) \begin{enumerate} \item Give a set $A$ such that the following holds: \begin{itemize} \item $A\in\NP$. \item The question {\it is $A$ in $\P$?} is UNKNOWN TO SCIENCE! \item The question {\it is $A$ in $\NP-{\rm complete}$?} is UNKNOWN TO SCIENCE! \end{itemize} \item (5 points) Give an algorithm for the set $A$. It {\bf does not} need to be efficient. It {\bf does} need to be clear enough so that the grader can take what you give and write a program that runs your algorithm. \end{enumerate} \end{enumerate} \end{document}