


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main points of this exam paper are: Network Critical, Optimizes Revenue, Constraints, Maximum Available, Reduction From, Vertices, Even Number, Np-Complete, Correctness, Justification
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Material 1 has density 2 tons/cubic meter, maximum available amount 40 cubic meters, revenue $1,000 per cubic meter.
Material 2 has density 1 ton/cubic meter, maximum available amount 30 cubic meters, revenue $1,200 per cubic meter.
Material 3 has density 3 tons/cubic meter, maximum available amount 20 cubic meters, revenue $12,000 per cubic meter.
Write a linear program that optimizes revenue while satisfying all the constraints.
Reduction from:
Proof of correctness:
3. (30 points) A subsequence of a given sequence of numbers can be thought of as the new sequence obtained when you cross out some of the numbers. For example, 1,2,5,6,9, a
subsequence of the sequence 3,1,2,17,5,6,9, is obtained by crossing out 3 and 17.
Consider the following problem: Given a sequence of n number x 1 ,... , x n, find the length of the longest increasing subsequence. i.e. a subsequence y 1 ,... , y k with k as large as possible and such that y 1 < y 2 <... < y k.
Give a dynamic programming algorithm for this problem.
Dynamic programming recurrence and initialization:
Justification of correctness:
Running time and justification:
4. (20 points) Call an edge of a flow network critical if decreasing the capacity of this edge results in a decrease in the maximum flow. Give an algorithm that finds a critical edge in a network. Your algorithm should run as fast as maximum flow.
Algorithm:
T F A divide and conquer algorithm that breaks a problem of size n into 2 problems of size n / 2 at the cost of n^2 steps is slower than a divide and conquer algorithm that breaks a problem of size n into 3 problems of size n / 2 at the cost of n steps.
T F Raising the 90 th^ roots of unity to the 5 th^ power yields the 18 th^ roots of unity.
Posted by HKN (Electrical Engineering and Computer Science Honor Society) University of California at Berkeley If y 4