top | item 44225617

(no title)

antics | 8 months ago

If I give you a biased coin can you simulate a truly random coin flip with it? The answer turns out to be yes. Flip the biased coin twice: HT = heads, TH = tails, and HH/TT = flip twice again.

The general study of such things is called “randomness extractors”. The new Gödel prize goes to this paper which shows how to extract a nearly perfect random bit out of two sources with low min-entropy.

discuss

order

falcor84|8 months ago

Yes, but - you need to replace "twice" there with "an unbounded number of times". If you apply this in an environment where the biased coin is coming from an external source, your system becomes susceptible to DoS attacks.

antics|8 months ago

While I obviously think randomness extractors over adversarial sources are very interesting, I think talking about them specifically in this example complicates the point I'm trying to make, which is that it's incredible it can be done at all.

pasquinelli|8 months ago

i read "flip twice" as recussion, so, given we're talking randomness, yes, that could go on forever. but i don't think you really need to replace "twice."

pbhjpbhj|8 months ago

Speaking from complete ignorance, with apologies to those who that will annoy:

I'm sure it's possible to make a coin with what one might term "complex bias" where the bias extends over two events (thick gloop inside the coin, possibly heat activated or non-Newtonian).

This method sounds like the bias needs to be fixed ("simple bias" if you like)?

I guess that's just out of scope here.

Aside: There's a strong 'vibe' that HHHH HHHH with a single coin is somehow less random than HTHTHTHT HTHTHTHT with two coins when discarding HH and TT. I wonder what the origin of that feeling is - maybe just HT doesn't seem like it's a constant result simply due to nomenclature? If we call HT "type-A", then we just have HHHH HHHH vs. AAAA AAAA; and I _feel_ happier about the result!

Terr_|8 months ago

I suspect this depends on where you drawn the upper bound, since a really really complex biased coin is one that spies on your thesis and data and is committed to making you suffer.

Descartes' evil demon, in numismatic form.

lovecg|8 months ago

Could the vibe be due to the fact that HHHH… seems like the coin could not just be biased - it could be completely broken and come up heads every time. There are two distinct possibilities here:

1) the coin is broken and is always H

2) the coin is random or possibly biased, and you got a string of H by chance

And observing the string of H… increases the probability of 1) in the Bayesian sense.

With the two coins you eliminate this possibility altogether - a broken coin can never produce HT or TH.