# HG changeset patch # User Christian Urban # Date 1381135511 -3600 # Node ID 04264d0c43bb4ac7db9069ad423c7dc69faecf1b # Parent 13ff10d9717ab0affcf4dff0887b4c3c36e698b4 added diff -r 13ff10d9717a -r 04264d0c43bb hws/hw01.pdf Binary file hws/hw01.pdf has changed diff -r 13ff10d9717a -r 04264d0c43bb hws/hw02.pdf Binary file hws/hw02.pdf has changed diff -r 13ff10d9717a -r 04264d0c43bb hws/hw02.tex --- a/hws/hw02.tex Mon Oct 07 09:34:12 2013 +0100 +++ b/hws/hw02.tex Mon Oct 07 09:45:11 2013 +0100 @@ -14,7 +14,9 @@ in general for arbitrary languages $A$, $B$ and $C$: \begin{eqnarray} (A \cup B) @ C & = & A @ C \cup B @ C\nonumber\\ -A^* \cup B^* & = & (A \cup B)^*\nonumber\\ A^* @ A^* & = & A^*\nonumber\\ (A \cap B)@ C & = & (A@C) \cap (B@C)\nonumber +A^* \cup B^* & = & (A \cup B)^*\nonumber\\ +A^* @ A^* & = & A^*\nonumber\\ +(A \cap B)@ C & = & (A@C) \cap (B@C)\nonumber \end{eqnarray} \noindent @@ -36,8 +38,6 @@ \item Given the regular expression $r = (a \cdot b + b)^*$. Compute what the derivative of $r$ is with respect to $a$ and $b$. Is $r$ nullable? -\item What is a regular language? - \item Prove that for all regular expressions $r$ we have \begin{center} $\text{nullable}(r)$ \quad if and only if \quad $\texttt{""} \in L(r)$ diff -r 13ff10d9717a -r 04264d0c43bb hws/hw03.pdf Binary file hws/hw03.pdf has changed diff -r 13ff10d9717a -r 04264d0c43bb hws/hw03.tex --- a/hws/hw03.tex Mon Oct 07 09:34:12 2013 +0100 +++ b/hws/hw03.tex Mon Oct 07 09:45:11 2013 +0100 @@ -9,6 +9,8 @@ \section*{Homework 3} \begin{enumerate} +\item What is a regular language? + \item Assume you have an alphabet consisting of the letters $a$, $b$ and $c$ only. (a) Find a regular expression that recognises the two strings $ab$ and $ac$. (b) Find a regular expression that matches all strings \emph{except} these two strings. @@ -18,7 +20,7 @@ \end{center} \item Define the function $zeroable$ which takes a regular expression as argument -and returns a boolean.\footnote{In an earlier version there was an error.} The +and returns a boolean. The function should satisfy the following property: \begin{center} $zeroable(r)$ \;if and only if\; $L(r) = \varnothing$