  In the simplest case, we obtain a general solution to a problem of minimizing
an integral of a nondecreasing right continuous stochastic process from zero to
some nonnegative random variable tau, under the constraints that for some
nonnegative random variable T, tau is between zero and T a.s. and the expected
value of tau is some alpha. The nondecreasing process and T are allowed to be
dependent. In fact a more general setup involving sigma-finite measures, rather
than just probability measures is considered and some consequences for families
of stochastic processes are given as special cases. Various applications are
provided.
