Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

COMP157 Fall07 Assignment 7: Dynamic Programming Exercises, Assignments of Algorithms and Programming

Information about assignment 7 for the comp157 fall07 course. The assignment includes several dynamic programming exercises, such as finding the transitive closure of a directed graph and solving the knapsack problem. The necessary data for these exercises, including the directed graph and the items' values and weights for the knapsack problem.

Typology: Assignments

Pre 2010

Uploaded on 08/18/2009

koofers-user-cd7
koofers-user-cd7 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
COMP157Fall07Assignment7
HomeworkAssignment7:dueMonday,November12.
(1) Exercise7.1.6,page254
(2) Exercise7.3.4,page271
(3) Exercises8.4.9,page304
(4) Usedynamicprogrammingtofindthetransitiveclosureofthefollowingdirectedgraph.
Showallintermediatematricesinyouranswer.
(5) Usedynamicprogrammingtofindthemaximumpossiblevalueofthefollowingknapsack
problem.Solvetheproblemtwice:onceorderingtheitemstoptobottom,andthenordering
theitemsbottomtotop.Thiswillverifythattheitemorderdoesnotaffecttheresult.
capacity=20
valueweight
109
308
235
153
184
406
207
12
35
4 6

Partial preview of the text

Download COMP157 Fall07 Assignment 7: Dynamic Programming Exercises and more Assignments Algorithms and Programming in PDF only on Docsity!

COMP157 Homework Assignment Fall07 7 : due Monday, NovemberAssignment 12. 7

(1) (2) (3) ExerciseExerciseExercises 7.1.6,7.3.4, 8.4.9, pagepage page (^254271 ) (4) Use Show dynamic all intermediate programming matrices to find in yourthe transitive answer. closure of the following directed graph.

(5) Use problem. the itemsdynamic Solvebottom programming the to problem top. This to twice: willfind verify the once maximum thatordering the itempossible the itemsorder value topdoes (^) toof not thebottom, affect following and the then (^) result.knapsack ordering capacity value 10 = (^20) weight 9 (^302315 ) (^184020 )