Misplaced Pages

Low-discrepancy sequence

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
(Redirected from Constructions of low-discrepancy sequences) Type of mathematical sequence

In mathematics, a low-discrepancy sequence is a sequence with the property that for all values of N {\displaystyle N} , its subsequence x 1 , , x N {\displaystyle x_{1},\ldots ,x_{N}} has a low discrepancy.

Roughly speaking, the discrepancy of a sequence is low if the proportion of points in the sequence falling into an arbitrary set B is close to proportional to the measure of B, as would happen on average (but not for particular samples) in the case of an equidistributed sequence. Specific definitions of discrepancy differ regarding the choice of B (hyperspheres, hypercubes, etc.) and how the discrepancy for every B is computed (usually normalized) and combined (usually by taking the worst value).

Low-discrepancy sequences are also called quasirandom sequences, due to their common use as a replacement of uniformly distributed random numbers. The "quasi" modifier is used to denote more clearly that the values of a low-discrepancy sequence are neither random nor pseudorandom, but such sequences share some properties of random variables and in certain applications such as the quasi-Monte Carlo method their lower discrepancy is an important advantage.

Applications

Error in estimated kurtosis as a function of number of datapoints. 'Additive quasirandom' gives the maximum error when c = (√5 − 1)/2. 'Random' gives the average error over six runs of random numbers, where the average is taken to reduce the magnitude of the wild fluctuations

Quasirandom numbers have an advantage over pure random numbers in that they cover the domain of interest quickly and evenly.

Two useful applications are in finding the characteristic function of a probability density function, and in finding the derivative function of a deterministic function with a small amount of noise. Quasirandom numbers allow higher-order moments to be calculated to high accuracy very quickly.

Applications that don't involve sorting would be in finding the mean, standard deviation, skewness and kurtosis of a statistical distribution, and in finding the integral and global maxima and minima of difficult deterministic functions. Quasirandom numbers can also be used for providing starting points for deterministic algorithms that only work locally, such as Newton–Raphson iteration.

Quasirandom numbers can also be combined with search algorithms. With a search algorithm, quasirandom numbers can be used to find the mode, median, confidence intervals and cumulative distribution of a statistical distribution, and all local minima and all solutions of deterministic functions.

Low-discrepancy sequences in numerical integration

Various methods of numerical integration can be phrased as approximating the integral of a function f {\displaystyle f} in some interval, e.g. , as the average of the function evaluated at a set { x 1 , , x N } {\displaystyle \{x_{1},\dots ,x_{N}}\} in that interval:

0 1 f ( u ) d u 1 N i = 1 N f ( x i ) . {\displaystyle \int _{0}^{1}f(u)\,du\approx {\frac {1}{N}}\,\sum _{i=1}^{N}f(x_{i}).}

If the points are chosen as x i = i / N {\displaystyle x_{i}=i/N} , this is the rectangle rule. If the points are chosen to be randomly (or pseudorandomly) distributed, this is the Monte Carlo method. If the points are chosen as elements of a low-discrepancy sequence, this is the quasi-Monte Carlo method. A remarkable result, the Koksma–Hlawka inequality (stated below), shows that the error of such a method can be bounded by the product of two terms, one of which depends only on f {\displaystyle f} , and the other one is the discrepancy of the set { x 1 , , x N } {\displaystyle \{x_{1},\dots ,x_{N}}\} .

It is convenient to construct the set { x 1 , , x N } {\displaystyle \{x_{1},\dots ,x_{N}}\} in such a way that if a set with N + 1 {\displaystyle N+1} elements is constructed, the previous N {\displaystyle N} elements need not be recomputed. The rectangle rule uses points set which have low discrepancy, but in general the elements must be recomputed if N {\displaystyle N} is increased. Elements need not be recomputed in the random Monte Carlo method if N {\displaystyle N} is increased, but the point sets do not have minimal discrepancy. By using low-discrepancy sequences we aim for low discrepancy and no need for recomputations, but actually low-discrepancy sequences can only be incrementally good on discrepancy if we allow no recomputation.

Definition of discrepancy

The discrepancy of a set P = { x 1 , , x N } {\displaystyle P=\{x_{1},\dots ,x_{N}}\} is defined, using Niederreiter's notation, as

