I. The Burial of the Dead

April is the cruellest month, breeding

Lilacs out of the dead land, mixing

Memory and desire, stirring

Dull roots with spring rain.

Time present and time past

Are both perhaps present in time future,

And time future contained in time past.

If all time is eternally present

All time is unredeemable.

We start with some notation. Describe a position by a triplet (x,y,z) where x is the number of guaranteed hits (that is, correctly identified cards), y is the number of used lives (incorrectly identified cards) and z the number of binary bits of information we have accumulated, not including the visible bit on the top card. So the initial position is (0,0,0) and after one guess we’re inevitably on (0,1,1). We’re trying to get to 26 hits at the cost of 10 lives, so (26,10,0).

At any moment I call the top face down card a, the next card b, then c, d etc.

Tanya notes a method to gain a hit and a bit at the cost of a life, which I call the “2 card trick”: use a bit in hand plus card a’s bit to encode the suit of card a or b, the psychic predicts this suit twice, getting one right and one wrong, and the assistant can encode a bit of information based on which of a or b is correct, plus we have b’s bit. (If a and b happen to have the same suit we can pick up two hits, no loss, and continue with the algorithm as though this good fortune had not occurred, which can only be advantageous.) A 2 card trick takes us from (x,y,z) to (x+1,y+1,z+1).

The “3 card trick” is a 2 card trick followed immediately by using the bits on b and c to encode c’s suit. This would take us to (x+2,y+1,z). Effectively the 3 card trick sacrifices a life to gain two hits, leaving bits unchanged. We could perform nine 3 card tricks consecutively to get from (0,1,1) to (18,10,1), then use the last bit to get to (19,10,0), but this is some way off our target.

At this point it’s worth mentioning a useful measure of progress which I call the “count”. The count of a position is: hits + bits – 2*lives. We start off on (0,0,0) with count 0, after one move on (0,1,1) the count is down to -1. We’d like to reach (24,10,0) because if the psychic has counted suits she can deduce the last two cards to score 26. This position has count 24+0-2*10 = 4, so we need to increase the count by 5. The 3 card trick doesn’t change the count, so (19,10,0) still has count -1. We need techniques to increase the count. A few are available of which I will only use two, the first of which we use at the start.

From (0,1,1) perform four 3 card tricks, and deliberately introduce an error on one of them; the choice of which of the four can encode two bits of information. In that erroneous 3 card trick we can introduce the error in four ways (encoding two more bits of information). To spell that out: there are 3 ways the bits on b and c could incorrectly identify the suit of c, and the bit in hand plus bit a could encode either of the two suits on neither card a nor b (and the choice of which suit returns us the bit). The four types of error create two more bits, thus generating a total of four bits from one error in the four 3 card tricks (plus we still have the bit from the last trick making 5 bits in total). This takes us from (0,1,1) to (7,6,5).

(7,6,5) has count 7+5-2*6=0, so we’ve increased the count by 1. We don’t have enough lives to repeat this sequence so need another way to improve the count, more efficient in lives, and the most efficient way I know I call the “3 bit trick”.

As its name suggests, the 3 bit trick requires we have 3 bits in hand (or more). We will combine these 3 bits with the bits on cards a, b and c to encode the suits of a, b and c, but before doing so (as the assistant) look ahead to cards d and e. If either one (or both) of these is a heart we encode the suits for a, b and c correctly. The psychic can pick up 3 hits for a, b and c, then guess hearts for d and e for another hit (and a miss).

If, on the other hand, neither d nor e is a heart, we identify one of a, b or c incorrectly. Which of the three cards is incorrect provides sufficient information to identify which of the three non-heart suits card d could be. Also, there are three ways to incorrectly identify the suit of the erroneous card, which gives enough information to encode card e. The psychic can thus get two hits on card a, b and c, and pick up two more for d and e, along with the bits on those cards.

With either path the psychic gains 4 hits for the cost of one life and one bit. A bargain which increases the count by one.

From (0,1,1) it would be possible to perform six 2 card tricks and four 3 bit tricks to reach (21,10,2) and so to (23,10,0),with count 3. This is not quite enough to guarantee 26 hits, but is a reasonably easy way to reach 25 hits.

Instead, from (7,6,5), left after the four 3 card tricks, we perform three 3 bit tricks to reach (19,9,2).

From (19,9,2) we could play to (21,9,0) or (20,10,3), that is six cards left either with one life or with 3 bits. However, even with careful suit counting, it is not possible to guarantee 26 hits with either of these. For example, to solve a suit partition of 2,2,1,1 (such as CCDDHS) I believe we need 1 life plus 1 bit, or 2 bits plus T (where T is a three-way piece of knowledge) which is about half a bit more than 3 bits. Either way we can’t quite make 26.

Instead, from (19,9,2) we will use the two bits to encode cards a and b, but before doing so look ahead to the last 5 cards. If all 4 suits are present in the last 5 cards then we encode a and b correctly. The psychic gets a and b correct and arrives at (21,9,0), 6 cards remaining, and knows (from the absence of error) that all 4 suits will be present in the last 5 cards.

Alternatively, if only 3 or fewer suits are present in the last 5 cards, we make an error in encoding one of a or b. Which of a or b is wrong encodes a bit, and the three ways to get it wrong a T, leaving (20,10,1+T), 6 cards remaining, and the psychic will know (from the presence of an error) that 3 or fewer suits will be in the last 5 cards.

Either way, this is sufficient information to reach 26 hits. The detail fragments into cases. These are best understood by working backwards from the end of the pack to work out the minimum information needed to solve the various suit partitions with increasing numbers of remaining cards.

But, as example, if the psychic (having carefully counted suits) finds herself facing the last 6 cards with suit partition CCDDHS in position (21,9,0), she knows there must be 4 suits left after the next card. Therefore the next card must be one of Clubs or Diamonds, and this can be encoded on the current top card. This might leave, for example, the split CCDHS and she still has one life left. She guesses clubs: if correct she has a life and a bit which is more than enough to get home; if incorrect she has a bit to play with CCDH (for example). This can be resolved with no lives and 1 bit.

If the psychic faced CCDDHS with 1 bit plus T, she knows only three suits must be left after the next card, so the current card is either Hearts or Spades, which can be encoded in one bit, leaving her facing CCDDH (for example), still with 1 bit + T. We use the T, and might be left with CCDH and 2 bits, but as noted previously we only need 1 bit to resolve this.

So 26 cards is possible.

]]>I am using your site http://www.numbergossip.com to study about interesting number properties.

My goal is to implement some computer programming libraries about them.

Keep the good work.

]]>