mtfall04 - 22C : 231 Design and Analysis of Algorithms...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
22 C : 231 Design and Analysis of Algorithms Midterm Exam The duration of this exam is one hour and Ffteen minutes. This is a closed-book exam. 1. (10 points) (a) We are given a ±ow network G with vertex set V and a nonnegative integer capacity c ( u, v ) for any edge ( u, v ) V × V . We are also speciFed a source s V and a sink t V . State the deFnition of a ±ow in the network G . DeFne the value of the ±ow. (b) Consider the Fgure on the next page. What is the value of the ±ow that is depicted? (c) Argue that ±ow conservation holds at v 3 . (d) Argue that the ±ow depicted is a maximum ±ow. (e) In the Fgure, what is the capacity of the minimum-capacity s - t cut? 2. (10 points) We are given a sequence S = h s 1 , s 2 , . . . , s n i of n distinct positive in- tegers. The sequence is not necessarily sorted. The problem is to develop an al- gorithm for Fnding the longest increasing subsequence of S . ²or example, if S = h 100 , 10 , 60 , 70 , 20 , 30 , 40 , 80 i
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

mtfall04 - 22C : 231 Design and Analysis of Algorithms...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online