Dan Piponi on Nostr: I think this is curious. die() is the function you think it is. This code almost ...
I think this is curious. die() is the function you think it is. This code almost always returns 3.
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.)
Published at
2024-11-24 00:42:40Event JSON
{
"id": "dc86d5ff5aaa09904da9f68d420394bcc227ec9bb4f44291c699476dd4c1d666",
"pubkey": "3422fcbc32f333fb2d3481b2e981258af8a0b571869cbfe93c42962410e232ef",
"created_at": 1732408960,
"kind": 1,
"tags": [
[
"proxy",
"https://mathstodon.xyz/users/dpiponi/statuses/113535153607420790",
"activitypub"
]
],
"content": "I think this is curious. die() is the function you think it is. This code almost always returns 3.\n\nint depth(int n)\n{\n if (n == 0)\n {\n return die(6);\n }\n\n return max(\n min(depth(n - 1), depth(n - 1)),\n min(depth(n - 1), depth(n - 1)));\n}\n\n(I have Haskell code to compute the exact prob.)",
"sig": "3168805489ba82ec6475761bb59ee78e855932146bb61107f27994c6626128a10dbdc7ecc36be50eaf6315ce218bc0730a7cc98bb20751483bfa7e0ed033713a"
}