90 |
117 |
91 |
118 |
92 \subsection*{Disclaimer} |
119 \subsection*{Disclaimer} |
93 |
120 |
94 It should be understood that the work you submit represents |
121 It should be understood that the work you submit represents |
95 your own effort! You have not copied from anyone else. An |
122 your \textbf{own} effort! You have not copied from anyone else. An |
96 exception is the Scala code I showed during the lectures or |
123 exception is the Scala code I showed during the lectures or |
97 uploaded to KEATS, which you can freely use.\bigskip |
124 uploaded to KEATS, which you can freely use.\bigskip |
98 |
125 |
99 |
126 |
100 \subsection*{Part 1 (6 Marks)} |
127 \subsection*{Part 1 (6 Marks)} |
357 KEATS). Compare this with the matcher you have implemented. How long |
384 KEATS). Compare this with the matcher you have implemented. How long |
358 can the string of $a$'s be in your matcher and still stay within the |
385 can the string of $a$'s be in your matcher and still stay within the |
359 30 seconds time limit? |
386 30 seconds time limit? |
360 |
387 |
361 \begin{center} |
388 \begin{center} |
|
389 \begin{tabular}{@{}cc@{}} |
|
390 \multicolumn{2}{c}{Graph: $(a^*)^*\cdot b$ and strings |
|
391 $\underbrace{a\ldots a}_{n}$}\bigskip\\ |
|
392 |
362 \begin{tikzpicture} |
393 \begin{tikzpicture} |
363 \begin{axis}[ |
394 \begin{axis}[ |
364 title={Graph: $(a^*)^*\cdot b$ and strings |
|
365 $\underbrace{a\ldots a}_{n}$}, |
|
366 xlabel={$n$}, |
395 xlabel={$n$}, |
367 x label style={at={(1.05,0.0)}}, |
396 x label style={at={(1.05,0.0)}}, |
368 ylabel={time in secs}, |
397 ylabel={time in secs}, |
|
398 y label style={at={(0.06,0.5)}}, |
369 enlargelimits=false, |
399 enlargelimits=false, |
370 xtick={0,5,...,30}, |
400 xtick={0,5,...,30}, |
371 xmax=33, |
401 xmax=33, |
372 ymax=35, |
402 ymax=45, |
373 ytick={0,5,...,30}, |
403 ytick={0,5,...,40}, |
374 scaled ticks=false, |
404 scaled ticks=false, |
375 axis lines=left, |
405 axis lines=left, |
376 width=6cm, |
406 width=6cm, |
377 height=5.5cm, |
407 height=5.5cm, |
378 legend entries={Python, Java 8}, |
408 legend entries={Python, Java 8}, |
379 legend pos=outer north east] |
409 legend pos=north west] |
380 \addplot[blue,mark=*, mark options={fill=white}] table {re-python2.data}; |
410 \addplot[blue,mark=*, mark options={fill=white}] table {re-python2.data}; |
381 \addplot[cyan,mark=*, mark options={fill=white}] table {re-java.data}; |
411 \addplot[cyan,mark=*, mark options={fill=white}] table {re-java.data}; |
382 \end{axis} |
412 \end{axis} |
383 \end{tikzpicture} |
413 \end{tikzpicture} |
|
414 & |
|
415 \begin{tikzpicture} |
|
416 \begin{axis}[ |
|
417 xlabel={$n$}, |
|
418 x label style={at={(1.05,0.0)}}, |
|
419 ylabel={time in secs}, |
|
420 y label style={at={(0.06,0.5)}}, |
|
421 %enlargelimits=false, |
|
422 %xtick={0,5000,...,30000}, |
|
423 xmax=65000, |
|
424 ymax=45, |
|
425 ytick={0,5,...,40}, |
|
426 scaled ticks=false, |
|
427 axis lines=left, |
|
428 width=6cm, |
|
429 height=5.5cm, |
|
430 legend entries={Java 9}, |
|
431 legend pos=north west] |
|
432 \addplot[cyan,mark=*, mark options={fill=white}] table {re-java9.data}; |
|
433 \end{axis} |
|
434 \end{tikzpicture} |
|
435 \end{tabular} |
384 \end{center} |
436 \end{center} |
385 \newpage |
437 \newpage |
386 |
438 |
387 \subsection*{Part 2 (4 Marks)} |
439 \subsection*{Part 2 (4 Marks)} |
388 |
440 |