De Bruijn edits
This commit is contained in:
@@ -21,7 +21,7 @@ Unlock this lock with only 5 keypresses.
|
||||
\end{solution}
|
||||
\vfill
|
||||
|
||||
Now, consider the same lock, now set with a three-digit binary code.
|
||||
Now consider the same lock, but configured with a three-digit binary code.
|
||||
\problem{}
|
||||
How many codes are possible?
|
||||
\vfill
|
||||
|
||||
@@ -20,7 +20,11 @@ We say $v$ is a \textit{subword} of $w$ if $v$ is contained in $w$. \par
|
||||
For example, \texttt{11} is a subword of \texttt{011}, but \texttt{00} is not.
|
||||
|
||||
\definition{}
|
||||
Recall \ref{lockproblem}. Let's generalize this to the \textit{$n$-subword problem}: \par
|
||||
Recall the lock problem from the previous page.
|
||||
Let's generalize this to the \textit{$n$-subword problem}:
|
||||
|
||||
\vspace{1mm}
|
||||
|
||||
Given an alphabet $A$ and a positive integer $n$,
|
||||
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}.
|
||||
@@ -67,7 +71,7 @@ Find the following:
|
||||
|
||||
\problem{}<sbounds>
|
||||
Let $w$ be a word over an alphabet of size $k$. \par
|
||||
Prove the following:
|
||||
Show that all of the following are true:
|
||||
\begin{itemize}
|
||||
\item $\mathcal{S}_n(w) \leq k^n$
|
||||
\item $\mathcal{S}_n(w) \geq \mathcal{S}_{n-1}(w) - 1$
|
||||
@@ -103,7 +107,7 @@ 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
|
||||
The word $vw$ is the word formed by writing $w$ after $v$. \par
|
||||
For example, if $v = \texttt{1001}$ and $w = \texttt{10}$, $vw$ is $\texttt{100110}$.
|
||||
|
||||
\problem{}
|
||||
@@ -116,7 +120,6 @@ We'll call this the \textit{Fibonacci word} of order $k$.
|
||||
\item What are $F_3$, $F_4$, and $F_5$?
|
||||
\item Compute $\mathcal{S}_0$ through $\mathcal{S}_5$ for $F_5$.
|
||||
\item Show that the length of $F_k$ is the $(k + 2)^\text{th}$ Fibonacci number. \par
|
||||
\hint{Induction.}
|
||||
\end{itemize}
|
||||
|
||||
\begin{solution}
|
||||
|
||||
Reference in New Issue
Block a user