# Is there a way to determine the cheapest way to cut a line if each cut costs the current length of a line?

I was reading through an example question for the UNSW Computing ProgComp and found a question they claimed to be impossible to solve without going through all possible solutions.

You have a length of timber that needs to be cut into several pieces. The points where the cuts have to be made are marked on the timber, measured from one end. The only precision cutting company available at short notice charges, for each cut, a rate in dollars equal to the length of the piece (being cut) in metres before cutting.