I think this is curious. die() rolls a die. This code almost always returns 3 for large input n.
int depth(int n)
{
if (n == 0)
{
return die(6);
}
return max(
min(depth(n - 1), depth(n - 1)),
min(depth(n - 1), depth(n - 1)));
}
(I have Haskell code to compute the exact prob.)
=> More informations about this toot | More toots from dpiponi@mathstodon.xyz
I was wondering how much you could control the resulting distribution if the only tools you have available are 6-sided dice and the functions min and max. Looks like you can keep "refining" the distribution to get it as close as you like to being supported at just one value.
=> More informations about this toot | More toots from dpiponi@mathstodon.xyz
@dpiponi That’s neat. So it’s a sort of… not sure what to call it… emergent distribution? based on the structure of the logic. I like it.
=> More informations about this toot | More toots from 4raylee@mathstodon.xyz
@4raylee I noticed the similarity to logic too. Not sure if there's any mileage you could get out of that.
=> More informations about this toot | More toots from dpiponi@mathstodon.xyz This content has been proxied by September (ba2dc).Proxy Information
text/gemini