2016-03-14, 23:20
  #1
Medlem
Erik just got a summer job at a factory cutting rods.

He gets a table listing prices he gets for different lengths of rods, listing rods of length
pi to pn, n being the length of the whole rod.
He gets nothing for a rod of length 0.

Erik can only cut the rod k times.

Your job is to maximize the the amount of money Erik gets for the rod.


Use dynamic programming, show the differential (or difference) equation that you use
and make an algorithm that finds the best solution, that is: finds the best way to cut
the rod for maximum profit.

Skapa ett konto eller logga in för att kommentera

Du måste vara medlem för att kunna kommentera

Skapa ett konto

Det är enkelt att registrera ett nytt konto

Bli medlem

Logga in

Har du redan ett konto? Logga in här

Logga in