This commit is contained in:
Mark 2024-03-22 16:55:08 -07:00
parent 8d520eabc2
commit 6a94084190
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
2 changed files with 22 additions and 13 deletions

View File

@ -17,9 +17,9 @@ 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
Given an alphabet $A$ and a positive integer $n$, we want a \par
word over $A$ that contains all possible length-$n$ subwords. \par
The shortest word that solves a given $n$-subword problem is called the \textit{optimal solution}.
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}.
@ -55,7 +55,7 @@ Find the following:
\vfill
\pagebreak
\problem{}
\problem{}<sbounds>
Let $w$ be a word over an alphabet of size $k$. \par
Prove the following:
\begin{itemize}

View File

@ -96,11 +96,11 @@ We'll call the optimal solution to this problem a \textit{De Bruijn\footnotemark
\problem{}<dbbounds>
Let $\mathcal{B}_n$ be the length of an order-$n$ De Bruijn word. \par
Let $w$ be the an order-$n$ De Bruijn word, and denote its length with $|w|$. \par
Show that the following bounds always hold:
\begin{itemize}
\item $\mathcal{B}_n \leq n2^n$
\item $\mathcal{B}_n \geq 2^n + n - 1$
\item $|w| \leq n2^n$
\item $|w| \geq 2^n + n - 1$
\end{itemize}
\begin{solution}
@ -113,7 +113,7 @@ Show that the following bounds always hold:
\remark{}
Now, we'd like to show that $\mathcal{B}_n = 2^n + n - 1$... \par
Now, we'd like to show that the length of a De Bruijn word is always $2^n + n - 1$... \par
That is, that the optimal solution to the subword problem always has $2^n + n - 1$ letters. \par
We'll do this by construction: for a given $n$, we want to build a word with length $2^n + n - 1$
that solves the binary $n$-subword problem.
@ -244,7 +244,7 @@ Draw $G_4$.
\end{solution}
\vfill
\pagebreak
\problem{}
\begin{itemize}
@ -268,8 +268,6 @@ Show that $G_4$ always contains an Eulerian path. \par
\hint{\ref{eulerexists}}
\vfill
\pagebreak
\theorem{}<dbeuler>
We can now easily construct De Bruijn words for a given $n$: \par
@ -310,6 +308,7 @@ Find De Bruijn words of orders $2$, $3$, and $4$.
\end{solution}
\vfill
\pagebreak
Let's quickly show that the process described in \ref{dbeuler}
indeed produces a valid De Bruijn word.
@ -334,7 +333,17 @@ contains every possible length-$n$ subword. \par
In other words, show that $\mathcal{S}_n(w) = 2^n$ for a generated word $w$.
\begin{solution}
TODO
Any length-$n$ subword of $w$ is the concatenation of a vertex label and an edge label.
By construction, the next length-$n$ subword is the concatenation of the next vertex and edge
in the Eulerian cycle.
\vspace{2mm}
This cycle traverses each edge exactly once, so each length-$n$ subword is distinct. \par
Since $w$ has length $2^n + n - 1$, there are $2^n$ total subwords. \par
These are all different, so $\mathcal{S}_n \geq 2^n$. \par
However, $\mathcal{S}_n \leq 2^n$ by \ref{sbounds}, so $\mathcal{S}_n = 2^n$.
\end{solution}
\vfill