ChengsongTanPhdThesis/Chapters/Chapter2.tex
author Chengsong
Fri, 25 Mar 2022 21:49:53 +0000
changeset 468 a0f27e21b42c
child 500 4d9eecfc936a
permissions -rwxr-xr-x
all texrelated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
468
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     1
% Chapter Template
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     2
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     3
\chapter{Chapter Title Here} % Main chapter title
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     4
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     5
\label{ChapterX} % Change X to a consecutive number; for referencing this chapter elsewhere, use \ref{ChapterX}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     6
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     7
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     8
%	SECTION 1
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     9
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    10
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    11
\section{Properties of $\backslash c$}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    12
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    13
To have a clear idea of what we can and 
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    14
need to prove about the algorithms involving
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    15
Brzozowski's derivatives, there are a few 
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    16
properties we need to be clear about 
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    17
it.
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    18
\subsection{function $\backslash c$ is not 1-to-1}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    19
\begin{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    20
The derivative $w.r.t$ character $c$ is not one-to-one.
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    21
Formally,
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    22
	$\exists r_1 \;r_2. r_1 \neq r_2 \mathit{and} r_1 \backslash c = r_2 \backslash c$
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    23
\end{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    24
This property is trivially true for the
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    25
character regex example:
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    26
\begin{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    27
	$r_1 = e; \; r_2 = d;\; r_1 \backslash c = \ZERO = r_2 \backslash c$
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    28
\end{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    29
But apart from the cases where the derivative
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    30
output is $\ZERO$, are there non-trivial results
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    31
of derivatives which contain strings?
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    32
The answer is yes.
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    33
For example,
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    34
\begin{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    35
	Let $r_1 = a^*b\;\quad r_2 = (a\cdot a^*)\cdot b + b$.\\
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    36
	where $a$ is not nullable.\\
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    37
	$r_1 \backslash c = ((a \backslash c)\cdot a^*)\cdot c + b \backslash c$\\
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    38
	$r_2 \backslash c = ((a \backslash c)\cdot a^*)\cdot c + b \backslash c$
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    39
\end{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    40
We start with two syntactically different regexes,
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    41
and end up with the same derivative result, which is
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    42
a "meaningful" regex because it contains strings.
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    43
We have rediscovered Arden's lemma:\\
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    44
\begin{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    45
	$A^*B = A\cdot A^* \cdot B + B$
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    46
\end{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    47
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    48
	
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    49
%-----------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    50
%	SUBSECTION 1
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    51
%-----------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    52
\subsection{Subsection 1}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    53
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    54
Nunc posuere quam at lectus tristique eu ultrices augue venenatis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam erat volutpat. Vivamus sodales tortor eget quam adipiscing in vulputate ante ullamcorper. Sed eros ante, lacinia et sollicitudin et, aliquam sit amet augue. In hac habitasse platea dictumst.
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    55
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    56
%-----------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    57
%	SUBSECTION 2
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    58
%-----------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    59
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    60
\subsection{Subsection 2}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    61
Morbi rutrum odio eget arcu adipiscing sodales. Aenean et purus a est pulvinar pellentesque. Cras in elit neque, quis varius elit. Phasellus fringilla, nibh eu tempus venenatis, dolor elit posuere quam, quis adipiscing urna leo nec orci. Sed nec nulla auctor odio aliquet consequat. Ut nec nulla in ante ullamcorper aliquam at sed dolor. Phasellus fermentum magna in augue gravida cursus. Cras sed pretium lorem. Pellentesque eget ornare odio. Proin accumsan, massa viverra cursus pharetra, ipsum nisi lobortis velit, a malesuada dolor lorem eu neque.
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    62
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    63
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    64
%	SECTION 2
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    65
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    66
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    67
\section{Main Section 2}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    68
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    69
Sed ullamcorper quam eu nisl interdum at interdum enim egestas. Aliquam placerat justo sed lectus lobortis ut porta nisl porttitor. Vestibulum mi dolor, lacinia molestie gravida at, tempus vitae ligula. Donec eget quam sapien, in viverra eros. Donec pellentesque justo a massa fringilla non vestibulum metus vestibulum. Vestibulum in orci quis felis tempor lacinia. Vivamus ornare ultrices facilisis. Ut hendrerit volutpat vulputate. Morbi condimentum venenatis augue, id porta ipsum vulputate in. Curabitur luctus tempus justo. Vestibulum risus lectus, adipiscing nec condimentum quis, condimentum nec nisl. Aliquam dictum sagittis velit sed iaculis. Morbi tristique augue sit amet nulla pulvinar id facilisis ligula mollis. Nam elit libero, tincidunt ut aliquam at, molestie in quam. Aenean rhoncus vehicula hendrerit.