diff --git a/elacProjectA/project.aux b/elacProjectA/project.aux index a54669aa..f4346f0c 100644 --- a/elacProjectA/project.aux +++ b/elacProjectA/project.aux @@ -21,7 +21,10 @@ \@writefile{lof}{\contentsline {figure}{\numberline {1.9}{\ignorespaces Operator '$a^*+ba^*b + bba^*$'}}{3}{}\protected@file@percent } \newlabel{fig:final}{{1.9}{3}} \@writefile{lof}{\contentsline {figure}{\numberline {1.10}{\ignorespaces Operator '$a^*+ba^*b + bba^*$' - changed names of states}}{3}{}\protected@file@percent } -\newlabel{fig:final}{{1.10}{3}} +\newlabel{fig:finalBetter}{{1.10}{3}} \@writefile{toc}{\contentsline {section}{\numberline {1.4}Transforming NFA into DFA using subset algorithm}{4}{}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {1.5}Constructing minimal state DFA}{4}{}\protected@file@percent } -\gdef \@abspage@last{5} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.4.1}State table}{4}{}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {1.11}{\ignorespaces DFA graph before minimalization}}{5}{}\protected@file@percent } +\newlabel{dfaNominimalization}{{1.11}{5}} +\@writefile{toc}{\contentsline {section}{\numberline {1.5}Constructing minimal state DFA}{5}{}\protected@file@percent } +\gdef \@abspage@last{6} diff --git a/elacProjectA/project.fdb_latexmk b/elacProjectA/project.fdb_latexmk index 093f768e..81895ed9 100644 --- a/elacProjectA/project.fdb_latexmk +++ b/elacProjectA/project.fdb_latexmk @@ -1,5 +1,5 @@ # Fdb version 3 -["pdflatex"] 1637106796 "project.tex" "project.pdf" "project" 1637118524 +["pdflatex"] 1637121514 "project.tex" "project.pdf" "project" 1637121515 "/etc/texmf/web2c/texmf.cnf" 1635008344 475 c0e671620eb5563b2130f56340a5fde8 "" "/usr/share/texlive/texmf-dist/fonts/map/fontname/texfonts.map" 1577235249 3524 cb3e574dea2d1052e39280babc910dc8 "" "/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm" 1246382020 1004 54797486969f23fa377b128694d548df "" @@ -18,10 +18,12 @@ "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm" 1136768653 1120 8b7d695260f3cff42e636090a8002094 "" "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb" 1248133631 32080 340ef9bf63678554ee606688e7b5339d "" "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb" 1248133631 36299 5f9df58c2139e7edcf37c8fca4bd384d "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb" 1248133631 36281 c355509802a035cadc5f15869451dcee "" "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb" 1248133631 35752 024fb6c41858982481f6968b5fc26508 "" "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb" 1248133631 32722 d7379af29a190c3f453aba36302ff5a9 "" "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb" 1248133631 32362 179c33bbf43f19adbb3825bb4e36e57a "" "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb" 1248133631 32762 224316ccc9ad3ca0423a14971cfa7fc1 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb" 1248133631 32569 5e5ddc8df908dea60932f3c484a54c0d "" "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb" 1248133631 32716 08e384dc442464e7285e891af9f45947 "" "/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii" 1461363279 71627 94eb9990bed73c364d7f53f960cc8c5b "" "/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty" 1583617216 6501 4011d89d9621e0b0901138815ba5ff29 "" @@ -123,9 +125,9 @@ "/usr/share/texmf/web2c/texmf.cnf" 1613593815 38841 799d1dd9682a55ce442e10c99777ecc1 "" "/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map" 1635008389 5160710 ecf427ae8fa19139d8691f526e47bb9b "" "/var/lib/texmf/web2c/pdftex/pdflatex.fmt" 1635008460 2570450 6e12b1c097cbda0f70015645294afd24 "" - "project.aux" 1637106797 2301 25365c128ec31bbdc3fbc64fe64f1084 "pdflatex" - "project.tex" 1637118524 13317 96fad0bd37e24e817d231aeb954632f1 "" + "project.aux" 1637121515 2592 65a2c5d3cc5d4fbb767d5e48f951d8a4 "pdflatex" + "project.tex" 1637121514 16514 c0b41610a76b6798be6eeebc2a81d40a "" (generated) - "project.aux" "project.pdf" + "project.aux" "project.log" diff --git a/elacProjectA/project.fls b/elacProjectA/project.fls index 15b00a4a..9a6bb2a2 100644 --- a/elacProjectA/project.fls +++ b/elacProjectA/project.fls @@ -517,11 +517,14 @@ INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr12.tfm INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm INPUT project.aux INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb diff --git a/elacProjectA/project.log b/elacProjectA/project.log index b56d79c5..fc0e76e7 100644 --- a/elacProjectA/project.log +++ b/elacProjectA/project.log @@ -1,4 +1,4 @@ -This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian) (preloaded format=pdflatex 2021.10.23) 17 NOV 2021 00:53 +This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian) (preloaded format=pdflatex 2021.10.23) 17 NOV 2021 04:58 entering extended mode restricted \write18 enabled. file:line:error style messages enabled. @@ -335,11 +335,7 @@ File: tikzlibrarypositioning.code.tex 2020/12/27 v3.1.8b (3.1.8b) File: l3backend-pdftex.def 2020-01-29 L3 backend support: PDF output (pdfTeX) \l__color_backend_stack_int=\count285 \l__pdf_internal_box=\box80 -) (./project.aux - -LaTeX Warning: Label `fig:final' multiply defined. - -) +) (./project.aux) \openout1 = `project.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 16. @@ -415,26 +411,32 @@ Overfull \hbox (34.79312pt too wide) in paragraph at lines 446--447 [][] [] -[1] [2] [3] [4 +[1] [2] [3] +Overfull \hbox (61.62515pt too wide) detected at line 454 +\OML/cmm/m/it/10 ^^O[]\OT1/cmr/m/n/10 (\OML/cmm/m/it/10 move\OT1/cmr/m/n/10 ([]\OML/cmm/m/it/10 ; a\OT1/cmr/m/n/10 )) = (\OML/cmm/m/it/10 ^^O[]\OT1/cmr/m/n/10 (\OML/cmm/m/it/10 move\OT1/cmr/m/n/10 (\OML/cmm/m/it/10 q[]; q[]; q[]; q[]; q[]; q[]; q[]; []; a\OT1/cmr/m/n/10 ))) = \OML/cmm/m/it/10 ^^O[]\OT1/cmr/m/n/10 (\OML/cmm/m/it/10 q[]\OT1/cmr/m/n/10 ) = (\OML/cmm/m/it/10 q[]; q[]; q[]; []\OT1/cmr/m/n/10 ) = [] + [] -] (./project.aux) -LaTeX Warning: There were multiply-defined labels. +Overfull \hbox (58.9759pt too wide) detected at line 455 +\OML/cmm/m/it/10 A \OT1/cmr/m/n/10 = \OML/cmm/m/it/10 ^^O[]\OT1/cmr/m/n/10 (\OML/cmm/m/it/10 move\OT1/cmr/m/n/10 ([]\OML/cmm/m/it/10 ; b\OT1/cmr/m/n/10 )) = \OML/cmm/m/it/10 ^^O[]\OT1/cmr/m/n/10 (\OML/cmm/m/it/10 move\OT1/cmr/m/n/10 (\OML/cmm/m/it/10 q[]; q[]; q[]; q[]; q[]; q[]; q[]; []; b\OT1/cmr/m/n/10 ))) = \OML/cmm/m/it/10 ^^O[]\OT1/cmr/m/n/10 (\OML/cmm/m/it/10 q[]; q[]\OT1/cmr/m/n/10 ) = (\OML/cmm/m/it/10 q[]; q[]\OT1/cmr/m/n/10 ) = \OML/cmm/m/it/10 C + [] - ) +[4 + +] [5] (./project.aux) ) Here is how much of TeX's memory you used: - 13885 strings out of 479304 - 290077 string characters out of 5869778 - 665548 words of memory out of 5000000 - 30830 multiletter control sequences out of 15000+600000 - 408198 words of font info for 44 fonts, out of 8000000 for 9000 + 13908 strings out of 479304 + 290559 string characters out of 5869778 + 665530 words of memory out of 5000000 + 30853 multiletter control sequences out of 15000+600000 + 408505 words of font info for 45 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 - 113i,10n,116p,418b,915s stack positions out of 5000i,500n,10000p,200000b,80000s - -Output written on project.pdf (5 pages, 90541 bytes). + 113i,10n,116p,418b,949s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on project.pdf (6 pages, 114865 bytes). PDF statistics: - 51 PDF objects out of 1000 (max. 8388607) - 36 compressed objects within 1 object stream + 62 PDF objects out of 1000 (max. 8388607) + 44 compressed objects within 1 object stream 0 named destinations out of 1000 (max. 500000) 13 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/elacProjectA/project.pdf b/elacProjectA/project.pdf index 394d950c..02781b2b 100644 Binary files a/elacProjectA/project.pdf and b/elacProjectA/project.pdf differ diff --git a/elacProjectA/project.synctex.gz b/elacProjectA/project.synctex.gz index b7d07457..cf4182d0 100644 Binary files a/elacProjectA/project.synctex.gz and b/elacProjectA/project.synctex.gz differ diff --git a/elacProjectA/project.tex b/elacProjectA/project.tex index 877e5915..852829b0 100644 --- a/elacProjectA/project.tex +++ b/elacProjectA/project.tex @@ -1,4 +1,4 @@ -\documentclass{report} +\documentclass{report}[pt12] \usepackage{amsmath} \usepackage{tikz} \usepackage[section]{placeins} @@ -444,10 +444,91 @@ We are given following regular expression: % bba* \end{tikzpicture} -\caption{Operator '$a^*+ba^*b + bba^*$' - changed names of states} \label{fig:final} +\caption{Operator '$a^*+ba^*b + bba^*$' - changed names of states} \label{fig:finalBetter} \end{figure} \section{Transforming NFA into DFA using subset algorithm} +I will use $\epsilon_{cl}$ instead of $\epsilon$-closure for brevity sake. +Final state - $\underline{q_{19}}$ was marked with an $\underline{underline}$ and so did all the states of DFA that contain it. +\[ A = \epsilon_{cl}(q_0) = (q_0, q_1, q_3, q_4, q_6, q_{12}, q_{18}, \underline{q_{19}}) = \underline{A} \] +\[ \epsilon_{cl}(move(\underline{A}, a)) = (\epsilon_{cl}(move(q_0, q_1, q_3, q_4, q_6, q_{12}, q_{18}, \underline{q_{19}}, a))) = \epsilon_{cl}(q_9) = (q_9, q_{12}, q_{18}, \underline{q_{19}}) = \underline{B} \] +\[ A = \epsilon_{cl}(move(\underline{A}, b)) = \epsilon_{cl}(move(q_0, q_1, q_3, q_4, q_6, q_{12}, q_{18}, \underline{q_{19}}, b))) = \epsilon_{cl}(q_2, q_7) = (q_{10}, q_{15}) = C \] +\[ \epsilon_{cl}(move(\underline{B}, a)) = \epsilon_{cl}(move(q_9, q_{12}, q_{18}, \underline{q_{19}}), a) = \emptyset \] +\[ \epsilon_{cl}(move(\underline{B}, b)) = \epsilon_{cl}(move(q_9, q_{12}, q_{18}, \underline{q_{19}}), b) = \emptyset \] +\[ \epsilon_{cl}(move(C, a)) = \epsilon_{cl}(move(q_{10}, q_{15}), a) = \epsilon_{cl}(q_{13}) = (q_{15}) = D \] +\[ \epsilon_{cl}(move(C, b)) = \epsilon_{cl}(move(q_{10}, q_{15}), b) = \epsilon_{cl}(q_{17}) = (q_{18}, \underline{q_{19}}) = \underline{E} \] +\[ \epsilon_{cl}(move(D, a)) = \epsilon_{cl}(move((q_{15}), a) = \epsilon_{cl}(\emptyset) = \emptyset \] +\[ \epsilon_{cl}(move(D, b)) = \epsilon_{cl}(move((q_{15}), b) = \epsilon_{cl}(q_{17}) = (q_{18}, \underline{q_{19}}) = \underline{E} \] +\[ \epsilon_{cl}(move(\underline{E}, a)) = \epsilon_{cl}(move((q_{18}, \underline{q_{19}}), a) = \epsilon_{cl}(\emptyset) = \emptyset \] +\[ \epsilon_{cl}(move(\underline{E}, b)) = \epsilon_{cl}(move((q_{18}, \underline{q_{19}}), b) = \epsilon_{cl}(\emptyset) = \emptyset \] + +\subsection{State table} +\begin{center} +\begin{tabular}{||c c c||} + \hline + State & a & b \\ + \hline +$\underline{A}$ & $\underline{B}$ & C\\ + \hline + $\underline{B}$ & $\emptyset$ & $\emptyset$ \\ + \hline + C & D & $\underline{E}$\\ + \hline + D & $\emptyset$ & $\underline{E}$\\ + \hline + $\underline{E}$ & $\emptyset$ & $\emptyset$\\ + \hline +$\emptyset$ & $\emptyset$ & $\emptyset$\\ + \hline +\end{tabular} +\end{center} + +\begin{figure}[!htb] +\centering +\begin{tikzpicture} [node distance = 2cm, on grid, auto] + +\node (q0) [state, accepting, initial, initial text = {}] {A}; +\node (q1) [state, accepting, above right = of q0] {B}; +\node (q2) [state, below right = of q0] {C}; +\node (q3) [state, accepting, above right = of q2] {E}; +\node (q4) [state, below right = of q2] {D}; +\node (q5) [state, right = of q1] {$\emptyset$}; + +\path [-stealth, thick] +(q0) edge node {$a$} (q1); + +\path [-stealth, thick] +(q0) edge node {$b$} (q2); + +\path [-stealth, thick] +(q2) edge node {$a$} (q4); + +\path [-stealth, thick] +(q2) edge node {$b$} (q3); + +\path [-stealth, thick] +(q4) edge node {$b$} (q3); + +\path [-stealth, thick] +(q1) edge [bend left] node {$a, b$} (q5); + +\path [-stealth, thick] +(q3) edge node {$a, b$} (q5); + +\path [-stealth, thick] +(q4) edge [bend right] node {$a$} (q5); + +\path [-stealth, thick] +(q5) edge [loop] node {$a, b$} (q5); + + + + + +\end{tikzpicture} +\caption{DFA graph before minimalization} \label{dfaNominimalization} +\end{figure} + \section{Constructing minimal state DFA}