handouts/graphs.tex
changeset 990 ef63ae3586b8
parent 497 c498cb53a9a8
equal deleted inserted replaced
989:aa976b429904 990:ef63ae3586b8
     1 \documentclass{article}
     1 \documentclass{article}
     2 \usepackage{../style}
     2 \usepackage{tikz}
     3 \usepackage{../langs}
     3 \usepackage{pgf}
     4 \usepackage{../graphics}
     4 \usepackage{pgfplots}
     5 \usepackage{../data}
     5 
       
     6 \pgfplotsset{compat=1.15}
       
     7 
       
     8 
       
     9 %% DATA for the graphs: first x coordinate, second y coordinate
       
    10 \begin{filecontents}{re-python2.data}
       
    11 1 0.033
       
    12 5 0.036
       
    13 10 0.034
       
    14 15 0.036
       
    15 18 0.059
       
    16 19 0.084
       
    17 20 0.141
       
    18 21 0.248
       
    19 22 0.485
       
    20 23 0.878
       
    21 24 1.71
       
    22 25 3.40
       
    23 26 7.08
       
    24 27 14.12
       
    25 28 26.69
       
    26 \end{filecontents}
       
    27 
       
    28 \begin{filecontents}{re-java.data}
       
    29 5  0.00298
       
    30 10  0.00418
       
    31 15  0.00996
       
    32 16  0.01710
       
    33 17  0.03492
       
    34 18  0.03303
       
    35 19  0.05084
       
    36 20  0.10177
       
    37 21  0.19960
       
    38 22  0.41159
       
    39 23  0.82234
       
    40 24  1.70251
       
    41 25  3.36112
       
    42 26  6.63998
       
    43 27  13.35120
       
    44 28  29.81185
       
    45 \end{filecontents}
       
    46 
       
    47 \begin{filecontents}{re3a.data}
       
    48 1 0.00003
       
    49 500001 0.22527
       
    50 1000001 0.62752
       
    51 1500001 0.88485
       
    52 2000001 1.39815
       
    53 2500001 1.68619
       
    54 3000001 1.94957
       
    55 3500001 2.15878
       
    56 4000001 2.59918
       
    57 4500001 5.90679
       
    58 5000001 13.11295
       
    59 5500001 19.15376
       
    60 6000001 40.16373
       
    61 \end{filecontents}
       
    62 
     6 
    63 
     7 
    64 
     8 \begin{document}
    65 \begin{document}
     9 
       
    10 
    66 
    11 \section*{Benchmarks for $(a^*)^* b$ and $a^{?\{n\}} a^{\{n\}}$}
    67 \section*{Benchmarks for $(a^*)^* b$ and $a^{?\{n\}} a^{\{n\}}$}
    12 
    68 
    13 \mbox{}\bigskip
    69 \mbox{}\bigskip
    14 
    70 
    40 &
    96 &
    41 \begin{tikzpicture}
    97 \begin{tikzpicture}
    42   \begin{axis}[
    98   \begin{axis}[
    43     xlabel={$n$},
    99     xlabel={$n$},
    44     x label style={at={(1.1,0.0)}},
   100     x label style={at={(1.1,0.0)}},
    45     %%xtick={0,1000000,...,5000000}, 
       
    46     ylabel={time in secs},
   101     ylabel={time in secs},
    47     enlargelimits=false,
   102     enlargelimits=false,
    48     ymax=35,
   103     ymax=35,
    49     ytick={0,5,...,30},
   104     ytick={0,5,...,30},
    50     axis lines=left,
   105     axis lines=left,
    51     %scaled ticks=false,
       
    52     width=6.5cm,
   106     width=6.5cm,
    53     height=5cm,
   107     height=5cm,
    54     legend entries={Derivative matcher},  
   108     legend entries={Derivative matcher},  
    55     legend pos=north east,
   109     legend pos=north east,
    56     legend cell align=left]
   110     legend cell align=left]
    57 %\addplot[green,mark=square*,mark options={fill=white}] table {re2a.data};    
       
    58 \addplot[black,mark=square*,mark options={fill=white}] table {re3a.data};
   111 \addplot[black,mark=square*,mark options={fill=white}] table {re3a.data};
    59 \end{axis}
   112 \end{axis}
    60 \end{tikzpicture}
   113 \end{tikzpicture}
    61 \end{tabular}
   114 \end{tabular}
    62 \end{center}\bigskip
   115 \end{center}\bigskip
   101     width=6.5cm,
   154     width=6.5cm,
   102     height=5cm,
   155     height=5cm,
   103     legend entries={Derivative matcher},  
   156     legend entries={Derivative matcher},  
   104     legend pos=north east,
   157     legend pos=north east,
   105     legend cell align=left]
   158     legend cell align=left]
   106 %\addplot[green,mark=square*,mark options={fill=white}] table {re2.data};
       
   107 \addplot[black,mark=square*,mark options={fill=white}] table {re3.data};
   159 \addplot[black,mark=square*,mark options={fill=white}] table {re3.data};
   108 \end{axis}
   160 \end{axis}
   109 \end{tikzpicture}
   161 \end{tikzpicture}
   110 \end{tabular}
   162 \end{tabular}
   111 \end{center}
   163 \end{center}
   112 
   164 
   113 
   165 
   114 \subsubsection*{Sources}
       
   115 
       
   116 
       
   117 \url{http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.java}\medskip
       
   118 
       
   119 \noindent
       
   120 \url{http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.py}
       
   121 
   166 
   122 \end{document}
   167 \end{document}
   123 
   168 
   124 
   169 
   125 
   170