Cleanup
This commit is contained in:
@ -2,24 +2,28 @@
|
||||
|
||||
\definition{}
|
||||
An \textit{alphabet} is a set of symbols. \par
|
||||
For example, $\{\texttt{0}, \texttt{1}\}$ is an alphabet of two symbols, \par
|
||||
For example, $\{\texttt{0}, \texttt{1}\}$ is an alphabet of two symbols,
|
||||
and $\{\texttt{a}, \texttt{b}, \texttt{c}\}$ is an alphabet of three.
|
||||
|
||||
\definition{}
|
||||
A \textit{word} over an alphabet $A$ is a sequence of symbols in that alphabet. \par
|
||||
For example, $\texttt{00110}$ is a word over the alphabet $\{\texttt{0}, \texttt{1}\}$. \par
|
||||
We'll let $\varnothing$ denote the empty word, which exists over every alphabet.
|
||||
We'll let $\varnothing$ denote the empty word, which is a valid word over any alphabet.
|
||||
|
||||
\definition{}
|
||||
Let $v$ and $w$ be words over the same alphabet. \par
|
||||
We say $v$ is a \textit{subword} of $w$ if $v$ is contained in $w$. \par
|
||||
\note{
|
||||
In other words, $v$ is a subword of $w$ if we can construct $v$ \par
|
||||
by removing a few characters from the start and end of $w$.
|
||||
}
|
||||
For example, \texttt{11} is a subword of \texttt{011}, but \texttt{00} is not.
|
||||
|
||||
\definition{}
|
||||
Recall \ref{lockproblem}. From now on, we'll call this the \textit{$n$-subword problem}: \par
|
||||
Recall \ref{lockproblem}. Let's generalize this to the \textit{$n$-subword problem}: \par
|
||||
Given an alphabet $A$ and a positive integer $n$,
|
||||
we want a word over $A$ that contains all possible length-$n$ subwords. \par
|
||||
That shortest word that solves a given $n$-subword problem is called the \textit{optimal solution}.
|
||||
we want a word over $A$ that contains all possible length-$n$ subwords.
|
||||
The shortest word that solves a given $n$-subword problem is called the \textit{optimal solution}.
|
||||
|
||||
|
||||
|
||||
@ -55,6 +59,12 @@ Find the following:
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\problem{}<sbounds>
|
||||
Let $w$ be a word over an alphabet of size $k$. \par
|
||||
Prove the following:
|
||||
@ -87,6 +97,10 @@ Prove the following:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\definition{}
|
||||
Let $v$ and $w$ be words over the same alphabet. \par
|
||||
The word $vw$ is the word formed by writing $v$ after $w$. \par
|
||||
@ -145,6 +159,10 @@ We'll call this the \textit{Fibonacci word} of order $k$.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
% C_k is called the "Champernowne word" of order k.
|
||||
\problem{}<cword>
|
||||
Let $C_k$ denote the word over the alphabet $\{\texttt{0}, \texttt{1}\}$ obtained by \par
|
||||
|
Reference in New Issue
Block a user