The purpose of the chapter is to introduce basic concepts of random sequence generation that can be used in the simulation modeling of random flows. In the first part, features of random number generators (RNGs) are presented, distinguishing the two directions of realization – true RNGs and pseudo-RNGs. The first type are nondeterministic systems with hardware realization. The second type is realized based on deterministic algorithms with initial values for some parameters. A brief overview of these types was made. The second part of the chapter is devoted to Pseudo-RNGs, which are mainly used in simulation modeling. Their implementation is based on a selected probability distribution law – discrete or continuous. An example for program implementation of for the purposes of random flow modeling is presented and parameters of the most frequently used distributions are summarized. At the end, the three types of distributions for the simulation are discussed in more detail - uniform, normal, and distribution of Poisson.
Top1. Basic Concept Of Random Number Generators
Random number generator (RNG) is a tool for generating a sequence of random numbers that can be implemented in a suitable programming environment for processes automatization. RNGs have many uses in different fields in the contemporary digital world, including cryptography, games, scientific research, etc. Specifically in cryptography, they are applied to generate secure keys and codes to protect confidential information in the encryption and decryption processes of messages and data (Crocetti et al., 2023). Due to the applicability of RNGs in various fields of scientific research, their quality in forming reliable and unpredictable sequences is important to ensure the reliability of the entire system. Various methods are applied to evaluate RNG quality, such as statistical tests, hardware evaluations, etc.
RNG is a generalizing concept, but in principle two main types can be defined – Pseudo-Random Number Generator (PRNG) and True Random Number Generator (TRNG) (Johnston, 2018). Generators of the first type are deterministic algorithms for randomly generating random numbers under given initial conditions, which explains the addition of “Pseudo” in the name. The second type of TRNG are nondeterministic systems, but they are not well defined. The implementation also requires the presence of a hardware component because it is known that each computer algorithm is implemented as a sequence of discrete steps (a sequence of instructions), which does not meet the requirement of non-determinism.