author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Sun, 27 Oct 2013 20:07:10 +0000 | |
changeset 166 | ef48e378c44e |
parent 115 | 86c1c049eb3e |
child 227 | 93bd75031ced |
permissions | -rw-r--r-- |
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
86c1c049eb3e
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
109
diff
changeset
|
20 |
Can you improve them (in cases they are linked on different levels, |
86c1c049eb3e
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
109
diff
changeset
|
21 |
they visit web-pages several times)? |
0 | 22 |
|
104
ffde837b1db1
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
102
diff
changeset
|
23 |
\item Read the handout of the first lecture and make sure you |
ffde837b1db1
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
102
diff
changeset
|
24 |
understand the concepts of strings and languages. |
ffde837b1db1
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
102
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
f2a90dda7e3b
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
104
diff
changeset
|
34 |
\item Assume a set $A$ contains 4 strings and a set $B$ 7 strings, how many strings |
f2a90dda7e3b
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
104
diff
changeset
|
35 |
are in $A @ B$? |
f2a90dda7e3b
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
104
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: |