Cleanup
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\example{}<lockproblem>
|
||||
A certain electronic lock has two buttons: \texttt{0} and \texttt{1}.
|
||||
It opens as soon as the correct two-digit code is entered, completely ignoring
|
||||
previous inputs.\hspace{-0.5ex}\footnotemark{} For example, if the correct code is \text{10}, the lock will open
|
||||
previous inputs. For example, if the correct code is \text{10}, the lock will open
|
||||
once the sequence \texttt{010} is entered.
|
||||
|
||||
\vspace{2mm}
|
||||
@ -19,36 +19,38 @@ Unlock this lock with only 5 keypresses.
|
||||
\begin{solution}
|
||||
The sequence \texttt{00110} is guaranteed to unlock this lock.
|
||||
\end{solution}
|
||||
\vfill
|
||||
|
||||
Now, consider the same lock, now set with a three-digit binary code.
|
||||
\problem{}
|
||||
How many codes are possible?
|
||||
\vfill
|
||||
|
||||
\problem{}
|
||||
Consider the same lock, now set with a three-digit binary code.
|
||||
\begin{itemize}
|
||||
\item How many codes are possible?
|
||||
\item What is the shortest sequence that is guaranteed to unlock the lock? \par
|
||||
\hint{You'll need 10 digits.}
|
||||
\end{itemize}
|
||||
Show that there is no solution with fewer than three keypresses
|
||||
\vfill
|
||||
|
||||
\problem{}
|
||||
What is the shortest sequence that is guaranteed to unlock the lock? \par
|
||||
\hint{You'll need 10 digits.}
|
||||
|
||||
\begin{solution}
|
||||
\begin{itemize}
|
||||
\item $2^3 = 8$
|
||||
\item \texttt{0001110100} will do.
|
||||
\end{itemize}
|
||||
\texttt{0001110100} will do.
|
||||
\end{solution}
|
||||
|
||||
|
||||
\problem{}
|
||||
How about a four-digit code? How many digits do we need? \par
|
||||
|
||||
\begin{instructornote}
|
||||
Don't spend too much time here.
|
||||
Provide a solution at the board once everyone has had a few
|
||||
minutes to think about this problem.
|
||||
\end{instructornote}
|
||||
|
||||
\begin{solution}
|
||||
One example is \texttt{0000 1111 0110 0101 000}
|
||||
\end{solution}
|
||||
%\problem{}
|
||||
%How about a four-digit code? How many digits do we need? \par
|
||||
%
|
||||
%\begin{instructornote}
|
||||
% Don't spend too much time here.
|
||||
% Provide a solution at the board once everyone has had a few
|
||||
% minutes to think about this problem.
|
||||
%\end{instructornote}
|
||||
%
|
||||
%\begin{solution}
|
||||
% One example is \texttt{0000 1111 0110 0101 000}
|
||||
%\end{solution}
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
Reference in New Issue
Block a user