# Tagged Questions

32 views

### How to check if a sequence is random?

When I was thinking about various types of pseudo-randomness, the following question struck me: Suppose that a sequence $a_n \in \{0,1\}$ is given. Is there a way to check if it is genuinely ...
29 views

### Selecting a random orthogonal polygon

For a certain demo application, I want to create at random a rectilinear polygon with a given number of corners. Selecting random $x$ and $y$ coordinates of each corner is not a good method, since ...
27 views

### Understanding Sobol sequences

Can someone explain to me in simple terms, how Sobol sequences work? The wikipedia article is fairly technical. They look pretty interesting. So I shall describe (whatever little I know) in short the ...
29 views

### The probability of getting a certain image by random pixelation

Well, seeing that I'm terribly bad at math I don't know how to solve this, I'll try to explain, excuse me if I sound dumb. Just suppose that I've got a photo/image with 320x240 resolution and 24 bit ...
13 views

### How to normalise logarithm depending on the size of the range of possible values

I'm attempting to write a function which can be used to generate weighted random numbers between a set range, the size of which can arbitrarily grow and shrink, depending on some modifying value to ...
57 views

### “Alice and Bob” problem with matrices

Alice has a binary matrix $A$, and Bob has a binary matrix $B$. Both matrices are of size $n \times n$. Alice and Bob want to check if the matrices are equal except for exactly $1$ entry. Alice has to ...
21 views

### Ideal shrinking of discrete randomness source

I have a discrete randomness source that emits random integer numbers in range [0..N) with uniform distribution. I need to reduce this distribution, limiting it to ...
20 views

### Mathematically safe, open TAN generation and verification

For an upcoming Arduino project I need to generate, distribute and verify TANs (transaction authentication numbers). Let me explain (and assume for a second this is happening on a bigger computer). I ...
127 views

### Simple algorithm for generating Poisson distribution

I found a very simple algorithm that draws values from a Poisson distribution from this project. The algorithm's code in Java is: ...
209 views

### $e$ popping up in topic I'm unfamiliar with

I programmed up a little algorithm that goes like this: Fix two positive, real numbers, call them $\alpha$ and $\beta$. Generate a new, random, real number, $x \in [0,1]$ Set $\alpha$ = ...
113 views

### Generating Random Serialnumber with least similarity

