Mathematical Formulations for the Optimal Design of Resilient Shortest Paths