The Critical-Path Algorithm

Similar documents
Minimal Spanning Trees

The Traveling Salesman Problem Brute Force Method

Recursive Sequences. Lecture 24 Section 5.6. Robb T. Koether. Hampden-Sydney College. Wed, Feb 27, 2013

Recursive Sequences. Lecture 24 Section 5.6. Robb T. Koether. Hampden-Sydney College. Wed, Feb 26, 2014

The Decreasing-Time Algorithm

Scheduling and Digraphs

Rotations and Translations

The Traveling Salesman Problem Nearest-Neighbor Algorithm

The Pairwise-Comparison Method

Sampling Distribution Examples Sections 15.4, 15.5

while Loops Lecture 13 Sections Robb T. Koether Wed, Sep 26, 2018 Hampden-Sydney College

Stack Applications. Lecture 27 Sections Robb T. Koether. Hampden-Sydney College. Wed, Mar 29, 2017

Street-Routing Problems

Boxplots. Lecture 17 Section Robb T. Koether. Hampden-Sydney College. Wed, Feb 10, 2010

Solving Recursive Sequences by Iteration

Recursive Descent Parsers

The Graphics Pipeline

The Traveling Salesman Problem Cheapest-Link Algorithm

Nondeterministic Programming in C++

Magnification and Minification

Displaying Distributions - Quantitative Variables

Density Curves Sections

Mipmaps. Lecture 35. Robb T. Koether. Hampden-Sydney College. Wed, Nov 18, 2015

Boolean Expressions. Lecture 31 Sections 6.6, 6.7. Robb T. Koether. Hampden-Sydney College. Wed, Apr 8, 2015

XPath Lecture 34. Robb T. Koether. Hampden-Sydney College. Wed, Apr 11, 2012

Binary Tree Applications

LR Parsing - Conflicts

Total Orders. Lecture 41 Section 8.5. Robb T. Koether. Hampden-Sydney College. Mon, Apr 8, 2013

The Coefficient of Determination

Scope and Parameter Passing

The Plurality-with-Elimination Method

Recursion. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 17, 2018

The Projection Matrix

The Graphics Pipeline

The string Class. Lecture 21 Sections 2.9, 3.9, Robb T. Koether. Wed, Oct 17, Hampden-Sydney College

The Class Construct Part 1

Specular Reflection. Lecture 19. Robb T. Koether. Hampden-Sydney College. Wed, Oct 4, 2017

Shading Triangles. Lecture 37. Robb T. Koether. Hampden-Sydney College. Mon, Nov 30, 2015

Linked Lists. Lecture 16 Sections Robb T. Koether. Hampden-Sydney College. Wed, Feb 22, 2017

Scope and Parameter Passing

Implementing Linked Lists

The CYK Parsing Algorithm

Building the Abstract Syntax Trees

The Normal Distribution

XML Attributes. Lecture 33. Robb T. Koether. Hampden-Sydney College. Wed, Apr 25, 2018

Regular Expressions. Lecture 10 Sections Robb T. Koether. Hampden-Sydney College. Wed, Sep 14, 2016

Pointers. Lecture 1 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 14, 2015

XPath. Lecture 36. Robb T. Koether. Wed, Apr 16, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) XPath Wed, Apr 16, / 28

Function Definition Syntax Tree

Aggregation. Lecture 7 Section Robb T. Koether. Hampden-Sydney College. Wed, Jan 29, 2014

XQuery FLOWR Expressions Lecture 35

Operators. Lecture 12 Section Robb T. Koether. Hampden-Sydney College. Fri, Feb 9, 2018

PHP Queries and HTML Forms Lecture 23

List Iterators. Lecture 27 Section Robb T. Koether. Hampden-Sydney College. Wed, Apr 8, 2015

Recognition of Tokens

Recursion. Lecture 26 Sections , Robb T. Koether. Hampden-Sydney College. Mon, Apr 6, 2015

Abstract Data Types. Lecture 23 Section 7.1. Robb T. Koether. Hampden-Sydney College. Wed, Oct 24, 2012

Ambient and Diffuse Light

Friends and Unary Operators

List Iterators. Lecture 34 Section Robb T. Koether. Hampden-Sydney College. Wed, Apr 24, 2013

