/

### Function Description

Returns a Halton quasi-random sequence, where p is the base prime of the sequence, n is the number of elements in the sequence returned by the function and istart is the point in the sequence where we start to return elements.

To calculate the j'th element of a Halton sequence element (with istart = 0) we write j as a number in base p (p needs to be prime), e.g. 17 base 3 is 122. We then reverse the sequence and put a decimal point radix p in front of it, so e.g. the 17'th element of the Halton sequence in base 3 is 0.221 base 3, i.e. (2*9 + 2*3 + 1*1)/27. Different (positive) values of istart offset the elements of the sequence that are returned by the function.

Halton sequences are examples of quasi-random, i.e. low discrepancy, sequences that are more evenly spread out in multiple dimensions (if, for Halton sequences, the base primes are different for the different dimensions) than would be the case if elements of the sequences are chosen ‘randomly’, e.g. using merely the MnRand function (or the equivalent MnProbDistRand with DistributionName = “uniform” and ParamValues = {0, 1}). Every time the number of digits in j increases, j’s digits become a factor of p more finely meshed.

This added smoothness means that in some circumstances they offer better convergence properties than basic Monte Carlo simulation techniques but at the cost of it then being less clear what these convergence properties are.

This function does not trap for whether p is prime.

Contents | Prev | Next