slides/slides04.tex
author Christian Urban <urbanc@in.tum.de>
Tue, 18 Dec 2018 23:31:45 +0000
changeset 250 1b08b8ac13fd
parent 229 5549016ab10f
child 325 ca9c1cf929fa
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
\documentclass[dvipsnames,14pt,t,xelatex]{beamer}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
\usepackage{../slides}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
\usepackage{../graphics}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
\usepackage{../langs}
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
     5
%%\usepackage{../data}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
     6
\usepackage[export]{adjustbox}
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
     7
\usetikzlibrary{shapes}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
\hfuzz=220pt 
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
%\setmonofont[Scale=.88]{Consolas}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
%\newfontfamily{\consolas}{Consolas}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
\lstset{language=Scala,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
        style=mystyle,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
        numbersep=0pt,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
        numbers=none,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
        xleftmargin=0mm}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    20
\newcommand{\LEFTarrow}[3]{%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    21
\begin{textblock}{0}(#2,#3)%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    22
\onslide<#1>{%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    23
\begin{tikzpicture}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    24
\node at (0,0) [single arrow, shape border rotate=180, fill=red,text=red]{a};%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    25
\end{tikzpicture}}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    26
\end{textblock}}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    27
\newcommand{\DOWNarrow}[3]{%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    28
\begin{textblock}{0}(#2,#3)%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    29
\onslide<#1>{%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    30
\begin{tikzpicture}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    31
\node at (0,0) [single arrow, shape border rotate=270, fill=red,text=red]{a};%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    32
\end{tikzpicture}}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    33
\end{textblock}}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    34
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    35
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
\newcommand{\bl}[1]{\textcolor{blue}{#1}}     
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
% beamer stuff 
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    39
\renewcommand{\slidecaption}{PEP (Scala) 04, King's College London}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    41
\begin{filecontents}{re3a.data}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    42
1 0.00003
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    43
500001 0.22527
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    44
1000001 0.62752
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    45
1500001 0.88485
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    46
2000001 1.39815
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    47
2500001 1.68619
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    48
3000001 1.94957
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    49
3500001 2.15878
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    50
4000001 2.59918
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    51
4500001 5.90679
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    52
5000001 13.11295
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    53
5500001 19.15376
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    54
6000001 40.16373
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    55
\end{filecontents}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    56
\begin{filecontents}{re-python2.data}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    57
1 0.033
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    58
5 0.036
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    59
10 0.034
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    60
15 0.036
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    61
18 0.059
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    62
19 0.084
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    63
20 0.141
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    64
21 0.248
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    65
22 0.485
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    66
23 0.878
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    67
24 1.71
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    68
25 3.40
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    69
26 7.08
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    70
27 14.12
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    71
28 26.69
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    72
\end{filecontents}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    73
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    74
\begin{filecontents}{re-js.data}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    75
5   0.061
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    76
10  0.061
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    77
15  0.061
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    78
20  0.070
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    79
23  0.131
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    80
25  0.308
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    81
26  0.564
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    82
28  1.994
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    83
30  7.648
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    84
31  15.881 
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    85
32  32.190
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    86
\end{filecontents}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    87
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    88
\begin{filecontents}{re-java.data}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    89
5  0.00298
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    90
10  0.00418
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    91
15  0.00996
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    92
16  0.01710
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    93
17  0.03492
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    94
18  0.03303
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    95
19  0.05084
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    96
20  0.10177
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    97
21  0.19960
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    98
22  0.41159
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    99
23  0.82234
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   100
24  1.70251
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   101
25  3.36112
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   102
26  6.63998
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   103
27  13.35120
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   104
28  29.81185
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   105
\end{filecontents}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   107
\begin{filecontents}{re-java9.data}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   108
1000  0.01410
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   109
2000  0.04882
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   110
3000  0.10609
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   111
4000  0.17456
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   112
5000  0.27530
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   113
6000  0.41116
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   114
7000  0.53741
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   115
8000  0.70261
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   116
9000  0.93981
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   117
10000 0.97419
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   118
11000 1.28697
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   119
12000 1.51387
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   120
14000 2.07079
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   121
16000 2.69846
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   122
20000 4.41823
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   123
24000 6.46077
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   124
26000 7.64373
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   125
30000 9.99446
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   126
34000 12.966885
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   127
38000 16.281621
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   128
42000 19.180228
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   129
46000 21.984721
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   130
50000 26.950203
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   131
60000 43.0327746
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   132
\end{filecontents}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   133
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   134
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
\begin{document}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   137
\begin{frame}[t]
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   138
\frametitle{%
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   139
  \begin{tabular}{@ {}c@ {}}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   140
  \\[5mm]
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   141
  \huge PEP Scala (4) 
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   142
  \end{tabular}}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   144
  \normalsize
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
  \begin{center}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
  \begin{tabular}{ll}
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   147
    Email:  & christian.urban at kcl.ac.uk\\
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   148
    Office: & N\liningnums{7.07} (North Wing, Bush House)\\
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   149
    Slides \& Code: & KEATS\medskip\\
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   150
    Office Hours: &  Mondays 12:00 -- 14:00\\
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   151
  \end{tabular}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   152
  \end{center}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   153
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   154
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   155
\end{frame}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   157
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   158
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   159
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   160
\begin{frame}[c]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   161
\frametitle{Somewhere Remote}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   162
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   163
\begin{center}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   164
\includegraphics[scale=0.37]{../pics/sahara.jpg}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   165
\end{center}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   166
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   167
\end{frame}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   168
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   169
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   170
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   171
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   172
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   173
\begin{frame}[t]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   174
\frametitle{This is a bit harsh\ldots}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   175
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   176
\mbox{}\\[-22mm]\mbox{}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   177
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   178
\begin{center}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   179
\begin{bubble}[10.5cm]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   180
  ...trying a new method because the fucking github reports dont tell me
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   181
  which test failed. It's not really helpful when the inline tests work
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   182
  and it compiles but all i get is 'one test failed'... really helpful my dude.
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   183
\end{bubble}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   184
\end{center}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   185
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   186
\begin{center}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   187
\begin{bubble}[10.5cm]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   188
  ...Reverted back and finished part 5, this is ridiculous how one test works
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   189
  and all I get is 'ONE TEST FAILED'. Fix your reports before giving us
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   190
  assignments like this...
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   191
\end{bubble}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   192
\end{center}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   193
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   194
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   195
\end{frame}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   196
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   197
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   198
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   199
\begin{frame}[t,fragile]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   200
\frametitle{Needless to say I tried it out}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   201
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   202
\mbox{}\\[-7mm]\mbox{}\footnotesize
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   203
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   204
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-4mm]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   205
> legal_moves(8, Nil, (2,2))
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   206
 = List((3,4), (4,3), (4,1), (3,0), (1,0), (0,1), (0,3), (1,4))
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   207
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   208
> legal_moves(8, Nil, (7,7))
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   209
 = List((6,5), (5,6))
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   210
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   211
> legal_moves(8, List((4,1), (1,0)), (2,2))
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   212
 = List((3,4), (4,3), (3,0), (0,1), (0,3), (1,4))
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   213
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   214
> legal_moves(1, Nil, (0,0))
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   215
 = List((-1,-2), (-2,-1))
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   216
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   217
> legal_moves(2, Nil, (0,0))
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   218
 = List((1,-2), (-1,-2), (-2,-1), (-2,1))
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   219
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   220
> legal_moves(3, Nil, (0,0))
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   221
 = List((1,2), (2,1), (2,-1), (1,-2), (-1,-2), (-2,-1), (-2,1), (-1,2))
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   222
\end{lstlisting}  
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   223
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   224
\LEFTarrow{1}{9}{9}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   225
\LEFTarrow{1}{12}{11}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   226
\DOWNarrow{1}{10}{13}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   227
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   228
\end{frame}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   229
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   230
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   231
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   232
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   233
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   234
\begin{frame}[c,fragile]
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   235
\small
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   236
  
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   237
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-7mm]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   238
def is_legal(dim: Int, p: Path, x: Pos): Boolean = {
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   239
  if (......some_really_long_condition.....) false
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   240
  else true
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   241
}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   242
\end{lstlisting}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   243
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   244
\pause
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   245
\bigskip
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   246
\rule{11cm}{0.3mm}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   247
\bigskip
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   248
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   249
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-7mm]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   250
def is_legal(dim: Int, p: Path, x: Pos): Boolean = 
229
5549016ab10f updated
Christian Urban <urbanc@in.tum.de>
parents: 222
diff changeset
   251
  !......some_really_long_condition.....
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   252
\end{lstlisting}\pause
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   253
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   254
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   255
\end{frame}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   256
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   257
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   258
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   259
\begin{frame}[c]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   260
\frametitle{DFAs}  
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   261
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   262
\begin{center}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   263
\begin{tikzpicture}[>=stealth',very thick,auto,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   264
  every state/.style={minimum size=0pt,inner sep=2pt,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   265
    draw=blue!50,very thick,fill=blue!20},]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   266
  
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   267
\only<1,3->{\node[state,initial] (Q_0)  {$\mbox{Q}_0$};}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   268
\only<2>{\node[state,initial,fill=red] (Q_0)  {$\mbox{Q}_0$};}  
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   269
\only<1,2,4->{\node[state] (Q_1) [right=of Q_0] {$\mbox{Q}_1$};}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   270
\only<3>{\node[state,fill=red] (Q_1) [right=of Q_0] {$\mbox{Q}_1$};}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   271
\only<-3,5->{\node[state] (Q_2) [below right=of Q_0] {$\mbox{Q}_2$};}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   272
\only<4>{\node[state,fill=red] (Q_2) [below right=of Q_0] {$\mbox{Q}_2$};}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   273
\only<-4,6->{\node[state] (Q_3) [right=of Q_2] {$\mbox{Q}_3$};}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   274
\only<5>{\node[state,fill=red] (Q_3) [right=of Q_2] {$\mbox{Q}_3$};}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   275
\only<-5>{\node[state, accepting] (Q_4) [right=of Q_1] {$\mbox{Q}_4$};}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   276
\only<6->{\node[state, accepting,fill=red] (Q_4) [right=of Q_1] {$\mbox{Q}_4$};}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   277
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   278
\path[->] (Q_0) edge node [above]  {\alert{$a$}} (Q_1);
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   279
\path[->] (Q_1) edge node [above]  {\alert{$a$}} (Q_4);
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   280
\path[->] (Q_4) edge [loop right] node  {\alert{$a, b$}} ();
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   281
\path[->] (Q_3) edge node [right]  {\alert{$a$}} (Q_4);
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   282
\path[->] (Q_2) edge node [above]  {\alert{$a$}} (Q_3);
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   283
\path[->] (Q_1) edge node [right]  {\alert{$b$}} (Q_2);
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   284
\path[->] (Q_0) edge node [above]  {\alert{$b$}} (Q_2);
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   285
\path[->] (Q_2) edge [loop left] node  {\alert{$b$}} ();
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   286
\path[->] (Q_3) edge [bend left=95, looseness=1.3] node [below]  {\alert{$b$}} (Q_0);
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   287
\end{tikzpicture}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   288
\end{center}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   289
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   290
\begin{textblock}{9}(4,12)
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   291
\LARGE{}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   292
\only<3->{\boldmath\alert{$a$}}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   293
\only<4->{\boldmath\alert{$b$}}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   294
\only<5->{\boldmath\alert{$a$}}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   295
\only<6->{\boldmath\alert{$a$}}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   296
\only<7->{\boldmath\alert{$a\quad\Rightarrow \textbf{yes}$}}% 
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   297
\end{textblock}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   298
  
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   299
\end{frame}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   300
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   301
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   302
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   303
\begin{frame}[t]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   304
\frametitle{DFAs}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   305
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   306
A \alert{\bf deterministic finite automaton}, DFA, consists of
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   307
5 things:
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   308
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   309
\begin{itemize}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   310
\item an alphabet \bl{$\varSigma$}  
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   311
\item a set of states \bl{$\mbox{Qs}$}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   312
\item one of these states is the start state \bl{$\mbox{Q}_0$}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   313
\item some states are accepting states \bl{$F$}, and
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   314
\item there is transition function \bl{$\delta$}\bigskip 
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   315
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   316
\small
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   317
which takes a state  and a character as arguments and produces a 
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   318
new state; this function might not be everywhere defined 
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   319
\end{itemize}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   320
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   321
\begin{center}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   322
\bl{$A(\varSigma, \mbox{Qs}, \mbox{Q}_0, F, \delta)$}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   323
\end{center}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   324
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   325
\end{frame}
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   326
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   327
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   328
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   329
\begin{frame}[c]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   330
\frametitle{NFAs}  
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   331
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   332
\begin{center}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   333
\begin{tikzpicture}[>=stealth',very thick, auto,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   334
    every state/.style={minimum size=0pt,inner sep=3pt,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   335
      draw=blue!50,very thick,fill=blue!20},scale=2]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   336
