hws/hw01.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Thu, 21 Aug 2014 15:10:53 +0100
changeset 227 93bd75031ced
parent 115 86c1c049eb3e
child 249 377c59df7297
permissions -rw-r--r--
added handout

\documentclass{article}
\usepackage{charter}
\usepackage{hyperref}
\usepackage{amssymb}

\begin{document}

\section*{Homework 1}

\begin{enumerate}
\item {\bf (Optional)} If you want to run the code presented 
in the lectures, install the 
Scala programming language available (for free) from
\begin{center}
\url{http://www.scala-lang.org}
\end{center}

\item {\bf (Optional)} Have a look at the crawler programs. 
Can you find a usage for them in your daily programming life?
Can you improve them (in cases they are linked on different levels, 
they visit web-pages several times)? 

\item Read the handout of the first lecture and make sure you
understand the concepts of strings and languages. 

\item In the context of the AFL-course, what is meant by the term \emph{language}?

\item Give the definition for regular expressions. What is the meaning of a 
regular expression?

\item Assume the concatenation operation of two strings is written as $s_1 @ s_2$. 
Define the operation  of \emph{concatenating} two sets of strings.

\item Assume a set $A$ contains 4 strings and a set $B$ 7 strings, how many strings
are in $A @ B$?

\item How is the power of a language defined? (Hint: There are two rules, one for $\_\!\_^0$ and
one for $\_\!\_^{n+1}$.)

\item How many regular expressions are there to match the string $abc$? 
(How many if they cannot include $\epsilon$ and $\varempty$? 
How many if they also are not allowed to contain stars?
How many if they also are not allowed to contain $+$?)

\end{enumerate}

\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: