Envoyer par SMS: The art and theory of dynamic programming