I want to generate 16-digits hexadecimal serial-number like: F204-8BE2-17A2-CFF3. (This pattern give me 16^16 distinct serial-number But I don't need all of them as I describe below) I need an idea ...
95 views

### Using an elliptic curve to create pseudo random number

I recently started learning about encryption. I read about how elliptic curves can be used to create pseudo random numbers (and how the nsa might have abused this fact to create a backdoor in ...
35 views

### choose a list of words such that have equal letter frequency

I have a big list meaning full Words. surely letter frequency of this word list is different for each letter. Now my problem is to find a way to randomly select words from this word list to a new ...
112 views

### What is an example for an algorithm which makes use the power of randomness?

Can someone give a (most simple) example for an algorithm on a machine, which has access to random numbers, and which is faster than any other known algorithm for the same task? My actual motivation ...
251 views

### Algorithm to generate an uniform distribution of points in the volume of an hypersphere/on the surface of an hypersphere.

I am searching two simple/efficient/generic algorithms to generate a uniform distribution of random points: in the volume of a n-dimensional hypersphere on the surface of a n-dimensional hypersphere ...
71 views

### Pseudorandom numbers - Get a sequence of number not close each others

I have this function inside a software: a+(SeededRand(Round((SongTime-0.5+(Round(1000*c)))*1))-0.5)*b it creates a pseudo-random numbers sequence inside the ...
175 views

### Generate random numbers between a range such that no number comes twice.

Sorry if my question is stupid, math has been always a wild beast for me. I am an application developer. In one application I have a module which assigns a random 6-8 digit number and a serial number ...
346 views

### Can random number generators be used in compression?

This is basically a recurring thought I have from time to time and I suspect it is flawed, so my question is basically why can't you do the following: Basically, I imagine that given a seed and a ...
198 views

### Fast generation of Pareto-distributed randoms.

I'm developing a library of routines for generating random numbers for simulations (it's on GitHub). I've included fast routines for normally distributed and exponentially distributed randoms, using ...
219 views

### Simple random sample without replacement

I have a data file from which I wish to create a uniformly distributed simple random sample, without replacement. Will the following algorithm give me an unbiased result? ...
168 views

### Algorithm to generate a random sequence.

Let $f(n):\mathbb N \to\mathbb N$, be a function randomly gives a integer from $0$ to $n-1$. How can I generate a random sequence of integer with $n$ element which contain every integer from $0$ to ...
67 views

### Finding a distribution for random number generation

I am writing a program for solving the shortest path in travelling salesman problem, with a twist that there are multiple salesmen who partition the cities among themselves, thus creating two part ...
289 views

### What are the differences between the random walk and the gaussian random walk?

I know the random walk mobility model, but I can not understand what are the differences with respect to gaussian random walk. In other words, I know how to implement the two-dimensional random walk: ...
155 views

### Efficient generation of a von Mises-Fisher distribution

The von Mises-Fisher distribution is a probability distribution on the ($p-1$)-sphere. I'm interested in the efficient generation of this distribution for a relatively high dimension ($1000$ or ...
200 views

### Pseudo random number generator: Why not to use “too many” random variables in one application

I found statement in an article "Good Practice in ( Pseudo ) Random Number Generation for Bioinformatics Applications" that you should not use too many random variables in a single simulation. Authors ...
789 views

### Uniform Random Quaternion In a restricted angle range

I'm trying to sample uniform random rotations. I'd like the rotations to be restricted in a range [-θ,θ]. I found a method by K. Shoemake which can be summarized as: ...
59 views

### Does re-ordering a shuffled pile while drawing from it affect the randomness of the draw?

In the game "Settlers of Catan", there is a stack of fourteen tiles, four of which are "water", two "gold", and the other eight an arbitrary mixture of "sheep", "wheat", "ore", "brick", and "lumber". ...
601 views

### Get n random values between 2 numbers having average x

I want to get n random numbers(e.g n=16)(whole numbers) between 1 to 5(including both) so that average is x. x can be any value between (1, 1.5, 2, 2.5, 3, 3.5, 4, ...
81 views

### Finding a subsequence (of a very long sequence) which does not sum to an even number

[Edited. I've revised to problem to focus on the special case of the integers modulo 2.] You are given a function f from binary strings x ∈ {0,1}n to the integers, or (without loss of ...
536 views

### Generating geometrically-distributed variates over an interval given endpoints and expected value

I want to generate random variates from a truncated geometric distribution over the interval $[0, n)$ with specified expected value, $0 \le E < n$. The obvious way to do this seems to be to sample ...
148 views

### Period of least significant bits of linear congruential random number generator

On a practice exam for a course on stochastic simulations I encountered the following question: Show that the least significant $n$ bits must repeat with a period $2^n$ for a congruential random ...
177 views

### Simulation and Stochastic Processes

Supposing we want to take a sample from the distribution $p(x)=cp^*(x)$ where $c$ is the normalization constant and $p^*(x)$ is given by $$p^*(x)=0.5\exp(-(x-\mu_1)^2)+0.5\exp(-(x-\mu_2)^2).$$ ...
156 views

### Algorithms and Simulation

Supposing we want to take a sample from a $N(0,1)$ distribution and i can take a sample from a $N(0,σ^2)$. (a) Construct a disposal/rejection algorithm with function $N(0,σ^2)$, which generates a ...
165 views

### Generating a random Eisenstein integer matrix whose inverse has Eisenstein integer entries

Thanks to a question I previously asked, I realized that a Gaussian integer matrix should have a determinant of $\pm 1$ or $\pm i$ for it to have an Gaussian integer inverse. From that, I gather that ...
118 views

### terrain generation help

I'm trying to make a 3D terrain generator. In doing so, I decided that I would use basic rectangles and then just turn them by having 4 points, 1 on each side, then turn the rectangle to fit in those ...
925 views

### How/why does this noise function work?

How/why does this noise function work? ...
143 views

### Uniform PRNG for long integer structures

Good morning! I don't actually know where to attribute this question (maybe it's better to publish it on StackOverflow), but it's more related to math theory than to actual realization. Since the ...
309 views

### How is a Halton sequence related to a Latin hypercube?

I currently use a Halton sequence to choose parameter sets for a prognostic model (e.g. using metabolic rate and protein content parameters to predict growth rate). From my understanding, both a ...