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
icon
Related questions
Question
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.
Transcribed Image Text: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.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781305082168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning