slides/slides05.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 22 Oct 2013 23:17:53 +0100
changeset 147 4725bba8ef26
parent 93 4794759139ea
child 148 36eb7bfb0e63
permissions -rw-r--r--
added slides
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
\documentclass[dvipsnames,14pt,t]{beamer}
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
     2
\usepackage{beamerthemeplaincu}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
     3
%\usepackage[T1]{fontenc}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
     4
%\usepackage[latin1]{inputenc}
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
\usepackage{mathpartir}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
\usepackage[absolute,overlay]{textpos}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
\usepackage{ifthen}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
\usepackage{tikz}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
\usepackage{pgf}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
\usepackage{calc} 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
\usepackage{ulem}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
\usepackage{courier}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
\usepackage{listings}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
\renewcommand{\uline}[1]{#1}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
\usetikzlibrary{arrows}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
\usetikzlibrary{automata}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
\usetikzlibrary{shapes}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
\usetikzlibrary{shadows}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
\usetikzlibrary{positioning}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
\usetikzlibrary{calc}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
\usepackage{graphicx} 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
\definecolor{javared}{rgb}{0.6,0,0} % for strings
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
\definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
\definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
\definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
    28
\makeatletter
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
    29
\lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
    30
\@empty\z@\@empty
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
    31
\makeatother
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
    32
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
\lstset{language=Java,
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
    34
	basicstyle=\consolas,
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
	keywordstyle=\color{javapurple}\bfseries,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
	stringstyle=\color{javagreen},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
	commentstyle=\color{javagreen},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
	morecomment=[s][\color{javadocblue}]{/**}{*/},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
	numbers=left,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
	numberstyle=\tiny\color{black},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
	stepnumber=1,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
	numbersep=10pt,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
	tabsize=2,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
	showspaces=false,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
	showstringspaces=false}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
\lstdefinelanguage{scala}{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
  morekeywords={abstract,case,catch,class,def,%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
    do,else,extends,false,final,finally,%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
    for,if,implicit,import,match,mixin,%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
    new,null,object,override,package,%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
    private,protected,requires,return,sealed,%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
    super,this,throw,trait,true,try,%
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
    54
    type,val,var,while,with,yield, then},
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
    55
  otherkeywords={=>,<-,<\%,<:,>:,\#,@,->},
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
  sensitive=true,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
  morecomment=[l]{//},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
  morecomment=[n]{/*}{*/},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
  morestring=[b]",
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
  morestring=[b]',
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
  morestring=[b]"""
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
\lstset{language=Scala,
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
    65
	basicstyle=\consolas,
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
	keywordstyle=\color{javapurple}\bfseries,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
	stringstyle=\color{javagreen},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
	commentstyle=\color{javagreen},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
	morecomment=[s][\color{javadocblue}]{/**}{*/},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
	numbers=left,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
	numberstyle=\tiny\color{black},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
	stepnumber=1,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
	numbersep=10pt,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
	tabsize=2,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
	showspaces=false,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
	showstringspaces=false}
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
    77
	
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
% beamer stuff 
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
    80
\renewcommand{\slidecaption}{AFL 05, King's College London, 23.~October 2013}
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
\newcommand{\bl}[1]{\textcolor{blue}{#1}}       
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
\newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
\begin{document}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
\mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
\begin{frame}<1>[t]
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
\frametitle{%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
  \begin{tabular}{@ {}c@ {}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
  \\[-3mm]
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    92
  \LARGE Automata and \\[-2mm] 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
  \LARGE Formal Languages (5)\\[3mm] 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
  \end{tabular}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
  \normalsize
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
  \begin{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
  \begin{tabular}{ll}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
  Email:  & christian.urban at kcl.ac.uk\\
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   100
  Office: & S1.27 (1st floor Strand Building)\\
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
  Slides: & KEATS (also home work is there)\\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
  \end{tabular}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
  \end{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   104
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
\end{frame}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
\mode<presentation>{
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   111
\begin{frame}[c]
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   112
\frametitle{DFA Minimisation}
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   114
\begin{enumerate}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   115
\item Take all pairs \bl{$(q, p)$} with \bl{$q \not= p$}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   116
\item Mark all pairs that accepting and non-accepting states
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   117
\item For  all unmarked pairs \bl{$(q, p)$} and all characters \bl{$c$} tests wether
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   118
\begin{center}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   119
\bl{$(\delta(q, c), \delta(p,c))$}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   120
\end{center} 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   121
are marked. If yes, then also mark \bl{$(q, p)$}.
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   122
\item Repeat last step until no chance.
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   123
\item All unmarked pairs can be merged.
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   124
\end{enumerate}
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   126
\end{frame}}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   127
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   128
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   129
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   130
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   131
\mode<presentation>{
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   132
\begin{frame}<1-2>[c]
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   134
\begin{center}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   135
\begin{tikzpicture}[>=stealth',very thick,auto,
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   136
                             every state/.style={minimum size=0pt,inner sep=2pt,draw=blue!50,very thick,fill=blue!20},]
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   137
\node[state,initial]  (q_0)  {$q_0$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   138
\node[state] (q_1) [right=of q_0] {$q_1$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   139
\node[state] (q_2) [below right=of q_0] {$q_2$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   140
\node[state] (q_3) [right=of q_2] {$q_3$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   141
\node[state, accepting] (q_4) [right=of q_1] {$q_4$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   142
\path[->] (q_0) edge node [above]  {\alert{$a$}} (q_1);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   143
\path[->] (q_1) edge node [above]  {\alert{$a$}} (q_4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   144
\path[->] (q_4) edge [loop right] node  {\alert{$a, b$}} ();
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   145
\path[->] (q_3) edge node [right]  {\alert{$a$}} (q_4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   146
\path[->] (q_2) edge node [above]  {\alert{$a$}} (q_3);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   147
\path[->] (q_1) edge node [right]  {\alert{$b$}} (q_2);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   148
\path[->] (q_0) edge node [above]  {\alert{$b$}} (q_2);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   149
\path[->] (q_2) edge [loop left] node  {\alert{$b$}} ();
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   150
\path[->] (q_3) edge [bend left=95, looseness=1.3] node [below]  {\alert{$b$}} (q_0);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   151
\end{tikzpicture}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   152
\end{center}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   153
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   154
\mbox{}\\[-20mm]\mbox{}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   155
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
\begin{center}
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   157
\begin{tikzpicture}[scale=0.8,line width=0.8mm]
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   158
\draw (0,0) -- (4,0);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   159
\draw (0,1) -- (4,1);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   160
\draw (0,2) -- (3,2);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   161
\draw (0,3) -- (2,3);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   162
\draw (0,4) -- (1,4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   163
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   164
\draw (0,0) -- (0, 4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   165
\draw (1,0) -- (1, 4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   166
\draw (2,0) -- (2, 3);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   167
\draw (3,0) -- (3, 2);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   168
\draw (4,0) -- (4, 1);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   169
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   170
\draw (0.5,-0.5) node {$q_0$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   171
\draw (1.5,-0.5) node {$q_1$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   172
\draw (2.5,-0.5) node {$q_2$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   173
\draw (3.5,-0.5) node {$q_3$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   174
 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   175
\draw (-0.5, 3.5) node {$q_1$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   176
\draw (-0.5, 2.5) node {$q_2$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   177
\draw (-0.5, 1.5) node {$q_3$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   178
\draw (-0.5, 0.5) node {$q_4$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   179
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   180
\draw (0.5,0.5) node {\large$\star$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   181
\draw (1.5,0.5) node {\large$\star$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   182
\draw (2.5,0.5) node {\large$\star$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   183
\draw (3.5,0.5) node {\large$\star$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   184
\end{tikzpicture}\\
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   185
\end{center}
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   186
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   187
\end{frame}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   188
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   189
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   190
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   191
\mode<presentation>{
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   192
\begin{frame}<1-2>[c]
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   193
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   194
\begin{center}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   195
\begin{tabular}{@{\hspace{-8mm}}cc@{}}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   196
\begin{tikzpicture}[>=stealth',very thick,auto,
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   197
                             every state/.style={minimum size=0pt,inner sep=2pt,draw=blue!50,very thick,fill=blue!20},]
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   198
\node[state,initial]  (q_0)  {$q_0$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   199
\node[state] (q_1) [right=of q_0] {$q_1$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   200
\node[state] (q_2) [below right=of q_0] {$q_2$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   201
\node[state] (q_3) [right=of q_2] {$q_3$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   202
\node[state, accepting] (q_4) [right=of q_1] {$q_4$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   203
\path[->] (q_0) edge node [above]  {\alert{$a$}} (q_1);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   204
\path[->] (q_1) edge node [above]  {\alert{$a$}} (q_4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   205
\path[->] (q_4) edge [loop right] node  {\alert{$a, b$}} ();
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   206
\path[->] (q_3) edge node [right]  {\alert{$a$}} (q_4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   207
\path[->] (q_2) edge node [above]  {\alert{$a$}} (q_3);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   208
\path[->] (q_1) edge node [right]  {\alert{$b$}} (q_2);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   209
\path[->] (q_0) edge node [above]  {\alert{$b$}} (q_2);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   210
\path[->] (q_2) edge [loop left] node  {\alert{$b$}} ();
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   211
\path[->] (q_3) edge [bend left=95, looseness=1.3] node [below]  {\alert{$b$}} (q_0);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   212
\end{tikzpicture}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   213
&
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   214
\raisebox{9mm}{\begin{tikzpicture}[scale=0.6,line width=0.8mm]
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   215
\draw (0,0) -- (4,0);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   216
\draw (0,1) -- (4,1);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   217
\draw (0,2) -- (3,2);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   218
\draw (0,3) -- (2,3);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   219
\draw (0,4) -- (1,4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   220
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   221
\draw (0,0) -- (0, 4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   222
\draw (1,0) -- (1, 4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   223
\draw (2,0) -- (2, 3);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   224
\draw (3,0) -- (3, 2);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   225
\draw (4,0) -- (4, 1);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   226
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   227
\draw (0.5,-0.5) node {$q_0$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   228
\draw (1.5,-0.5) node {$q_1$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   229
\draw (2.5,-0.5) node {$q_2$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   230
\draw (3.5,-0.5) node {$q_3$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   231
 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   232
\draw (-0.5, 3.5) node {$q_1$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   233
\draw (-0.5, 2.5) node {$q_2$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   234
\draw (-0.5, 1.5) node {$q_3$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   235
\draw (-0.5, 0.5) node {$q_4$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   236
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   237
\draw (0.5,0.5) node {\large$\star$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   238
\draw (1.5,0.5) node {\large$\star$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   239
\draw (2.5,0.5) node {\large$\star$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   240
\draw (3.5,0.5) node {\large$\star$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   241
\draw (0.5,1.5) node {\large$\star$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   242
\draw (2.5,1.5) node {\large$\star$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   243
\draw (0.5,3.5) node {\large$\star$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   244
\draw (1.5,2.5) node {\large$\star$}; 
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   245
\end{tikzpicture}}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   246
\end{tabular}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   247
\end{center}
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   248
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   249
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   250
\mbox{}\\[-20mm]\mbox{}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   251
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   252
\begin{center}
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   253
\begin{tikzpicture}[>=stealth',very thick,auto,
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   254
                             every state/.style={minimum size=0pt,inner sep=2pt,draw=blue!50,very thick,fill=blue!20},]
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   255
\node[state,initial]  (q_02)  {$q_{0, 2}$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   256
\node[state] (q_13) [right=of q_02] {$q_{1, 3}$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   257
\node[state, accepting] (q_4) [right=of q_13] {$q_{4\phantom{,0}}$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   258
\path[->] (q_02) edge [bend left] node [above]  {\alert{$a$}} (q_13);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   259
\path[->] (q_13) edge [bend left] node [below]  {\alert{$b$}} (q_02);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   260
\path[->] (q_02) edge [loop below] node  {\alert{$b$}} ();
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   261
\path[->] (q_13) edge node [above]  {\alert{$a$}} (q_4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   262
\path[->] (q_4) edge [loop above] node  {\alert{$a, b$}} ();
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   263
\end{tikzpicture}\\
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   264
minimal automaton
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   265
\end{center}
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   266
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   267
\end{frame}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   268
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   269
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   270
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   271
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   272
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   273
\mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   274
\begin{frame}[c]
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   275
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   276
\begin{center}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   277
\begin{tikzpicture}[>=stealth',very thick,auto,
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   278
                             every state/.style={minimum size=0pt,inner sep=2pt,draw=blue!50,very thick,fill=blue!20},]
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   279
\only<1>{\node[state,initial]  (q_0)  {$q_0$};}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   280
\only<2->{\node[state,accepting]  (q_0)  {$q_0$};}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   281
\node[state] (q_1) [right=of q_0] {$q_1$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   282
\node[state] (q_2) [below right=of q_0] {$q_2$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   283
\node[state] (q_3) [right=of q_2] {$q_3$};
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   284
\only<1>{\node[state, accepting] (q_4) [right=of q_1] {$q_4$};}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   285
\only<2->{\node[state, initial right] (q_4) [right=of q_1] {$q_4$};}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   286
\only<1-2>{
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   287
\path[->] (q_0) edge node [above]  {\alert{$a$}} (q_1);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   288
\path[->] (q_1) edge node [above]  {\alert{$a$}} (q_4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   289
\path[->] (q_4) edge [loop above] node  {\alert{$a, b$}} ();
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   290
\path[->] (q_3) edge node [right]  {\alert{$a$}} (q_4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   291
\path[->] (q_2) edge node [above]  {\alert{$a$}} (q_3);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   292
\path[->] (q_1) edge node [right]  {\alert{$b$}} (q_2);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   293
\path[->] (q_0) edge node [above]  {\alert{$b$}} (q_2);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   294
\path[->] (q_2) edge [loop left] node  {\alert{$b$}} ();
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   295
\path[->] (q_3) edge [bend left=95, looseness=1.3] node [below]  {\alert{$b$}} (q_0);}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   296
\only<3->{
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   297
\path[<-] (q_0) edge node [above]  {\alert{$a$}} (q_1);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   298
\path[<-] (q_1) edge node [above]  {\alert{$a$}} (q_4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   299
\path[<-] (q_4) edge [loop above] node  {\alert{$a, b$}} ();
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   300
\path[<-] (q_3) edge node [right]  {\alert{$a$}} (q_4);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   301
\path[<-] (q_2) edge node [above]  {\alert{$a$}} (q_3);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   302
\path[<-] (q_1) edge node [right]  {\alert{$b$}} (q_2);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   303
\path[<-] (q_0) edge node [above]  {\alert{$b$}} (q_2);
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   304
\path[<-] (q_2) edge [loop left] node  {\alert{$b$}} ();
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   305
\path[<-] (q_3) edge [bend left=95, looseness=1.3] node [below]  {\alert{$b$}} (q_0);}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   306
\end{tikzpicture}
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   307
\end{center}
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   308
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   309
\begin{itemize}
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   310
\item<2-> exchange initial / accepting states
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   311
\item<3-> reverse all edges
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   312
\item<4-> subset construction $\Rightarrow$ DFA
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   313
\item<5-> repeat once more \onslide<6->{$\Rightarrow$ minimal DFA}
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   314
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   315
\end{itemize}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   316
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   317
\end{frame}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   318
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   319
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   320
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   321
\mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   322
\begin{frame}[c]
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   323
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   324
\texttt{\consolas\lstinputlisting{../progs/fib.while}}
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   325
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   326
\end{frame}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   327
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   328
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   329
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   330
\mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   331
\begin{frame}[c]
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   332
147
4725bba8ef26 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
   333
\texttt{\consolas\lstinputlisting{../progs/collatz.while}}
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   334
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   335
\end{frame}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   336
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   337
46
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
   338
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
   339
Christian Urban <urbanc@in.tum.de>
parents: 44
diff changeset
   340
47
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   341
\newcommand{\qq}{\mbox{\texttt{"}}}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   342
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   343
\mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   344
\begin{frame}[c]
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   345
\frametitle{\begin{tabular}{c}Grammars\end{tabular}}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   346
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   347
\begin{center}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   348
\bl{\begin{tabular}{lcl}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   349
$E$ & $\rightarrow$ &  $F + (F \cdot \qq*\qq \cdot F) + (F \cdot \qq\backslash\qq \cdot F)$\\
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   350
$F$ & $\rightarrow$ & $T + (T \cdot \qq\texttt{+}\qq \cdot T) + (T \cdot \qq\texttt{-}\qq \cdot T)$\\
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   351
$T$ & $\rightarrow$ & $num + (\qq\texttt{(}\qq \cdot E \cdot \qq\texttt{)}\qq)$\\
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   352
\end{tabular}}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   353
\end{center}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   354
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   355
\bl{$E$}, \bl{$F$} and \bl{$T$} are non-terminals\\
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   356
\bl{$E$} is start symbol\\
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   357
\bl{$num$}, \bl{(}, \bl{)}, \bl{+} \ldots are terminals\bigskip\\
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   358
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   359
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   360
\bl{\texttt{(2*3)+(3+4)}}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   361
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   362
\end{frame}}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   363
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   364
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   365
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   366
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   367
\mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   368
\begin{frame}[c]
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   369
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   370
\begin{center}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   371
\bl{\begin{tabular}{lcl}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   372
$E$ & $\rightarrow$ &  $F + (F \cdot \qq*\qq \cdot F) + (F \cdot \qq\backslash\qq \cdot F)$\\
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   373
$F$ & $\rightarrow$ & $T + (T \cdot \qq\texttt{+}\qq \cdot T) + (T \cdot \qq\texttt{-}\qq \cdot T)$\\
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   374
$T$ & $\rightarrow$ & $num + (\qq\texttt{(}\qq \cdot E \cdot \qq\texttt{)}\qq)$\\
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   375
\end{tabular}}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   376
\end{center}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   377
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   378
\begin{center}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   379
\begin{tikzpicture}[level distance=8mm, blue]
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   380
  \node {E}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   381
    child {node {F} 
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   382
     child {node {T} 
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   383
                 child {node {\qq(\qq\,E\,\qq)\qq}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   384
                            child {node{F \qq*\qq{} F}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   385
                                  child {node {T} child {node {2}}}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   386
                                  child {node {T} child {node {3}}} 
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   387
                               }
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   388
                          }
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   389
              }
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   390
     child {node {\qq+\qq}}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   391
     child {node {T}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   392
       child {node {\qq(\qq\,E\,\qq)\qq} 
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   393
       child {node {F}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   394
       child {node {T \qq+\qq{} T}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   395
                    child {node {3}}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   396
                    child {node {4}} 
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   397
                 }
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   398
                 }}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   399
    }};
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   400
\end{tikzpicture}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   401
\end{center}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   402
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   403
\begin{textblock}{5}(1, 5)
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   404
\bl{\texttt{(2*3)+(3+4)}}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   405
\end{textblock}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   406
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   407
\end{frame}}
Christian Urban <urbanc@in.tum.de>
parents: 46
diff changeset
   408
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
44
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   409
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   410
\end{document}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   411
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   412
%%% Local Variables:  
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   413
%%% mode: latex
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   414
%%% TeX-master: t
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   415
%%% End: 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   416