Compare commits

..

3 Commits

23 changed files with 1344 additions and 137 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
build/
.bak*
.auctex-auto
## Core latex/pdflatex auxiliary files:

BIN
automaton.pdf (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,63 @@
\chapter{Back to basics}
\begin{algorithm}
\caption{Search an element in an array}
\begin{algorithmic}[1]
\Function{Search}{$A$: Array($n$), $E$: element}
\For {($i = 0$; $i < n$; $i++$)}
\If {$A[i] = E$}
\State \Return \True
\EndIf
\EndFor
\State \Return \False
\EndFunction
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Search an element in an array using a while loop}
\begin{algorithmic}[1]
\Function{Search}{$A$: Array($n$), $E$: element}
\State $i \gets 0$
\While {$i < n$}
\If {$A[i] = E$}
\State \Return \True
\EndIf
\State $i \gets i + 1$
\EndWhile
\State
\Return
\False
\EndFunction
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Search an element in an array using a while loop (bis)}
\begin{algorithmic}[1]
\Function{Search}{$A$: Array($n$), $E$: element}
% \Comment{Version ``preffered" by the professor}
\State $i \gets 0$
\While {$i < n$ and $A[i] \neq E$}
\State $i \gets i + 1$
\EndWhile
\If {$i = n$}
\State
\Return \False \Else \State \Return \True \EndIf
\EndFunction
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Count the occurrences of an element in an array}
\begin{algorithmic}[1]
\Function{Search}{$A$: Array($n$), $E$: element} \State $c \gets 0$
\For{($i = 0$; $i < n$; $i++$)}
\If {$A[i] = E$}
\State $c \gets c + 1$
\EndIf
\EndFor
\State \Return $c$
\EndFunction
\end{algorithmic}
\end{algorithm}

199
content/chapters/part1/1.tex Executable file → Normal file
View File

@ -1,141 +1,74 @@
\chapter{Back to basics}
\begin{algorithm}
\caption{Search an element in an array}
\begin{algorithmic}[1]
\Function{Search}{A: Array(n), E: element}
\For {(i=0; i < n; i++)}
\If {A[i] $ = $ E}
\State \Return \True
\EndIf
\EndFor
\State \Return \False
\EndFunction
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Search an element in an array using a while loop}
\begin{algorithmic}[1]
\Function{Search}{A: Array(n), E: element}
\State $i \gets 0$
\While {$i < n$}
\If {A[i] $ = $ E}
\State \Return \True
\EndIf
\State $i \gets i + 1$
\EndWhile
\State \Return \False
\EndFunction
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Search an element in an array using a while loop (bis)}
\begin{algorithmic}[1]
\Function{Search}{A: Array(n), E: element}
\Comment{Version prefered by the professor}
\State $i \gets 0$
\While {$i < n$ and $A[i] \neq E$}
\If {A[i] $ = $ E}
\State \Return \True
\EndIf
\State $i \gets i + 1$
\EndWhile
\If {$i = n$}
\State \Return \False
\Else
\State \Return \True
\EndIf
\EndFunction
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Count the occurences of an element in an array}
\begin{algorithmic}[1]
\Function{Search}{A: Array(n), E: element}
\State $c \gets 0$
\For{$i = 0$; $i < n$; $i++$}
\If {A[i] $ = $ E}
\State $c \gets c + 1$
\EndIf
\EndFor
\State \Return $c$
\EndFunction
\end{algorithmic}
\end{algorithm}
\chapter{Motif}
\begin{algorithm}
\caption{Brute-force search of a motif in a sequence}
\begin{algorithmic}[1]
\Function{FindMotif}{S: Array(n), M: Array(m)}
\Returns{list of position}
\State $pos \gets $ empty list
\State $i \gets 0$
\While {$i < n - m + 1$}
\State $j \gets 0$
\While {$j < m$ and S[i+j] $ = $ M[j]}
\State $j++$
\EndWhile
\If {$j = m$}
\State add $i$ to $pos$
\EndIf
\State $i++$
\EndWhile
\State \Return $pos$
\EndFunction
\end{algorithmic}
\caption{Brute-force search of a motif in a sequence}
\begin{algorithmic}[1]
\Function{FindMotif}{$S$: Array($n$), $M$: Array($m$)}
\Returns{a list of position}
\State $pos \gets \{\}$
\State $i \gets 0$
\While {$i < n - m + 1$}
\State $j \gets 0$
\While {$j < m$ and $S[i+j] = M[j]$}
\State $j++$
\EndWhile
\If {$j = m$}
\State $pos \gets pos \cup \{i\}$
\EndIf
\State $i++$
\EndWhile
\State \Return $pos$
\EndFunction
\end{algorithmic}
\label{alg:naive-motif-matching}
\end{algorithm}
\begin{algorithm}
\caption{Knuth-Morris-Pratt algorithm}
\begin{algorithmic}[1]
\Function{KMP\_Search}{S: Array(n), M: Array(m)}
\Returns{Integer}
\State $table \gets \Call{KMP\_Table}{M}$
\State $c \gets 0$ \Comment{Count the number of matches}
\State $i \gets 0$
\State $j \gets 0$
\While {$i < n$}
\If{$S[i] = M[i]$}
\State $i \gets i + 1$
\State $j \gets j + 1$
\EndIf
\If {$j = m$}
\State $c \gets c + 1$
\State $j \gets table[j-1]$
\ElsIf {$j < n$ and $M[j] \neq S[i]$}
\If {$j \neq 0$}
\State $j \gets table[j-1]$
\Else
\State $i \gets i + 1$
\EndIf
\EndIf`
\EndWhile
\State \Return $c$
\EndFunction
\caption{Knuth-Morris-Pratt algorithm}
\begin{algorithmic}[1]
\Function{KMP\_Search}{$S$: Array($n$), $M$: Array($m$)}
\Returns{Integer}
\State $table \gets$ \Call{KMP\_Table}{$M$}
\State $c \gets 0$ \Comment{Count the number of matches}
\State $i \gets 0$
\State $j \gets 0$
\While {$i < n$}
\If{$S[i] = M[i]$}
\State $i \gets i + 1$
\State $j \gets j + 1$
\EndIf
\If {$j = m$}
\State $c \gets c + 1$
\State $j \gets table[j-1]$
\ElsIf {$j < n$ and $M[j] \neq S[i]$}
\If {$j \neq 0$}
\State $j \gets table[j-1]$
\Else
\State $i \gets i + 1$
\EndIf
\EndIf`
\EndWhile
\State \Return $c$
\EndFunction
\Function{KMP\_Table}{M: Array(m)}
\State \textbf{Returns} Array(m)
\State $previous \gets 0$
\State $table \gets $ array of zeros of size m
\For {$i = 0$; $i < m$; $i++$}
\If {$M[i] = M[previous]$}
\State $previous \gets previous + 1$
\State $table[i] \gets previous$
\State $i \gets i + 1$
\Else
\If {$previous = 0$}
\State $previous \gets table[previous - 1]$
\Else
\State $table[i] \gets 0$
\State $i \gets 1$
\EndIf
\EndIf
\EndFor
\EndFunction
\end{algorithmic}
\Function{KMP\_Table}{M: Array(m)}
\State \textbf{Returns} Array(m)
\State $previous \gets 0$
\State $table \gets $ array of zeros of size m
\For {$i = 0$; $i < m$; $i++$}
\If {$M[i] = M[previous]$}
\State $previous \gets previous + 1$
\State $table[i] \gets previous$
\State $i \gets i + 1$
\Else
\If {$previous = 0$}
\State $previous \gets table[previous - 1]$
\Else
\State $table[i] \gets 0$
\State $i \gets 1$
\EndIf
\EndIf
\EndFor
\EndFunction
\end{algorithmic}
\end{algorithm}