Webpage Navigation. Lecture 27. Robb T. Koether. Hampden-Sydney College. Mon, Apr 2, 2018

Introduction to Compiler Design

Pointer Arithmetic. Lecture 4 Chapter 10. Robb T. Koether. Hampden-Sydney College. Wed, Jan 25, 2017

Form Validation. Lecture 25. Robb T. Koether. Hampden-Sydney College. Wed, Mar 23, 2018

Stack Applications. Lecture 25 Sections Robb T. Koether. Hampden-Sydney College. Mon, Mar 30, 2015

Introduction to Databases

Recursive Linked Lists

Inheritance: The Fundamental Functions

Shader Programs. Lecture 30 Subsections 2.8.2, Robb T. Koether. Hampden-Sydney College. Wed, Nov 16, 2011

Triggers. Lecture 14. Robb T. Koether. Hampden-Sydney College. Wed, Feb 14, 2018

Integer Overflow. Lecture 8 Section 2.5. Robb T. Koether. Hampden-Sydney College. Mon, Jan 27, 2014

The Constructors. Lecture 7 Sections Robb T. Koether. Hampden-Sydney College. Wed, Feb 1, 2017

List Iterator Implementation

Programming Languages

Programming Languages

Function Usage. Lecture 15 Sections 6.3, 6.4. Robb T. Koether. Hampden-Sydney College. Mon, Oct 1, 2018

The Model Stack. Lecture 8. Robb T. Koether. Hampden-Sydney College. Wed, Sep 6, 2017

Pointers. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Fri, Jan 18, 2013

The x86 Instruction Set

Insertions, Deletions, and Updates

DTDs and XML Attributes

Fundamental Data Types

jquery Lecture 34 Robb T. Koether Wed, Apr 10, 2013 Hampden-Sydney College Robb T. Koether (Hampden-Sydney College) jquery Wed, Apr 10, / 29

The Mesh Class. Lecture 26. Robb T. Koether. Wed, Oct 28, Hampden-Sydney College

Pointers. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Mon, Jan 20, 2014

Basic CSS Lecture 17

Stacks and their Applications

The Mesh Class. Lecture 23. Robb T. Koether. Hampden-Sydney College. Wed, Oct 18, 2017

Dynamic Allocation of Memory

Array Lists. Lecture 15. Robb T. Koether. Hampden-Sydney College. Fri, Feb 16, 2018

Applying Textures. Lecture 27. Robb T. Koether. Hampden-Sydney College. Fri, Nov 3, 2017

Dynamic Allocation of Memory

Inheritance: The Fundamental Functions

The Class Construct Part 2

LR Parsing - The Items

XML and AJAX Lecture 28

Array Lists. Lecture 15. Robb T. Koether. Hampden-Sydney College. Mon, Feb 22, 2016

Basic PHP Lecture 17

Relational Databases Lecture 2

Functional Dependencies and Normal Forms

Transcription:

The Critical-Path Algorithm Lecture 32 Sections 8.3-8.4 Robb T. Koether Hampden-Sydney College Wed, Nov 19, 2014 Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 1 / 15

1 Assignment 2 Critical Paths 3 The Backflow Algorithm 4 The Critical-Path Algorithm Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 2 / 15

Outline 1 Assignment 2 Critical Paths 3 The Backflow Algorithm 4 The Critical-Path Algorithm Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 3 / 15

Assignment Collected To be collected on Monday, November 24. Chapter 8: Exercises 37, 43, 53. Assignment Chapter 8: Exercises 49, 52, 53, 56. Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 4 / 15

Outline 1 Assignment 2 Critical Paths 3 The Backflow Algorithm 4 The Critical-Path Algorithm Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 5 / 15

Definitions Definition (Critical Path for a Vertex) The critical path for a vertex is the path from that vertex to END with the longest processing time. Definition (Critical Path for a Project) The critical path for a project is the critical path from START to END. Definition (Critical Time) The critical time for a vertex or project is the processing time of its critical path. Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 6 / 15

Example A(6) D(2) Start(0) B(5) C(7) E(5) The critical time of a project is the shortest possible time required to complete the project. Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 7 / 15

Example A(6) D(2) Start(0) B(5) C(7) E(5) The critical time of a project is the shortest possible time required to complete the project. Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 8 / 15

Outline 1 Assignment 2 Critical Paths 3 The Backflow Algorithm 4 The Critical-Path Algorithm Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 9 / 15

