This is a homework exercise for a class on winter trip planning.