Skip to content

Explore dynamic programming using the example of cutting a rod of length n

Notifications You must be signed in to change notification settings

mraediaz/CutRod

Repository files navigation

README

Cut-rod

#Synopsis Explore dynamic programming using the example of cutting a rod of length n

This program was created in response to: book: Introduction to Algorithms, Third Edition Author: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein Section 15.1, page 360

as a homework assignment for Dr. Gerry Howser, Design and Analysis of Algorithms, Kalamazoo College.

The purpose of the program is to find a solution to the rod cutting problem using the algorithm PRINT-CUT-ROD-SOLUTION(p, n) and EXTENDED-BOTTOM-UPCOT-ROD(p, n).

ROD CUTTING PROBLEM:

Given a rod of length n inches and a table of prices pi for i D 1;2; : : : ;n, determine the maximum revenue rn obtainable by cutting up the rod and selling the pieces. Note that if the price pn for a rod of length n is large enough, an optimal solution may require no cutting at all.

About

Explore dynamic programming using the example of cutting a rod of length n

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages