  In this paper we develop the theory of {\it polymorphisms} of measure spaces,
which is a generalization of the theory of measure-preserving transformations;
we describe the main notions and discuss relations to the theory of Markov
processes, operator theory, ergodic theory, etc. Using these tools, we solve
the problem, which appeared in dynamics in the 70s: what kind of equivalence
can exist between deterministic and random dynamical systems; our refining of
this question is as follows: is it possible to have the quasi-similarity of a
measure-preserving automorphism and a polymorphism. We prove that it is
possible and the automorphism must be a $K$-automorphism and the polymorphism
must be a special random perturbation of the automorphism; more exactly, the
polymorphism is a random walk over stable leaves of the $K$-automorphism. The
main part of our analysis concerns quasi-deterministic Markov processes and
their tail (residual) $\sigma$-fields; such processes correspond to the most
interesting class of polymorphisms: prime nonmixing polymorphisms.
