1. A graph G = (V, E) is called bipartite if the vertex set can be partitioned into sets
X, Y such that no edge in E has both endpoints in the same set X or Y . Give a linear
time algorithm to check if a graph is bipartite.
2. A graph is 2 vertex connecte

CS356
Aug 2, 2010
TUTORIAL 1
Review DFS. Run DFS on example graph and show back edges, and label each vertex
with the time at which it is visited.
Given an undirected graph, call a vertex critical if its removal disconnects the graph.
Give a linear time

CSL356
Aug 13, 2010
TUTORIAL 3
Suppose you want to go from city A to city B on a long highway. Once you ll your
car tank to full capacity, it can travel D kilometres. There are several locations on the
highway which have petrol pumps. Assume that there i

CSL356
Aug 9, 2010
TUTORIAL 2
Review DFS on directed graphs.
Given an undirected graph, we say it is bipartite if we can partition the vertex set into
two disjoint sets A and B such that all edges go between A and B. Give a linear time
algorithm to chec

CSL356
Due on : November, 2010
Homework V
1. You are given a directed graph with edge capacities, and two vertices s and t. Let A
and B be two dierent st min-cuts. Is A B also a min-cut between s and t ? How
about A B ? Give reasons for your answer. How w

CSL356
Due on : September 3, 2010
Homework II
1. You are given a line with n points, labeled 1 to n, marked on it. You are also given a
set of intervals I1 , . . . , Ik , where interval Ii is of the form [si , ei ], 1 si ei n. Find
a set of points X of sm

CSL356
Due on : September 24, 2010
Homework III
1. (a) Suppose we are given two sorted arrays A[1 . . . n] and B[1 . . . n] and an integer k.
Describe an algorithm to nd the k th smallest element in the union of A and B in
O(log n) time. For example, if k

CSL356
Due on : October 21, 2010
Homework IV
1. You are given a set of intervals, I1 , . . . , Ik , where each interval Ii = [si , ei ] has an
associated prot pi . Give an ecient algorithm for nding a subset of intervals of
maximum total prot satisfying t

CSL356
Due on : August 20, 2010
Homework I
1. We say that a directed graph is nice if for every pair of vertices u and v in the graph,
either u is reachable from v or v is reachable from u. Give a linear time algorithm to
check if a graph is nice.
2. Cons