D N ( P ) = sup B J | A ( B ; P ) N λ s ( B ) | {\displaystyle D_{N}(P)=\sup _{B\in J}\left|{\frac {A(B;P)}{N}}-\lambda _{s}(B)\right|}

where λ s {\displaystyle \lambda _{s}} is the s {\displaystyle s} -dimensional Lebesgue measure, A ( B ; P ) {\displaystyle A(B;P)} is the number of points in P {\displaystyle P} that fall into B {\displaystyle B} , and J {\displaystyle J} is the set of s {\displaystyle s} -dimensional intervals or boxes of the form

i = 1 s [ a i , b i ) = { x R s : a i x i < b i } {\displaystyle \prod _{i=1}^{s}[a_{i},b_{i})=\{\mathbf {x} \in \mathbf {R} ^{s}:a_{i}\leq x_{i}<b_{i}\}\,}

where 0 a i < b i 1 {\displaystyle 0\leq a_{i}<b_{i}\leq 1} .

The star-discrepancy D N ( P ) {\displaystyle D_{N}^{*}(P)} is defined similarly, except that the supremum is taken over the set J {\displaystyle J^{*}} of rectangular boxes of the form

i = 1 s [ 0 , u i ) {\displaystyle \prod _{i=1}^{s}[0,u_{i})}

where u i {\displaystyle u_{i}} is in the half-open interval [0, 1).

The two are related by

D N D N 2 s D N . {\displaystyle D_{N}^{*}\leq D_{N}\leq 2^{s}D_{N}^{*}.\,}

Note: With these definitions, discrepancy represents the worst-case or maximum point density deviation of a uniform set. However, also other error measures are meaningful, leading to other definitions and variation measures. For instance, L 2 {\displaystyle L^{2}} -discrepancy or modified centered L 2 {\displaystyle L^{2}} -discrepancy are also used intensively to compare the quality of uniform point sets. Both are much easier to calculate for large N {\displaystyle N} and s {\displaystyle s} .

The Koksma–Hlawka inequality

Let I ¯ s {\displaystyle {\overline {I}}^{s}} be the s {\displaystyle s} -dimensional unit cube, I ¯ s = [ 0 , 1 ] × × [ 0 , 1 ] {\displaystyle {\overline {I}}^{s}=\times \cdots \times } . Let f {\displaystyle f} have bounded variation V ( f ) {\displaystyle V(f)} on I ¯ s {\displaystyle {\overline {I}}^{s}} in the sense of Hardy and Krause. Then for any x 1 , , x N {\displaystyle x_{1},\ldots ,x_{N}} in I s = [ 0 , 1 ) s = [ 0 , 1 ) × × [ 0 , 1 ) {\displaystyle I^{s}=[0,1)^{s}=[0,1)\times \cdots \times [0,1)} ,

| 1 N i = 1 N f ( x i ) I ¯ s f ( u ) d u | V ( f ) D N ( x 1 , , x N ) . {\displaystyle \left|{\frac {1}{N}}\sum _{i=1}^{N}f(x_{i})-\int _{{\bar {I}}^{s}}f(u)\,du\right|\leq V(f)\,D_{N}^{*}(x_{1},\ldots ,x_{N}).}

The KoksmaHlawka inequality is sharp in the following sense: For any point set { x 1 , , x N } {\displaystyle \{x_{1},\ldots ,x_{N}\}} in I s {\displaystyle I^{s}} and any ε > 0 {\displaystyle \varepsilon >0} , there is a function f {\displaystyle f} with bounded variation and V ( f ) = 1 {\displaystyle V(f)=1} such that

| 1 N i = 1 N f ( x i ) I ¯ s f ( u ) d u | > D N ( x 1 , , x N ) ε . {\displaystyle \left|{\frac {1}{N}}\sum _{i=1}^{N}f(x_{i})-\int _{{\bar {I}}^{s}}f(u)\,du\right|>D_{N}^{*}(x_{1},\ldots ,x_{N})-\varepsilon .}

Therefore, the quality of a numerical integration rule depends only on the discrepancy D N ( x 1 , , x N ) {\displaystyle D_{N}^{*}(x_{1},\ldots ,x_{N})} .

The formula of Hlawka–Zaremba

Let D = { 1 , 2 , , d } {\displaystyle D=\{1,2,\ldots ,d\}} . For u D {\displaystyle \emptyset \neq u\subseteq D} we write

