texupdate
authorChristian Urban <christian.urban@kcl.ac.uk>
Thu, 19 Sep 2024 19:21:52 +0100
changeset 963 85bb0ef99fc7
parent 962 5176cbb819c2
child 964 da1f8c033b8e
texupdate
hws/hw01.pdf
hws/hw02.pdf
hws/hw03.pdf
hws/hw04.pdf
hws/hw05.pdf
hws/hw05.tex
hws/hw06.pdf
hws/hw07.pdf
hws/hw08.pdf
hws/hw09.pdf
Binary file hws/hw01.pdf has changed
Binary file hws/hw02.pdf has changed
Binary file hws/hw03.pdf has changed
Binary file hws/hw04.pdf has changed
Binary file hws/hw05.pdf has changed
--- a/hws/hw05.tex	Thu Sep 19 16:32:26 2024 +0100
+++ b/hws/hw05.tex	Thu Sep 19 19:21:52 2024 +0100
@@ -56,6 +56,22 @@
 %where the three dots stand for arbitrary characters, but not
 %comment delimiters.
 
+\item The \emph{not}-regular expression is definitely useful for recognising
+  comments for example, but can
+  sometimes be quite unintuitive when it comes to deciding which strings are
+  matched or not. Consider
+
+  \[
+  (\sim{}a)^*  \quad\text{and}\quad \sim{}(a^*)\;.  
+  \]  
+
+  What is the language of each regular expression?
+
+  \solution{
+    The first one is ``all strings, except $[a]$''; the second
+    ``all strings except strings of the form $a^*$''.
+  }
+  
 \item Define the following regular expressions 
 
 \begin{center}
Binary file hws/hw06.pdf has changed
Binary file hws/hw07.pdf has changed
Binary file hws/hw08.pdf has changed
Binary file hws/hw09.pdf has changed