| author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
| Thu, 26 Sep 2013 15:17:38 +0100 | |
| changeset 109 | f2a90dda7e3b |
| parent 104 | ffde837b1db1 |
| child 115 | 86c1c049eb3e |
| 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? |
|
| 0 | 20 |
|
|
104
ffde837b1db1
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
102
diff
changeset
|
21 |
\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
|
22 |
understand the concepts of strings and languages. |
|
ffde837b1db1
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
102
diff
changeset
|
23 |
|
| 12 | 24 |
\item In the context of the AFL-course, what is meant by the term \emph{language}?
|
| 9 | 25 |
|
26 |
\item Give the definition for regular expressions. What is the meaning of a |
|
27 |
regular expression? |
|
| 0 | 28 |
|
| 9 | 29 |
\item Assume the concatenation operation of two strings is written as $s_1 @ s_2$. |
30 |
Define the operation of \emph{concatenating} two sets of strings.
|
|
| 0 | 31 |
|
|
109
f2a90dda7e3b
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
104
diff
changeset
|
32 |
\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
|
33 |
are in $A @ B$? |
|
f2a90dda7e3b
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
104
diff
changeset
|
34 |
|
| 9 | 35 |
\item How is the power of a language defined? (Hint: There are two rules, one for $\_\!\_^0$ and |
36 |
one for $\_\!\_^{n+1}$.)
|
|
| 0 | 37 |
|
38 |
||
39 |
\end{enumerate}
|
|
40 |
||
41 |
\end{document}
|
|
42 |
||
43 |
%%% Local Variables: |
|
44 |
%%% mode: latex |
|
45 |
%%% TeX-master: t |
|
46 |
%%% End: |