d x u := j u d x j {\displaystyle dx_{u}:=\prod _{j\in u}dx_{j}}

and denote by ( x u , 1 ) {\displaystyle (x_{u},1)} the point obtained from x by replacing the coordinates not in u by 1 {\displaystyle 1} . Then

1 N i = 1 N f ( x i ) I ¯ s f ( u ) d u = u D ( 1 ) | u | [ 0 , 1 ] | u | disc ( x u , 1 ) | u | x u f ( x u , 1 ) d x u , {\displaystyle {\frac {1}{N}}\sum _{i=1}^{N}f(x_{i})-\int _{{\bar {I}}^{s}}f(u)\,du=\sum _{\emptyset \neq u\subseteq D}(-1)^{|u|}\int _{^{|u|}}\operatorname {disc} (x_{u},1){\frac {\partial ^{|u|}}{\partial x_{u}}}f(x_{u},1)\,dx_{u},}

where disc ( z ) = 1 N i = 1 N j = 1 d 1 [ 0 , z j ) ( x i , j ) j = 1 d z i {\displaystyle \operatorname {disc} (z)={\frac {1}{N}}\sum _{i=1}^{N}\prod _{j=1}^{d}1_{[0,z_{j})}(x_{i,j})-\prod _{j=1}^{d}z_{i}} is the discrepancy function.

The L version of the Koksma–Hlawka inequality

Applying the Cauchy–Schwarz inequality for integrals and sums to the Hlawka–Zaremba identity, we obtain an L 2 {\displaystyle L^{2}} version of the Koksma–Hlawka inequality:

| 1 N i = 1 N f ( x i ) I ¯ s f ( u ) d u | f d disc d ( { t i } ) , {\displaystyle \left|{\frac {1}{N}}\sum _{i=1}^{N}f(x_{i})-\int _{{\bar {I}}^{s}}f(u)\,du\right|\leq \|f\|_{d}\operatorname {disc} _{d}(\{t_{i}\}),}

where

disc d ( { t i } ) = ( u D [ 0 , 1 ] | u | disc ( x u , 1 ) 2 d x u ) 1 / 2 {\displaystyle \operatorname {disc} _{d}(\{t_{i}\})=\left(\sum _{\emptyset \neq u\subseteq D}\int _{^{|u|}}\operatorname {disc} (x_{u},1)^{2}\,dx_{u}\right)^{1/2}}

and

f d = ( u D [ 0 , 1 ] | u | | | u | x u f ( x u , 1 ) | 2 d x u ) 1 / 2 . {\displaystyle \|f\|_{d}=\left(\sum _{u\subseteq D}\int _{^{|u|}}\left|{\frac {\partial ^{|u|}}{\partial x_{u}}}f(x_{u},1)\right|^{2}dx_{u}\right)^{1/2}.}

L 2 {\displaystyle L^{2}} discrepancy has a high practical importance because fast explicit calculations are possible for a given point set. This way it is easy to create point set optimizers using L 2 {\displaystyle L^{2}} discrepancy as criteria.

The Erdős–Turán–Koksma inequality

It is computationally hard to find the exact value of the discrepancy of large point sets. The ErdősTuránKoksma inequality provides an upper bound.

Let x 1 , , x N {\displaystyle x_{1},\ldots ,x_{N}} be points in I s {\displaystyle I^{s}} and H {\displaystyle H} be an arbitrary positive integer. Then

D N ( x 1 , , x N ) ( 3 2 ) s ( 2 H + 1 + 0 < h H 1 r ( h ) | 1 N n = 1 N e 2 π i h , x n | ) {\displaystyle D_{N}^{*}(x_{1},\ldots ,x_{N})\leq \left({\frac {3}{2}}\right)^{s}\left({\frac {2}{H+1}}+\sum _{0<\|h\|_{\infty }\leq H}{\frac {1}{r(h)}}\left|{\frac {1}{N}}\sum _{n=1}^{N}e^{2\pi i\langle h,x_{n}\rangle }\right|\right)}

where

r ( h ) = i = 1 s max { 1 , | h i | } for h = ( h 1 , , h s ) Z s . {\displaystyle r(h)=\prod _{i=1}^{s}\max\{1,|h_{i}|\}\quad {\mbox{for}}\quad h=(h_{1},\ldots ,h_{s})\in \mathbb {Z} ^{s}.}

