Rod-Cutting Problem: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{DISPLAYTITLE:Rod-Cutting Problem (Rod-Cutting Problem)}} == Description == Given a rod of length $n$, and prices $p_i$ for which one can sell a segment of the rod of length $i$ ($1 \leq i \leq n$), find the splitting of the rod for which one can earn the most money once they sell the rod segments produced. == Parameters == <pre>n: length of rod</pre> == Table of Algorithms == {| class="wikitable sortable" style="text-align:center;" width="100%" ! Name !! Year...") |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
== Parameters == | == Parameters == | ||
$n$: length of rod | |||
== Table of Algorithms == | == Table of Algorithms == | ||
Line 22: | Line 22: | ||
|} | |} | ||
== Time Complexity | == Time Complexity Graph == | ||
[[File:Rod-Cutting Problem - Time.png|1000px]] | [[File:Rod-Cutting Problem - Time.png|1000px]] | ||
Latest revision as of 09:11, 28 April 2023
Description
Given a rod of length $n$, and prices $p_i$ for which one can sell a segment of the rod of length $i$ ($1 \leq i \leq n$), find the splitting of the rod for which one can earn the most money once they sell the rod segments produced.
Parameters
$n$: length of rod
Table of Algorithms
Name | Year | Time | Space | Approximation Factor | Model | Reference |
---|---|---|---|---|---|---|
Brute Force | 1940 | $O(n*{2}^n)$ | $O(n)$ | Exact | Deterministic | |
Dynamic Programming | 1953 | $O(n^{2})$ | $O(n)$ | Exact | Deterministic |