Minimization of logistic costs with given frequencies