The main conjectures

Conjecture 1. There is a constant c s {\displaystyle c_{s}} depending only on the dimension s {\displaystyle s} , such that

D N ( x 1 , , x N ) c s ( ln N ) s 1 N {\displaystyle D_{N}^{*}(x_{1},\ldots ,x_{N})\geq c_{s}{\frac {(\ln N)^{s-1}}{N}}}

for any finite point set x 1 , , x N {\displaystyle {x_{1},\ldots ,x_{N}}} .

Conjecture 2. There is a constant c s {\displaystyle c'_{s}} depending only on : s {\displaystyle s} , such that: D N ( x 1 , , x N ) c s ( ln N ) s N {\displaystyle D_{N}^{*}(x_{1},\ldots ,x_{N})\geq c'_{s}{\frac {(\ln N)^{s}}{N}}}

for infinite number of N {\displaystyle N} for any infinite sequence x 1 , x 2 , x 3 , {\displaystyle x_{1},x_{2},x_{3},\ldots } .

These conjectures are equivalent. They have been proved for s 2 {\displaystyle s\leq 2} by W. M. Schmidt. In higher dimensions, the corresponding problem is still open. The best-known lower bounds are due to Michael Lacey and collaborators.

Lower bounds

Let s = 1 {\displaystyle s=1} . Then

D N ( x 1 , , x N ) 1 2 N {\displaystyle D_{N}^{*}(x_{1},\ldots ,x_{N})\geq {\frac {1}{2N}}}

for any finite point set { x 1 , , x N } {\displaystyle \{x_{1},\dots ,x_{N}}\} .

Let s = 2 {\displaystyle s=2} . W. M. Schmidt proved that for any finite point set { x 1 , , x N } {\displaystyle \{x_{1},\dots ,x_{N}}\} ,

D N ( x 1 , , x N ) C log N N {\displaystyle D_{N}^{*}(x_{1},\ldots ,x_{N})\geq C{\frac {\log N}{N}}}

where

C = max a 3 1 16 a 2 a log a = 0.023335 . {\displaystyle C=\max _{a\geq 3}{\frac {1}{16}}{\frac {a-2}{a\log a}}=0.023335\dots .}

For arbitrary dimensions s > 1 {\displaystyle s>1} , K. F. Roth proved that

D N ( x 1 , , x N ) 1 2 4 s 1 ( ( s 1 ) log 2 ) s 1 2 log s 1 2 N N {\displaystyle D_{N}^{*}(x_{1},\ldots ,x_{N})\geq {\frac {1}{2^{4s}}}{\frac {1}{((s-1)\log 2)^{\frac {s-1}{2}}}}{\frac {\log ^{\frac {s-1}{2}}N}{N}}}

for any finite point set { x 1 , , x N } {\displaystyle \{x_{1},\dots ,x_{N}}\} . Jozef Beck established a double log improvement of this result in three dimensions. This was improved by D. Bilyk and M. T. Lacey to a power of a single logarithm. The best known bound for s > 2 is due D. Bilyk and M. T. Lacey and A. Vagharshakyan. For { x 1 , , x N } {\displaystyle \{x_{1},\dots ,x_{N}}\} there is a t = 0 {\displaystyle t=0} so that

D N ( x 1 , , x N ) t log s 1 2 + t N N {\displaystyle D_{N}^{*}(x_{1},\ldots ,x_{N})\geq t{\frac {\log ^{{\frac {s-1}{2}}+t}N}{N}}}

for any finite point set { x 1 , , x N } {\displaystyle \{x_{1},\dots ,x_{N}}\} .

Construction of low-discrepancy sequences

Because any distribution of random numbers can be mapped onto a uniform distribution, and quasirandom numbers are mapped in the same way, this article only concerns generation of quasirandom numbers on a multidimensional uniform distribution.

There are constructions of sequences known such that

D N ( x 1 , , x N ) C ( ln N ) s N . {\displaystyle D_{N}^{*}(x_{1},\ldots ,x_{N})\leq C{\frac {(\ln N)^{s}}{N}}.}