View File

@ -0,0 +1,281 @@
\chapter{Matrices}
Let $S_{1}$ and $S_{2}$ be two sequences.
$S_{1} = $ ACGUUCC
$S_{2} = $ GUU
\begin{table}
\centering
\begin{tabular}{c|ccccccc}
& A & C & G & U & U & C & C \\
\hline
G & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\
U & 0 & 0 & 0 & 1 & 1 & 0 & 0 \\
U & 0 & 0 & 0 & 1 & 1 & 0 & 0
\end{tabular}
\caption{Comparison matrix}
\end{table}
Let $n = |S_{1}|$, $m = |S_{2}|$
The complexity of this algorithm is $\mathcal{O}(n \cdot m)$ to build the matrix, and it requires also to find the diagonals and thus it is a bit less efficient than the \autoref{alg:naive-motif-matching}.
To find repetitions, we can use a comparison matrix with a single sequence against itself. A repetition would appear as a diagonal of ones, not on the main diagonal.
Let $S = $ ACGUUACGUU. Let's write the comparison matrix.
\begin{table}
\includegraphics{figures/part1/comparison_matrix_repetitions.pdf}
\caption{Comparison matrix for $seq = $``ACGUUACGUUGUU"}
\end{table}
\begin{algorithm}
\caption{Construct a comparison matrix}
\begin{algorithmic}[1]
\Function{ComparisonMatrix}{$S$: Array($n$)}
\State $M \gets $ Array($n$, $n$)
\For{($i = 0$; $i < n$; $i++$)}
\For{$j = 0$; $j < n$; $j++$}
\If {$S[i] = S[j]$}
\State $M[i][j] = 1$
\Else
\State $M[i][j] = 0$
\EndIf
\EndFor
\EndFor
\State \Return $M$
\EndFunction
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Construct the top half of a comparison matrix}
\begin{algorithmic}[1]
\Function{ComparisonMatrix}{$S$: Array($n$)}
\State $M \gets$ Array($n$,$n$)
\For{($i = 0$; $i < n$; $i++$)}
\For{j=i; j < n; j++}
\If {S[i] = S[j]}
\State M[i][j] = 1
\Else
\State M[i][j] = 0
\EndIf
\EndFor
\EndFor
\State \Return M
\EndFunction
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Find repetitions (with a set of visited segments)}
\begin{algorithmic}[1]
\Function{FindRepetions}{$S$: Array($n$)}
\Returns{A list of start and end positions for repeated sequences}
\State $M = $ \Call{ComparisonMatrix}{S}
\State $pos = \{\}$
\State $visited = \{\}$
\For {($i_{start} = 0$; $i_{start} < n$; $i_{start}++$)}
\For {($j_{start} = i_{start}+1$; $j_{start} < n$; $j_{start}++$)}
\If{$M[i_{start}][j_{start}] = 1$ and $(i_{start}, j_{start}) \notin visited$}
\State $i = i_{start}$
\State $j = j_{start}$
\While {$M[i][j] = 1$}
\State $i++$
\State $j++$
\State $visited = visited \cup \{(i, j)\}$
\EndWhile
\State $pos = pos \cup \{(i_{start}, i), (j_{start},j)\}$
\EndIf
\EndFor
\EndFor
\EndFunction
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Find repetitions with an exploration of diagonals}
\begin{algorithmic}[1]
\Function{FindRepetions}{$S$: Array($n$)}
\Returns{A list of start and end positions for repeted sequences}
\State $M$ = \Call{ComparisonMatrix}{S}
\State $pos = \{\}$
\For {($diag = 1$; $diag < n$; $diag++$)}
\State $j = diag$
\State $i = 0$
\While {$i < n$ and $j < n$}
\If {$M[i][j] = 1$}
\State $i_{start} = i$
\State $j_{start} = j$
\While {$i < n$ and $j < n$ and $M[i][j] = 1$}
\State i++
\State j++
\EndWhile
\State $pos = pos \cup \{((i_{start},i-1),(j_{start},j-1))\}$
\EndIf
\State $i++$
\State $j++$
\State
\EndWhile
\EndFor
\EndFunction
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Find repetitions with an exploration of diagonals, without nested while}
\begin{algorithmic}[1]
\Function{FindRepetions}{$S$: Array($n$)}
\Returns{A list of start positions for repeted sequences and match length}
\State $M$ = \Call{ComparisonMatrix}{S}
\State $pos = \{\}$
\For {($diag = 1$; $diag < n$; $diag++$)}
\State $j = diag$
\State $i = 0$
\State $l = 0$
\While {$i < n$ and $j < n$}
\If {$M[i][j] = 1$}
\State $l++$
\Else
\If {$l > 0$}
\State $pos = pos \cup \{(i-l,j-l,l)\}$
\State $l = 0$
\EndIf
\EndIf
\State $i++$
\State $j++$
\EndWhile
\If {$l > 0$}
\State $pos = pos \cup \{((i-l,j-l,l))\}$
\EndIf
\EndFor
\State \Return $pos$
\EndFunction
\end{algorithmic}
\end{algorithm}
\begin{algorithm}
\caption{Find repetitions}
\begin{algorithmic}[1]
\Function{FindRepetions}{$S$: Array($n$)}
\Returns{A list of start and end positions for repeted sequences}
\State $M$ = \Call{ComparisonMatrix}{S}
\State $pos = \{\}$
\For {$i_{start} = 0$; $i_{start} < n$; $i_{start}++$}
\For {$j_{start} = i_{start}+1$; $j_{start} < n$; $j_{start}++$}
\If{$M[i_{start}][j_{start}] = 1$}
\State $i = i_{start}$
\State $j = j_{start}$
\While {$M[i][j] = 1$}
\State $M[i][j] = 0$ \Comment{Ensure that the segment is not explored again}
\State $i++$
\State $j++$
\EndWhile
\State $pos = pos \cup \{((i_{start}, i-1), (j_{start},j-1))\}$
\EndIf
\EndFor
\EndFor
\EndFunction
\end{algorithmic}
\end{algorithm}
\section{Automata}
An automaton is a tuple $\langle S, s_{0}, T, \Sigma,f\rangle$
\begin{itemize}
\item $S$ the set of states
\item $s_{0}$ the initial state
\item $T$ the set of terminal states
\item $\Sigma$ the alphabet
\item $f$ the transition function $f: (s_{1}, c) \to s_{2}$
\end{itemize}
\paragraph{Example} Given the language $L$ on the alphabet $\Sigma = \{A, C, T\}$, $L = \{A^{*}, CTT, CA^{*}\}$
\begin{definition}[Deterministic automaton]
An automaton is deterministic, if for each couple $(p, a) \in S \times \Sigma$ it exists at most a state $q$ such as $f(p, q) = q$
\end{definition}
\begin{definition}[Complete automaton]
An automaton is complete, if for each couple $(p, a) \in S \times \Sigma$ it exists at least a state $q$ such as $f(p, q) = q$.
\end{definition}
\begin{algorithm}
\caption{Check wether a word belong to a language for which we have an automaton}
\begin{algorithmic}[1]
\Function{WordInLanguage}{$W$: Array($n$), $A$: $\langle S, s_{0}, T, \Sigma,f \rangle$}
\Returns{A Boolean valued to \True{} if the word is recognized by the language automaton}
\State $s \gets s_{0}$
\State $i \gets 0$
\While {$i < n$}
\State $a \gets W[i]$
\If {$\exists f(s, a)$}
\State $s \gets f(s, a)$
\Else
\State \Return \False
\EndIf
\State i++
\EndWhile
\If {$s \in T$}
\State \Return \True
\Else
\State \Return \False
\EndIf
\EndFunction
\end{algorithmic}
\end{algorithm}
\section{Suffix Automaton}
Let $S = $ AACTACT
A suffix automata recognize all suffix of a given sequence.
The suffix language of $S$ is $\{S, ACTACT, CTACT, TACT, ACT, CT, T\}$.
\begin{figure}
\centering
\includegraphics{figures/part1/minimal_suffix_automaton_exercise.pdf}
\caption{Suffix automaton for $S = $ AACTACT}
\end{figure}
\begin{figure}
\centering
\includegraphics{figures/part1/minimal_suffix_automaton_exercise_bis.pdf}
\caption{Suffix automaton for $S = $ TCATCATT}
\end{figure}
\begin{algorithm}
\caption{Check if a sequences matches a motif, from a suffix automaton $\mathcal{O}(m)$}
\begin{algorithmic}[1]
\Function{CheckMotifInSuffixAutomaton}{$W$: Array($m$), $A$: $\langle S, s_{0}, T, \Sigma,f \rangle$}
\Returns{Boolean valued to \True{} if the motif is in the sequence}
\State $s \gets s_{0}$
\State $i \gets 0$
\While {$i < m$ and $\exists f(s, W[i])$}
\State $s \gets f(s, W[i])$
\State $i++$
\EndWhile
\If {$i=n$}
\State \Return \True
\Else
\State \Return \False
\EndIf
\EndFunction
\end{algorithmic}
\end{algorithm}
The complexity of the pattern matching algorithm is $\mathcal{O}(n + m)$, because building the automaton is $\mathcal{O}(m)$

