hws/hw03.tex
changeset 146 9da175d5eb63
parent 132 04264d0c43bb
child 258 1e4da6d2490c
equal deleted inserted replaced
145:920f675b4ed1 146:9da175d5eb63
    10 
    10 
    11 \begin{enumerate}
    11 \begin{enumerate}
    12 \item What is a regular language?
    12 \item What is a regular language?
    13 
    13 
    14 \item Assume you have an alphabet consisting of the letters $a$, $b$ and $c$ only.
    14 \item Assume you have an alphabet consisting of the letters $a$, $b$ and $c$ only.
    15 (a) Find a regular expression that recognises the two strings $ab$ and $ac$. (b)
    15 (1) Find a regular expression that recognises the two strings $ab$ and $ac$. (2)
    16 Find a regular expression that matches all strings \emph{except} these two strings.
    16 Find a regular expression that matches all strings \emph{except} these two strings.
    17 Note, you can only use regular expressions of the form 
    17 Note, you can only use regular expressions of the form 
    18 \begin{center}
    18 \begin{center}
    19 $r ::= \varnothing \;|\; \epsilon \;|\; c  \;|\; r_1 + r_2  \;|\; r_1 \cdot r_2 \;|\; r^*$
    19 $r ::= \varnothing \;|\; \epsilon \;|\; c  \;|\; r_1 + r_2  \;|\; r_1 \cdot r_2 \;|\; r^*$
    20 \end{center}
    20 \end{center}