The Backflow Algorithm Definition (The Backflow Algorithm) The backflow algorithm finds the critical path by the following method. 1 Beginning with END and working back to START, find the critical time for each vertex. The critical time for a vertex is the processing time for that vertex plus the largest critical time of the vertices incident from that vertex. 2 The critical path for the project is the path from START to END whose edges connect each vertex to its successor with the greatest critical time. Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 10 / 15

The Backflow Algorithm Example (The Backflow Algorithm) A(6) D(2) Start(0) B(5) C(7) E(5) Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 11 / 15

The Backflow Algorithm Example (The Backflow Algorithm) A(6) D(2) Start(0) B(5) C(7) E(5) Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 11 / 15

The Backflow Algorithm Example (The Backflow Algorithm) A(6) D(5) Start(0) B(5) C(7) E(9) Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 11 / 15

The Backflow Algorithm Example (The Backflow Algorithm) A(11) D(5) Start(0) B(14) C(16) E(9) Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 11 / 15

The Backflow Algorithm Example (The Backflow Algorithm) A(11) D(5) Start(16) B(14) C(16) E(9) Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 11 / 15

The Backflow Algorithm Example (The Backflow Algorithm) A(11) D(5) Start(16) B(14) C(16) E(9) Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 11 / 15

Outline 1 Assignment 2 Critical Paths 3 The Backflow Algorithm 4 The Critical-Path Algorithm Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 12 / 15

The Critical-Path Algorithm Definition (The Critical-Path Algorithm) The critical-path algorithm creates a schedule by the following method. 1 Use the backflow algorithm to find the critical time of every task in the project. 2 Create a priority list with the tasks listed in order of decreasing critical time. 3 Use the priority list to create a schedule. Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 13 / 15

Example Example (The Critical-Path Algorithm) A(11) D(5) Start(16) B(14) C(16) E(9) The priority list is C, B, A, E, D, H, F, G. Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 14 / 15

Example Example (The Critical-Path Algorithm) A(11) D(5) Start(16) B(14) C(16) E(9) Priority list: C, B, A, E, D, H, F, G Processor 1 Processor 2 0 5 10 15 20 Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15

Example Example (The Critical-Path Algorithm) A(11) D(5) Start(16) B(14) C(16) E(9) Priority list: C, B, A, E, D, H, F, G Processor 1 C(7) Processor 2 0 5 10 15 20 Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15

Example Example (The Critical-Path Algorithm) A(11) D(5) Start(16) B(14) C(16) E(9) Priority list: C, B, A, E, D, H, F, G Processor 1 Processor 2 C(7) B(5) 0 5 10 15 20 Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15

Example Example (The Critical-Path Algorithm) A(11) D(5) Start(16) B(14) C(16) E(9) Priority list: C, B, A, E, D, H, F, G Processor 1 Processor 2 C(7) B(5) A(6) 0 5 10 15 20 Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15

Example Example (The Critical-Path Algorithm) A(11) D(5) Start(16) B(14) C(16) E(9) Priority list: C, B, A, E, D, H, F, G Processor 1 C(7) E(5) Processor 2 B(5) A(6) 0 5 10 15 20 Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15

Example Example (The Critical-Path Algorithm) A(11) D(5) Start(16) B(14) C(16) E(9) Priority list: C, B, A, E, D, H, F, G Processor 1 C(7) E(5) Processor 2 B(5) A(6) D(2) 0 5 10 15 20 Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15

Example Example (The Critical-Path Algorithm) A(11) D(5) Start(16) B(14) C(16) E(9) Priority list: C, B, A, E, D, H, F, G Processor 1 C(7) E(5) Processor 2 B(5) A(6) D(2) 0 5 10 15 20 Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15

Example Example (The Critical-Path Algorithm) A(11) D(5) Start(16) B(14) C(16) E(9) Priority list: C, B, A, E, D, H, F, G Processor 1 C(7) E(5) Processor 2 B(5) A(6) D(2) 0 5 10 15 20 Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15

Example Example (The Critical-Path Algorithm) A(11) D(5) Start(16) B(14) C(16) E(9) Priority list: C, B, A, E, D, H, F, G Processor 1 C(7) E(5) Processor 2 B(5) A(6) D(2) 0 5 10 15 20 Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15