fixed plotting error 6.1
authorChengsong
Mon, 06 Jun 2022 15:57:17 +0100
changeset 535 ce91c29d2885
parent 534 d4359c94bead
child 536 aff7bf93b9c7
fixed plotting error 6.1
ChengsongTanPhdThesis/Chapters/Cubic.tex
ChengsongTanPhdThesis/bsimpExponential.data
ChengsongTanPhdThesis/main.tex
--- a/ChengsongTanPhdThesis/Chapters/Cubic.tex	Mon Jun 06 03:06:32 2022 +0100
+++ b/ChengsongTanPhdThesis/Chapters/Cubic.tex	Mon Jun 06 15:57:17 2022 +0100
@@ -183,6 +183,7 @@
 that have "language duplicates", but only eliminate the "exact duplicates".
 For this we need to break up terms $(a+b)\cdot c$ into two
 terms $a\cdot c$ and $b\cdot c$ before we add them to the accumulator:
+\begin{figure}
 \begin{verbatim}
 def distinctWith(rs: List[ARexp], 
                 pruneFunction: (ARexp, Set[Rexp]) => ARexp, 
@@ -202,8 +203,11 @@
       }
   }
 \end{verbatim}
+\caption{A Stronger Version of $\textit{distinctBy}$}
+\end{figure}
 \noindent
 This process is done by the function $\textit{turnIntoTerms}$:
+\begin{figure}
 \begin{verbatim}
 def turnIntoTerms(r: Rexp): List[Rexp] = r match {
   case SEQ(r1, r2)  => if(isOne(r1)) 
@@ -215,8 +219,12 @@
   case _ => r :: Nil
 }
 \end{verbatim}
+\caption{function that breaks up regular expression into "atomic" terms}
+\end{figure}
+
 \noindent
 The pruning function can be defined recursively:
+\begin{figure}
 \begin{verbatim}
 def prune7(r: ARexp, acc: Set[Rexp]) : ARexp = r match{
   case AALTS(bs, rs) => rs.map(r => prune7(r, acc)).filter(_ != ZERO) match
@@ -233,52 +241,49 @@
   case r => if(acc(erase(r))) AZERO else r
 }
 \end{verbatim}
+\caption{pruning function}
+\end{figure}
+
+
+\pgfplotsset{
+    myplotstyle/.style={
+    legend style={draw=none, font=\small},
+    legend cell align=left,
+    legend pos=north east,
+    ylabel style={align=center, font=\bfseries\boldmath},
+    xlabel style={align=center, font=\bfseries\boldmath},
+    x tick label style={font=\bfseries\boldmath},
+    y tick label style={font=\bfseries\boldmath},
+    scaled ticks=true,
+    every axis plot/.append style={thick},
+    },
+}
 
 \begin{figure}
 \centering
 \begin{tabular}{@{}c@{\hspace{0mm}}c@{\hspace{0mm}}c@{}}
 \begin{tikzpicture}
 \begin{axis}[
-    xlabel={$n$},
-    x label style={at={(1.05,-0.05)}},
+    %xlabel={$n$},
+    myplotstyle,
+    xlabel={input length},
     ylabel={size},
-    enlargelimits=false,
-    xtick={0,5,...,30},
-    xmax=30,
-    ymax=800,
-    ytick={0,200,...,800},
-    scaled ticks=false,
-    axis lines=left,
-    width=5cm,
-    height=4cm, 
-    legend entries={$bsimpStrong$ size growth},  
-    legend pos=north west,
-    legend cell align=left]
+    ]
 \addplot[red,mark=*, mark options={fill=white}] table {strongSimpCurve.data};
 \end{axis}
 \end{tikzpicture}
   &
 \begin{tikzpicture}
 \begin{axis}[
-    xlabel={$n$},
-    x label style={at={(1.05,-0.05)}},
+    %xlabel={$n$},
+    myplotstyle,
+    xlabel={input length},
     ylabel={size},
-    enlargelimits=false,
-    xtick={0,5,...,30},
-    xmax=30,
-    ymax=42000,
-    ytick={0,10000,...,40000},
-    scaled ticks=true,
-    axis lines=left,
-    width=5cm,
-    height=4cm, 
-    legend entries={$bsimp$ size growth},  
-    legend pos=north west,
-    legend cell align=left]
+    ]
 \addplot[blue,mark=*, mark options={fill=white}] table {bsimpExponential.data};
 \end{axis}
 \end{tikzpicture}\\
-\multicolumn{2}{c}{Graphs: Runtime for matching $((a^* + (aa)^* + \ldots + (aaaaa)^* )^*)^*$ with strings 
+\multicolumn{2}{l}{Graphs: Runtime for matching $((a^* + (aa)^* + \ldots + (aaaaa)^* )^*)^*$ with strings 
            of the form $\underbrace{aa..a}_{n}$.}
 \end{tabular}    
 \caption{aaaaaStarStar} \label{fig:aaaaaStarStar}
--- a/ChengsongTanPhdThesis/bsimpExponential.data	Mon Jun 06 03:06:32 2022 +0100
+++ b/ChengsongTanPhdThesis/bsimpExponential.data	Mon Jun 06 15:57:17 2022 +0100
@@ -28,34 +28,4 @@
 27 33061
 28 35461
 29 37947
-30 405110 39
-1 133
-2 353
-3 655
-4 1037
-5 1503
-6 2055
-7 2695
-8 3415
-9 4219
-10 5105
-11 6079
-12 7133
-13 8277
-14 9503
-15 10807
-16 12197
-17 13677
-18 15239
-19 16885
-20 18607
-21 20419
-22 22319
-23 24303
-24 26363
-25 28509
-26 30743
-27 33061
-28 35461
-29 37947
 30 40511
\ No newline at end of file
--- a/ChengsongTanPhdThesis/main.tex	Mon Jun 06 03:06:32 2022 +0100
+++ b/ChengsongTanPhdThesis/main.tex	Mon Jun 06 15:57:17 2022 +0100
@@ -230,7 +230,7 @@
 cubic to regular expression size using a technique introduced by
 Antimirov.
 The result is an algorithm with provable guarantees on 
-correctness and running time. We believe this is the first 
+correctness and finiteness. We believe this is the first 
 work with these two guarantees together.
 
 \end{abstract}