TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Getting a Fair Toss From a Biased Coin

40 点作者 spydez超过 15 年前

4 条评论

vegashacker超过 15 年前
von Neumann is credited with coming up with the fair toss trick:<p><a href="http://en.wikipedia.org/wiki/Fair_coin#Fair_results_from_a_biased_coin" rel="nofollow">http://en.wikipedia.org/wiki/Fair_coin#Fair_results_from_a_b...</a>
评论 #801464 未加载
joshu超过 15 年前
Flip the coin to get sufficient entropy, then take the md5 of the bits generated. That should give you some number of virtual flips as output.
评论 #801306 未加载
评论 #801555 未加载
评论 #801591 未加载
JulianMorrison超过 15 年前
Haha! I saw the title and thought "how would I..." and reinvented it in seconds, almost (mine differed in that I'd allocate the H or T value of each pair arbitrarily by fiat ahead of time).<p>Edit: oops! I failed to reinvent discarding by pairs. That makes my attempt a fail. D'oh!
roundsquare超过 15 年前
Neat idea. But how do you convince your friends to do this?<p>A: I call heads.<p>&#60;flip&#62;<p>B: It came up tails! I win!<p>A: No, wait, we're not done yet. We need to flip it again, if it comes up tails, we start over.<p>B: What? No, give me my doughnut!