On Tue, 18 Dec 2012, Veit Elser wrote:
I also haven't found any improvements to the 46/4 code. But here are a couple of curiosities.
...
For fun I looked at n=13 and found a remarkable 53/2 code. One of the code words is the zero codeword and the others are orbits under the dihedral group (order 26) of the codewords
{0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1} {0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1}
...
The 52/2 code you get by taking away the zero codeword might be the basis of a card trick where the magician amazingly determines the identities of two cards. I'm stuck on how the or/union operation gets implemented in an interesting way.
Well, you can put one joker back in to get 53, and assign the joker to the 0 word. You could ask 13 questions of the form, "Does either card...?" Each of the two patterns above and their flips can correspond to a suit, and the cyclic permutations of the answers correspond to the ranks, 1 (=A) to 13 (=K). Of course the questions will be pretty lame, like, "Is either card an ace, a two, a 4C, a 10C, a 5D, a 7D, a 6H, a QH, a 9S, or a JS?" and cyclic shifts of this. Maybe there's some more elegant way to do this. In fact, you could put both jokers in, if they both called just "joker", and identify the pair out of a full deck.
Finally, for large optimal codes we expect the frequencies of the 2^n possible outcomes of their pairwise unions to be as uniform as possible (so as to maximize the entropy). But that means the frequency of 1's in the first (or any) position should be about 1-1/sqrt(2) = .293 in order for the pairwise-or distribution in that position to have equal probability of 0 and 1. This suggests the heuristic of tuning the weight of codewords near .293n in searches.
Note that for n = 13, this gives 3.81, which is very close to the weight 4 that the codewords above have and even closer to the average of 3.92 you get when you include the 0 codeword. David P. Moulton