slides/slides03.tex
author Christian Urban <urbanc@in.tum.de>
Fri, 23 Nov 2018 01:52:37 +0000
changeset 217 e689375abcc1
parent 158 94b11ac19b41
child 218 22705d22c105
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}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
\hfuzz=220pt 
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
%\setmonofont[Scale=.88]{Consolas}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
%\newfontfamily{\consolas}{Consolas}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
\lstset{language=Scala,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
        style=mystyle,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
        numbersep=0pt,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
        numbers=none,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
        xleftmargin=0mm}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
\newcommand{\bl}[1]{\textcolor{blue}{#1}}     
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
% beamer stuff 
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
    22
\renewcommand{\slidecaption}{PEP (Scala) 03, King's College London}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
\begin{document}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
\begin{frame}[t]
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
\frametitle{%
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
  \begin{tabular}{@ {}c@ {}}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
  \\[5mm]
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
    30
  \huge PEP Scala (3) 
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
  \end{tabular}}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
  \normalsize
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
  \begin{center}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
  \begin{tabular}{ll}
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    36
    Email:  & christian.urban at kcl.ac.uk\\
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    37
    Office: & N7.07 (North Wing, Bush House)\\
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    38
    Slides \& Code: & KEATS\medskip\\
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    39
    Office Hours: &  \alert{next Monday} 11 -- 12 \& 13 -- 14\\
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
  \end{tabular}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
  \end{center}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
\end{frame}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    47
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    48
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    49
\begin{frame}[c]
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    50
\frametitle{Marks for CW6 (Part 1 + 2)}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    51
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    52
Raw marks (234 submissions):
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    53
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    54
\begin{itemize}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    55
\item 6\%: \hspace{4mm}163 students
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    56
\item 5\%: \hspace{4mm}29
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    57
\item 4\%: \hspace{4mm}3
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    58
\item 3\%: \hspace{4mm}13
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    59
\item 2\%: \hspace{4mm}3
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    60
\item 1\%: \hspace{4mm}0
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    61
\item 0\%: \hspace{4mm}23 
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    62
\end{itemize}  
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    63
\end{frame}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    64
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    65
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    66
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    67
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    68
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
    71
\begin{frame}[c,fragile]
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
    72
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    73
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    74
def collatz(n: Long) : Long =
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    75
  {
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    76
    val toReturn = collatzHelper(n, 0)
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    77
    toReturn
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    78
  } 
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    79
\end{lstlisting}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    80
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    81
\pause
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    82
\bigskip
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    83
\rule{11cm}{0.3mm}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    84
\bigskip
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
    85
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    86
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    87
def collatz(n: Long) : Long =
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    88
  collatzHelper(n, 0)
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    89
\end{lstlisting}\pause
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    90
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    91
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    92
\end{frame}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    93
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    94
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    95
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    96
\begin{frame}[c,fragile]
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    97
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    98
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    99
def collatz_max(bnd: Long) : (Long,Long) = {val lst = for(a<-(1 to bnd.toInt)) yield (collatz(a),a.toLong);val lst2 = lst.sortBy(_._1);lst2(lst2.length-1)}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   100
\end{lstlisting}\bigskip
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   101
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   102
\tiny
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   103
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   104
def collatz_max(bnd: Long) : (Long,Long) = {val lst = for(a<-(1 to bnd.toInt)) yield (collatz(a),a.toLong);val lst2 = lst.sortBy(_._1);lst2(lst2.length-1)}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   105
\end{lstlisting}\pause
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   106
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   107
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   108
\end{frame}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   109
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   110
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   111
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   112
\begin{frame}[c,fragile]
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   113
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   114
\small
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   115
\begin{lstlisting}[language=Scala, xleftmargin=-4mm,numbers=left]
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   116
 def process_ratings(lines: List[String]) = {
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   117
    val values = List[(String,String)]()
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   118
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   119
    for(line <- lines){
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   120
        val splitList = line.split(",").toList
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   121
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   122
        if(splitList(2).toInt >= 4){
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   123
            val userID = splitList(0)
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   124
            val movieID = splitList(1)
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   125
            val tuple = (userID, movieID)
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   126
            tuple :: values
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   127
        }
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   128
    }
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   129
    
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   130
    values
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   131
 }
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   132
\end{lstlisting}
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   133
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   134
\normalsize
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   135
What does this function always return?
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   136
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   137
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   138
\end{frame}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   139
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   140
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   141
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   142
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   143
\begin{frame}[c]
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   144
\frametitle{Jumping Towers}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   145
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   146
\begin{center}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   147
\begin{tikzpicture}[scale=1.2]
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   148
  \draw[line width=1mm,cap=round] (0,0) -- (5,0);
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   149
  \draw[line width=1mm,cap=round] (0,1) -- (5,1);
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   150
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   151
  \draw[line width=1mm,cap=round] (0,0) -- (0,1);
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   152
  \node at (0.5,0.5) {\textbf{\Large 3}};
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   153
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   154
  \draw[line width=1mm,cap=round] (1,0) -- (1,1);
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   155
  \node at (1.5,0.5) {\textbf{\Large 4}};
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   156
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   157
  \draw[line width=1mm,cap=round] (2,0) -- (2,1);
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   158
  \node at (2.5,0.5) {\textbf{\Large 2}};
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   159
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   160
  \draw[line width=1mm,cap=round] (3,0) -- (3,1);
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   161
  \node at (3.5,0.5) {\textbf{\Large 0}};
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   162
  
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   163
  \draw[line width=1mm,cap=round] (4,0) -- (4,1);
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   164
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   165
  \node at (4.5,0.5) {\textbf{\Large 1}};
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   166
  
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   167
  \draw[line width=1mm,cap=round] (5,0) -- (5,1);
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   168
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   169
  \draw[->,line width=0.5mm,cap=round,out=90,in=90,relative] (0.5,1) to (1.5,1);
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   170
  \draw[->,line width=0.5mm,cap=round,out=90,in=90,relative] (0.5,1) to (2.5,1);
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   171
  \draw[->,line width=0.5mm,cap=round,out=90,in=90,relative] (0.5,1) to (3.5,1);
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   172
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   173
  \draw[->,line width=0.5mm,cap=round,out=-90,in=-90,relative] (2.5,0) to (3.5,0);
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   174
  \draw[->,line width=0.5mm,cap=round,out=-90,in=-90,relative] (2.5,0) to (4.5,0);
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   175
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   176
  \draw[->,line width=0.5mm,cap=round,out=90,in=90,relative] (4.5,1) to (5.7,1);
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   177
  \node at (5.7, 0.8) {End};
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   178
\end{tikzpicture}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   179
\end{center}\bigskip
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   180
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   181
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   182
shortest: 3 $\rightarrow$ 4 $\rightarrow$ End
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   183
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   184
\end{frame}
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   185
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   186
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   187
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   188
70
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   189
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   190
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   191
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   192
\begin{frame}[c]
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   193
\frametitle{``Children'' / moves}
70
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   194
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   195
\begin{center}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   196
  \begin{tikzpicture}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   197
    [grow=right,level distance=30mm,child anchor=north,line width=0.5mm]
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   198
  \node {$[3,4,2,0,1]$}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   199
     child {node {$[0,1]$}}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   200
     child {node {$[2,0,1]$}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   201
        child {node {$[1]$} child [level distance=13mm] {node {End}}}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   202
        child {node {$[0,1]$}}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   203
     }
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   204
     child {node {$[4,2,0,1]$\ldots}};
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   205
\end{tikzpicture}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   206
\end{center}
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   207
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   208
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   209
70
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   210
\end{frame}
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   211
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   212
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   213
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   214
217
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   215
e689375abcc1 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   216
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   217
\end{document}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   218
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   219
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   220
\end{document}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   221
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   222
%%% Local Variables:  
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   223
%%% mode: latex
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   224
%%% TeX-master: t
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   225
%%% End: 
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   226