slides08.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 20 Nov 2012 22:06:05 +0000
changeset 65 ade6af51402c
child 66 9215b9fb8852
permissions -rw-r--r--
tuned
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
65
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
\documentclass[dvipsnames,14pt,t]{beamer}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
\usepackage{beamerthemeplainculight}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
\usepackage[T1]{fontenc}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
\usepackage[latin1]{inputenc}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
\usepackage{mathpartir}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
\usepackage[absolute,overlay]{textpos}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
\usepackage{ifthen}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
\usepackage{tikz}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
\usepackage{pgf}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
\usepackage{calc} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
\usepackage{ulem}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
\usepackage{courier}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
\usepackage{listings}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
\renewcommand{\uline}[1]{#1}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
\usetikzlibrary{arrows}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
\usetikzlibrary{automata}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
\usetikzlibrary{shapes}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
\usetikzlibrary{shadows}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
\usetikzlibrary{positioning}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
\usetikzlibrary{calc}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    21
\usetikzlibrary{plotmarks}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    22
\usepackage{graphicx} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    23
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    24
\definecolor{javared}{rgb}{0.6,0,0} % for strings
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    25
\definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    26
\definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
\definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    28
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
\lstset{language=Java,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    30
	basicstyle=\ttfamily,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    31
	keywordstyle=\color{javapurple}\bfseries,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    32
	stringstyle=\color{javagreen},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    33
	commentstyle=\color{javagreen},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    34
	morecomment=[s][\color{javadocblue}]{/**}{*/},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    35
	numbers=left,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    36
	numberstyle=\tiny\color{black},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    37
	stepnumber=1,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    38
	numbersep=10pt,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    39
	tabsize=2,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    40
	showspaces=false,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    41
	showstringspaces=false}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    42
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    43
\lstdefinelanguage{scala}{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    44
  morekeywords={abstract,case,catch,class,def,%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    45
    do,else,extends,false,final,finally,%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    46
    for,if,implicit,import,match,mixin,%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    47
    new,null,object,override,package,%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    48
    private,protected,requires,return,sealed,%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    49
    super,this,throw,trait,true,try,%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    50
    type,val,var,while,with,yield},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    51
  otherkeywords={=>,<-,<\%,<:,>:,\#,@},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    52
  sensitive=true,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    53
  morecomment=[l]{//},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    54
  morecomment=[n]{/*}{*/},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    55
  morestring=[b]",
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    56
  morestring=[b]',
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    57
  morestring=[b]"""
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    58
}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    59
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    60
\lstset{language=Scala,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    61
	basicstyle=\ttfamily,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    62
	keywordstyle=\color{javapurple}\bfseries,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    63
	stringstyle=\color{javagreen},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    64
	commentstyle=\color{javagreen},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    65
	morecomment=[s][\color{javadocblue}]{/**}{*/},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    66
	numbers=left,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    67
	numberstyle=\tiny\color{black},
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    68
	stepnumber=1,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    69
	numbersep=10pt,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    70
	tabsize=2,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    71
	showspaces=false,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    72
	showstringspaces=false}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    73
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    74
% beamer stuff 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    75
\renewcommand{\slidecaption}{AFL 08, King's College London, 21.~November 2012}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    76
\newcommand{\bl}[1]{\textcolor{blue}{#1}}       
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    77
\newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    78
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    79
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    80
% The data files, written on the first run.
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    81
\begin{filecontents}{s-grammar1.data}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    82
1 0.01152
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    83
51 0.07973
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    84
101 0.09726
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    85
151 0.09320
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    86
201 0.10010
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    87
251 0.16997
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    88
301 0.26662
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    89
351 0.46118
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    90
401 0.62516
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    91
451 0.87247
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    92
501 1.16334
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    93
551 1.71152
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    94
601 2.10958
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    95
651 2.44360
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    96
701 2.98488
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    97
751 3.50326
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    98
801 4.11036
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    99
851 4.93394
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   100
901 5.77465
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   101
951 7.39123
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   102
\end{filecontents}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   103
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   104
\begin{filecontents}{s-grammar2.data}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   105
1 0.01280
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   106
2 0.00064
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   107
3 0.00173
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   108
4 0.00355
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   109
5 0.00965
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   110
6 0.02674
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   111
7 0.06953
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   112
8 0.11166
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   113
9 0.18707
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   114
10 0.09189
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   115
11 0.12724
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   116
12 0.24337
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   117
13 0.59304
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   118
14 1.53594
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   119
15 4.01195
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   120
16 10.73582
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   121
17 29.51587
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   122
#18 73.14163
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   123
\end{filecontents}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   124
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   125
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   126
\begin{document}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   127
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   128
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   129
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   130
\begin{frame}<1>[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   131
\frametitle{%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   132
  \begin{tabular}{@ {}c@ {}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   133
  \\[-3mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   134
  \LARGE Automata and \\[-2mm] 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   135
  \LARGE Formal Languages (8)\\[3mm] 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   136
  \end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   137
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   138
  \normalsize
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   139
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   140
  \begin{tabular}{ll}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   141
  Email:  & christian.urban at kcl.ac.uk\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   142
  Of$\!$fice: & S1.27 (1st floor Strand Building)\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   143
  Slides: & KEATS (also home work is there)\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   144
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   145
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   146
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   147
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   148
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   149
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   150
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   151
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   152
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   153
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   154
\frametitle{\begin{tabular}{c}Two Grammars\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   155
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   156
Which languages are recognised by the following two grammars?
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   157
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   158
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   159
\bl{\begin{tabular}{lcl}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   160
$S$ & $\rightarrow$ &  $1 \cdot S \cdot S$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   161
        & $|$ & $\epsilon$
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   162
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   163
\end{center}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   164
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   165
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   166
\bl{\begin{tabular}{lcl}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   167
$U$ & $\rightarrow$ &  $1 \cdot U$\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   168
        & $|$ & $\epsilon$
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   169
\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   170
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   171
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   172
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   173
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   174
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   175
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   176
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   177
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   178
\begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   179
\frametitle{\begin{tabular}{c}Ambiguous Grammars\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   180
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   181
\mbox{}\\[-25mm]\mbox{}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   182
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   183
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   184
\begin{tikzpicture}[y=.2cm, x=.009cm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   185
 	%axis
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   186
	\draw (0,0) -- coordinate (x axis mid) (1000,0);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   187
    	\draw (0,0) -- coordinate (y axis mid) (0,30);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   188
    	%ticks
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   189
    	\foreach \x in {0, 20, 100, 200,...,1000}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   190
     		\draw (\x,1pt) -- (\x,-3pt)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   191
			node[anchor=north] {\small \x};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   192
    	\foreach \y in {0,5,...,30}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   193
     		\draw (1pt,\y) -- (-3pt,\y) 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   194
     			node[anchor=east] {\small\y}; 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   195
	%labels      
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   196
	\node[below=0.6cm] at (x axis mid) {\bl{1}s};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   197
	\node[rotate=90, left=1.2cm] at (y axis mid) {secs};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   198
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   199
	%plots
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   200
	\draw[color=blue] plot[mark=*, mark options={fill=white}] 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   201
		file {s-grammar1.data};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   202
         \only<2->{\draw[color=red] plot[mark=triangle*, mark options={fill=white} ] 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   203
                  file {s-grammar2.data};}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   204
	%legend
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   205
	\begin{scope}[shift={(400,20)}] 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   206
	\draw[color=blue] (0,0) -- 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   207
		plot[mark=*, mark options={fill=white}] (0.25,0) -- (0.5,0) 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   208
		node[right]{\small unambiguous};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   209
	\only<2->{\draw[yshift=\baselineskip, color=red] (0,0) -- 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   210
                plot[mark=triangle*, mark options={fill=white}] (0.25,0) -- (0.5,0)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   211
                node[right]{\small ambiguous};}  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   212
	\end{scope}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   213
\end{tikzpicture}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   214
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   215
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   216
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   217
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   218
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   219
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   220
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   221
\end{document}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   222
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   223
%%% Local Variables:  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   224
%%% mode: latex
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   225
%%% TeX-master: t
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   226
%%% End: 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   227