will depue's Avatar

will depue

@wmd.bsky.social

designer, builder, human. ------------------------- currently exploring, let me know where i should look https://depue.design

408 Followers  |  40 Following  |  3 Posts  |  Joined: 25.04.2023  |  1.2191

Latest posts by wmd.bsky.social on Bluesky

character limit is hard:

the problem overview is "turn an unknown biased RNG into a unbiased, uniformly distributed RNG"

25.04.2023 05:16 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

clarifying rules:

you can't use external sources of randomness
every time you run your algorithm it should run RNG some number of times and output a single value
you're given a size N at the start, every value outputted should have a 1 / N chance of occuring

25.04.2023 05:15 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

fun problem i can't stop thinking about:

you have a biased RNG that outputs a 1 or a 0 offset by some unknown value P%
you need to use it to produce a value that is uniformly distributed over some given N
you can call the RNG some finite number of times
no error is allowed (you can't estimate P)

25.04.2023 05:11 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

@wmd is following 20 prominent accounts