Question: please step by step solutions, no written explanation needed X = 1 Y = 3 Z= 9 a = 4 b = 5 c =

please step by step solutions, no written explanation needed please step by step solutions, no written explanation needed X = 1

X = 1 Y = 3 Z= 9 a = 4 b = 5 c = 12 Q.1. (30 pnts.) Suppose you have a rod of length, and you want to cut up the rod and sell the pieces in a way that maximizes the total amount of money you get. A piece of length i is worth pi dollars. Let Length i and Price pe be as follows: Length i 1 2 3 4 5 6 7 8 9 10 Pricep Tab 9 17 17 20 24 30 a) Cut a rod with length 5 by using the dynamic programming method (Complete the following table) and write the maximum total amount of money you will gain. Length i 0 1 2 3 4 5 rul sul Maximum Total Money: b) Show how to cut the given rod with length 5 using arrays? Q.2. (50 pnts.) Given the following Knapsack information: Item 1 Item 2 Item 3 Item 4 Item 5 Knapsack Capacity 2 kg 2 kg 2 kg 1 kg 2 kg 6 kg S(100+a) S(150+b) $(30+) $100 S160 a) Use dynamic programming method and solve 0-1 Knapsack problem given above. b) Use greedy programming method and solve Fractional Knapsack problem given above. Q.3. (20 pnts.) Consider the activities as, a, a, a, as, as with starting times as (1, 2, 6, 5, 7, 2) and finishing times as {(2+), 4,7,6,8, (3+b)) consecutively. Use a greedy approach to select a maximum of non-overlapping activities for one single resource. Selected activities

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!