0
|
1 |
\documentclass{article}
|
|
2 |
\usepackage{charter}
|
|
3 |
\usepackage{hyperref}
|
9
|
4 |
\usepackage{amssymb}
|
0
|
5 |
|
|
6 |
\begin{document}
|
|
7 |
|
|
8 |
\section*{Homework 1}
|
|
9 |
|
|
10 |
\begin{enumerate}
|
12
|
11 |
\item {\bf (Optional)} If you want to run the code presented
|
|
12 |
in the lectures, install the
|
9
|
13 |
Scala programming language available (for free) from
|
0
|
14 |
\begin{center}
|
|
15 |
\url{http://www.scala-lang.org}
|
|
16 |
\end{center}
|
|
17 |
|
9
|
18 |
\item {\bf (Optional)} Have a look at the crawler programs.
|
|
19 |
Can you find a usage for them in your daily programming life?
|
115
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
20 |
Can you improve them (in cases they are linked on different levels,
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
21 |
they visit web-pages several times)?
|
0
|
22 |
|
104
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
23 |
\item Read the handout of the first lecture and make sure you
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
24 |
understand the concepts of strings and languages.
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
25 |
|
12
|
26 |
\item In the context of the AFL-course, what is meant by the term \emph{language}?
|
9
|
27 |
|
|
28 |
\item Give the definition for regular expressions. What is the meaning of a
|
|
29 |
regular expression?
|
0
|
30 |
|
9
|
31 |
\item Assume the concatenation operation of two strings is written as $s_1 @ s_2$.
|
|
32 |
Define the operation of \emph{concatenating} two sets of strings.
|
0
|
33 |
|
109
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
34 |
\item Assume a set $A$ contains 4 strings and a set $B$ 7 strings, how many strings
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
35 |
are in $A @ B$?
|
Christian Urban <christian dot urban at kcl dot ac dot uk>
diff
changeset
|
36 |
|
9
|
37 |
\item How is the power of a language defined? (Hint: There are two rules, one for $\_\!\_^0$ and
|
|
38 |
one for $\_\!\_^{n+1}$.)
|
0
|
39 |
|
|
40 |
|
|
41 |
\end{enumerate}
|
|
42 |
|
|
43 |
\end{document}
|
|
44 |
|
|
45 |
%%% Local Variables:
|
|
46 |
%%% mode: latex
|
|
47 |
%%% TeX-master: t
|
|
48 |
%%% End:
|