The.Algorithm.Design.Manual.Springer-Verlag.1998
The.Algorithm.Design.Manual.Springer-Verlag.1998 The.Algorithm.Design.Manual.Springer-Verlag.1998
Job Scheduling Next: Satisfiability Up: Combinatorial Problems Previous: Calendrical Calculations Job Scheduling Input description: A directed acyclic graph G=(V,E), where the vertices represent jobs and the edge (u,v) implies that task u must be completed before task v. Problem description: What schedule of tasks completes the job using the minimum amount of time or processors? Discussion: Devising a proper schedule to satisfy a set of constraints is fundamental to many applications. A critical aspect of any parallel processing system is the algorithm mapping tasks to processors. Poor scheduling can leave most of the expensive machine sitting idle while one bottleneck task is performed. Assigning people to jobs, meetings to rooms, or courses to final exam periods are all different examples of scheduling problems. Scheduling problems differ widely in the nature of the constraints that must be satisfied and the type of schedule desired. For this reason, several other catalog problems have a direct application to various kinds of scheduling: ● To construct a schedule consistent with the precedence constraints, see topological sorting in Section . file:///E|/BOOK/BOOK4/NODE156.HTM (1 of 4) [19/1/2003 1:30:50]
Job Scheduling ● To assign a set of jobs to people who have the appropriate skills for them, see bipartite matching in Section . ● To assign a set of jobs to time slots such that no two jobs that interfere are assigned the same time slot, see vertex and edge coloring in Sections and . ● To construct the most efficient route for a delivery person to visit a given set of locations, see the traveling salesman problem in Section . To construct the most efficient route for a snowplow or mailman to completely traverse a given set of edges, see the Eulerian cycle problem in Section . In this section, we focus on precedence-constrained scheduling problems for directed acyclic graphs. These problems are often called PERT/CPM, for Program Evaluation and Review Technique/Critical Path Method. Suppose you have broken a big job into a large number of smaller tasks. For each task you know how long it should take (or perhaps an upper bound on how long it might take). Further, for each pair of tasks you know whether it is essential that one task be performed before another. The fewer constraints we have to enforce, the better our schedule can be. These constraints must define a directed acyclic graph, acyclic because a cycle in the precedence constraints represents a Catch-22 situation that can never be resolved. We are interested in several problems on these networks: ● Minimum completion time - assuming that we have an unlimited number of workers, what is the fastest we can get this job completed while respecting precedence constraints. If there were no precedence constraints, each task could be worked on by its own worker, and the total time would be that of the longest single task. If there were such strict precedence constraints that each task had to follow the completion of its immediate predecessor, the minimum completion time would be obtained by summing up the times for each task. The minimum completion time for a DAG can be easily computed in O(n+m) time. Initialize the completion time for all the vertices to 0, except the start vertex, which is initialized to the length of the start task. Perform a topological sort to order the vertices such that all precedences will have been considered by the time we evaluate each vertex. For each vertex u, consider all the edges (u,v) leaving u. The completion time of these vertices is the maximum of the current completion time for v plus the completion time of u plus the task time of v. ● Critical path - The longest path from the start vertex to the completion vertex defines the critical path. This can be important to know, for the only way to shorten the minimum total completion time is to reduce the time of one of the tasks on each critical path. The tasks on the critical paths can be determined in O(n+m) time using the simple dynamic programming presented in Section . ● What is the tradeoff between number of workers and completion time? - What we would really be interested in knowing is how best to complete the schedule with a given number of workers. Unfortunately, this and most similar problems are NP-complete. file:///E|/BOOK/BOOK4/NODE156.HTM (2 of 4) [19/1/2003 1:30:50]
- Page 405 and 406: Factoring and Primality Testing The
- Page 407 and 408: Factoring and Primality Testing Alg
- Page 409 and 410: Arbitrary-Precision Arithmetic If y
- Page 411 and 412: Arbitrary-Precision Arithmetic PARI
- Page 413 and 414: Knapsack Problem Next: Discrete Fou
- Page 415 and 416: Knapsack Problem is a subset of S'
- Page 417 and 418: Discrete Fourier Transform Next: Co
- Page 419 and 420: Discrete Fourier Transform an algor
- Page 421 and 422: Combinatorial Problems Next: Sortin
- Page 423 and 424: Sorting Next: Searching Up: Combina
- Page 425 and 426: Sorting The simplest approach to ex
- Page 427 and 428: Sorting operations, implying an sor
- Page 429 and 430: Searching large performance improve
- Page 431 and 432: Searching Notes: Mehlhorn and Tsaka
- Page 433 and 434: Median and Selection followed by fi
- Page 435 and 436: Generating Permutations Next: Gener
- Page 437 and 438: Generating Permutations The rank/un
- Page 439 and 440: Generating Permutations generating
- Page 441 and 442: Generating Subsets look right when
- Page 443 and 444: Generating Subsets above for detail
- Page 445 and 446: Generating Partitions Although the
- Page 447 and 448: Generating Partitions Two related c
- Page 449 and 450: Generating Graphs generate: ● Do
- Page 451 and 452: Generating Graphs Combinatorica [Sk
- Page 453 and 454: Calendrical Calculations Next: Job
- Page 455: Calendrical Calculations Gregorian,
- Page 459 and 460: Job Scheduling shop scheduling incl
- Page 461 and 462: Satisfiability logic, and automatic
- Page 463 and 464: Satisfiability Next: Graph Problems
- Page 465 and 466: Graph Problems: Polynomial-Time rec
- Page 467 and 468: Connected Components Testing the co
- Page 469 and 470: Connected Components discussing gra
- Page 471 and 472: Topological Sorting contradiction t
- Page 473 and 474: Minimum Spanning Tree Next: Shortes
- Page 475 and 476: Minimum Spanning Tree help you sort
- Page 477 and 478: Shortest Path Next: Transitive Clos
- Page 479 and 480: Shortest Path easier to program tha
- Page 481 and 482: Shortest Path Related Problems: Net
- Page 483 and 484: Transitive Closure and Reduction
- Page 485 and 486: Transitive Closure and Reduction Al
- Page 487 and 488: Matching augmenting paths and stopp
- Page 489 and 490: Matching Combinatorica [Ski90] prov
- Page 491 and 492: Eulerian Cycle / Chinese Postman ar
- Page 493 and 494: Eulerian Cycle / Chinese Postman Ne
- Page 495 and 496: Edge and Vertex Connectivity Severa
- Page 497 and 498: Edge and Vertex Connectivity Next:
- Page 499 and 500: Network Flow programming model for
- Page 501 and 502: Network Flow Combinatorica [Ski90]
- Page 503 and 504: Drawing Graphs Nicely vertices are
- Page 505 and 506: Drawing Graphs Nicely labs.com/orgs
Job Scheduling<br />
Next: Satisfiability Up: Combinatorial Problems Previous: Calendrical Calculations<br />
Job Scheduling<br />
Input description: A directed acyclic graph G=(V,E), where the vertices represent jobs and the edge<br />
(u,v) implies that task u must be completed before task v.<br />
Problem description: What schedule of tasks completes the job using the minimum amount of time or<br />
processors?<br />
Discussion: Devising a proper schedule to satisfy a set of constraints is fundamental to many<br />
applications. A critical aspect of any parallel processing system is the algorithm mapping tasks to<br />
processors. Poor scheduling can leave most of the expensive machine sitting idle while one bottleneck<br />
task is performed. Assigning people to jobs, meetings to rooms, or courses to final exam periods are all<br />
different examples of scheduling problems.<br />
Scheduling problems differ widely in the nature of the constraints that must be satisfied and the type of<br />
schedule desired. For this reason, several other catalog problems have a direct application to various<br />
kinds of scheduling:<br />
● To construct a schedule consistent with the precedence constraints, see topological sorting in<br />
Section .<br />
file:///E|/BOOK/BOOK4/NODE156.HTM (1 of 4) [19/1/2003 1:30:50]