Algorithms icon indicating copy to clipboard operation
Algorithms copied to clipboard

[Algorithm] Pseudo-random numbers generator

Open realwoopee opened this issue 6 years ago • 8 comments

realwoopee avatar Oct 07 '18 16:10 realwoopee

Can I pick this one up?

marjanovicsteva avatar Oct 09 '18 15:10 marjanovicsteva

Yes

realwoopee avatar Oct 09 '18 15:10 realwoopee

Okay, so I've finished this one. But now that I think of it, is it allowed to use an API which has bigger randomness rate? Check here what I've done, to see what I'm talking about.

If it's not allowed, just say, I'll do it manually :smile:

marjanovicsteva avatar Oct 09 '18 21:10 marjanovicsteva

By the Contributing.md you are allowed to use an external library only when there's no other solution is possible. So, implement this algorithm manually, please.

realwoopee avatar Oct 10 '18 04:10 realwoopee

Truely random numbers are not possible on todays computers. Your best bet would be using this api as it generates numbers from atmospheric noise, which is truly random. Best you can get on computers are pseudo-random numbers.

There is simply no algorithm to generate a truly random number. You're asking for something impossible.

I've gathered a couple articles for you to read: https://curiosity.com/topics/why-computers-can-never-generate-truly-random-numbers-curiosity/ https://engineering.mit.edu/engage/ask-an-engineer/can-a-computer-generate-a-truly-random-number/

I'd recommend you close this issue as no human being in the history of humankind has ever been able to write an algorithm to generate truly random numbers.

Naamloos avatar Oct 26 '18 14:10 Naamloos

A pseudo-random number generator has already been included in the .net framework.

https://docs.microsoft.com/en-us/dotnet/api/system.random?view=netframework-4.7.2

Naamloos avatar Oct 29 '18 19:10 Naamloos

This repo is not about C# implementations of algorithms and data structures. This repo is about data structures and algorithms implemented in any programming language. So it doesn't matter that pseudo-random number generator has been already included in the .net framework. Also, there are many pseudo-random number generators. https://en.wikipedia.org/wiki/List_of_random_number_generators

realwoopee avatar Oct 30 '18 05:10 realwoopee

Oh, apologies. This repo was marked as C#

Naamloos avatar Oct 30 '18 10:10 Naamloos