where C {\displaystyle C} is a certain constant, depending on the sequence. After Conjecture 2, these sequences are believed to have the best possible order of convergence. Examples below are the van der Corput sequence, the Halton sequences, and the Sobol’ sequences. One general limitation is that construction methods can usually only guarantee the order of convergence. Practically, low discrepancy can be only achieved if N {\displaystyle N} is large enough, and for large given s this minimum N {\displaystyle N} can be very large. This means running a Monte-Carlo analysis with e.g. s = 20 {\displaystyle s=20} variables and N = 1000 {\displaystyle N=1000} points from a low-discrepancy sequence generator may offer only a very minor accuracy improvement .

Random numbers

Sequences of quasirandom numbers can be generated from random numbers by imposing a negative correlation on those random numbers. One way to do this is to start with a set of random numbers r i {\displaystyle r_{i}} on [ 0 , 0.5 ) {\displaystyle [0,0.5)} and construct quasirandom numbers s i {\displaystyle s_{i}} which are uniform on [ 0 , 1 ) {\displaystyle [0,1)} using:

s i = r i {\displaystyle s_{i}=r_{i}} for i {\displaystyle i} odd and s i = 0.5 + r i {\displaystyle s_{i}=0.5+r_{i}} for i {\displaystyle i} even.

A second way to do it with the starting random numbers is to construct a random walk with offset 0.5 as in:

s i = s i 1 + 0.5 + r i ( mod 1 ) . {\displaystyle s_{i}=s_{i-1}+0.5+r_{i}{\pmod {1}}.\,}

That is, take the previous quasirandom number, add 0.5 and the random number, and take the result modulo 1.

For more than one dimension, Latin squares of the appropriate dimension can be used to provide offsets to ensure that the whole domain is covered evenly.

Coverage of the unit square. Left for additive quasirandom numbers with c = 0.5545497..., 0.308517... Right for random numbers. From top to bottom. 10, 100, 1000, 10000 points.

Additive recurrence

For any irrational α {\displaystyle \alpha } , the sequence

s n = { s 0 + n α } {\displaystyle s_{n}=\{s_{0}+n\alpha \}}

has discrepancy tending to 1 / N {\displaystyle 1/N} . Note that the sequence can be defined recursively by

s n + 1 = ( s n + α ) mod 1 . {\displaystyle s_{n+1}=(s_{n}+\alpha ){\bmod {1}}\;.}

A good value of α {\displaystyle \alpha } gives lower discrepancy than a sequence of independent uniform random numbers.

The discrepancy can be bounded by the approximation exponent of α {\displaystyle \alpha } . If the approximation exponent is μ {\displaystyle \mu } , then for any ε > 0 {\displaystyle \varepsilon >0} , the following bound holds:

D N ( ( s n ) ) = O ε ( N 1 / ( μ 1 ) + ε ) . {\displaystyle D_{N}((s_{n}))=O_{\varepsilon }(N^{-1/(\mu -1)+\varepsilon }).}

By the Thue–Siegel–Roth theorem, the approximation exponent of any irrational algebraic number is 2, giving a bound of N 1 + ε {\displaystyle N^{-1+\varepsilon }} above.

The recurrence relation above is similar to the recurrence relation used by a linear congruential generator, a poor-quality pseudorandom number generator:

r i = ( a r i 1 + c ) mod m {\displaystyle r_{i}=(ar_{i-1}+c){\bmod {m}}}

For the low discrepancy additive recurrence above, a and m are chosen to be 1. Note, however, that this will not generate independent random numbers, so should not be used for purposes requiring independence.

The value of c {\displaystyle c} with lowest discrepancy is the fractional part of the golden ratio:

c = 5 1 2 = φ 1 0.618034. {\displaystyle c={\frac {{\sqrt {5}}-1}{2}}=\varphi -1\approx 0.618034.}

Another value that is nearly as good is the fractional part of the silver ratio, which is the fractional part of the square root of 2:

c = 2 1 0.414214. {\displaystyle c={\sqrt {2}}-1\approx 0.414214.\,}

In more than one dimension, separate quasirandom numbers are needed for each dimension. A convenient set of values that are used, is the square roots of primes from two up, all taken modulo 1:

c = 2 , 3 , 5 , 7 , 11 , {\displaystyle c={\sqrt {2}},{\sqrt {3}},{\sqrt {5}},{\sqrt {7}},{\sqrt {11}},\ldots \,}

