Design and Analysis of Algorithms — CSE 101
Sample Final Examination
NAME:
Student ID:
Answer all the following questions:
1.
8 points
Formulate the following problem as a directed or undirected graph problem.
Clearly indicate the set of vertices, edges and any weights associated with the vertices
and/or edges.
A job consists of a series of tasks
S
1
, S
2
,
· · ·
, S
n
where the amount of time required by
task
S
i
is
t
i
for
1
≤
i
≤
n
. A list of
m
pairs
(
S
i
, S
j
)
is given such that, if
(
S
i
, S
j
)
is not the
list, task
S
i
must be completed before task
S
j
is begun. Pairs that would imply transitivity
are not on the list. Assume that there is an unlimited number of processors available so
that several tasks can be done at the same time. How much time is needed to complete the
job?
Describe an efficient algorithm to compute the minimum time required to complete the job.
Present a highlevel description of the algorithm followed by pseudocode. Analyze the
time complexity of your algorithm in terms of
n
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.
 Winter '08
 staff
 Algorithms, Graph Theory, maximum flow, lecture halls

Click to edit the document details