# HG changeset patch # User Christian Urban # Date 1726770112 -3600 # Node ID 85bb0ef99fc7e4dadc48707ee012cf67ec16aae3 # Parent 5176cbb819c212c7d5027d5fe400d9641cb8c5ce texupdate diff -r 5176cbb819c2 -r 85bb0ef99fc7 hws/hw01.pdf Binary file hws/hw01.pdf has changed diff -r 5176cbb819c2 -r 85bb0ef99fc7 hws/hw02.pdf Binary file hws/hw02.pdf has changed diff -r 5176cbb819c2 -r 85bb0ef99fc7 hws/hw03.pdf Binary file hws/hw03.pdf has changed diff -r 5176cbb819c2 -r 85bb0ef99fc7 hws/hw04.pdf Binary file hws/hw04.pdf has changed diff -r 5176cbb819c2 -r 85bb0ef99fc7 hws/hw05.pdf Binary file hws/hw05.pdf has changed diff -r 5176cbb819c2 -r 85bb0ef99fc7 hws/hw05.tex --- 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} diff -r 5176cbb819c2 -r 85bb0ef99fc7 hws/hw06.pdf Binary file hws/hw06.pdf has changed diff -r 5176cbb819c2 -r 85bb0ef99fc7 hws/hw07.pdf Binary file hws/hw07.pdf has changed diff -r 5176cbb819c2 -r 85bb0ef99fc7 hws/hw08.pdf Binary file hws/hw08.pdf has changed diff -r 5176cbb819c2 -r 85bb0ef99fc7 hws/hw09.pdf Binary file hws/hw09.pdf has changed