However, a set of values based on the generalised golden ratio has been shown to produce more evenly distributed points.

The list of pseudorandom number generators lists methods for generating independent pseudorandom numbers. Note: In few dimensions, recursive recurrence leads to uniform sets of good quality, but for larger s {\displaystyle s} (like s > 8 {\displaystyle s>8} ) other point set generators can offer much lower discrepancies.

van der Corput sequence

Main article: van der Corput sequence

Let

n = k = 0 L 1 d k ( n ) b k {\displaystyle n=\sum _{k=0}^{L-1}d_{k}(n)b^{k}}

be the b {\displaystyle b} -ary representation of the positive integer n 1 {\displaystyle n\geq 1} , i.e. 0 d k ( n ) < b {\displaystyle 0\leq d_{k}(n)<b} . Set

g b ( n ) = k = 0 L 1 d k ( n ) b k 1 . {\displaystyle g_{b}(n)=\sum _{k=0}^{L-1}d_{k}(n)b^{-k-1}.}

Then there is a constant C {\displaystyle C} depending only on b {\displaystyle b} such that ( g b ( n ) ) n 1 {\displaystyle (g_{b}(n))_{n\geq 1}} satisfies

D N ( g b ( 1 ) , , g b ( N ) ) C log N N , {\displaystyle D_{N}^{*}(g_{b}(1),\dots ,g_{b}(N))\leq C{\frac {\log N}{N}},}

where D N {\displaystyle D_{N}^{*}} is the star discrepancy.

Halton sequence

First 256 points of the (2,3) Halton sequence
Main article: Halton sequence

The Halton sequence is a natural generalization of the van der Corput sequence to higher dimensions. Let s be an arbitrary dimension and b1, ..., bs be arbitrary coprime integers greater than 1. Define

x ( n ) = ( g b 1 ( n ) , , g b s ( n ) ) . {\displaystyle x(n)=(g_{b_{1}}(n),\dots ,g_{b_{s}}(n)).}

Then there is a constant C depending only on b1, ..., bs, such that sequence {x(n)}n≥1 is a s-dimensional sequence with

