Vous êtes sur la page 1sur 2

Columbia University

W4231 : Analysis of Algorithms I Spring'00


Professor Lu a Trevisan

Comprehensive Exam

This is a losed book exam. You annot use book, notebooks, or a al ulator. You an
use one double-sided sheet of notes.
Read the questions arefully, and write your solution learly and on isely. Partial redit
will be given for in omplete solutions.
GOOD LUCK!

Problem 1. Graph Terminology [10 points℄


Consider the dire ted graph G = (V; E ) where V = fa; b; ; dg and E = f(a; b); (a; ); (d; b); (b; ); ( ; d)g.

(a) Is G strongly onne ted?


(b) Is G a y li ?

Problem 2. Design of Algorithms [25 points℄


Given a sorted sequen e a[1℄; : : :; a[n℄ of distin t integers, and given an integer x, the prob-
lem is to nd, if they exist, two indi es i; j su h that a[i℄ + a[j ℄ = x. Give a O(n) time
algorithm. (Partial redit will be given to a O(n log n) time solution,)

Problem 3. Mat hing [20 points℄


Consider the following bipartite graph and the mat hing given by the bold edges. Is it the
largest possible mat hing? If not, give an augmenting path.
a e

b f

c g

d h

1
Problem 4. NP- ompleteness [20 points℄
Des ribe the redu tion from Clique to Independent Set.

Problem 5. Modular arithmeti [25 points℄

(a) For an integer n  3, what is the de nition of Zn and what is the de nition of
(n)?.
(b) List the element of Z10 .
( ) Compute (77).
(d) Do you see an easy way to ompute 1360 (mod 77)? Justify your answer.

Vous aimerez peut-être aussi