.. _ProcSobolSequence: Procedure: Generating a Sobol's Sequence ======================================== Description and Background -------------------------- The numbers in a Sobol's sequence are generated directly as binary fractions of length :math:`w` bits. These numbers are created from a special set of :math:`w` binary fractions :math:`V_i` called direction numbers. In Sobol's original method, the j-th number :math:`X_j` is generated by the operation XOR among those direction numbers :math:`V_i` such that the i-th bit of :math:`j` is not zero, see comments below. See :ref:`DiscSobol` for additional discussion. Detailed description of the procedure ------------------------------------- The :math:`i`-th number in Sobol's sequence is .. math:: x_i=\bigoplus_{j=1}^\infty b_j(i)v_j, where :math:`b_j(i)` is the :math:`j`-th digit of the binary expansion of :math:`i`; :math:`v_j` is the :math:`j`-th direction number and :math:`\oplus` is the binary (bitwise) XOR operation. The number :math:`b_j(i)` is a bit and thus it only takes values :math:`0` or :math:`1`, i.e. for an integer :math:`i` we have its binary expansion .. math:: i=\sum_{j=1}^\infty b_j(i)2^{j-1}. As for any finite number :math:`i`, its binary expansion has a finite number of non-zero digits, the Sobol's number is computed with a XOR sum of a finite number of direction numbers and thus no convergence properties are needed in the above equations. An important element in Sobol's sequence are the direction numbers. The direction numbers are binary (dyadic) fractions :math:`v_j\in(0,1)` and the resulting Sobol's number is also a binary fraction :math:`x_i\in(0,1)`. The direction numbers are represented as .. math:: v_j=\frac{m_j}{2^j} where :math:`m_j` takes integer values, :math:`1