Borel
1
The Borel
driver produces sequences which favor smaller sample-to-sample transitions over larger
ones. It imposes a condition of equal probability (like a coin flip) for upward versus downward motion. A second step generates a sample uniformly
in the selected region (upward or downward).
When describing the mechanism selecting consecutive section densities in his Stochastic Music Program,
Iannis Xenakis expressed "a certain concern for
continuity",2.
He also presented a formula which amounts a straight line running from a maximum for the narrowest transitions
down to zero for the widest transitions. Now my page covering the
Lehmer
driver demonstrates
that the straight-line distribution of sample-to-sample transitions in fact characterizes the standard random-number
generator. However John Myhill asserted in 19793
that the mechanism actually used in Xenakis's program was the process just described, which Myhill attributed to
Émile Borel.
This page shows below that this process does indeed exhibit a certain concern for continuity.
The Borel process is one of several approaches to generating sequences which
exert control over distances between consecutive samples. Others include
Moderate
, which John Myhill suggested
as an alternative to Borel, and
Brownian
, where control becomes
parameterized.
Figure 1 illustrates Borel
output with a sequence of
200 samples generated with a random seed of 1.
Borel.next()
. The left
graph displays samples in time-series while the right graph presents a histogram analyzed from the same samples.
The vertical x axes for both graphs represent the driver domain from zero to unity; the horizontal k axis of the time-series graph (left) plots ordinal sequence numbers; the horizontal f(x) axis of the histogram (right) plots the relative concentration of samples at each point in the driver domain.
Figure 2 takes the sequence shown in Figure 1 and breaks out what happens in bit 1 (zero or one-half), bit 2 (zero or one-quarter), bit 3 (zero or one-eighth), bit 4 (zero or one-sixteenth), and the residual bits (continuous between zero and one-sixteenth).
Borel.next()
.
The bit-specific graphs in Figure 2 transition back and forth between a set state (bit value 1) and a clear state (bit value 0).
Table 1 statistically analyses
of sample the actual stats for these bit-specific graphs. By comparison with the equivalent table for the
Lehmer
driver, probability has shifted
away from single samples between transitions toward multiple samples between transitions.
Transitions | 1 Sample | 2 Samples | 3 Samples | 4 Samples | 5 or more | |
---|---|---|---|---|---|---|
Actual Bit 1 | 58 | 32% | 18% | 13% | 5% | 29% |
Actual Bit 2 | 68 | 36% | 25% | 13% | 8% | 16% |
Actual Bit 3 | 79 | 43% | 18% | 13% | 7% | 16% |
Actual Bit 4 | 88 | 42% | 31% | 9% | 6% | 16% |
Borel.next()
after 10,000 consecutive samples.
Figure 3 plots the range of sample-to-sample differences along the vertical Δx
axis against the relative concentrations of these values along the horizontal f(Δx) axis.
Difference amounts concentrate much more narrowly around zero than they did for the Lehmer
driver. However, the concentrations remain decidedly positive as Δx approaches -1 from above and as Δx
approaches 1 from below. Compare these concentrations to the the Moderate
driver, which hugs very closely to zero at these extremes. The standard deviation of Δx around zero is 0.353, which is well short of the
0.410 deviation found for the Lehmer
driver and which thus gives an indication of proximity dependence.
Figure 4 presents a trend graph of histogram tallies for 4-nibble patterns generated using
Borel.next()
. My first attempt to produce this graph following
the methods used for the Lehmer
driver flatlined with negligible tallies
at all points. To obtain a nontrivial result it was necessary to limit the graph the 200 largest tallies. The most frequent pattern was 0 0 0 0,
representing 2% of instances. Almost as frequent was the pattern 15 15 15 15, which also had a 2% presence. Following with some 0.5%
presence were the patterns 1 0 0 0 and 14 15 15 15. These details are consistent with the histogram on the right
side of Figure 2, which has samples concentrating at the bottom and top of the driver range.
The glaring conclusion from Figure 4 is that the Borel
driver
fails the 4-nibble independence test, and does so dramatically.
Borel
implementation class.
The type hierarchy for Borel
is:
DriverBase
extends WriteableEntity
implements Driver
Borel
extends DriverBase
Listing 1 provides the source code for the Borel
class. The sequential process described at the top of this page is implemented by
generate()
, which is not public facing. Instead,
generate()
is
called by DriverBase.next()
.
DriverBase
.next() also
takes care to store the new sample in the field
DriverBase
.value, where
generate()
can employ
DriverBase.getValue()
to pick this
(now previous) sample up for the next sample iteration.
DriverBase
also offers
setValue()
and randomizeValue()
methods to establish the initial sequence value.
BOREL
and MODERATE
algorithms were reversed.
© Charles Ames | Page created: 2022-08-29 | Last updated: 2022-08-30 |