Question

# Bob has to plan his working life for the next T years. There are m jobs that Bob can do, and every year Bob must

do exactly one job. Each job pays different amounts depending on the year. (For example, being a mail carrier will pay less and less with time, while being a computer scientist will pay more and more with time.)

Specifically, during a year t a job j pays W ( j, t). Bob is currently doing job 1 and can switch job at most S times.

Give an algorithm to compute the maximum possible earning of Bob for the next T years. The running time of the algorithms should be polynomial in T,m , and S.

Engineering Technology