Re:Randomness extractors: making fair coins out of biased coins
by atq2119 on Sunday September 15, 2024 @03:37PM
(#41549735)
It's obviously false. If you know that the bias is 0.5, you can just pass the input stream through unmodified. You can also construct better codes for other biases.
Re:Randomness extractors: making fair coins out of biased coins
by ralegh on Sunday September 15, 2024 @04:46PM
(#41550249)
Depends how you define best, I assume best in the article means ‘output is close to 50/50 and independent’, in which case the 01/10 solution is already optimal given the assumptions.
If you define best as the most efficient at converting inputs to outputs as well as the output being 50/50 then there are better ways such as your example.
Re:Randomness extractors: making fair coins out of biased coins
by contravariant on Sunday September 15, 2024 @06:11PM
(#41550876)
It's worded quite badly, but I think it's the best you can do given 2 independent bits, except for the rare case where 00 and 11 are equally likely.
Re:Randomness extractors: making fair coins out of biased coins
by Maro on Monday September 16, 2024 @12:10AM
(#41552679)
OP here. Thanks for the comment. I'm not a mathematician, will double-check my wording/phrasing on this.
Re:Randomness extractors: making fair coins out of biased coins
by Maro on Wednesday September 18, 2024 @02:04AM
(#41576293)
OP here.
Re-reading this bit, I agree my wording is very clunky. What I meant by "whether we know the bias of the input bit stream or not" was:
[For p≠1/2] whether you know the value of p or not, this is the best approach. Of course, p=1/2 is the trivial case where we can just pass through..
Re:Randomness extractors: making fair coins out of biased coins
by bjornsing on Monday September 16, 2024 @03:25AM
(#41553602)
That’s a good counter example. :) Thanks.
Re:Randomness extractors: making fair coins out of biased coins
by LegionMammal978 on Sunday September 15, 2024 @03:04PM
(#41549527)
In general, I think you could show that an 'arithmetic coding' approach is optimal, if the distribution of each bit given the previous bits is known. From there, you'd just have to show that the von Neumann approach for i.i.d. bits is no worse on average.
Re:Randomness extractors: making fair coins out of biased coins
by Darmani on Sunday September 15, 2024 @06:37PM
(#41551055)
This is correct, and I came to the comments to say the same thing. It takes some work to implement without arbitrary-precision floating point, but arithmetic coding can make use of the full entropy in the input stream, whereas the approach in the article discards a lot of information.
Would love to see a proof of that. It feels a bit unintuitive to me.
(But on second thought that might be because I’m thinking of cases of correlated bits.)