[HN Gopher] The cursed d65536 ___________________________________________________________________ The cursed d65536 Author : EvgeniyZh Score : 63 points Date : 2022-06-09 09:25 UTC (13 hours ago) (HTM) web link (aleph.se) (TXT) w3m dump (aleph.se) | sp332 wrote: | From the broken first attempt: _Each face has 3 vertices, shared | between 6 faces, so the total number of vertices is 65536, and | they become faces of my die._ | | This should have tipped you off. If you have six triangular faces | around every vertex, you have a flat Euclidean plane, not a | sphere with positive curvature. | | For another example of this: | https://m.youtube.com/watch?v=jfSTwqmrQDc | tgb wrote: | Pedantry: it doesn't have to be flat - for example a | triangulated parabola could also have that configuration. You | only get a topological result from just knowing edge and vertex | counts. Now if the triangles are identical equilateral then | you're in business. | | What if the triangles are all congruent but not equilateral? | Can that even happen? That's a fun one, so I won't spoil it. | sp332 wrote: | Oh, do you think it could make a sphere then? If the angle at | each triangle corner is a bit less than 60 degrees? | avmich wrote: | That's why "don't do math after midnight". But I don't get | what's wrong with repeated throws of tetrahedron - 2 bits of | result at a time - or even icosahedron, with re-throws if one | of 4 "wrong" sides is up - 4 bits at a "good" throw... | samch wrote: | Probably says something about me that my immediate reaction to | the number 65536 wasn't 2^16, but rather the frequency of the | timer crystal you had to swap into a Radio Shack tone dialer to | make a "red box"[1] that would let you make free phone calls on | US pay phones by simulating the analog coin code sound of a | quarter being deposited. Fun fact that the "red box" was the | first hackaday article[2] posted way back in 2004. I learned | about this back in the days of 2600 magazine. Fun stuff! | | [1] http://www.techfreakz.org/2600faq.html#redbox | | [2] https://hackaday.com/2004/09/05/radioshack-phone-dialer- | red-... | scrame wrote: | I just coded it in basic and the recorded it to a mini-casette | lecture-recorder. Unfortunately, by that point the tones just | triggered an operator call. | reaperducer wrote: | The DTMF chips that generated regular Touch Tones(tm) were | capable of generating all kinds of fun sounds simply by | extending the key matrix. | | You could build a red box, pink box, blue box, and others by | modifying a standard tone dialer. The easiest thing to do was | to add a fourth column of keys, which supposedly gave you the | ability to use the ABCD digits required for military networks. | I never tried that, though. | | For those of you who missed out on that era, a tone dialer was | a little palm-sized box that had a small Touch Tone keypad on | one side, and a speaker on the other. If you had a rotary | phone, after dialing, you could hold it up to the mouthpiece | and use many of the fancy features that came with the invention | of Touch Tone, like using FON cards, or listening to your | messages on your answering machine. | aidenn0 wrote: | I know it's not the point of TFA, but you can just roll a d8 6 | times, generating 3 bits each time, for a total of 18 bits, and | then discard two of them. | tialaramex wrote: | You can buy hexadecimal dice ie D16 with the sides labelled 0 | through F, I have some, I use them to generate random numbers | when it is important to me that I personally have confidence | these are random numbers. | | With hex dice you can generate 16 bits with four rolls, four | bits each time. | | Obviously you're more likely to already have a D6 somewhere, | but then you're even more likely to own a coin, and 16 coin | tosses is also an effective way to generate a 16-bit number. | aetherson wrote: | The article suggests flipping coins in the last sentence, which | gets you exactly as many bits as you want. | bombcar wrote: | Yep, or use 16 dice that have only 0 and 1 on them. The order | would be important, so you'd want to color them or otherwise | indicate which was high order and which was low. | anyfoo wrote: | Or do 16 throws of such a d(2) die, i.e. 16 coin flips, in | succession. | | If you really want to do it in one throw, you don't really | need to color them all differently, though. Just read them in | a specified way, i.e. always from left to right and top to | bottom. (You don't even have to always read them the same way | as long as how you read them is completely independent from | what their faces show.) | mellavora wrote: | Kids these days. What ever happened to sacrificing a goat | and reading the entrails? | avmich wrote: | Inflation of goats? | bombcar wrote: | Apparently some guy named Monty Hall is just giving away | goats for free. | jandrese wrote: | Why not just roll 4D16? | | https://www.amazon.com/Lanema-Polyhedral-Dungeons-Dragons-Si... | aidenn0 wrote: | "... for Dungeons and Dragons" ah yes, I use a D16 _all the | time_ when playing D &D /s | jeramey wrote: | I'd be a little worried that I might be tempted to | unconsciously order the values in some way which would bias | the results. But you could build a box with four separate | cells and a clear plexiglass top, shake them all up, and | always read left-to-right or right-to-left! Sounds like a fun | weekend project! | kazinator wrote: | > _This is of course hilariously cursed. It will look almost | perfect, but very rarely give numbers outside the expected | range._ | | If the D65538 is fair, it is usable: you just discard the two | unwanted values when they show up and roll again. Those faces | could be labelled as "roll again". | | If you have a uniform source of random numbers from 1 to N, you | can get a uniform distribution from 1 to M < N simply by | discarding values obtained above M. Those values are just "rain | that fell elsewhere". | stkdump wrote: | This process has an infinitely small (but non-zero) chance of | never terminating. | Dylan16807 wrote: | Which doesn't matter on objects or programs because that | chance already exists as a baseline. I'm not building a math | here. | davidgay wrote: | But that probability rapidly drops below the probability that | you will drop dead from some random cause while waiting for | the roll's result :) | mananaysiempre wrote: | The process has an _exactly zero_ chance of never terminating | in the usual probability space of infinite strings with iid | characters, even though the set of strings (of RNG results) | on which it does not terminate is nonempty (uncountably | infinite, even, provided N >= M + 2); the term of art is that | it terminates _almost surely_. (The usual definition of that | space via "cylinder sets" may seem contrived, but it's | usually introduced first because it's "elementary" in that it | does not require developing the machinery of limits of [not | _in_ ] probability spaces. That can be made to work, though, | and then you can say that the space of infinite strings is | the limit of the spaces of length-n strings for n - [?] and | obtain the same thing. In fact, the cylinder-set definition | is essentially the limit definition with the notion of limit | inlined.) | kazinator wrote: | The die also has a very small chance of landing on an edge | between two faces, which also requires a repeated roll. | Smaug123 wrote: | This is a rather sloppy way of saying "this process may fail | to terminate, though the set of nonterminating outcomes has | probability 0". No real number is infinitely small but | nonzero. | mananaysiempre wrote: | _Rejection sampling_ , that is. Unexpectedly, but obviously in | retrospect, the common (ancient) wisdom of using that in the | continuous case instead of figuring out tricky combinations of | special functions to get the result from a bounded number of | uniform samples... fails miserably on LuaJIT. Of course atan2() | is not the fastest thing in the world, but on a compiler that | only really understands loops with linear bodies calling it | even via FFI beats adding an unpredictable nested loop. | pacaro wrote: | I'm surprised that nobody has mentioned the d120 which AFAICT is | the largest fair dice that you can just go out and buy. Sadly | it's a smidge under 7 bits, but you can "reasonably" roll up 32 | bits of entropy with a mere 6 rolls (and still have 9 bits left | over) | | https://www.wired.com/2016/05/mathematical-challenge-of-desi... | woliveirajr wrote: | > XKCD joked about the problem of secure generation of random 32 | bit numbers by rolling a 65536-sided die | | Well, 2^16 = 65536, so it's a 16-bit number. To get a random | 32-bit number you'd need to roll more than once.... | recursive wrote: | XKCD got it right. aleph.se got it wrong. | tlb wrote: | I'd like a physics analysis of how flat/hard a surface you need | to roll a D65536, how long it would take to settle, and how good | a microscope you'd need to read the top face. | | Is there, like, 99designs for physics questions? I'd happily pay | $99 for the answer, then post it here like I worked it out | myself. ___________________________________________________________________ (page generated 2022-06-09 23:00 UTC)