Optimal Routing for Protection and Restoration in an Optical Network