coursework/cw01.tex
changeset 512 56550ad904d8
parent 499 b06c81c0b12f
child 545 56e054d84be2
equal deleted inserted replaced
511:3d4067bf4dc4 512:56550ad904d8
    26 It should be understood that the work you submit represents
    26 It should be understood that the work you submit represents
    27 your own effort. You have not copied from anyone else. An
    27 your own effort. You have not copied from anyone else. An
    28 exception is the Scala code I showed during the lectures or
    28 exception is the Scala code I showed during the lectures or
    29 uploaded to KEATS, which you can freely use.\bigskip
    29 uploaded to KEATS, which you can freely use.\bigskip
    30 
    30 
       
    31 \noindent
       
    32 If you have any questions, please send me an email in \textbf{good}
       
    33 time.\bigskip
    31 
    34 
    32 \subsection*{Task}
    35 \subsection*{Task}
    33 
    36 
    34 The task is to implement a regular expression matcher based on
    37 The task is to implement a regular expression matcher based on
    35 derivatives of regular expressions. The implementation should
    38 derivatives of regular expressions. The implementation should
    98 \item $L(der\,c\,r) = Der\,c\,(L(r))$
   101 \item $L(der\,c\,r) = Der\,c\,(L(r))$
    99 \end{itemize}
   102 \end{itemize}
   100 
   103 
   101 
   104 
   102 
   105 
   103 \subsection*{Question 1}
   106 \subsection*{Question 1 (Unmarked)}
   104 
   107 
   105 What is your King's email address (you will need it in
   108 What is your King's email address (you will need it in
   106 Question 4)?
   109 Question 4)?
   107 
   110 
   108 \subsection*{Question 2}
   111 \subsection*{Question 2}
   257 \item \texttt{"/*foobar*/"}
   260 \item \texttt{"/*foobar*/"}
   258 \item \texttt{"/*test*/test*/"}
   261 \item \texttt{"/*test*/test*/"}
   259 \item \texttt{"/*test/*test*/"}
   262 \item \texttt{"/*test/*test*/"}
   260 \end{enumerate}
   263 \end{enumerate}
   261 
   264 
   262 \noindent
   265 \subsection*{Question 5}
   263 Also let $r_1$ be the regular expression $a\cdot a\cdot a$ and $r_2$ be
   266 
       
   267 Let $r_1$ be the regular expression $a\cdot a\cdot a$ and $r_2$ be
   264 $(a^{\{19,19\}}) \cdot (a^?)$.  Decide whether the following three
   268 $(a^{\{19,19\}}) \cdot (a^?)$.  Decide whether the following three
   265 strings consisting of $a$s only can be matched by $(r_1^+)^+$.
   269 strings consisting of $a$s only can be matched by $(r_1^+)^+$.
   266 Similarly test them with $(r_2^+)^+$. Again answer in all six cases
   270 Similarly test them with $(r_2^+)^+$. Again answer in all six cases
   267 with yes or no. \medskip
   271 with yes or no. \medskip
   268 
   272