# A related card trick based on counting

I learned this card trick from my MAT115 student Alyssa. She presented it in class one day. It's really neat, and involves nothing more than counting.

1. Have your "lovely contestant" choose three cards (perhaps their favorites), and hold them.
2. Now you need to count out four piles of 9, 15, 15, and 10 cards (for a total of 49), from left to right.
3. Here's how I do that, dropping cards into the four piles from right to left, then left to right for alternating rows: ${\displaystyle {\begin{bmatrix}{1}&{}&{}&{1}\\{1}&{1}&{1}&{1}\\{}&{1}&{1}&{1}\\{1}&{1}&{1}&{}\\{}&{1}&{1}&{1}\\{1}&{1}&{1}&{}\\{}&{1}&{1}&{1}\\{1}&{1}&{1}&{}\\{}&{1}&{1}&{1}\\{1}&{1}&{1}&{}\\{}&{1}&{1}&{1}\\{1}&{1}&{1}&{}\\{}&{1}&{1}&{1}\\{1}&{1}&{1}&{}\\{}&{1}&{1}&{1}\\{1}&{1}&{1}&{1}\end{bmatrix}}}$
4. Now the lovely assistant (the LA) puts the first card down on top of the rightmost pile.
5. You invite the LA to cut any number from the secondmost right pile onto the top of the rightmost pile.
6. Now the lovely assistant puts the second card down on top of what's left of the secondmost right pile.
7. You invite the LA to cut any number from the thirdmost right pile onto the top of the secondmost right pile.
8. Now the lovely assistant puts the third card down on top of what's left of the thirdmost right pile.
9. You now stack the piles from left to right into a single pile of cards.
10. Take four cards off the top and put them on the bottom.
11. You begin to alternate cards into two piles, turning over the first and putting the second face down. You continue doing this until you have placed all the cards into one or the other of the two piles. You ask your LA if any of his or her cards have appeared (they'll say "No!").
12. Now "do it again", but use only the cards that remain uncovered (you're done with the rest).
13. When you're down to three cards face down, those are your LA's cards.

How does it work?