Skip to main content

Questions tagged [random]

This tag is for questions dealing with random numbers, pseudorandom numbers, and computer entropy.

6 votes
6 answers
669 views

Several random number generators I've used return numbers between 0 and 1, such as JavaScript's Math.random() It's also notoriously true that floating point numbers have an issue with storing specific ...
David Starkey's user avatar
1 vote
1 answer
359 views

I read a question about using a 32bit random number as a "unique" identifier. One of the answers asserted that a "rough guide" to estimating collision likelihood is that there's a ...
user679560's user avatar
4 votes
4 answers
2k views

Say I use GUIDs as keys. Considering the chance of a duplicate GUID being generated being what they are, is code like this considered a code smell? Guid newID = GenerateGuid(); while (dictionary....
Cole Tobin's user avatar
  • 1,533
1 vote
2 answers
1k views

I've read the questions regarding the use of random values in unit-tests and, well, I still don't quite understand what the argument against random values is. I'm trying to understand because I've had ...
Byebye's user avatar
  • 346
0 votes
0 answers
340 views

I wrote a prioritized/weighted left shuffle algorithm (the code is copied from my open source C# project Fluent Random Picker). What does that mean? You've got some values and each of them has a ...
hardfork's user avatar
  • 101
4 votes
3 answers
1k views

My understanding is that every PRNG or QRNG requires a state to prevent the next item in its sequence from being too predictable; which is sensible, as they're all running on deterministic hardware. ...
Michael Macha's user avatar
-1 votes
2 answers
240 views

I download the atmospheric noise data from random.org in form: 10111011 01101111 01100001 00001001 00100110 10111011 01110110 11010110 00000111 01111110 10001110 01101010 11100000 11110111 10101011 ...
matousc's user avatar
  • 115
-4 votes
1 answer
95 views

I already asked this question on stackoverflow -- I am posting it here as well, because I think many of you will have encountered an analogous problem. I would appreciate even a link as a reference, ...
 Konstantin Ashkenazy's user avatar
1 vote
4 answers
2k views

For example if you have a single UUID with a collision probability of x, if you concatenate 2 UUIDs, does the collision probability become x^2? val0 = generate_uuid() val1 = generate_uuid() final_val ...
Joan Venge's user avatar
  • 1,980
0 votes
3 answers
1k views

I would like to have IDs of different sizes from the alphabet 0-9. So I have 5-length IDs as in 10000 or 13531, etc.. I have 10, 15, 20, up to 39 digit strings (the size of a UUID). I would like to ...
Lance Pollard's user avatar
2 votes
3 answers
951 views

I don't exactly know how to phrase the thing I'm searching for in a succinct way, which also made it hard to research. In my application I need a random list of booleans, say of length five. The ...
kangalio's user avatar
  • 139
3 votes
3 answers
600 views

I am a theoretical computer scientist. I have heard the following: Practitioners do not like randomized algorithms because they are notoriously difficult to debug. So deterministic algorithms are ...
eig's user avatar
  • 147
0 votes
2 answers
139 views

I have thinking about this idea for over 5 years and i don't have the complete technical knowledge to fully grasp the idea I'm having. The premise of the idea is to have an extremely high base number ...
Necro's user avatar
  • 105
0 votes
3 answers
493 views

I have a big codebase yet to be covered with tests and rather limited access to the real data. The code that needs to be covered is very data dependent. And the data is anything but shallow and ...
Trident D'Gao's user avatar
1 vote
2 answers
1k views

Let’s say I have two larges arrays of users with equals number of rows and I want to match them randomly and one to one(one from the first array,one from the second), I will first need to shuffle one ...
Mathias's user avatar
  • 121

15 30 50 per page
1
2 3 4 5
9