\node[state,initial]  (Q_0)  {$\mbox{Q}_0$};
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   337
\node[state] (Q_1) [right=of Q_0] {$\mbox{Q}_1$};
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   338
\node[state, accepting] (Q_2) [right=of Q_1] {$\mbox{Q}_2$};
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   339
\path[->] (Q_0) edge [loop above] node  {\alert{$b$}} ();
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   340
\path[<-] (Q_0) edge node [below]  {\alert{$b$}} (Q_1);
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   341
\path[->] (Q_0) edge [bend left] node [above]  {\alert{$a$}} (Q_1);
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   342
\path[->] (Q_0) edge [bend right=45,looseness=1.3] node [below]  {\alert{$a$}} (Q_2);
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   343
\path[->] (Q_1) edge [loop above] node  {\alert{$a,b$}} ();
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   344
\path[->] (Q_1) edge node  [above] {\alert{$a$}} (Q_2);
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   345
\end{tikzpicture}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   346
\end{center}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   347
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   348
\end{frame}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   349
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   350
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   351
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   352
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   353
\begin{frame}[c]
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   354
  \frametitle{CW\liningnums{9} (\liningnums{1} Part): Regexes}
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   355
  
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   356
\begin{center}
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   357
  Graphs: $(a^*)^* b$ and strings $\underbrace{\;a\ldots a\;}_{n}$\bigskip
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   358
  
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   359
\begin{tabular}[t]{@{\hspace{-8mm}}c@{\hspace{-4mm}}c@{}}
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   360
\only<1>{\raisebox{6mm}{\begin{tikzpicture}
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   361
\begin{axis}[
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   362
    xlabel={$n$},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   363
    x label style={at={(1.05,0.0)}},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   364
    ylabel={time in secs},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   365
    enlargelimits=false,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   366
    xtick={0,5,...,30},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   367
    xmax=33,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   368
    ymax=35,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   369
    ytick={0,5,...,30},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   370
    scaled ticks=false,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   371
    axis lines=left,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   372
    width=5.5cm,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   373
    height=5cm, 
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   374
    legend entries={\small{}Python,  \small{}Java 8,  \small{}JavaScript},  
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   375
    legend pos=north west,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   376
    legend cell align=left]
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   377
\addplot[blue,mark=*, mark options={fill=white}] table {re-python2.data};  
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   378
\addplot[cyan,mark=*, mark options={fill=white}] table {re-java.data};
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   379
\addplot[red,mark=*, mark options={fill=white}] table {re-js.data};
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   380
\end{axis}
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   381
\end{tikzpicture}}}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   382
\only<2>{\raisebox{0mm}{\begin{tikzpicture}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   383
\begin{axis}[
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   384
    xlabel={$n$},
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   385
    x label style={at={(1.05,0.0)}},
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   386
    ylabel={time in secs},
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   387
    %y label style={at={(0.06,0.5)}},
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   388
    enlargelimits=false,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   389
    %xtick={0,30000,...,60000},
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   390
    xmax=65000,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   391
    ymax=35,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   392
    ytick={0,5,...,30},
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   393
    scaled ticks=true,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   394
    axis lines=left,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   395
    width=5.5cm,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   396
    height=5cm, 
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   397
    legend entries={\small{}Java 9},  
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   398
    legend pos=north west]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   399
\addplot[cyan,mark=*, mark options={fill=white}] table {re-java9.data};
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   400
\end{axis}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   401
\end{tikzpicture}}}
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   402
  &
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   403
\onslide<1-2>{\begin{tikzpicture}
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   404
  \begin{axis}[
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   405
    xlabel={$n$},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   406
    x label style={at={(1.05,0.0)}},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   407
    ylabel={time in secs},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   408
    enlargelimits=false,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   409
    ymax=35,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   410
    ytick={0,5,...,30},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   411
    axis lines=left,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   412
    %%scaled ticks=false,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   413
    width=5.5cm, 
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   414
    height=5cm]
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   415
%%\addplot[green,mark=square*,mark options={fill=white}] table {re2a.data};    
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   416
\addplot[magenta,mark=square*,mark options={fill=white}] table {re3a.data};
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   417
\end{axis}
70
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   418
\end{tikzpicture}}
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   419
\end{tabular}
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   420
\end{center}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   421
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   422
\hfill\small\url{https://vimeo.com/112065252}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   423
\end{frame}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   424
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   425
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   426
\begin{frame}[c]
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   427
\frametitle{Hint}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   428
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   429
\begin{center}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   430
\LARGE\textbf{\alert{Pattern-Matching}}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   431
\end{center}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   432
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   433
\end{frame}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   434
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   435
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   436
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   437
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   438
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   439
\begin{frame}[c,fragile]
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   440
\frametitle{\alert{Questions?}}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   441
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   442
\end{frame}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   443
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
70
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   444
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   445
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   446
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   447
\end{document}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   448
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   449
%%% Local Variables:  
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   450
%%% mode: latex
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   451
%%% TeX-master: t
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   452
%%% End: 
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   453