D N ( x ( 1 ) , , x ( N ) ) C ( log N ) s N . {\displaystyle D_{N}^{*}(x(1),\dots ,x(N))\leq C'{\frac {(\log N)^{s}}{N}}.}

Hammersley set

2D Hammersley set of size 256

Let b 1 , , b s 1 {\displaystyle b_{1},\ldots ,b_{s-1}} be coprime positive integers greater than 1. For given s {\displaystyle s} and N {\displaystyle N} , the s {\displaystyle s} -dimensional Hammersley set of size N {\displaystyle N} is defined by

x ( n ) = ( g b 1 ( n ) , , g b s 1 ( n ) , n N ) {\displaystyle x(n)=\left(g_{b_{1}}(n),\dots ,g_{b_{s-1}}(n),{\frac {n}{N}}\right)}

for n = 1 , , N {\displaystyle n=1,\ldots ,N} . Then

D N ( x ( 1 ) , , x ( N ) ) C ( log N ) s 1 N {\displaystyle D_{N}^{*}(x(1),\dots ,x(N))\leq C{\frac {(\log N)^{s-1}}{N}}}

where C {\displaystyle C} is a constant depending only on b 1 , , b s 1 {\displaystyle b_{1},\ldots ,b_{s-1}} .

Note: The formulas show that the Hammersley set is actually the Halton sequence, but we get one more dimension for free by adding a linear sweep. This is only possible if N {\displaystyle N} is known upfront. A linear set is also the set with lowest possible one-dimensional discrepancy in general. Unfortunately, for higher dimensions, no such "discrepancy record sets" are known. For s = 2 {\displaystyle s=2} , most low-discrepancy point set generators deliver at least near-optimum discrepancies.

Sobol sequence

Main article: Sobol sequence

The Antonov–Saleev variant of the Sobol’ sequence generates numbers between zero and one directly as binary fractions of length w , {\displaystyle w,} from a set of w {\displaystyle w} special binary fractions, V i , i = 1 , 2 , , w {\displaystyle V_{i},i=1,2,\dots ,w} called direction numbers. The bits of the Gray code of i {\displaystyle i} , G ( i ) {\displaystyle G(i)} , are used to select direction numbers. To get the Sobol’ sequence value s i {\displaystyle s_{i}} take the exclusive or of the binary value of the Gray code of i {\displaystyle i} with the appropriate direction number. The number of dimensions required affects the choice of V i {\displaystyle V_{i}} .

Poisson disk sampling

Main article: Supersampling § Poisson disk

Poisson disk sampling is popular in video games to rapidly place objects in a way that appears random-looking but guarantees that every two points are separated by at least the specified minimum distance. This does not guarantee low discrepancy (as e. g. Sobol’), but at least a significantly lower discrepancy than pure random sampling. The goal of these sampling patterns is based on frequency analysis rather than discrepancy, a type of so-called "blue noise" patterns.

Graphical examples

The points plotted below are the first 100, 1000, and 10000 elements in a sequence of the Sobol' type. For comparison, 10000 elements of a sequence of pseudorandom points are also shown. The low-discrepancy sequence was generated by TOMS algorithm 659. An implementation of the algorithm in Fortran is available from Netlib.

Low discrepancy 100.png Low discrepancy 1000.png
The first 100 points in a low-discrepancy sequence of the Sobol' type. The first 1000 points in the same sequence. These 1000 comprise the first 100, with 900 more points.
Low discrepancy 10000.png Random 10000.png
The first 10000 points in the same sequence. These 10000 comprise the first 1000, with 9000 more points. For comparison, here are the first 10000 points in a sequence of uniformly distributed pseudorandom numbers. Regions of higher and lower density are evident.


See also

Notes

  1. Beck, József (1989). "A two-dimensional van Aardenne-Ehrenfest theorem in irregularities of distribution". Compositio Mathematica. 72 (3): 269–339. MR 1032337. S2CID 125940424. Zbl 0691.10041.
  2. Bilyk, Dmitriy; Lacey, Michael T.; Vagharshakyan, Armen (2008). "On the Small Ball Inequality in all dimensions". Journal of Functional Analysis. 254 (9): 2470–2502. arXiv:0705.4619. doi:10.1016/j.jfa.2007.09.010. S2CID 14234006.
  3. Kuipers & Niederreiter 2005, p. 123
  4. Knuth, Donald E. "Chapter 3 – Random Numbers". The Art of Computer Programming. Vol. 2.
  5. Skarupke, Malte (16 June 2018). "Fibonacci Hashing: The Optimization that the World Forgot". One property of the Golden Ratio is that you can use it to subdivide any range roughly evenly ... if you don't know ahead of time how many steps you're going to take
  6. Roberts, Martin (2018). "The Unreasonable Effectiveness of Quasirandom Sequences".
  7. Hammersley, J. M.; Handscomb, D. C. (1964). Monte Carlo Methods. doi:10.1007/978-94-009-5819-7. ISBN 978-94-009-5821-0.
  8. Herman Tulleken. Tulleken, Herman (March 2008). "Poisson Disk Sampling". Dev.Mag. No. 21. pp. 21–25.
  9. Bratley, Paul; Fox, Bennett L. (1988). "Algorithm 659". ACM Transactions on Mathematical Software. 14: 88–100. doi:10.1145/42288.214372. S2CID 17325779.

References

  • Dick, Josef; Pillichshammer, Friedrich (2010). Digital Nets and Sequences: Discrepancy Theory and Quasi-Monte Carlo Integration. Cambridge University Press. ISBN 978-0-521-19159-3.
  • Kuipers, L.; Niederreiter, H. (2005), Uniform distribution of sequences, Dover Publications, ISBN 0-486-45019-8
  • Harald Niederreiter (1992). Random Number Generation and Quasi-Monte Carlo Methods. Society for Industrial and Applied Mathematics. ISBN 0-89871-295-5.
  • Drmota, Michael; Tichy, Robert F. (1997). Sequences, Discrepancies and Applications. Lecture Notes in Math. Vol. 1651. Springer. ISBN 3-540-62606-9.
  • Press, William H.; Flannery, Brian P.; Teukolsky, Saul A.; Vetterling, William T. (1992). Numerical Recipes in C (2nd ed.). Cambridge University Press. see Section 7.7 for a less technical discussion of low-discrepancy sequences. ISBN 0-521-43108-5.

External links

Categories: