Traveling salesman dynamic proramming solver