3 Commits

Author SHA1 Message Date
b9f378ab76 Retrograde edits
All checks were successful
CI / Typst formatting (pull_request) Successful in 55s
CI / Typos (pull_request) Successful in 1m3s
CI / Build (pull_request) Successful in 4m44s
2026-03-04 18:12:42 -08:00
1a5aafb19b The Painting edits 2026-03-04 14:15:22 -08:00
53c3e1859b De Bruijn edits 2026-03-04 14:14:38 -08:00
6 changed files with 275 additions and 54 deletions

View File

@@ -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

View File

@@ -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}

View File

@@ -127,10 +127,6 @@ Mate the king in one move. \par
\pagebreak
% Sherlock, a question of survival
\problem{An empty board}
\difficulty{2}{5}
@@ -161,42 +157,6 @@ There is one more piece on the board, which isn't shown. What color square does
\pagebreak
% Sherlock, another monochromatic
\problem{The knight's grave}
\difficulty{3}{5}
In the game below, no pieces have moved from a black square to a white square, or from a white square to a black square.
The white king has made less than fourteen moves. \par
Use this information to show that a pawn was promoted. \par
% spell:off
\manyboards{
ke8,
Pb2,Pd2,
Ke1
}
% spell:on
\begin{solution}
Knights always move to a different colored square, so all four missing knights must have been captured on their home square.
What pieces captured them?
\vspace{2mm}
We can easily account for the white knights and the black knight on G8, but who could've captured the knight from B8?
The only white pieces that can move to black squares are pawns, the Bishop (which is trapped on C1), the rook (which is stuck on column A and row 1), or the king (which would need at least 14 moves to do so).
\vspace{2mm}
If this knight was captured by a pawn, that pawn would be immediately promoted. If it was captured by a piece that wasn't a pawn, that piece must be a promoted pawn.
\end{solution}
\vfill
\pagebreak
% Arabian Knights, intro (given with solution)
@@ -372,4 +332,122 @@ Which bishop was it, and what did it capture? \par
\end{solution}
\vfill
\pagebreak
\pagebreak
% Sherlock, appendix
\problem{Moriarty's first}
\difficulty{3}{5}
No captures have been made in the last four moves. \par
It is White's move. What was the previous move?
% spell:off
\manyboards{
Bc8,
pg6,
Pg5,kh5,
Pd4,Qg4,Bh4,
pd3,
Pd2,Be2,Bg2,
Nc1,rd1,Ne1,Kf1,Qg1,Rh1
}
% spell:on
\begin{solution}
To see what the position was four moves ago,
move the Black queen to E4, the knight on E1 to F3,
the Black bishop to E1, and the White bishop on C8 to H3.
The following sequence of moves brought the game to the present position:
\begin{itemize}
\item bishop to c8, check
\item bishop to h4, check
\item knight to e1, check
\item queen to g4.
\end{itemize}
This is the only way the present position could have arisen,
so Black's last move was with the queen from E4 to G4.
Try any other last move, and you will find it impossible to play back three more moves.
\end{solution}
\vfill
\pagebreak
% Sherlock, appendix
\problem{Moriarty's second}
\difficulty{3}{5}
Neither the White king nor queen has moved
during the last five moves, nor has any piece
been captured during that time.
What was the last move?
% spell:off
\manyboards{
kh8,
Kg6,Bh6,
pa4,
Qa2
}
% spell:on
\begin{solution}
Put the Black pawn on A7, the Black king on G8, remove the
White bishop, and put a White pawn on d5; this was the position
five moves ago. The following sequence of moves brought the
game to its present position:
\begin{itemize}
\item White: P-d6
\item Black: K-h8
\item White: P-d7
\item Black: P-a6
\item White: P-d8 = B
\item Black: P-a5
\item White: B-g5
\item Black: P-a4
\item White: B-h6
\end{itemize}
\end{solution}
\vfill
\pagebreak
% Sherlock, appendix
\problem{Moriarty's third}
\difficulty{3}{5}
No pawn has moved, nor has any piece been
captured in the last five moves. \par
The Black king has been accidentally
knocked off the board. \par
On what square should he stand?
% spell:off
\manyboards{
rh8,
pa7,pb7,pc7,pd7,pe7,Kf7,pg7,Ph7,
Pg6,
na2
}
% spell:on
\begin{solution}
The only way to avoid a retrograde stalemate for White is by
placing the Black king on C8. Black's last move was with
the rook from D8, White's move before that was with his
king from G8, and Black's move before that was to castle.
\end{solution}
\vfill
\pagebreak

View File

@@ -169,16 +169,156 @@ White to move. Which side of the board did each color start on? \par
% Sherlock, another monochromatic
\problem{Monochromatic}
\difficulty{4}{5}
In the game below, no pieces have moved from a black square to a white square or from a white square to a black square.
The white king has made fewer than fourteen moves. \par
Use this information to show that a pawn was promoted. \par
% spell:off
\manyboards{
ke8,
Pb2,Pd2,
Ke1
}
% spell:on
\begin{solution}
Knights always move to a different colored square, so all four missing knights must have been captured on their home square.
What pieces captured them?
\vspace{2mm}
We can easily account for the white knights and the black knight on G8, but who could've captured the knight from B8?
The only white pieces that can move to black squares are pawns, the Bishop (which is trapped on C1), the rook (which is stuck on column A and row 1), or the king (which would need at least 14 moves to do so).
\vspace{2mm}
If this knight was captured by a pawn, that pawn would be immediately promoted. If it was captured by a piece that wasn't a pawn, that piece must be a promoted pawn.
\end{solution}
\vfill
\pagebreak
% Sherlock, another question of location
\problem{Superposition}
\difficulty{4}{5}
A white pawn is missing; it is either on F2 or G2. \par
Where is it?
% spell:off
\manyboards{
ke8,rh8,
pa7,pf7,pg7,
pa6,pb6,
pb5,
Pa4,Pb4,Pc4,
pa3,
Pa2,Pb2,
Ke1
}
% spell:on
\vfill
\pagebreak
% Sherlock, another question of location
\problem{Possibility}
\difficulty{4}{5}
Show that black can castle to either side. \par
We know the following:
\begin{itemize}
\item White started the game missing one rook.
\item White has not moved either knight
\item No promotions have been made
\item White's last move was from E2 to E4.
\end{itemize}
% spell:off
\manyboards{
ra8,ke8,rh8,
pa7,bb7,pc7,pd7,pf7,pg7,ph7,
nc6,nh6,
pe5,qg5,
bb4,Pe4,
Pb2,Pc2,Pd2,Pf2,Pg2,Ph2,
Nb1,Bc1,Qd1,Ke1,Bf1,Ng1,Rh1
}
% spell:on
\vfill
\pagebreak
% Sherlock, little exercise 2
\problem{Kidnapping}
\difficulty{4}{5}
On which square was the White queen captured?. \par
% spell:off
\manyboards{
ra8,qd8,ke8,ng8,rh8,
pa7,pb7,pc7,pe7,pf7,ph7,
nc6,pe6,ph6,
Pb3,
Na2,Pb2,Pc2,Pd2,Pe2,Pf2,Pg2,Ph2,
Ra1,Ke1,Rh1
}
% spell:on
\begin{solution}
White is missing a queen, both bishops, and one knight. \par
The black pawns on E6 and H6 account for two captures.
\vspace{2mm}
Neither white bishop could've been captured by these pawns,
since both are trapped by their pawns. Thus, these black pawns must have captured a queen and a knight.
\vspace{4mm}
The white pawn on B3 must have captured a black bishop. \par
The white queen got onto the board through A2. \par
Therefore, the pawn on B3 made its capture before the queen escaped,
and the black bishop was captured before the white queen.
\vspace{4mm}
Similarly, the bishop from C8 must have been
captured on B3 after the capture on E6, since it
got on the board through D7.
\vspace{4mm}
The capture on E6 was made before the capture on B3 (black bishop),
which was made before the white queen was captured.
Therefore, the white queen was not captured on E6, and must
have been lost on H6.
\end{solution}
\vfill
\pagebreak
% Arabian Knights 4
\problem{A missing piece}
\difficulty{4}{5}
\difficulty{6}{8}
There is a piece at G4, marked with a $\odot$. \par

View File

@@ -2,7 +2,7 @@
% Arabian Knights 5
\problem{The hidden castle}
\difficulty{7}{7}
\difficulty{8}{8}
There is a white castle hidden on this board. Where is it? \par
None of the royalty has moved or been under attack. \par
@@ -30,7 +30,7 @@ None of the royalty has moved or been under attack. \par
% Arabian Knights 6
\problem{Who moved last?}
\difficulty{7}{7}
\difficulty{8}{8}
After many moves of chess, the board looks as follows. \par
Who moved last? \par
@@ -58,7 +58,7 @@ Who moved last? \par
% Arabian Knights 3
\problem{The king in disguise}<kingdisguise>
\difficulty{7}{7}
\difficulty{8}{8}
The white king is exploring his kingdom under a disguise. He could look like any piece of any color.\par
Show that he must be on C7.
@@ -119,7 +119,7 @@ Show that he must be on C7.
% Arabian Knights 3
\problem{The king in disguise once more}
\difficulty{5}{7}
\difficulty{5}{8}
The white king is again exploring his kingdom, now under a different disguise. Where is he? \par
\hint{\say{different disguise} implies that the white king looks like a different piece!}

View File

@@ -2,9 +2,8 @@
#import "@preview/cetz:0.4.2"
#show: handout.with(
title: [Warm-Up: What's an AST?],
title: [Warm-Up: The Painting],
by: "Mark",
subtitle: "Based on a true story.",
)
#problem()
@@ -13,7 +12,8 @@ Hang the painting on two nails so that if either is removed, the painting falls.
#v(2mm)
You may detach the string as you hang the painting, but it must be re-attached once you're done. \
#hint[The solution to this problem isn't a "think outside the box" trick, it's a clever wrapping of the string.]
The solution to this problem isn't a trick, it's a clever wrapping of the string.
#v(2mm)