  The results of the study provide guidelines for the development and
applications of algorithms. When the number of steps for calculating an
assumption tends to infinity, probability theory can be applied to predict
whether the assumption holds or not. This characteristic is related to the
number of steps for verifying arbitrarily large prime numbers. This study
proved that $\pi (n)-Li(n)=o(M(n)\sqrt{Li(n)})$ almost certainly holds without
any assumptions. Here, $\pi (n)$ is the number of primes not greater than $n$,
$Li(n)$ is a logarithmic integral function, and $M(n)$ is an arbitrary function
such that $M(n)\rightarrow\infty$. This result implies that the Riemann
hypothesis holds as the falseness of the Riemann hypothesis leads to a
contradiction.
