We give an algorithm to construct a translation-invariant transport kernel
between ergodic stationary random measures $\Phi$ and $\Psi$ on $\mathbb R^d$,
given that they have equal intensities. As a result, this yields a construction
of a shift-coupling of an ergodic stationary random measure and its Palm
version. This algorithm constructs the transport kernel in a deterministic
manner given realizations $\varphi$ and $\psi$ of the measures. The
(non-constructive) existence of such a transport kernel was proved in [8]. Our
algorithm is a generalization of the work of [3], in which a construction is
provided for the Lebesgue measure and an ergodic simple point process. In the
general case, we limit ourselves to what we call constrained densities and
transport kernels. We give a definition of stability of constrained densities
and introduce our construction algorithm inspired by the Gale-Shapley stable
marriage algorithm. For stable constrained densities, we study existence,
uniqueness, monotonicity w.r.t. the measures and boundedness.Comment: In the second version, we change the way of presentation of the main
results in Section 4. The main results and their proofs are not changed
significantly. We add Section 3 and Subsection 4.6. 25 pages and 2 figure