SMS versenden: Dynamic programming and optimal control