| author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
| Tue, 29 Oct 2013 12:24:22 +0000 | |
| changeset 168 | e60c4a9ba340 |
| parent 93 | 4794759139ea |
| child 169 | 57df3d7b4a25 |
| permissions | -rw-r--r-- |
| 49 | 1 |
\documentclass[dvipsnames,14pt,t]{beamer}
|
|
168
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
2 |
\usepackage{beamerthemeplaincu}
|
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
3 |
%\usepackage[T1]{fontenc}
|
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
4 |
%\usepackage[latin1]{inputenc}
|
| 49 | 5 |
\usepackage{mathpartir}
|
6 |
\usepackage[absolute,overlay]{textpos}
|
|
7 |
\usepackage{ifthen}
|
|
8 |
\usepackage{tikz}
|
|
9 |
\usepackage{pgf}
|
|
10 |
\usepackage{calc}
|
|
11 |
\usepackage{ulem}
|
|
12 |
\usepackage{courier}
|
|
13 |
\usepackage{listings}
|
|
14 |
\renewcommand{\uline}[1]{#1}
|
|
15 |
\usetikzlibrary{arrows}
|
|
16 |
\usetikzlibrary{automata}
|
|
17 |
\usetikzlibrary{shapes}
|
|
18 |
\usetikzlibrary{shadows}
|
|
19 |
\usetikzlibrary{positioning}
|
|
20 |
\usetikzlibrary{calc}
|
|
21 |
\usetikzlibrary{plotmarks}
|
|
22 |
\usepackage{graphicx}
|
|
|
168
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
23 |
\setmonofont{Consolas}
|
| 49 | 24 |
|
25 |
\definecolor{javared}{rgb}{0.6,0,0} % for strings
|
|
26 |
\definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
|
|
27 |
\definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
|
|
28 |
\definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
|
|
29 |
||
|
168
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
30 |
\makeatletter |
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
31 |
\lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}}
|
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
32 |
\@empty\z@\@empty |
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
33 |
\makeatother |
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
34 |
|
| 49 | 35 |
|
36 |
\lstdefinelanguage{scala}{
|
|
37 |
morekeywords={abstract,case,catch,class,def,%
|
|
38 |
do,else,extends,false,final,finally,% |
|
39 |
for,if,implicit,import,match,mixin,% |
|
40 |
new,null,object,override,package,% |
|
41 |
private,protected,requires,return,sealed,% |
|
42 |
super,this,throw,trait,true,try,% |
|
43 |
type,val,var,while,with,yield}, |
|
44 |
otherkeywords={=>,<-,<\%,<:,>:,\#,@},
|
|
45 |
sensitive=true, |
|
46 |
morecomment=[l]{//},
|
|
47 |
morecomment=[n]{/*}{*/},
|
|
48 |
morestring=[b]", |
|
49 |
morestring=[b]', |
|
50 |
morestring=[b]""" |
|
51 |
} |
|
52 |
||
|
168
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
53 |
\lstdefinelanguage{while}{
|
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
54 |
morekeywords={while, if, then. else, read, write},
|
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
55 |
otherkeywords={=>,<-,<\%,<:,>:,\#,@},
|
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
56 |
sensitive=true, |
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
57 |
morecomment=[l]{//},
|
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
58 |
morecomment=[n]{/*}{*/},
|
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
59 |
morestring=[b]", |
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
60 |
morestring=[b]', |
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
61 |
morestring=[b]""" |
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
62 |
} |
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
63 |
|
|
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
64 |
|
| 49 | 65 |
\lstset{language=Scala,
|
66 |
basicstyle=\ttfamily, |
|
67 |
keywordstyle=\color{javapurple}\bfseries,
|
|
68 |
stringstyle=\color{javagreen},
|
|
69 |
commentstyle=\color{javagreen},
|
|
70 |
morecomment=[s][\color{javadocblue}]{/**}{*/},
|
|
71 |
numbers=left, |
|
72 |
numberstyle=\tiny\color{black},
|
|
73 |
stepnumber=1, |
|
74 |
numbersep=10pt, |
|
75 |
tabsize=2, |
|
76 |
showspaces=false, |
|
77 |
showstringspaces=false} |
|
|
168
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
78 |
|
| 49 | 79 |
|
80 |
% beamer stuff |
|
|
168
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
81 |
\renewcommand{\slidecaption}{AFL 06, King's College London, 30.~October 2013}
|
| 49 | 82 |
\newcommand{\bl}[1]{\textcolor{blue}{#1}}
|
83 |
\newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions
|
|
84 |
||
85 |
% The data files, written on the first run. |
|
86 |
\begin{filecontents}{re-python.data}
|
|
87 |
1 0.029 |
|
88 |
5 0.029 |
|
89 |
10 0.029 |
|
90 |
15 0.032 |
|
91 |
16 0.042 |
|
92 |
17 0.042 |
|
93 |
18 0.055 |
|
94 |
19 0.084 |
|
95 |
20 0.136 |
|
96 |
21 0.248 |
|
97 |
22 0.464 |
|
98 |
23 0.899 |
|
99 |
24 1.773 |
|
100 |
25 3.505 |
|
101 |
26 6.993 |
|
102 |
27 14.503 |
|
103 |
28 29.307 |
|
104 |
#29 58.886 |
|
105 |
\end{filecontents}
|
|
106 |
||
107 |
\begin{filecontents}{re1.data}
|
|
108 |
1 0.00179 |
|
109 |
2 0.00011 |
|
110 |
3 0.00014 |
|
111 |
4 0.00026 |
|
112 |
5 0.00050 |
|
113 |
6 0.00095 |
|
114 |
7 0.00190 |
|
115 |
8 0.00287 |
|
116 |
9 0.00779 |
|
117 |
10 0.01399 |
|
118 |
11 0.01894 |
|
119 |
12 0.03666 |
|
120 |
13 0.07994 |
|
121 |
14 0.08944 |
|
122 |
15 0.02377 |
|
123 |
16 0.07392 |
|
124 |
17 0.22798 |
|
125 |
18 0.65310 |
|
126 |
19 2.11360 |
|
127 |
20 6.31606 |
|
128 |
21 21.46013 |
|
129 |
\end{filecontents}
|
|
130 |
||
131 |
\begin{filecontents}{re2.data}
|
|
132 |
1 0.00240 |
|
133 |
2 0.00013 |
|
134 |
3 0.00020 |
|
135 |
4 0.00030 |
|
136 |
5 0.00049 |
|
137 |
6 0.00083 |
|
138 |
7 0.00146 |
|
139 |
8 0.00228 |
|
140 |
9 0.00351 |
|
141 |
10 0.00640 |
|
142 |
11 0.01217 |
|
143 |
12 0.02565 |
|
144 |
13 0.01382 |
|
145 |
14 0.02423 |
|
146 |
15 0.05065 |
|
147 |
16 0.06522 |
|
148 |
17 0.02140 |
|
149 |
18 0.05176 |
|
150 |
19 0.18254 |
|
151 |
20 0.51898 |
|
152 |
21 1.39631 |
|
153 |
22 2.69501 |
|
154 |
23 8.07952 |
|
155 |
\end{filecontents}
|
|
156 |
||
157 |
\begin{filecontents}{re-internal.data}
|
|
158 |
1 0.00069 |
|
159 |
301 0.00700 |
|
160 |
601 0.00297 |
|
161 |
901 0.00470 |
|
162 |
1201 0.01301 |
|
163 |
1501 0.01175 |
|
164 |
1801 0.01761 |
|
165 |
2101 0.01787 |
|
166 |
2401 0.02717 |
|
167 |
2701 0.03932 |
|
168 |
3001 0.03470 |
|
169 |
3301 0.04349 |
|
170 |
3601 0.05411 |
|
171 |
3901 0.06181 |
|
172 |
4201 0.07119 |
|
173 |
4501 0.08578 |
|
174 |
\end{filecontents}
|
|
175 |
||
176 |
\begin{filecontents}{re3.data}
|
|
177 |
1 0.001605 |
|
178 |
501 0.131066 |
|
179 |
1001 0.057885 |
|
180 |
1501 0.136875 |
|
181 |
2001 0.176238 |
|
182 |
2501 0.254363 |
|
183 |
3001 0.37262 |
|
184 |
3501 0.500946 |
|
185 |
4001 0.638384 |
|
186 |
4501 0.816605 |
|
187 |
5001 1.00491 |
|
188 |
5501 1.232505 |
|
189 |
6001 1.525672 |
|
190 |
6501 1.757502 |
|
191 |
7001 2.092784 |
|
192 |
7501 2.429224 |
|
193 |
8001 2.803037 |
|
194 |
8501 3.463045 |
|
195 |
9001 3.609 |
|
196 |
9501 4.081504 |
|
197 |
10001 4.54569 |
|
198 |
\end{filecontents}
|
|
199 |
\begin{document}
|
|
200 |
||
201 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
202 |
\mode<presentation>{
|
|
203 |
\begin{frame}<1>[t]
|
|
204 |
\frametitle{%
|
|
205 |
\begin{tabular}{@ {}c@ {}}
|
|
206 |
\\[-3mm] |
|
207 |
\LARGE Automata and \\[-2mm] |
|
208 |
\LARGE Formal Languages (6)\\[3mm] |
|
209 |
\end{tabular}}
|
|
210 |
||
211 |
\normalsize |
|
212 |
\begin{center}
|
|
213 |
\begin{tabular}{ll}
|
|
214 |
Email: & christian.urban at kcl.ac.uk\\ |
|
|
168
e60c4a9ba340
added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
93
diff
changeset
|
215 |
Office: & S1.27 (1st floor Strand Building)\\ |
| 49 | 216 |
Slides: & KEATS (also home work is there)\\ |
217 |
\end{tabular}
|
|
218 |
\end{center}
|
|
219 |
||
220 |
||
221 |
\end{frame}}
|
|
222 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
223 |
||
224 |
||
| 50 | 225 |
\newcommand{\qq}{\mbox{\texttt{"}}}
|
| 49 | 226 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
227 |
\mode<presentation>{
|
|
228 |
\begin{frame}[c]
|
|
| 50 | 229 |
\frametitle{\begin{tabular}{c}Grammars\end{tabular}}
|
230 |
||
| 53 | 231 |
A (context-free) grammar \bl{$G$} consists of
|
| 49 | 232 |
|
233 |
\begin{itemize}
|
|
| 50 | 234 |
\item a finite set of nonterminal symbols (upper case) |
235 |
\item a finite terminal symbols or tokens (lower case) |
|
236 |
\item a start symbol (which must be a nonterminal) |
|
237 |
\item a set of rules |
|
| 49 | 238 |
\begin{center}
|
| 50 | 239 |
\bl{$A \rightarrow \text{rhs}$}
|
| 49 | 240 |
\end{center}
|
241 |
||
| 50 | 242 |
where \bl{rhs} are sequences involving terminals and nonterminals.\medskip\pause
|
| 49 | 243 |
|
| 50 | 244 |
We can also allow rules |
245 |
\begin{center}
|
|
246 |
\bl{$A \rightarrow \text{rhs}_1 | \text{rhs}_2 | \ldots$}
|
|
247 |
\end{center}
|
|
248 |
\end{itemize}
|
|
| 49 | 249 |
|
250 |
||
251 |
\end{frame}}
|
|
252 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
253 |
||
254 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
255 |
\mode<presentation>{
|
|
256 |
\begin{frame}[c]
|
|
| 50 | 257 |
\frametitle{\begin{tabular}{c}Palindromes\end{tabular}}
|
| 49 | 258 |
|
259 |
\begin{center}
|
|
| 50 | 260 |
\bl{\begin{tabular}{lcl}
|
261 |
$S$ & $\rightarrow$ & $\epsilon$ \\ |
|
| 53 | 262 |
$S$ & $\rightarrow$ & $a\cdot S\cdot a$ \\ |
263 |
$S$ & $\rightarrow$ & $b\cdot S\cdot b$ \\ |
|
| 50 | 264 |
\end{tabular}}
|
265 |
\end{center}\pause
|
|
266 |
||
267 |
or |
|
268 |
||
269 |
\begin{center}
|
|
270 |
\bl{\begin{tabular}{lcl}
|
|
| 53 | 271 |
$S$ & $\rightarrow$ & $\epsilon \;|\; a\cdot S\cdot a \;|\;b\cdot S\cdot b$ \\ |
| 50 | 272 |
\end{tabular}}
|
| 49 | 273 |
\end{center}
|
274 |
||
275 |
||
276 |
\end{frame}}
|
|
277 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
278 |
||
279 |
||
280 |
||
281 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
282 |
\mode<presentation>{
|
|
283 |
\begin{frame}[c]
|
|
| 50 | 284 |
\frametitle{\begin{tabular}{c}Arithmetic Expressions\end{tabular}}
|
| 49 | 285 |
|
286 |
\begin{center}
|
|
287 |
\bl{\begin{tabular}{lcl}
|
|
| 50 | 288 |
$E$ & $\rightarrow$ & $num\_token$ \\ |
| 53 | 289 |
$E$ & $\rightarrow$ & $E \cdot + \cdot E$ \\ |
290 |
$E$ & $\rightarrow$ & $E \cdot - \cdot E$ \\ |
|
291 |
$E$ & $\rightarrow$ & $E \cdot * \cdot E$ \\ |
|
292 |
$E$ & $\rightarrow$ & $( \cdot E \cdot )$ |
|
| 49 | 293 |
\end{tabular}}
|
| 50 | 294 |
\end{center}\pause
|
| 49 | 295 |
|
| 50 | 296 |
\bl{\texttt{1 + 2 * 3 + 4}}
|
| 49 | 297 |
|
298 |
\end{frame}}
|
|
299 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
300 |
||
301 |
||
302 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
303 |
\mode<presentation>{
|
|
304 |
\begin{frame}[c]
|
|
| 50 | 305 |
\frametitle{\begin{tabular}{c}Parse Trees\end{tabular}}
|
| 49 | 306 |
|
307 |
\begin{center}
|
|
308 |
\bl{\begin{tabular}{lcl}
|
|
| 53 | 309 |
$E$ & $\rightarrow$ & $F \;|\; F \cdot * \cdot F$\\ |
310 |
$F$ & $\rightarrow$ & $T \;|\; T \cdot + \cdot T \;|\; T \cdot - \cdot T$\\ |
|
311 |
$T$ & $\rightarrow$ & $num\_token \;|\; ( \cdot E \cdot )$\\ |
|
| 49 | 312 |
\end{tabular}}
|
313 |
\end{center}
|
|
314 |
||
315 |
\begin{center}
|
|
316 |
\begin{tikzpicture}[level distance=8mm, blue]
|
|
| 50 | 317 |
\node {$E$}
|
318 |
child {node {$F$}
|
|
319 |
child {node {$T$}
|
|
320 |
child {node {(\,$E$\,)}
|
|
321 |
child {node{$F$ *{} $F$}
|
|
322 |
child {node {$T$} child {node {2}}}
|
|
323 |
child {node {$T$} child {node {3}}}
|
|
| 49 | 324 |
} |
325 |
} |
|
326 |
} |
|
| 50 | 327 |
child {node {+}}
|
328 |
child {node {$T$}
|
|
329 |
child {node {(\,$E$\,)}
|
|
330 |
child {node {$F$}
|
|
331 |
child {node {$T$ +{} $T$}
|
|
| 49 | 332 |
child {node {3}}
|
333 |
child {node {4}}
|
|
334 |
} |
|
335 |
}} |
|
336 |
}}; |
|
337 |
\end{tikzpicture}
|
|
338 |
\end{center}
|
|
339 |
||
| 50 | 340 |
\begin{textblock}{5}(1, 6.5)
|
| 49 | 341 |
\bl{\texttt{(2*3)+(3+4)}}
|
342 |
\end{textblock}
|
|
343 |
||
344 |
\end{frame}}
|
|
345 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
| 50 | 346 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
347 |
\mode<presentation>{
|
|
348 |
\begin{frame}[c]
|
|
349 |
\frametitle{\begin{tabular}{c}Ambiguous Grammars\end{tabular}}
|
|
350 |
||
351 |
A grammar is \alert{ambiguous} if there is a string that has at least parse trees.
|
|
352 |
||
353 |
||
354 |
\begin{center}
|
|
355 |
\bl{\begin{tabular}{lcl}
|
|
356 |
$E$ & $\rightarrow$ & $num\_token$ \\ |
|
| 53 | 357 |
$E$ & $\rightarrow$ & $E \cdot + \cdot E$ \\ |
358 |
$E$ & $\rightarrow$ & $E \cdot - \cdot E$ \\ |
|
359 |
$E$ & $\rightarrow$ & $E \cdot * \cdot E$ \\ |
|
360 |
$E$ & $\rightarrow$ & $( \cdot E \cdot )$ |
|
| 50 | 361 |
\end{tabular}}
|
362 |
\end{center}
|
|
363 |
||
364 |
\bl{\texttt{1 + 2 * 3 + 4}}
|
|
365 |
||
366 |
\end{frame}}
|
|
367 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
368 |
||
369 |
||
370 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
371 |
\mode<presentation>{
|
|
372 |
\begin{frame}[c]
|
|
373 |
\frametitle{\begin{tabular}{c}Chomsky Normal Form\end{tabular}}
|
|
374 |
||
375 |
All rules must be of the form |
|
376 |
||
377 |
\begin{center}
|
|
378 |
\bl{$A \rightarrow a$}
|
|
379 |
\end{center}
|
|
380 |
||
381 |
or |
|
382 |
||
383 |
\begin{center}
|
|
| 53 | 384 |
\bl{$A \rightarrow B\cdot C$}
|
| 50 | 385 |
\end{center}
|
386 |
||
387 |
||
388 |
||
389 |
\end{frame}}
|
|
390 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
| 53 | 391 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
392 |
\mode<presentation>{
|
|
393 |
\begin{frame}[c]
|
|
394 |
\frametitle{\begin{tabular}{c}CYK Algorithm\end{tabular}}
|
|
| 50 | 395 |
|
| 53 | 396 |
|
397 |
\begin{center}
|
|
398 |
\bl{\begin{tabular}{@ {}lcl}
|
|
399 |
$S$ & $\rightarrow$ & $N\cdot P$ \\ |
|
400 |
$P$ & $\rightarrow$ & $V\cdot N$ \\ |
|
401 |
$N$ & $\rightarrow$ & $N\cdot N$ \\ |
|
402 |
$N$ & $\rightarrow$ & $\texttt{students} \;|\; \texttt{Jeff} \;|\; \texttt{geometry} \;|\; \texttt{trains} $ \\
|
|
| 56 | 403 |
$V$ & $\rightarrow$ & $\texttt{trains}$
|
| 53 | 404 |
\end{tabular}}
|
405 |
\end{center}
|
|
406 |
||
407 |
\bl{\texttt{Jeff trains geometry students}}
|
|
408 |
||
409 |
\end{frame}}
|
|
410 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
| 51 | 411 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
412 |
\mode<presentation>{
|
|
413 |
\begin{frame}[c]
|
|
414 |
\frametitle{\begin{tabular}{c}CYK Algorithm\end{tabular}}
|
|
| 50 | 415 |
|
| 49 | 416 |
|
| 52 | 417 |
\begin{itemize}
|
418 |
\item runtime is \bl{$O(n^3)$}\bigskip
|
|
419 |
\item grammars need to be transferred into CNF |
|
420 |
\end{itemize}
|
|
| 51 | 421 |
|
422 |
\end{frame}}
|
|
423 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
424 |
||
| 49 | 425 |
\end{document}
|
426 |
||
427 |
%%% Local Variables: |
|
428 |
%%% mode: latex |
|
429 |
%%% TeX-master: t |
|
430 |
%%% End: |
|
431 |