Above Mathematical Card Trick Explained

The first bit of the trick is the showbiz. The miracle killer is at the end. The principle of the thing can be explained with this example: Lets pretend a deck of cards is broken into two piles. There's a pile of cards in your hand and one on the table. The card on top of the pile on the table is 13-the number of cards in that pile. You want to know how many cards are on the table. What do you do? You count how many you have in your hand. Then you know that 52 minus this number is the number on the table. Well, in our trick, because of the nature of the set-up, because we know that the number on top of a pile is 13- the number of cards in that pile, you can say that if you have 50 cards in you hand, there would be an 11 on top of the pile (because 2=13-11).

Now in the trick, you know the total number of cards not in the mystery pile is (13-#in pile 1) + (13-#in pile 2) + #of cards from other collected piles (each of these terms is known!!!). That means, the number on the top of the mystery deck must be (13- {52-the number of cards not in the mystery pile}. Since 13 and 52 are also known quantities, the number on the top of the mystery deck is also knowable. All you have to do is count. If you want a more rigorous definition, solve algebreically substituting in all the terms for "the total number of cards not in the mystery pile."