2 Suppose that the undergraduate curriculum of SCIS consists of n courses. To get a bachelor degree, one must take all these n courses. The prerequisite graph G is a directed graph consisting of n vertices one for each course and there is an edge (u, v) = E(G) if and only if course u is a prerequisite for course v. Design an efficient algorithm which, on input prerequisite graph G, outputs the least number of semesters possible to finish all these courses (assume that a student can take any number of courses in one semester).

icon
Related questions
Question
2
Suppose that the undergraduate curriculum of SCIS consists of n courses. To get a
bachelor degree, one must take all these n courses. The prerequisite graph G is directed graph
consisting of n vertices one for each course and there is an edge (u, v) = E(G) if and only if
course u is a prerequisite for course v. Design an efficient algorithm which, on input prerequisite
graph G, outputs the least number of semesters possible to finish all these courses (assume that a
student can take any number of courses in one semester).
Transcribed Image Text:2 Suppose that the undergraduate curriculum of SCIS consists of n courses. To get a bachelor degree, one must take all these n courses. The prerequisite graph G is directed graph consisting of n vertices one for each course and there is an edge (u, v) = E(G) if and only if course u is a prerequisite for course v. Design an efficient algorithm which, on input prerequisite graph G, outputs the least number of semesters possible to finish all these courses (assume that a student can take any number of courses in one semester).
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer