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).
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).
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps