Edits
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user