View File

@ -1,3 +1,3 @@
\newcommand{\Returns}[1]{
\State \textbf{Returns} #1
\State \textbf{returns} #1
}

BIN
figures/part1/automaton.pdf (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,21 @@
\documentclass[tikz]{standalone}
\usepackage{tikz}
\begin{document}
\usetikzlibrary{automata,positioning}
\begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid, auto]
\node[state, initial] (q_0) {$q_{0}$};
\node[state,right=of q_0] (q_1) {$q_{1}$};
\node[state,below=of q_0] (q_2) {$q_{2}$};
\node[state,accepting, right=of q_2] (q_3) {$q_{3}$};
\path[->] (q_0) edge node {A} (q_1)
edge node {G} (q_3)
(q_0) edge node {C} (q_2)
(q_2) edge node {C} (q_3);
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,69 @@
function comparison_matrix(seq)
matrix = {}
for i=1,#seq do
matrix[i] = {}
for j=1,#seq do
if seq[i] == seq[j] then
matrix[i][j] = 1
else
matrix[i][j] = 0
end
end
end
return matrix
end
function split_char(seq)
t = {}
seq:gsub(".",function(c) table.insert(t,c) end)
return t
end
function repr_matrix(matrix)
repr = ""
for i=1,#matrix do
for j=1,#matrix do
repr = repr .. matrix[i][j] .. " "
end
repr = repr .. "\n"
end
return repr
end
function comparison_matrix_tabular(matrix, seq1, seq2)
seq2 = seq2 or seq1
n=#seq1
m=#seq2
repr = [[\begin{tabular}{]] .. string.rep("c", n+1) .. "} \n"
repr = repr .. " "
for i=1,n do
repr = repr .. "& " .. seq1[i] .. " "
end
repr = repr .. "\\\\ \n "
for j=1,m do
repr = repr .. seq2[j] .. " "
for i=1,n do
repr = repr .. "& " .. matrix[i][j] .. " "
end
repr = repr .. " \\\\ \n "
end
repr = repr .. [[\end{tabular}]]
return repr
end
function main()
seq = split_char("ACGUUACGUUGUU")
matrix = comparison_matrix(seq)
print(comparison_matrix_tabular(matrix, seq))
end
function repr_comparison_matrix(seq)
seq = split_char(seq)
matrix = comparison_matrix(seq)
return comparison_matrix_tabular(matrix, seq)
end
main()
return { comparison_matrix=comparison_matrix, comparison_matrix_tabular, repr_comparison_matrix=repr_comparison_matrix }

BIN
figures/part1/comparison_matrix_repetitions.pdf (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,14 @@
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usepackage{luatextra}
\begin{document}
\directlua{
lib = require("comparison_matrix_repetitions")
seq="ACGUUACGUUGUU"
tex.print(lib.repr_comparison_matrix(seq))
}
\end{document}

View File

@ -0,0 +1,24 @@
\documentclass[tikz]{standalone}
\usepackage{tikz}
\begin{document}
\usetikzlibrary{automata,positioning}
\iffalse
$\Sigma = \{A, C, T\}$, $L = \{A^{*}, CTT, CA^{*}\}$
\fi
\begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid, auto]
% TODO
\node[state, initial] (q_0) {$q_{0}$};
\node[state,right=of q_0] (q_1) {$q_{1}$};
\node[state,below=of q_0] (q_2) {$q_{2}$};
\node[state,accepting, right=of q_2] (q_3) {$q_{3}$};
\path[->] (q_0) edge node {A} (q_1)
edge node {G} (q_3)
(q_0) edge node {C} (q_2)
(q_2) edge node {C} (q_3);
\end{tikzpicture}
\end{document}

BIN
figures/part1/minimal_suffix_automaton_exercise.pdf (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,62 @@
\documentclass[tikz]{standalone}
\usepackage{tikz}
\begin{document}
\usetikzlibrary{automata,positioning}
\iffalse
$S = $ AACTACT
The suffix language of $S$ is $\{S, ACTACT, CTACT, TACT, ACT, CT, T\}$.
\fi
\begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid, auto]
% TODO
\node[state, initial] (q_0) {$q_{0}$};
\node[state,right=of q_0] (q_1) {$q_{1}$};
\node[state,right=of q_1] (q_2) {$q_{2}$};
\node[state,right=of q_2] (q_3) {$q_{3}$};
\node[state,right=of q_3] (q_4) {$q_{4}$};
\node[state,right=of q_4] (q_5) {$q_{5}$};
\node[state,right=of q_5] (q_6) {$q_{6}$};
\node[state,accepting,right=of q_6] (q_7) {$q_{7}$};
% Fix for CT
\node[state,below=of q_2] (q_8) {$q_{8}$};
\node[state,right=of q_8,accepting,yshift=-2cm] (q_9) {$q_{9}$};
% Fix for T
% \node[state,above=of q_2,yshift=2cm,accepting] (q_10) {$q_{10}$};
% S itself
\path[->] (q_0) edge node {A} (q_1)
(q_1) edge node {A} (q_2)
(q_2) edge node {C} (q_3)
(q_3) edge node {T} (q_4)
(q_4) edge node {A} (q_5)
(q_5) edge node {C} (q_6)
(q_6) edge node {T} (q_7);
% First suffix: ACTACT
\path[->] (q_1) edge[bend left=30] node {C} (q_8)
(q_9) edge[bend right=30] node {A} (q_5);
% Second suffix: CTACT
\path[->] (q_0) edge[bend right=30] node {C} (q_8)
(q_8) edge node {T} (q_9);
% Third suffix: TACT
% \path[->] (q_0) edge[bend left=30] node {T} (q_10)
%(q_10) edge[bend left=30] node {A} (q_5);
% Fourth suffix: ACT
% \path[->] (q_)
% Fifth suffix: CT
% Fix for T
\path[->] (q_0) edge[bend right=40] node {T} (q_9);
\end{tikzpicture}
\end{document}

BIN
figures/part1/minimal_suffix_automaton_exercise_bis.pdf (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,50 @@
\documentclass[tikz]{standalone}
\usepackage{tikz}
\begin{document}
\usetikzlibrary{automata,positioning}
\iffalse
$S = $ TCATCATT
The suffix language of $S$ is $\{TCATCATT, CATCATT, ATCATT, TCATT, CATT, ATT, AT, T\}$.
\fi
\begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid, auto]
\node[state, initial] (q_0) {$q_{0}$};
\node[state,right=of q_0,accepting] (q_1) {$q_{1}$};
\node[state,right=of q_1] (q_2) {$q_{2}$};
\node[state,right=of q_2] (q_3) {$q_{3}$};
\node[state,right=of q_3] (q_4) {$q_{4}$};
\node[state,right=of q_4] (q_5) {$q_{5}$};
\node[state,right=of q_5] (q_6) {$q_{6}$};
\node[state,right=of q_6] (q_7) {$q_{7}$};
\node[state,right=of q_7,accepting] (q_8) {$q_{8}$};
\path[->] (q_0) edge node {T} (q_1)
(q_1) edge node {C} (q_2)
(q_2) edge node {A} (q_3)
(q_3) edge node {T} (q_4)
(q_4) edge node {C} (q_5)
(q_5) edge node {A} (q_6)
(q_6) edge node {T} (q_7)
(q_7) edge node {T} (q_8);
% CATCATT
\path[->] (q_0) edge[bend right=40] node {C} (q_2);
% ATCATT
\path[->] (q_0) edge[bend right=50] node {A} (q_3);
% TCATT
\path[->] (q_4) edge[bend right=30] node {T} (q_8);
% CATT
% ATT
%\path[->] (q_0) edge[bend right=50] node {A} (q_6);
% TT
\path[->] (q_1) edge[bend left=30] node {T} (q_8);
\end{tikzpicture}
\end{document}

657
figures/part1/test.svg Normal file
View File

@ -0,0 +1,657 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="612" height="792" viewBox="0 0 612 792">
<defs>
<g>
<g id="glyph-0-0">
</g>
<g id="glyph-0-1">
<path d="M 7.140625 0 L 7.140625 -0.3125 L 6.96875 -0.3125 C 6.375 -0.3125 6.234375 -0.375 6.125 -0.703125 L 3.96875 -6.9375 C 3.921875 -7.0625 3.890625 -7.140625 3.734375 -7.140625 C 3.578125 -7.140625 3.546875 -7.078125 3.5 -6.9375 L 1.4375 -0.984375 C 1.25 -0.46875 0.859375 -0.3125 0.3125 -0.3125 L 0.3125 0 L 1.328125 -0.03125 L 2.484375 0 L 2.484375 -0.3125 C 1.984375 -0.3125 1.734375 -0.5625 1.734375 -0.8125 C 1.734375 -0.84375 1.75 -0.953125 1.75 -0.96875 L 2.21875 -2.265625 L 4.671875 -2.265625 L 5.203125 -0.75 C 5.21875 -0.703125 5.234375 -0.640625 5.234375 -0.609375 C 5.234375 -0.3125 4.671875 -0.3125 4.40625 -0.3125 L 4.40625 0 C 4.765625 -0.03125 5.46875 -0.03125 5.84375 -0.03125 Z M 4.5625 -2.578125 L 2.328125 -2.578125 L 3.4375 -5.828125 Z M 4.5625 -2.578125 "/>
</g>
<g id="glyph-0-2">
<path d="M 6.625 -2.328125 C 6.625 -2.421875 6.625 -2.5 6.5 -2.5 C 6.390625 -2.5 6.390625 -2.4375 6.375 -2.328125 C 6.296875 -0.90625 5.234375 -0.09375 4.140625 -0.09375 C 3.53125 -0.09375 1.578125 -0.421875 1.578125 -3.40625 C 1.578125 -6.375 3.53125 -6.71875 4.140625 -6.71875 C 5.21875 -6.71875 6.109375 -5.8125 6.3125 -4.359375 C 6.328125 -4.21875 6.328125 -4.1875 6.46875 -4.1875 C 6.625 -4.1875 6.625 -4.21875 6.625 -4.421875 L 6.625 -6.78125 C 6.625 -6.953125 6.625 -7.03125 6.515625 -7.03125 C 6.484375 -7.03125 6.4375 -7.03125 6.359375 -6.90625 L 5.859375 -6.171875 C 5.5 -6.53125 4.984375 -7.03125 4.03125 -7.03125 C 2.15625 -7.03125 0.5625 -5.4375 0.5625 -3.40625 C 0.5625 -1.34375 2.171875 0.21875 4.03125 0.21875 C 5.65625 0.21875 6.625 -1.171875 6.625 -2.328125 Z M 6.625 -2.328125 "/>
</g>
<g id="glyph-0-3">
<path d="M 7.328125 -2.40625 L 7.328125 -2.71875 L 6.109375 -2.6875 C 5.71875 -2.6875 4.859375 -2.6875 4.5 -2.71875 L 4.5 -2.40625 L 4.828125 -2.40625 C 5.71875 -2.40625 5.75 -2.296875 5.75 -1.9375 L 5.75 -1.296875 C 5.75 -0.171875 4.484375 -0.09375 4.203125 -0.09375 C 3.5625 -0.09375 1.578125 -0.4375 1.578125 -3.40625 C 1.578125 -6.390625 3.546875 -6.71875 4.140625 -6.71875 C 5.21875 -6.71875 6.125 -5.828125 6.3125 -4.359375 C 6.34375 -4.21875 6.34375 -4.1875 6.484375 -4.1875 C 6.640625 -4.1875 6.640625 -4.21875 6.640625 -4.421875 L 6.640625 -6.78125 C 6.640625 -6.953125 6.640625 -7.03125 6.53125 -7.03125 C 6.484375 -7.03125 6.453125 -7.03125 6.375 -6.90625 L 5.875 -6.171875 C 5.546875 -6.484375 5.015625 -7.03125 4.03125 -7.03125 C 2.171875 -7.03125 0.5625 -5.453125 0.5625 -3.40625 C 0.5625 -1.359375 2.15625 0.21875 4.046875 0.21875 C 4.78125 0.21875 5.578125 -0.046875 5.90625 -0.625 C 6.046875 -0.40625 6.4375 -0.015625 6.546875 -0.015625 C 6.640625 -0.015625 6.640625 -0.09375 6.640625 -0.234375 L 6.640625 -1.96875 C 6.640625 -2.359375 6.671875 -2.40625 7.328125 -2.40625 Z M 7.328125 -2.40625 "/>
</g>
<g id="glyph-0-4">
<path d="M 7.140625 -6.5 L 7.140625 -6.8125 L 5.96875 -6.78125 L 4.78125 -6.8125 L 4.78125 -6.5 C 5.796875 -6.5 5.796875 -6.03125 5.796875 -5.765625 L 5.796875 -2.296875 C 5.796875 -0.890625 4.828125 -0.09375 3.890625 -0.09375 C 3.421875 -0.09375 2.25 -0.34375 2.25 -2.234375 L 2.25 -6.03125 C 2.25 -6.390625 2.265625 -6.5 3.03125 -6.5 L 3.265625 -6.5 L 3.265625 -6.8125 C 2.921875 -6.78125 2.1875 -6.78125 1.796875 -6.78125 C 1.421875 -6.78125 0.671875 -6.78125 0.328125 -6.8125 L 0.328125 -6.5 L 0.5625 -6.5 C 1.328125 -6.5 1.359375 -6.390625 1.359375 -6.03125 L 1.359375 -2.265625 C 1.359375 -0.875 2.515625 0.21875 3.875 0.21875 C 5.015625 0.21875 5.90625 -0.703125 6.078125 -1.84375 C 6.109375 -2.046875 6.109375 -2.140625 6.109375 -2.53125 L 6.109375 -5.71875 C 6.109375 -6.046875 6.109375 -6.5 7.140625 -6.5 Z M 7.140625 -6.5 "/>
</g>
<g id="glyph-0-5">
<path d="M 4.171875 0 L 4.171875 -0.3125 L 3.859375 -0.3125 C 2.953125 -0.3125 2.9375 -0.421875 2.9375 -0.78125 L 2.9375 -6.375 C 2.9375 -6.625 2.9375 -6.640625 2.703125 -6.640625 C 2.078125 -6 1.203125 -6 0.890625 -6 L 0.890625 -5.6875 C 1.09375 -5.6875 1.671875 -5.6875 2.1875 -5.953125 L 2.1875 -0.78125 C 2.1875 -0.421875 2.15625 -0.3125 1.265625 -0.3125 L 0.953125 -0.3125 L 0.953125 0 C 1.296875 -0.03125 2.15625 -0.03125 2.5625 -0.03125 C 2.953125 -0.03125 3.828125 -0.03125 4.171875 0 Z M 4.171875 0 "/>
</g>
<g id="glyph-0-6">
<path d="M 4.578125 -3.1875 C 4.578125 -3.984375 4.53125 -4.78125 4.1875 -5.515625 C 3.734375 -6.484375 2.90625 -6.640625 2.5 -6.640625 C 1.890625 -6.640625 1.171875 -6.375 0.75 -5.453125 C 0.4375 -4.765625 0.390625 -3.984375 0.390625 -3.1875 C 0.390625 -2.4375 0.421875 -1.546875 0.84375 -0.78125 C 1.265625 0.015625 2 0.21875 2.484375 0.21875 C 3.015625 0.21875 3.78125 0.015625 4.21875 -0.9375 C 4.53125 -1.625 4.578125 -2.40625 4.578125 -3.1875 Z M 3.765625 -3.3125 C 3.765625 -2.5625 3.765625 -1.890625 3.65625 -1.25 C 3.5 -0.296875 2.9375 0 2.484375 0 C 2.09375 0 1.5 -0.25 1.328125 -1.203125 C 1.21875 -1.796875 1.21875 -2.71875 1.21875 -3.3125 C 1.21875 -3.953125 1.21875 -4.609375 1.296875 -5.140625 C 1.484375 -6.328125 2.234375 -6.421875 2.484375 -6.421875 C 2.8125 -6.421875 3.46875 -6.234375 3.65625 -5.25 C 3.765625 -4.6875 3.765625 -3.9375 3.765625 -3.3125 Z M 3.765625 -3.3125 "/>
</g>
</g>
</defs>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="26.491" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-1" x="46.804823" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-2" x="66.231971" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-3" x="85.380165" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-4" x="105.156005" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-4" x="124.583153" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-1" x="144.010301" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-2" x="163.437449" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-3" x="182.585644" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-4" x="202.361484" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-4" x="221.788632" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-3" x="241.21578" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-4" x="260.99162" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-4" x="280.418768" y="8.369"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="21.096" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-1" x="27.203098" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="48.044941" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="67.332612" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="86.799611" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="106.396124" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="125.823272" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="145.25042" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="164.538091" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="184.005089" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="203.601602" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="223.02875" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="242.635226" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="262.231739" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="281.658887" y="20.324"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="21.235" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-2" x="27.342098" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="48.044464" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="67.332135" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="86.799134" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="106.395647" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="125.822795" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="145.249943" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="164.537614" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="184.004612" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="203.601125" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="223.028273" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="242.634749" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="262.231262" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="281.65841" y="32.279"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="20.922" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-3" x="27.029098" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="48.050269" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="67.33794" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="86.794976" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="106.401451" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="125.828599" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="145.255747" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="164.543418" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="184.000454" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="203.60693" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="223.034078" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="242.630591" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="262.237066" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="281.664214" y="44.234"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="21.096" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-4" x="27.203098" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="48.044941" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="67.332612" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="86.799611" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="106.396124" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="125.823272" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="145.25042" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="164.538091" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="184.005089" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="203.601602" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="223.02875" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="242.635226" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="262.231739" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="281.658887" y="56.189"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="21.096" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-4" x="27.203098" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="48.044941" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="67.332612" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="86.799611" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="106.396124" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="125.823272" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="145.25042" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="164.538091" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="184.005089" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="203.601602" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="223.02875" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="242.635226" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="262.231739" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="281.658887" y="68.144"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="21.096" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-1" x="27.203098" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="48.044941" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="67.332612" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="86.799611" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="106.396124" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="125.823272" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="145.25042" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="164.538091" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="184.005089" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="203.601602" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="223.02875" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="242.635226" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="262.231739" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="281.658887" y="80.1"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="21.235" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-2" x="27.342098" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="48.044464" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="67.332135" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="86.799134" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="106.395647" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="125.822795" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="145.249943" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="164.537614" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="184.004612" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="203.601125" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="223.028273" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="242.634749" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="262.231262" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="281.65841" y="92.055"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="20.922" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-3" x="27.029098" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="48.050269" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="67.33794" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="86.794976" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="106.401451" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="125.828599" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="145.255747" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="164.543418" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="184.000454" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="203.60693" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="223.034078" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="242.630591" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="262.237066" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="281.664214" y="104.01"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="21.096" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-4" x="27.203098" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="48.044941" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="67.332612" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="86.799611" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="106.396124" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="125.823272" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="145.25042" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="164.538091" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="184.005089" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="203.601602" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="223.02875" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="242.635226" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="262.231739" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="281.658887" y="115.965"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="21.096" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-4" x="27.203098" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="48.044941" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="67.332612" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="86.799611" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="106.396124" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="125.823272" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="145.25042" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="164.538091" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="184.005089" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="203.601602" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="223.02875" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="242.635226" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="262.231739" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="281.658887" y="127.92"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="20.922" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-3" x="27.029098" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="48.050269" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="67.33794" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="86.794976" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="106.401451" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="125.828599" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="145.255747" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="164.543418" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="184.000454" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="203.60693" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="223.034078" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="242.630591" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="262.237066" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="281.664214" y="139.875"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="21.096" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-4" x="27.203098" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="48.044941" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="67.332612" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="86.799611" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="106.396124" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="125.823272" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="145.25042" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="164.538091" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="184.005089" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="203.601602" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="223.02875" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="242.635226" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="262.231739" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="281.658887" y="151.831"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="21.096" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-4" x="27.203098" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="48.044941" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="67.332612" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="86.799611" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="106.396124" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="125.823272" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="145.25042" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="164.538091" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="184.005089" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="203.601602" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="223.02875" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-6" x="242.635226" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="262.231739" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-5" x="281.658887" y="163.786"/>
</g>
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
<use xlink:href="#glyph-0-0" x="26.491" y="175.741"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 27 KiB

BIN
main.pdf

Binary file not shown.

View File

@ -80,8 +80,6 @@
\input{content/chapters/include}
\chapter{}
% \input{content/conclusion}

View File

BIN
tmp.pdf (Stored with Git LFS) Normal file

Binary file not shown.

16
tmp.tex Normal file
View File

@ -0,0 +1,16 @@
\documentclass{scrartcl}
\RequirePackage{algorithm}
\RequirePackage{algorithmicx}
\RequirePackage[noEnd=false]{algpseudocodex}
\newcommand{\algorithmautorefname}{Algorithm} % Allow autoref.
% Define macros to typeset boolean in pseudocode environments
\algnewcommand{\True}{\textbf{\texttt{true}}}
\algnewcommand{\False}{\textbf{\texttt{false}}}
\algnewcommand{\NIL}{\textbf{\texttt{NIL}}}
\algnewcommand{\NULL}{\textbf{\texttt{null}}}
\input{definitions.tex}
\begin{document}
\end{document}