There are n towns in a line. You are a traveller starting attown 1 and wanting to reach town n. It takes a week to travel fromany town to the next.In each town, there is a market where you can buy rations. In themarket of town i, you can buy a week’s worth of rations for cidollars. Furthermore, you can buy several weeks’ rations for laterconsumption.Your goal is to calculate the minimum cost to travel from town 1 totown n.
Which town’s rations do you want to consume as you travel fromtown n − 1 totown n? Provide reasoning to support your answer.
There are n towns in a line. You are a traveller starting at town 1 and wanting to reach town n. It takes a week to trav
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am