A strict order relation can be represented by a directed acyclic graph (or DAG), which is a directed graph with no cycles. For example, the following directed graph is a DAG: Figure 2: Example of DAG A topological sort of a DAG is an ordering of the vertices that is consistent with the edges of the graph. That is, if there is an edge (u,v) in the graph, then u should appear before v in the topological sort. For example, 1,2,3 and 1,3,2 are topological sorts of the DAG shown above, but 2,1,3 is not a topological sort because 2 cannot be listed before 1. CS 111 CS 141 CS 151 CS 261 CS 362 CS 211 CS 361 CS 401 CS 251 CS 342 CS 301 Figure 3: UIC CS Courses a Is the following ordering a topological sort of G? Justify your answer. CS 111, CS 141, CS 211, CS 261, CS 362, CS 361, CS 151, CS 251, CS 401, CS 342, CS 301. b Give two different topological sorts of G. c If a student can take an unlimited number of courses per semester, what is the fewest number of semesters required to complete these courses? Justify your answer.
A strict order relation can be represented by a directed acyclic graph (or DAG), which is a directed graph with no cycles. For example, the following directed graph is a DAG: Figure 2: Example of DAG A topological sort of a DAG is an ordering of the vertices that is consistent with the edges of the graph. That is, if there is an edge (u,v) in the graph, then u should appear before v in the topological sort. For example, 1,2,3 and 1,3,2 are topological sorts of the DAG shown above, but 2,1,3 is not a topological sort because 2 cannot be listed before 1. CS 111 CS 141 CS 151 CS 261 CS 362 CS 211 CS 361 CS 401 CS 251 CS 342 CS 301 Figure 3: UIC CS Courses a Is the following ordering a topological sort of G? Justify your answer. CS 111, CS 141, CS 211, CS 261, CS 362, CS 361, CS 151, CS 251, CS 401, CS 342, CS 301. b Give two different topological sorts of G. c If a student can take an unlimited number of courses per semester, what is the fewest number of semesters required to complete these courses? Justify your answer.
Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter18: Deterministic Dynamic Programming
Section18.4: Resource-allocation Problems
Problem 3P
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.
Step by step
Solved in 2 steps with 1 images
Recommended textbooks for you
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
Fundamentals of Information Systems
Computer Science
ISBN:
9781305082168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
Fundamentals of Information Systems
Computer Science
ISBN:
9781305082168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning