3 ms·
> Produce a table of all possible sequences of length 1,000 with k heads and 1,000-k tails. > Look up the position of your actual realized sequence in that tabl
by Someone 5y ago
> Produce a table of all possible sequences of length 1,000 with k heads and 1,000-k tails.
> Look up the position of your actual realized sequence in that table. The index of that position is a uniform random integer in a range from 1 to the size of the table.
I don’t see why it would be. The normal way to produce such a table is as hhh…hh, hhh…ht, hhh…th, … ttt…ht, ttt…th, ttt…tt. If heads is more likely than tails, the index is more likely to be in the lower half than the upper half.
Reading https://blog.cloudflare.com/ensuring-randomness-with-linuxs-random-number-generator/ https://blog.cloudflare.com/ensuring-randomness-with-linuxs-..., I also don’t think that’s how Linux’ entropy pool works.
- okintheory 5y agoThe parent comment was saying that when you fix the number of heads to be k in advance, the set of head positions you get is random. That sounds correct.
- eru 5y ago> Reading https://blog.cloudflare.com/ensuring-randomness-with-linuxs- https://blog.cloudflare.com/ensuring-randomness-with-linuxs-..., I also don’t think that’s how Linux’ entropy pool works. Where does the description in that article differ materially from what I described in the parenthetical remark? (Of course, it does differ from what I described in the main text of the comment.)