Evaluating Heuristics for the Fixed-Predecessor Subproblem of Pm | prec, p j = 1 | C max
Outline 1.Introduction 2.Approach 3.CP and LNS heuristics 4.HLF heuristics 5.Numerical results
Pm | prec, p j = 1 | C max Problem: find the makespan-minimizing schedule for a set of unit- length jobs with arbitrary precedence constraints Efficient algorithms exist for m = 2 Unknown complexity for fixed m >= 3
Question Can we discover anything by restricting to subproblems with more structured precedence constraints? Are any approaches we know optimal for these subproblems?
Motivation If a subproblem is found to be easy: More information about boundary between easy and hard problems Can easily schedule such instances in real world If a subproblem is found to be hard: General case is also hard, resolving open problem Easier to reason about a problem with more structure
Subproblems We saw two such subproblems in class: In-tree Out-tree
Heuristics Critical path (CP), largest number of successors (LNS) optimal In-tree Out-tree
Heuristics Critical path: prioritize nodes at the head of the longest path of jobs that still need to run Largest number of successors: prioritize nodes which are a predecessor (direct or indirect) of the most nodes
Generalization Can we find other precedence structures for which these heuristics are optimal?
Generalization In-tree: each node has one successor Out-tree: each node has one predecessor Both are planar In-tree Out-tree
Generalization Generalize out-tree: allow arbitrary number K of predecessors per node Pictured: K = 3
Method Generate many instance with the K-predecessor structure Solve each instance with each algorithm, several times
Method Generate many instance with the K-predecessor structure Solve each instance with each algorithm, several times If algorithm performs worse than another algorithm on an instance, cannot be optimal If algorithm’s schedule differs in makespan across trials, algorithm cannot be optimal
Instance Generation Add K root nodes to the graph Iteratively add nodes, randomly choosing K predecessors each time Any valid instance has a chance to be generated using this algorithm
Results: CP and LNS Neither CP nor LNS is optimal for the K-predecessor problem On some instances, both result in inconsistent C max
Results: CP Both algorithms fail on this graph. Here are the CP schedules: Time1234 Machine Machine Machine Time12345 Machine Machine Machine
Results: LNS Both algorithms fail on this graph. Here are the LNS schedules: Time1234 Machine Machine Machine Time12345 Machine Machine Machine
Results: Planar Graphs Even if we restrict to planar 2-predecessor graphs, there are instances for which both CP and LNS have inconsistent C max Time12345 Machine Machine Machine Time Machine Machine Machine Each schedule satisfies both the CP and LNS heuristics
Other Heuristics? P2 | prec, p j = 1 | C max has been solved efficiently All highest level first (HLF) schedules are optimal Proof, almost-linear algorithm given by [Gabow 1982] Level of a node: length of critical path starting at that node
HLF Heuristic A restriction of CP schedules 1.Process nodes from highest to lowest level 2.When finishing a level, if a machine remains available, “jump” a runnable job from the highest possible level 3.If there are multiple candidates, choose the one that allows future jumps to be to as high level as possible
Jumps With 2 machines, 16 is processed and a machine is free Node 15 or 10 can be “jumped” to run on the free machine Choose 15, since higher level Image: [Gabow 1982]
Generalizing to M >= 3 Not obvious how to generalize Gabow’s algorithm, since it assumes only one job is jumped each time For M = 3, can jump either 1 or 2 jobs each time Can still generate HLF schedules, though less efficiently, and observe performance Assumption: given a choice, we want to jump as many nodes as possible, minimizing idle time
HLF Self-Consistency Check if HLF schedules for the same instance agree on C max Generate 20,000,000 instances, each with 20 nodes, K = 3 Compare makespan of all HLF schedules
HLF Self-Consistency Result: no disagreements occurred Caveats: Does not mean no disagreement is possible Even if it is consistent, does not mean it is optimal
HLF Non-Optimal There are (very rare) instances where some CP schedules beat HLF
HLF Non-Optimal Time M M M Time M M M Note: Highest level at the bottom. Level is in [brackets]. Green nodes are executed on their level; blue nodes are jumped. CP Schedule: Superior HLF Schedule: Inferior
HLF Non-Optimal Time M M M Time M M M Note: Highest level at the bottom. Level is in [brackets]. Green nodes are executed on their level; blue nodes are jumped. CP Schedule: Superior HLF Schedule: Inferior
HLF Non-Optimal Time M M M Time M M M Note: Highest level at the bottom. Level is in [brackets]. Green nodes are executed on their level; blue nodes are jumped. CP Schedule: Superior HLF Schedule: Inferior
HLF Non-Optimal Time M M M Time M M M Note: Highest level at the bottom. Level is in [brackets]. Green nodes are executed on their level; blue nodes are jumped. CP Schedule: Superior HLF Schedule: Inferior
HLF Non-Optimal Time M M M Time M M M Note: Highest level at the bottom. Level is in [brackets]. Green nodes are executed on their level; blue nodes are jumped. CP Schedule: Superior HLF Schedule: Inferior
HLF Non-Optimal Time M M M Time M M M Note: Highest level at the bottom. Level is in [brackets]. Green nodes are executed on their level; blue nodes are jumped. CP Schedule: Superior HLF Schedule: Inferior
HLF Non-Optimal Time M M M Time M M M Note: It’s actually optimal to execute fewer nodes early on, so that the critical job #7 can finish earlier. CP Schedule: Superior HLF Schedule: Inferior
HLF Non-Optimal In the 2-processor case, you always jump 1 node With 3 processors, can choose between jumping 1 or 2 Sometimes, it’s better to jump 1 to allow a critical job to run earlier
Numerical Results Average makespan for each algorithm given M, N, K M: number of machines N: number of jobs K: branching factor MNKCPLNSHLFRANDOM
Numerical Analysis HLF is better than CP and LNS (by a tiny fraction) HLF implementation too inefficient to run on large graphs CP and LNS near identical, some divergence when K changed MNKCPLNSHLFRANDOM N/A N/A N/A N/A
Numerical Analysis Random performed admirably, but scaled less well as number of machines increased (though difference seemed to shrink with branching factor) MNKCPLNSHLFRANDOM N/A N/A N/A N/A
End