Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What is the catch here? In multi dimensional and infinite cases it can be a little tricky, but in this one is there more to it than "all permutations should have the same probability"?


I'm not an expert, but here are a few of the things that come to mind for me:

- One conception of random is subjective: the pattern must not be predictable by a particular person/entity. E.g., the Fibonacci sequence may seem random to a person with IQ 3, but not IQ 1000.

- I think related to that is the concept of cryptographically random: [0]

- Random numbers can have different statistical distributions. You referred to uniform randomness, but depending on the application, that's not necessarily what you want. E.g., [1] Especially for statistical / Monte Carlo modeling.

- Depending on just how random you need something to be and to whom, you may or may not need specialized computing hardware. [2]

- Sometimes people kinda want random, but they also want reproducibility if necessary. Think randomly generated unit test input, or randomly generated game levels. For those applications, it's helpful to know that most software uses pseudo- -random number generators (PRNG's). If you can remember the specific number used to seed the PRNG stream, you may be able to deterministically re-execute the code at will. Alternatively, if you want to (nearly) guarantee that subsequent runs of the program aren't the same, you'll want to somehow ensure that a different seed number is used for the different program runs.

So if anything about the job opening depends on this kind of stuff, IMHO it's a great interview question.

[0] https://crypto.stackexchange.com/questions/39186/what-does-i...

[1] https://stackoverflow.com/questions/37828955/what-is-the-dif...

[2] https://en.wikipedia.org/wiki/Entropy_(computing)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: