The connection between matter located in the physical microcosm and in the Universe is noted. Galaxies are presented in the form of galaxy particles. The expansion and contraction of the Universe is modeled as a process of concentration of galaxy particles. The stable and unstable system of Lotka-Voltaire equations is used as models for the expansion and contraction of the sphere of the Universe. It is shown that the equation modeling the behavior of galaxy particles satisfies the Euler-Lagrange optimization equation. It is shown that an imaginary ball of the Universe passes through a narrow region of the pseudosphere-coil and thereby causes the Big Bang. Some differential geometry models used to simulate the Big Bang are presented. It is said that, in a generalized sense, this monograph completes the work of A.A. Friedman to its logical conclusion.