diff --git a/Fonts/Symbola.ttf b/Fonts/Symbola.ttf new file mode 100644 index 0000000..d1bddac Binary files /dev/null and b/Fonts/Symbola.ttf differ diff --git a/counting/main.tex b/counting/main.tex new file mode 100644 index 0000000..344c8e6 --- /dev/null +++ b/counting/main.tex @@ -0,0 +1,100 @@ +% !TEX TS-program = xelatex +\documentclass{../leelavati} + +\usepackage{amsmath} + +\begin{document} + +\selectlanguage{english} +\setstretch{1.1} + +\title{\LARGE Counting Tricks: Two Mysteries to Try \\ +\large ଗଣନାର ଯାଦୁ: ଦୁଇଟି ଖେଳ} +\author{\AuthorDual{ନୀଲ୍‌ଧାରା ମିଶ୍ର}{Neeldhara Misra}} +\date{} +\maketitle + +\setstretch{1.2} + +\begin{abstract} +ଏହି ଲେଖାରେ, ଆମେ ଗଣନା ଉପରେ ଆଧାରିତ ଦୁଇଟି କାର୍ଡ ଟ୍ରିକ୍ ଉପସ୍ଥାପନ କରୁଛୁ। ପ୍ରଥମଟିରେ, ଜଣେ ଦର୍ଶକ ଏକ ଆଇସକ୍ରିମ୍ ସ୍ୱାଦ ବାଛନ୍ତି, ଏବଂ ଯାଦୁକର ବାରମ୍ବାର କାର୍ଡ ଡିଲ୍ କରନ୍ତି ଏବଂ ତା'ର ନାମ ଉଚ୍ଚାରଣ କରନ୍ତି। ଏପରି ତିନୋଟି "ସ୍କୁପ୍" ପରେ, ଯାଦୁକର ଆରମ୍ଭରେ ଗୁପ୍ତ ଭାବରେ ଉଲ୍ଲେଖ କରିଥିବା ଏକ କାର୍ଡ ଶୀର୍ଷକୁ ଉଠିଯାଏ। ଦ୍ୱିତୀୟ ଟ୍ରିକ୍‌ରେ, ଦଶଟି କାର୍ଡ ଦୁଇଟି ପାଇଲ୍‌ରେ ବିଭକ୍ତ ହୋଇଥାଏ, ଏବଂ ଦର୍ଶକ ମୁକ୍ତ ଭାବରେ ନିର୍ଦ୍ଧାରିତ ସଂଖ୍ୟକ ସ୍ୱାପ୍‌ରେ ଉପର କାର୍ଡଗୁଡ଼ିକୁ ତଳକୁ ଘୁଞ୍ଚାନ୍ତି। ଏହି ପସନ୍ଦ ସତ୍ତ୍ୱେ, ଦୁଇଟି ପାଇଲ୍‌ର ଉପର କାର୍ଡଗୁଡ଼ିକ ବାରମ୍ବାର ମେଳ ଖାଉଥିବା ଯୋଡି ଭାବରେ ବାହାରକୁ ଆସେ। ଆପଣ କ'ଣ ଜାଣିପାରୁଛନ୍ତି ଯେ ଏହି ଟ୍ରିକ୍‌ଗୁଡ଼ିକ କ'ଣ ଚଳାଉଛନ୍ତି? +\end{abstract} + +\setstretch{1.05} + +For the tricks in this issue, you get to make your audience feel like \emph{they} are the magicians. Tell them to manipulate the cards --- in the first trick a cool prediction works out, and in the second one, a neat patterns emerges. + +\section*{The Three-Scoop Miracle} + +Aalaya the magician hands a small packet of cards to a spectator and asks them to shuffle it thoroughly. The packet should be about a quarter of the deck; a packet of twelve to fifteen cards is a comfortable size for this effect. Now she asks the spectator: +\begin{quote} +\emph{What is your favourite flavor of ice-cream?} +\end{quote} + +Suppose the spectator says \emph{chocolate}. Aalaya spells the word aloud, dealing one card from the top of the packet to the table for each letter: $\text{C-H-O-C-O-L-A-T-E.}$ + +The dealt cards form the first ``scoop'' of ice cream. She picks up that little dealt pile and drops the rest of the packet on top as the ``topping.'' She repeats the same action twice more. Each time, she spells the same flavour, deals one card for each letter, picks up the dealt cards as a scoop, and places the rest on top. + +After three scoops, Aalaya turns to the spectator and says: +\begin{quote} +\emph{You did all the shuffling and all the counting. Would you like to finish the magic too by turning the top card into the King of Hearts?} +\end{quote} + +The spectator turns over the top card, and it turns out to be the King of Hearts. + +\begin{artprobox} +Perform this trick yourself, but before you deal the cards out for the first time, take note of the card at the bottom of the deck. What do you observe? +\end{artprobox} + +\begin{artprobox} +Try this with the flavours \emph{vanilla}, \emph{chocolate}, and \emph{strawberry}. What do you notice about the relationship between the length of the word and the size of the packet? Why might three scoops be the magic number? +\end{artprobox} + +\section*{The Partner-Pair Miracle} + +For the second trick, Aalaya needs a set of ten cards that can be paired up into five pairs naturally, for example: +\[ +A\clubsuit,2\clubsuit,3\clubsuit,4\clubsuit,5\clubsuit, +A\diamondsuit,2\diamondsuit,3\diamondsuit,4\diamondsuit,5\diamondsuit. +\] + +Aalaya places the ten-card packet face down. A spectator cuts the packet as many times as they like. Once they are satisfied, Aalaya takes the top five cards and deals them one at a time into a face-down pile. The remaining five cards form a second pile, also face-down. + +The spectator now controls the action. Aalaya explains that a \emph{swap} means taking the top card of either pile and moving it to the bottom of that same pile. + +At the beginning, with five cards in each pile, the spectator makes four swaps in total. They may put all four swaps on the left pile, all four on the right pile, or split them in any way they like. For example, they may do two swaps on the left and two on the right, or one on the left and three on the right. Aalaya does not decide the split. + +After the four swaps are done (in any way that the spectator chose to do them), Aalaya removes the top card of each pile and sets them aside as a pair. + +Now there are four cards left in each pile. The spectator makes three swaps in total, again split however they like. Aalaya removes the top card of each pile and sets them aside again. + +Then, with three cards remaining, the spectator makes two swaps in total. The next top cards are again set aside. Next, with two cards remaining, the spectator makes one swap: either in the left pile or the right. The next top cards are set aside once more. Finally, each pile has one card left: pair these up as well. + +Now, after all this swapping and pairing, we have the ten cards divided into five face-down pairs. It's time for the big reveal: turn over the cards in each pair. They will all turn out to match, every single time! + +% \begin{center} +% \begin{tabular}{c|c|c} +% Cards in each pile & Total swaps allowed & What happens next \\ +% \hline +% 5 & 4 & top cards match \\ +% 4 & 3 & top cards match \\ +% 3 & 2 & top cards match \\ +% 2 & 1 & top cards match \\ +% 1 & 0 & final cards match +% \end{tabular} +% \end{center} + +The striking feature is that the spectator seems to have a choice at every stage. They choose the cuts at the beginning, and then they choose how the swaps are split between the two piles. Yet every pair still appears exactly when it should. + +\begin{artprobox} +This is a self-working trick with a guaranteed outcome, no matter what the spectator does, although it does require the cards to be in a specific initial order. Can you figure out what that order should be? Can you generalize this to $N$ cards? +\end{artprobox} + +Please feel free to email your ideas to the author at the email below. The next article in this series will unpack the mechanism behind these two effects and show how to build new counting tricks from the same ideas. + +{\small +\vskip 0.05in +\affiliation[1.6em]{Associate Professor, CSE; IIT Gandhinagar} +\email{neeldhara.misra@gmail.com} +} +\end{document} diff --git a/leelavati_defs.sty b/leelavati_defs.sty index 24a1acc..67387bd 100644 --- a/leelavati_defs.sty +++ b/leelavati_defs.sty @@ -63,6 +63,7 @@ \newcommand*\LeelaHeaderFontPath{../Fonts/Anek/} \newcommand*\DejavuFontsPath{../Fonts/dejavu-sans-mono/} \newcommand*\LibreFontsPath{../Fonts/Libre/} +\newcommand*\FontsPath{../Fonts/} %change math env to noto sans as well \setmathfont[Path=\LeelaFontPath,Extension=.otf]{NotoSansMath-Regular} @@ -74,6 +75,8 @@ \newfontfamily\dispatchfont[Path=\LibreFontsPath,Extension=.ttf,UprightFont=*-Regular, BoldFont=*-Bold,ItalicFont=*-Italic, BoldItalicFont=*-BoldItalic,FontFace={mb}{n}{Font={*-Medium}}]{LibreBaskerville} +\newfontfamily\symbolafont[Path=\FontsPath, Extension=.ttf]{Symbola} + %add FakeSlant=0.12 later to imitate italics \newfontfamily\odiafont[Path=\LeelaFontPath, Extension=.ttf, Script=Odia, Mapping=odianumerals,UprightFont=*-Regular, BoldFont=*-Bold,ItalicFont=*-Regular, BoldItalicFont=*-Bold,FontFace={mb}{n}{Font={*-Medium}}, FontFace={sb}{n}{*-SemiBold}]{NotoSansOriya} diff --git a/rook/fitch-interactive-qr-code.png b/rook/fitch-interactive-qr-code.png new file mode 100644 index 0000000..0d2ec40 Binary files /dev/null and b/rook/fitch-interactive-qr-code.png differ diff --git a/rook/fitch-trick.tex b/rook/fitch-trick.tex new file mode 100644 index 0000000..318f030 --- /dev/null +++ b/rook/fitch-trick.tex @@ -0,0 +1,106 @@ +% !TEX TS-program = xelatex +\documentclass{../leelavati} + +\usepackage{qrcode} + +\begin{document} + +\selectlanguage{english} +\setstretch{1.1} + +\title{\LARGE The Fitch Trick and Variants \\ +\large ଫିଚ୍‌ଙ୍କ ତାସ ଖେଳ ଏବଂ ଏହାର ରହସ୍ୟ} +\author{\AuthorDual{ନୀଲ୍‌ଧାରା ମିଶ୍ର}{Neeldhara Misra}} +\date{} +\maketitle + +\setstretch{1.2} + +\begin{abstract} +ଯାଦୁକର ପ୍ରଥମେ ଦର୍ଶକଗଣଙ୍କୁ ଏକ ତାସ୍ ବିଡ଼ାକୁ ଭଲଭାବେ ମିଶାଇ ସେଥିରୁ ଯେକୌଣସି ପାଞ୍ଚଟି ତାସ୍ ପତ୍ର ବାଛିବା ପାଇଁ ନିର୍ଦ୍ଦେଶ ଦିଅନ୍ତି। ଏହାପରେ ଯାଦୁକର ସେହି ପାଞ୍ଚଟି ତାସ୍‌ଗୁଡ଼ିକୁ ନିରୀକ୍ଷଣ କରି ସେଥିରୁ ଗୋଟିଏ ତାସ୍‌କୁ ଲୁଚାଇ ଦିଅନ୍ତି ଏବଂ ବାକି ଚାରୋଟି ତାସ୍‌କୁ ଖୋଲାଭାବରେ (ମୁହଁ ଉପରକୁ କରି) ଗୋଟିଏ ଧାଡ଼ିରେ ସଜାଇ ରଖନ୍ତି। ତା'ପରେ ସେ ବାହାରେ ଅପେକ୍ଷା କରିଥିବା ନିଜର ଜଣେ ସହଯୋଗୀଙ୍କୁ ଡାକନ୍ତି। ସହଯୋଗୀ ଜଣକ ଆସି ସେହି ଚାରୋଟି ତାସ୍‌ଗୁଡ଼ିକ ଦେଖିବା ମାତ୍ରେ ହିଁ ଲୁଚାଯାଇଥିବା ତାସ୍‌ଟିକୁ ସଠିକ୍ ଭାବରେ ଚିହ୍ନଟ କରିଦିଅନ୍ତି। ଏହା କିପରି ସମ୍ଭବ? +\end{abstract} + +\setstretch{1.05} + +Aalaya the magician and her assistant Badarika are about to perform an impossible feat of telepathy. To prove there is no foul play, Badarika leaves the room. She leaves behind her phone, smartwatch, and any other gadgets to ensure no one can communicate with her. + +Then the audience picks out five cards from a shuffled deck and hands them to Aalaya. She studies the five cards, secretly removes one, and in a single fluid motion arranges the remaining four face-up neatly in a row. + +Once everything is set, Badarika is called back into the room. She carefully observes the four visible cards… and, to everyone’s amazement, correctly identifies the fifth card—the one she has never seen. How is this possible? + +\section*{The Mathematics Behind the Magic} +Notice that Badarika has to guess one out of $48$ possible cards, since the deck has $52$ cards of which four are face up. On the other hand, Aalaya can arrange the four cards in $4! = 24$ different orders. This feels like we are falling short by a factor of two! + +But Aalaya actually has a point of leverage that we have not yet accounted for: she can \emph{choose} the card that she wants to set aside. + +\newpage + +In other words, she is not just choosing an order for the four visible cards—she is also choosing which of the five cards to hide. This gives her $ 4! \times 5 = 120$ possible signals, more than enough to distinguish between the $48$ possibilities Badarika needs to resolve. + +{\par\centering +\includegraphics[scale=0.21]{pic.jpg} +\captionof*{figure}{In all these three cases, Aalaya shows the first four cards and Badarika guesses the fifth. What do you notice? Can you spot a pattern?} +\par +} + +So how do we think about a signaling strategy? Let's break down the numbers: +\begin{itemize} + \item There are ${52 \choose 5} = 2,598,960$ possibilities for what the audience can hand Aalaya. Call this set $\color{magHighlight}{\mathbf{P}}$. + \item The number of ordered sequences of four cards Aalaya can place on the table, say $\color{magHighlight}{\mathbf{Q}}$, is $52\cdot 51\cdot 50\cdot 49 = 6,497,400$. +\end{itemize} + +Each of the $120$ possible signals corresponds to an element of $\color{magHighlight}{\mathbf{Q}}$. + + +What we want is a rule that assigns each $\alpha \in \color{magHighlight}{\mathbf{P}}$ (what the audience does) to a unique and feasible choice of $\beta \in \color{magHighlight}{\mathbf{Q}}$ (what Aalaya would do). Badarika then comes in, sees $\beta$, works backward to $\alpha$, and identifies the missing card. + +In fact, since $\color{magHighlight}{\mathbf{Q}}$ has more elements that $\color{magHighlight}{\mathbf{P}}$, such a mapping definitely exists. But more interestingly, can you find a simple rule they could execute live, under pressure, with an audience watching? + +\begin{artprobox} +We write cards by rank and suit, with $S, H, C,$ and $D$ denoting Spades ($\spadesuit$), Hearts ($\heartsuit$), Clubs ($\clubsuit$), and Diamonds ($\diamondsuit$). Let $\alpha = \langle 4S, 5H, 2C, 7C, 6D \rangle$ be a hand given to Aalaya. Which $\beta$ does $\alpha$ map to under your rule? +\end{artprobox} + +\section*{Pushing the Limits} +You may have noticed that there is a considerable gap between the number of signals ($6,497,400$) and the number of possibilities ($2,598,960$) we calculated earlier. This raises a natural question: can we turn this extra room into a more impressive trick? The effect remains the same: four cards are shown in a fixed order, and a fifth is guessed. But could the audience be choosing from a \emph{larger} deck? + +If the audience is choosing from a deck of size $n$ in general, then there are ${n \choose 5}$ possible sets of cards they could hand to Aalaya, while the number of ordered sequences of four cards she can display is $n\cdot (n-1)\cdot (n-2)\cdot (n-3)$. For the trick to work, the space of signals must be at least as large as the space of possibilities-otherwise, two different hands would have the same signal introducing ambiguity. + +\begin{artprobox} +From the inequality +\[ +n(n-1)(n-2)(n-3) \geq \binom{n}{5}, +\] +conclude that $n \leqslant 124$. +\end{artprobox} + +This shows that $n \leq 124$ is a \emph{necessary} condition for the trick to work, but not necessarily a sufficient one. The next challenge is to show that the trick can, in fact, be made to work with a deck this large. + +So once you have figured out how to do it with a standard deck, try pushing further. Can you extend your method to larger decks, perhaps all the way up to $124$? + +\section*{Some Variations} +A variation of this trick, performed by \textbf{Elwyn Berlekamp}, uses a deck of size $64$ and adds an extra twist: Badarika also correctly guesses the outcome of a coin flip made by an audience member. If you can figure out the 124-card version, you should start to see how to handle the version with the coin as well. + +You might also wonder whether the reveal really has to rely only on the \emph{ordering} of the four cards. A variation suggested by \textbf{Colm Mulcahy} expands the signaling method: the cards are not only ordered but some are turned face up while others are face down. This allows the hidden card to be encoded using only \emph{three} cards instead of four! This makes for great theatrical flair, as discarding a card becomes part of the performance. + +We can frame the trick more generally as follows: the audience selects $p$ cards from a deck of size $n$, and the magician reveals $q$ of them. For which values of $n$, $p$, and $q$ is such a trick possible? And when it is possible, how many distinct signaling strategies are there? + +Please feel free to email your ideas to the author at the email below. And keep an eye out for future issues which will bring solutions and new puzzles! + +{\par\centering + \centering + \begin{minipage}{0.25\textwidth} + \centering \boxed{\color{magHighlight}\qrcode[height=1.1in]{https://short.neeldhara.website/fitch-video}} + \end{minipage}% + \begin{minipage}{0.25\textwidth} + \centering + \boxed{\qrcode[height=1.1in]{https://short.neeldhara.website/fitch-interactive}} + \end{minipage} + \captionof*{figure}{Left: link to a Youtube demonstration of the trick in its basic form. Right: link to an interactive where you can practice additional examples.} +\par} + +{\small +\vskip 0.05in +\affiliation[1.6em]{Associate Professor, CSE; IIT Gandhinagar} +\email{neeldhara.misra@gmail.com} +} +\end{document} \ No newline at end of file diff --git a/rook/fitch-video-qr-code.png b/rook/fitch-video-qr-code.png new file mode 100644 index 0000000..4f4a310 Binary files /dev/null and b/rook/fitch-video-qr-code.png differ diff --git a/rook/pic.jpg b/rook/pic.jpg new file mode 100644 index 0000000..c6f6efa Binary files /dev/null and b/rook/pic.jpg differ diff --git a/rook/rooks-fighting.tex b/rook/rooks-fighting.tex deleted file mode 100644 index 508add8..0000000 --- a/rook/rooks-fighting.tex +++ /dev/null @@ -1,71 +0,0 @@ -% !TEX TS-program = xelatex -\documentclass{../leelavati} -\usepackage{framed} - -\begin{document} - -\selectlanguage{english} -\setstretch{1.1} - -\title{\LARGE The Fitch Trick and Variants} -\author{\AuthorDual{ନୀଲ୍‌ଧାରା ମିଶ୍ର}{Neeldhara Misra}} -\date{} -\maketitle - -\setstretch{1.2} - -\begin{abstract} -The magician selects a volunteer to shuffle the deck and choose any five cards. The magician examines the cards, hides one of the five cards, sets the remaining four cards in a faceup row, and has the volunteer retrieve an accomplice from outside the room. The accomplice briefly examines the cards and identifies the missing card. -\end{abstract} - -\setstretch{1.1} - -This is a trick that is to be performed by Aalaya (a magician) and Badarika (an accomplice) with a standard deck of $52$ cards. Badarika steps out of the room and leaves her phone, smartwatches, etc. behind, so nobody can communicate with her. Then the audience picks out five cards out of the deck and gives it to Aalaya. Aalaya then arranges four out of these five cards in a row\footnote{The cards can also be placed in a stack, if the audience worries that Aalaya is signaling by angularities in the layout of the cards.} and Badarika comes back and takes a good look at the four cards on the table, and then identifies the missing card. - -How is this possible? - -\begin{framed} -...image here. -\vspace{140pt} -\end{framed} - -\newpage - -Notice that Badarika has to guess one out of 48 possible cards, since the deck has 52 cards of which four are face up. On the other hand, Aalaya can arrange the four cards in $4! = 24$ different orders, which is fewer than 48. This seems like we are falling short by a factor of two: but notice that Aalaya actually has a point of leverage that we have not accounted for: she can \emph{choose} the card that she wants to set aside. - -So what is the right way of thinking about a signaling strategy? On the one hand, there are: $${52 \choose 5} = 2,598,960$$ possibilities for what can happen at the trick. Call this set $\mathcal{P}$. Now the number of ordered sequences of four cards, say $\mathcal{Q}$, is $$52\cdot 51\cdot 50\cdot 49 = 6,497,400.$$ - -As an example, let $\alpha = \langle 4S, 5H, 2C, 7C, 6D \rangle \in \mathcal{P}$ be the subset of cards handed to Aalaya by the audience. Now Aalaya has $120$ possibilities for what she can do with these cards. These possibilities are all recorded in $\mathcal{Q}$. What we want is a way to map every element $\alpha$ in $\mathcal{P}$ (what the audience does) to a distinct element $\beta$ in $\mathcal{Q}$ (what Aalaya would do). Now Badarika comes and sees $\beta$ and maps it back to $\alpha$ and figures out the missing card. - -Can you figure out such a mapping that Aalaya and Badarika can use to perform and impress? You can use math to argue that such a mapping exists \emph{in principle}, but more usefully, you can also try to construct an explicit mapping that both Aalaya and Badarika can use in practice to impress! - -\newpage - -Incidentally, if Aalaya is facing a tough crowd, they might not let her pick the hidden card, and might insisting on making the choice for her. Then indeed Aalaya has only $24$ signals: but turns out there is a way out even in this scenario. - -One way out, for example is the following: Aalaya can attempt to use her 24 signals in a way that narrows down the possibilities for the hidden card to just 2. Once Badarika sees the 4 cards and figures out the two possibilities, she runs through the whole deck and finds the two cards and casually places one on the top of the deck and the other at the bottom. After this setup, she can distance herself from the deck and ask the audience what the card was. - -If the audience shouts out the card at the top, then Badarika can snap her fingers and pull up the top card, and if the audience indicates the other card, then Badarika can simply flip the whole deck over with a dramatic flourish instead. - -You may have also noticed that there is a difference between the number of signals ($6,497,400$) and the number of possibilities ($2,598,960$) that we calculated earier. A natural question then is if we can make a more impressive trick with the same constraint on Aalaya and Badarika: that is the effect remains that four cards are shown in a fixed order and a fifth card is guessed, but can the audience make their pick from a larger deck? - -If the audience is choosing from a deck of size $n$ in general, then there are: ${n \choose 5}$ possibilities for what can happen at the trick and the number of ordered sequences of four cards is $n\cdot (n-1)\cdot (n-2)\cdot (n-3)$. We need, at the very least, that the space of the number of signals is at least as large as the space of possibilities. - -In other words, we would need: - -$$\binom{n}{5} \leqslant n(n-1)(n-2)(n-3),$$ - -which, upon simplification, works out to $n \leqslant 124$. This, of course, only tells us that $n \leqslant 124$ is a necessary condition for the card trick to work in the form that we have discussed --- it may or may not be sufficient. Our next challenge will be to show card trick does, in fact, work with a deck containing as many as 124 cards. So once you have figured out how to do it with a standard deck, either in principle or in practice, see if you can extend your arguments to larger and larger decks: perhaps all the way to 124? - -A variation of this trick, as performed by Elwyn Berlekamp, is to use a deck of size 64, with the additional feat of guessing the result of a coin flipped by an audience member. If you can figure out a way of doing the 124-variant, you will probably also have some ideas for the version with the coin. - -You may also wonder if the reveal should necessarily involve an ordering of the four cards. A variation of the trick suggested by Colm Mulcahy involves revealing the cards in an order but also flipping some over, so that some cards are face up and some are face down. It turns out that with some clever observation, you can signal the hidden card using only three cards rather than four! This makes for great banter, as discarding a card is an excellent excuse for some drama. - -In its most general version, this trick has the audience pulling out $p$ cards out of a deck of $n$ and the magician revealing $q$ of the $p$ cards. For what values of $n$, $p$ and $q$ is this feasible? And for a feasible setup, how many distinct strategies are there? - -{\small -\vskip 0.05in -\affiliation[1.6em]{Associate Professor, CSE; IIT Gandhinagar} -\email{neeldhara.misra@gmail.com} -} -\end{document}