# Tagged Questions

The tag has no wiki summary.

34 views

### Generate Same Sequence of Random Numbers in IDL and C [closed]

I am in the process of developing a C version of a program originally written in IDL. The programs generate arrays with random number generators. I use gsl_rng_uniform and gsl_ran_poisson in the C ...
366 views

### When calling for a random integer from 1-6, how can I make it gradually get less likely to pick a number the bigger it is? [duplicate]

Like having 1 be the most common number and 6 be the least common number. And everything else just leveling out.
148 views

### Are random number generators security holes?

If I retrieve a random number from a database (e.g. RAND() in SQL Server) or using a programming language and send this in some form back to a client machine, is there an economic chance I will be ...
133 views

### What should I use as a random seed in a Brainfuck?

As I understand it, most pseudo-random algorithms work by taking one or more truly random longs, such as the date, time, MAC-Address, serial-number, etc., passing them through a complex series of ...
163 views

### What's the algorithm of “Shuffle Mode” in audio/music players [closed]

I was researching on how is the "Shuffle mode" in music players implemented and what is the algorithm behind this. How it makes sure that any songs won't repeat? What's the most efficient algorithm ...
103 views

### Generating a Nakagami Random Variable

Assuming the only tool for generating random numbers I have available is generating a uniformly distributed variable u on U(0,1). I want to generate a Nakagami Random Variable from it. I know I could ...
296 views

### More Accurate Random in C [closed]

I have 3 IPs and every IP has a weight, I want to return the IP's according to its weights using the random function. For example if we have 3 IP's X with weight 3 Y with weight 3 and Z with weight ...
161 views

### Performance of a Skip-List algorithm

Here is a simple code for a randomized skip-list: Coin_Side flip() { if ( random() % 2 == 0 ) return HEADS; else return TAILS; } Note: random() returns an integer that uses ...
914 views

### Can a random number generator ever produce different output given identical seeds?

The title sums it up. I'm interested to know if there exists an algorithm capable of producing variable output given identical input without relying on other sources for randomness such as ...
2k views

### How do functional languages handle random numbers?

What I mean about that is that in nearly every tutorial I've read about functional languages, is that one of the great things about functions, is that if you call a function with the same parameters ...
542 views

### Guid collisions

I have a product that lets game developers create games. Inside of their games they are required to give all the elements of their games GUIDs. I've told them that they need to generate their guids ...
307 views

### Can an 81 digit number generator lead to copyright infringement? [closed]

I'm looking to write a program that will generate valid sudoku puzzles. Essentially, a sudoku puzzle is just an 81 digit number. (The blanks are zeroes.) I would then like to use these puzzles in an ...
856 views

### Is there such a thing as truly random? [closed]

I saw a video about random numbers and how the programmer in that video was talking about computers generating pseudo random numbers and that they are not really random. I knew about this. Then he ...
136 views

### Randomness of wrapped RNG

There are plenty of questions around regarding random number generation, but I couldn't find anything that exactly matched my question. Apologies if I missed one. Most random number generators in ...
272 views

### idquantique .vs. rdrand

We are currently looking at using the idquantique random number generator device to provide random numbers. There are some issues though. We would only be using one device and we have at least 5 ...
783 views

### Randomly select from list with increased odds

I have a list of entities. Every entity contains a number that holds how many times the entity has been selected. I need to make a function that selects n (say 25%) of the entities, randomly. What I ...
219 views

### Determinism of functions using PRNG in Clojure and functional languages

I'm a bit surprised by a sentence found in the book "Clojure Programming" (1st [and only as I write this!?] edition), page 78: It should be obvious that it's impossible to deterministically test a ...
288 views

### is Microsoft LC random generator patented?

I need a very simple pseudo random generator (no any specific quality requirements) and I found Microsoft's variant of LCG algorithm used for rand() C runtime library function fit my needs (gcc's one ...
722 views

### How to create a random generator

How could a random generator be implemented? I'm not speaking about the invocation of a language mathRandom() method, but the implementation of the routines that lead to generate numbers totally ...
2k views

### Can you use Pi as a crude random number generator?

I recently saw this question over at math.SE. It got me thinking. Could Pi be used as a crude random number generator? I mean the results are well known(how long has pi been computed to now?) but, Pi ...
334 views

### What are best practices for testing programs with stochastic behavior?

Doing R&D work, I often find myself writing programs that have some large degree of randomness in their behavior. For example, when I work in Genetic Programming, I often write programs that ...
1k views

### How to generate random numbers without making new Random objects?

I'm using this as part of a game, but it's not really a game development question, so I'm putting it on this more general Stack Exchange. The goal is to generate "random" outputs for a fixed integer ...
5k views

### How should I test randomness?

Consider a method to randomly shuffle elements in an array. How would you write a simple yet robust unit test to make sure that this is working? I've come up with two ideas, both of which have ...
3k views

### Unit-testing of inherently random/non-deterministic algorithms

My current project, succinctly, involves the creation of "constrainably-random events". I'm basically generating a schedule of inspections. Some of them are based on strict schedule constraints; you ...
8k views

### UUID collisions

Has anybody done any real research on the probability of UUID collisions, especially with version 4 (random) UUIDs, given that the random number generators we use aren't truly random and that we might ...
4k views

### Why is it impossible to produce truly random numbers?

I was trying to solve a hobby problem that required generating a million random numbers. But I quickly realized, it is becoming difficult to make them unique. I picked up Algorithm Design Manual to ...
874 views

### PHP rand function (or not so rand)

I was testing PHP rand function to write on a image. Of course the output shows that it's not so random. The code I used: <?php header('Content-Type: image/png'); \$lenght = 512; \$im = ...
1k views

### How does minecraft use a seed to generate a completely unique world?

In minecraft, before creating a world you have an option to input a seed. The algorithm takes the seed and creates a completely unique world. How does this work?
87 views

### Random number for HTTPS MAC

Recently I found that Netscape used quite simple algorithm to generate random number for Message Authentication Code to establish an HTTPS connection (Nestscpe used time, process identification ...
4k views

### I need a true random number generator web service [closed]

I need a way to get non-deterministic random numbers on demand for my application. However i do not wish/have the capabilities to build the hardware myself, thus I'm looking for a web service which ...