Randomness is a way to mathematically model uncertainty. We often assume to have access to some well-defined source of random numbers, or that input values or events follow some probability distribution.
Questions tagged [randomness]
255 questions
12
votes
5 answers
pick K random integers without repetition
Suppose we've to pick $K (\le N)$ random integers in the range $[0, N - 1]$ for very large $N$ such that there is no repetition, while also deterministically minimizing the number of calls made to the $rand()$ function. How would we do it?
Assume…

bihariforces
- 333
- 7
8
votes
2 answers
How do computers create 'randomness'?
I have just used a function 'rand()' in my algorithm. In fact, it was arc4random() that I used. However, it got me thinking, how is randomness created in a computer system?
Can anything ever truly be random when it is produced by a computer?

Mark Ramotowski
- 217
- 1
- 4
3
votes
1 answer
How could you characterize "true randomness" of a finite sequence?
This question occurred to me while reading http://arxiv.org/abs/1806.08762/ Any observed sequence is necessarily finite, and any finite sequence is computable, either by explicitly storing all the data and just printing it, or by fitting an…

John Forkosh
- 305
- 2
- 12
3
votes
3 answers
Non-uniform random distribution: How do I get a random between 100 and 180 that is on average close to 120? (like in a Gaussian distribution)
Presume I have the following case:
int value a
int value b, for which a < b
int value i, for which a <= i < b
I need an int value x, for which a <= x < b, randomly chosen, according to a non-uniform distribution: the distribution should follow a…

Geoffrey De Smet
- 91
- 7
0
votes
0 answers
Prove fingerprinting
Possible Duplicate:
Prove fingerprinting
Let $a \neq b$ be two integers from the interval $[1, 2^n].$ Let $p$ be a random prime with $ 1 \le p \le n^c.$ Prove that
$$\text{prob}(a \equiv b \pmod{p}) \le c \ln(n)/(n^{c-1}).$$
Hint: As a…

user1374864
- 641
- 3
- 6
0
votes
0 answers
Computer Generated If-Statements to create A.I
Just a thought-experiment, could a program be written so that the computer generates it's own if-statements (semi/randomly) and runs them, gathers the results, then tests them in new scenarios, and iterates from there?
This idea came to me because…

Aetra
- 1