\documentclass[12pt,ifthen]{article} \usepackage{url} \usepackage{comment} \newif{\ifshowsoln} % \showsolntrue \newcommand{\und}{\_\_\_\_\_\_\_\_\_} \newcommand{\N}{\mathbb{N}} \newcommand{\Z}{\mathbb{Z}} \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} \usepackage{amsmath} \usepackage{amssymb} % for \nmid \begin{document} \centerline{\bf HW 05 CMSC 452} \centerline{\bf Morally Due TUES March 4 11:00AM} \centerline{\bf Dead-Cat Due THU March 6 at 11:00AM} \begin{enumerate} \item For this problem \begin{itemize} \item The {\it size} of a DFA is the number of states. \item The {\it size} of an NFA is the number of states. \item The {\it size} of a regex is its length. \end{itemize} This is just a FILL IN THE BLANK. You may use $O$-notation. I give two examples. EXAMPLE ONE If the question was: {\it There is an algorithm that will, given two regex's $\alpha_1,\alpha_2$ of sizes $n_1,n_2$, returns a regex for $L(\alpha_1)L(\alpha_2)$ of size FILLIN.} The answer would be $n_1+n_2+O(1)$. EXAMPLE TWO {\it There is an algorithm that will, given a DFA $M$ of size $n$, returns a regex for $L(M)$ of size FILLIN.} the answer is $2^{O(n)}$. (This will be one of the questions below and I've just given you the answer. Yeah for you!) The ACTUAL QUESTIONS are on the next page \newpage \begin{enumerate} \item There is an algorithm that will, given two DFA's $M_1,M_2$ of sizes $n_1,n_2$, returns a DFA for $L(M_1)\cap L(M_2)$ of size FILLIN. \item There is an algorithm that will, given two DFA's $M_1,M_2$ of sizes $n_1,n_2$, returns an NFA for $L(M_1)\cdot L(M_2)$ of size FILLIN. \item There is an algorithm that will, given a regex $\alpha$ of length $n$, returns an NFA for $L(\alpha)$ of size FILLIN. \item There is an algorithm that will, given a DFA $M$ of size $n$, returns a regex for $L(M)$ of size FILLIN. \end{enumerate} \newpage \item PROVE the following statements by giving an algorithm (your algorithm may use the algorithms in problem 1 as subroutines) and fill in where it says FILLIN. No proof of the FILLIN is needed. \begin{enumerate} \item There is an algorithm that will, given two DFA's $M_1,M_2$ of sizes $n_1,n_2$, returns a DFA for $L(M_1)\cdot L(M_2)$ of size FILLIN. (NOTE: in Problem 1 we asked for going from two DFA's to an NFA. Here we are asking to go from two DFA's to a DFA.) \item There is an algorithm that will, given two regex's $\alpha_1,\alpha_2$ of sizes $n_1,n_2$, returns a regex for $L(\alpha_1)\cap L(\alpha_2)$ of size FILLIN. \end{enumerate} \newpage \item For each of the following state if its is REGULAR or NOT REGULAR. If you say REGULAR then give either a DFA or REGEX for it. If you say NOT REGULAR than prove it using the pumping lemma. \begin{enumerate} \item $\{ a^{\floor{\log_2(n)}} \colon n\ge 1 \}$ \item $\{ a^{2n} \colon n\ge 1\}$ \item $\{ a^{2^n} \colon n\ge 1 \}$ \end{enumerate} \end{enumerate} \end{document}