Optimal regulator for linear stochastic systems with discrete and distributed state-delays and random time-horizon | Synapse