Pseudo-random numbers Randomly generating numbers is a crucial subroutine of many algorithms in computer science. Because computers execute deterministic code, it is not possible (without external influence) to generate truly random numbers. Hence, computers actually generate psuedorandom numbers. The linear congruential method is a simple method for generating pseudo-random numbers. Let m be a positive integer and a be an integer 2a.