Exact Solutions to Time-Dependent MDPs