\documentclass[12pt]{article} \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{\nth}{n^{th}} \newcommand{\es}{\emptyset} \newcommand{\st}{\mathrel{:}} \newcommand{\e}{\varepsilon} \usepackage{tikz} \usetikzlibrary{automata,positioning,arrows} \begin{document} \centerline{\bf Homework 3 Morally Due Feb 20 at 3:30PM} \begin{enumerate} \item (0 points, but if you actually miss the midterm without telling Dr. Gasarch ahead of time, you will lose 100 points on this homework) When will the midterm be (give date and time)? \newpage \item (25 points) Let the alphabet be $\Sigma=\{a\}$. Let $$L=\{ a^i \st i\ne 1000\}.$$ Present a DFA for $L$ with both a transition table and a picture. It should have 1002 states. You may use DOT DOT DOT. \newpage \item (30 points) Let the alphabet be $\Sigma=\{a\}$. Give an NFA for $$\{ a^i \st i\ne 100\}$$ that has substantially less than 100 states. Give it by drawing a picture of the NFA. You may use DOT DOT DOT. (You may use the Chicken McNugget Theorem without proving it.) {\it Advice} {\it Do not} try to make it as small as possible. You do NOT need to prove that it works. \newpage \item (24 points--6 points each) For this problem we are looking at the lengths of regular expressions. We DO NOT COUNT the following symbols: $$\cup \qquad \{ \qquad \}$$ We DO count *. As an example $\{aab\} \cup \{bb\} \cup \{abbb*\}$ is $3+2+5=10$ long. We also look at the lengths of textbook regular expressions. Note that $a^n$ has length $\ceil{\log_2(n)}$. (One exception: the length of $a^1$ is 1.) ALSO, if this problem its okay to be off by a little bit. \begin{enumerate} \item Give a regular expression for $\{a^{100}\}$. How long is it roughly? Speculate on if there is a shorter regular expression then you gave \item Give a textbook regular expression for $\{a^{100} \}$. How long is it roughly? Speculate on if there is a shorter regular expression then you gave \item Give a regular expression for $\{a^i \st i\ne 100 \}$. How long is it roughly? Speculate on if there is a shorter regular expression then you gave. \item Give a textbook regular expression for $\{a^i \st i\ne 100 \}$. How long was it roughly? Speculate on if there is a shorter textbook regular expression then you gave. ({\it Advice:} You may need a calculator or write a short program.) \end{enumerate} \newpage \item (21 points) $$L= \{ w \st \#_a(w)\equiv 17 \pmod {102}\ \wedge\ \#_b(w)\equiv 10 \pmod {91} \}.$$ I want a regular expression for this. DO NOT GIVE ME ONE- IT WOULD BE A MESS. Instead tell me how I could obtain one. \end{enumerate} \end{document}