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

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

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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 11/26/2009 for the course CIS 502 taught by Professor Naver during the Spring '09 term at National Tsing Hua University, China.

### 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
Ask a homework question - tutors are online