IMPROVEMENT OF A PSEUDORANDOM NUMBER GENERATOR BASED ON A LINEAR FEEDBACK SHIFT REGISTER AND INVESTIGATION OF ITS CHARACTERISTICS

Authors

DOI:

https://doi.org/10.35546/kntu2078-4481.2025.3.2.52

Keywords:

pseudo random number generator, linear feedback shift register, statistical analysis

Abstract

This article examines the use of pseudo random number generators in Monte Carlo methods and in computer simulations, in 2D and 3D rendering. Their characteristics are analyzed, with particular attention given to one of the most important properties of such generators – the quality of distribution uniformity, i.e., how evenly the generated points or directions are distributed in space. It is noted that a high-quality random number generator in 3D modeling and rendering is essential for achieving accurate results, fast convergence, and visually clean images. A review of recent publications on improving the properties of pseudo random number generators is presented. The analysis shows that many existing solutions involve combining classical fast generators or adding extra operations to ensure uniform coverage of 2D and 3D spaces and to reduce Monte Carlo integration error. Among algorithmic generators, Xorshift was selected for further modification due to its speed and ease of integration into an information system. A solution is proposed that builds upon the Xorshift pseudo random number generation algorithm by incorporating bit reversal, which improved the statistical properties of the generated sequence. Statistical tests were performed on the proposed generator, and its results were compared with those of the baseline Xorshift generator. The statistical analysis showed no significant deviations from an ideal uniform distribution. It was demonstrated that bit reversal can substantially improve 2D projections and reduce both excessive clustering of points and gaps. Improved uniformity in light-plane sampling and faster convergence of the Monte Carlo integral were observed for the bit-reversed generator, highlighting its potential for light and shadow rendering tasks. It is concluded that bit reversal is a simple yet effective technique for improving the quality of pseudo random sequences. This has practical importance for Monte Carlo methods, computer simulation, and 3D visualization, where uniformity of sampling in multidimensional space is especially critical.

References

Pharr M., Jakob W., Humphreys G. Physically Based Rendering: From Theory to Implementation. 3rd ed. San Francisco: Morgan Kaufmann, 2016. 1266 с.

Xorshift RNGs. ReseachGate. URL: https://www.researchgate.net/publication/5142825_Xorshift_RNGs (дата звернення: 12.09.2025).

Pseudo Random Number Generation Using Linear Feedback Shift Registers. Analog devices. URL: https://www.analog.com/en/resources/design-notes/random-number-generation-using-lfsr.html?utm_source=chatgpt.com (дата звернення: 12.09.2025).

Аvarez R. Improving the Statistical Qualities of Pseudo Random Number Generators // Symmetry. 2022. Т. 14, № 2. С. 269. DOI: 10.3390/sym14020269

Condo C., Gross W.J. Pseudo-random Gaussian distribution through optimised LFSR permutations. 2012 IEEE Workshop on Signal Processing Systems. IEEE, 2012. С. 69–74. DOI: 10.1109/SiPS.2012.57

Knuth D.E. The Art of Computer Programming. Vol. 2: Seminumerical Algorithms. – Addison-Wesley, 1997.

Askar A., Shukirgaliyev B., Lukac N., Abdikamalov E. Evaluation of Pseudo-Random Number Generation on GPU Cards // Computers. 2021. Vol. 10, No. 12. P. 142. DOI: 10.3390/computers10120142

Published

2025-11-28