N
Figure 1.4: Error in SNG simulation and theoretical error versus the SN sequence length
Fig.1.4 illustrates the standard deviation σ of error in SNG simulation converges to that of theoretical error mentioned in (1.6) (standard deviation of Bernoulli distribution). By changing the bit sequence length from 128 to 8192 with a increasing unit 128, when the bit sequence length increases, the σ clearly decreases and reaches minimum value with length 8192, in other words, the accuracy increases. It means that if length continues to be raised, the obtained accuracy keeps reducing. Nevertheless, computation time must be considered.
Besides, Fig.1.5 shows that the error decreases when bit sequence length increases from 128 to 8192: the minimum error gradually rises while the maximum value is reduced, and σ, which is related to the accuracy, decreases.
The accuracy of SC depends not only on the length of the bit streams but also on the dependence or correlation among the bit sequences. Theoretically, two bit sequences are independent if [2]
1 n 1 n 1 n
N S1(i) × N
i =1
. S2(i) =
i=1
. S1(i)S2(i) (1.12)
N
i=1
where S1(i) and S2(i) is the ith bit of bit sequences S1 and S2, respectively. According to (1.12), the product of the probabilities of S1 and S2 is equal to the probability of the bit sequence generated from the product of corresponding elements of two sequences. Generally, with any set of bit streams S1, S2,… from a set of bit streams S1, S2,…,Sn, we said that they are independent if the product of the their probabilities equals to the probability of sequences obtained from the product of corresponding elements of them.
Back to the example of unsigned multiplier, by changing position of bits in stochastic sequence (see Figure 1.6), the output is not as expected. In this case, the constraint (1.12) is not satisfied. To easily
0.05
0.04
0.03
0.02
0.01
0
−0.01
−0.02
−0.03
−0.04
−0.05
0 1000 2000 3000 4000 5000 6000 7000 8000