Book contents
- Frontmatter
- Dedication
- Contents
- Preface
- Acknowledgments
- 1 Atoms and the void
- 2 Sets
- 3 Gödel, Turing, and friends
- 4 Minds and machines
- 5 Paleocomplexity
- 6 P, NP, and friends
- 7 Randomness
- 8 Crypto
- 9 Quantum
- 10 Quantum computing
- 11 Penrose
- 12 Decoherence and hidden variables
- 13 Proofs
- 14 How big are quantum states?
- 15 Skepticism of quantum computing
- 16 Learning
- 17 Interactive proofs, circuit lower bounds, and more
- 18 Fun with the Anthropic Principle1
- 19 Free will
- 20 Time travel
- 21 Cosmology and complexity
- 22 Ask me anything
- Index
- References
8 - Crypto
Published online by Cambridge University Press: 05 April 2013
- Frontmatter
- Dedication
- Contents
- Preface
- Acknowledgments
- 1 Atoms and the void
- 2 Sets
- 3 Gödel, Turing, and friends
- 4 Minds and machines
- 5 Paleocomplexity
- 6 P, NP, and friends
- 7 Randomness
- 8 Crypto
- 9 Quantum
- 10 Quantum computing
- 11 Penrose
- 12 Decoherence and hidden variables
- 13 Proofs
- 14 How big are quantum states?
- 15 Skepticism of quantum computing
- 16 Learning
- 17 Interactive proofs, circuit lower bounds, and more
- 18 Fun with the Anthropic Principle1
- 19 Free will
- 20 Time travel
- 21 Cosmology and complexity
- 22 Ask me anything
- Index
- References
Summary
Answers to puzzles from Chapter 7
Puzzle 1. We are given a biased coin that comes up heads with probability p. Using this coin, construct an unbiased coin.
Solution. The solution is the “von Neumann trick”: flip the biased coin twice, interpreting HT as heads and TH as tails. If the flips come up HH or TT, then try again. Under this scheme, “heads” and “tails” are equiprobable, each occurring with probability p(1 - p) in any given trial. Conditioned on either HT or TH occurring, it follows that the simulated coin is unbiased.
Puzzle 2. n people sit in a circle. Each person wears either a red hat or a blue hat, chosen independently and uniformly at random. Each person can see the hats of all the other people, but not his/her own hat. Based only upon what they see, each person votes on whether or not the total number of red hats is odd. Is there a scheme by which the outcome of the vote is correct with probability greater than ½?
Solution. Each person decides his/her vote as follows: if the number of visible blue hats is larger than the number of visible red hats, then vote according to the parity of the number of visible red hats. Otherwise, vote the opposite of the parity of the number of visible red hats. If the number of red hats differs from the number of blue hats by at least 2, then this scheme succeeds with certainty. Otherwise, the scheme might fail. However, the probability that the number of red hats differs from the number of blue hats by less than 2 is small – O(1/√N).
- Type
- Chapter
- Information
- Quantum Computing since Democritus , pp. 93 - 108Publisher: Cambridge University PressPrint publication year: 2013