# HG changeset patch # User Christian Urban # Date 1726770112 -3600 # Node ID 2ecd511e62faa510ec20aec6d9e0b346a55554b6 # Parent 4543807efe9d54a5349541e97bf383855e01d287 texupdate diff -r 4543807efe9d -r 2ecd511e62fa hws/hw01.pdf Binary file hws/hw01.pdf has changed diff -r 4543807efe9d -r 2ecd511e62fa hws/hw02.pdf Binary file hws/hw02.pdf has changed diff -r 4543807efe9d -r 2ecd511e62fa hws/hw03.pdf Binary file hws/hw03.pdf has changed diff -r 4543807efe9d -r 2ecd511e62fa hws/hw04.pdf Binary file hws/hw04.pdf has changed diff -r 4543807efe9d -r 2ecd511e62fa hws/hw05.pdf Binary file hws/hw05.pdf has changed diff -r 4543807efe9d -r 2ecd511e62fa 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 4543807efe9d -r 2ecd511e62fa hws/hw06.pdf Binary file hws/hw06.pdf has changed diff -r 4543807efe9d -r 2ecd511e62fa hws/hw07.pdf Binary file hws/hw07.pdf has changed diff -r 4543807efe9d -r 2ecd511e62fa hws/hw08.pdf Binary file hws/hw08.pdf has changed diff -r 4543807efe9d -r 2ecd511e62fa hws/hw09.pdf Binary file hws/hw09.pdf has changed