AnswerBun.com

How to turn a shuffled deck of card into bits

Suppose I fairly shuffle a deck of 52 playing cards, and I want to generate some bits. You could look at each pair of cards, see which is higher or lower, and output either a 0 or 1. That’s 26 independent (you can convince yourself) and fair bits, guaranteed. If you were a computer, you could encode the permutation as a number between 0 and 2^225.58, and use standard methods to get 220+ expected bits out–but I’m not a human, so I can’t do that.

What’s a good way to generate lots of independent, fair bits using a single shuffled deck of cards as a human? Points for both guaranteed bits and expected bits.

Sorry for the kind of “wiki” nature of this question.

MathOverflow Asked by Zachary Vance on January 24, 2021

1 Answers

One Answer

Staying with your pairs, you can get more bits that are pretty independent by using characteristics of playing cards.

  • Your Bit 1: 0 increasing order, 1 decreasing order
  • Bits 2 & 3: Suit of lower card (say 00 club, 01 diamond, 10 heart, 11 spade)
  • Bit 4: 0 if the lower card is even (2, 4, 6, 8, 10, Q), 1 if odd (A, 3, 5, 7, 9, J, K)*

Notes: Towards the end, knowing suit and parity data for the lower cards of previous pairs could compromise independence, so stop somewhere before 104 bits. *Concerning Bit 4, there are more odds, but the lower card is a king only when the two cards are both kings--since you probably won't be using all pairs anyway, skip such a pair.

Depending on the "memory" of the human user, you could go from the 2 permutations of pairs (increasing or decreasing) to the 6 permutations applied to triples or the 24 permutations applied to quadruples along with more complicated patterns for suits and ranks. These are all somewhat imprecise on independence, but in a hopefully small enough way that could be quantified.

Answered by Brian Hopkins on January 24, 2021

Add your own answers!

Related Questions

Is $arcsin(1/4) / pi$ irrational?

3  Asked on December 13, 2021 by ikp

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.