-
Exercises 15.1-1
Show thatfollows from
and the initial condition
.
- 第十二組
-
Exercises 15.1-2
Show, by means of a counterexample, that the following "greedy" strategy does not always determine an optimal way to cut rods. Define the density of a rod of length i to be pi / i, that is, its value per inch. The greedy strategy for a rod of length n cuts off a first piece of length i, where 1 ≤ i ≤ n, having maximum density. It then continues by applying the greedy strategy to the remaining piece of length n - i.- 第一組
-
Exercises 15.1-3
Consider a modification of the rod-cutting problem in which, in addition to a price pi for each rod, each cut incurs a fixed cost of c. The revenue associated with a solution is now the sum of the prices of the pieces minus the costs of making the cuts. Give a dynamic-programming algorithm to solve this modified problem.- 第十五組
-
Exercises 15.1-4, unit05-演算法.pdf p12
ModifyM_Cut-Rodto return not only the value but the actual solution, too.- 第七組
-
Exercises 15.2-1
Find an optimal parenthesization of a matrix-chain product whose sequence of dimensions is《5, 10, 3, 12, 5, 50, 6》.- 第四組
-
Notifications
You must be signed in to change notification settings - Fork 0
NCU-CSIE-Algorithmics-A-1061/Homework-4
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published