Tag Info

New answers tagged

-2

This new version is equiprobable and does not use floats function urandom_rand($min = 0, $max = 0x7FFFFFFF) { // Force cast to integer (any other values will becomes 0) $min = (int)$min; $max = (int)$max; // Verify input if ($max <= $min) { trigger_error('Minimum value must be greater than maximum value.'); } if ($min ...


2

Are there many permutation polynomials in a field? For a field $F$ of order $q$, every function from $F$ to $F$ is expressable (uniquely) as a polynomial of order $q-1$. $q!$ of these will represent permutation polynomials. Is there anyway to pick uniformly at random permutation polynomial in a field of prime order? Given a function from $f$ with $f(x_i) ...


3

Who says that a dice roll is truly random? I notice you define it as a "fair" dice roll; sure, a "fair" real-world dice roll could be considered random but its randomness is based up our inability to manipulate the dice precisely (haha) while shaking them in our hand and then throwing them onto a surface. If we were in complete control of the initial state ...


5

Any result of a dice-throwing simulation in a physics engine is determined by its initial state prior to starting the simulation. Accordingly, the same initial state will always result in the same die surface coming up. To obtain a quantity of $N_{output}$ random output bits of randomness quality $Q_{output}$ from this simulation would require seeding with ...


14

No, that would not be a true RNG, because these physics engines would just repeat the exact same calculation and thus repeat the whole sequence of random numbers - like a PRNG. The starting conditions are the seed of this PRNG. Dice are truly random in the real world. Well, are they? If we ignore quantum effects, we could measure all relevant values of the ...


2

There are two answers, really depending on your specifications and how your generator will be evaluated. If all you need is to have a PRNG with statistically excellent random, but really don't care about predictability or cryptographic considerations, go for something simple like a Mersenne Twister. If you actually need some effective stream-cipher, look ...



Top 50 recent answers are included