the critical-path algorithm - hampden-sydney...
TRANSCRIPT
![Page 1: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/1.jpg)
The Critical-Path AlgorithmLecture 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
![Page 2: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/2.jpg)
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
![Page 3: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/3.jpg)
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
![Page 4: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/4.jpg)
Assignment
CollectedTo be collected on Monday, November 24.
Chapter 8: Exercises 37, 43, 53.
AssignmentChapter 8: Exercises 49, 52, 53, 56.
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 4 / 15
![Page 5: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/5.jpg)
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
![Page 6: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/6.jpg)
Definitions
Definition (Critical Path for a Vertex)The critical path for a vertex is the path from that vertex to END withthe 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 itscritical path.
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 6 / 15
![Page 7: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/7.jpg)
Example
Start(0)B(5)
D(2)
A(6)
C(7)
End(0)
E(5) H(4)
G(3)
F(3)
The critical time of a project is the shortest possible time requiredto complete the project.
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 7 / 15
![Page 8: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/8.jpg)
Example
Start(0)B(5)
D(2)
A(6)
C(7)
End(0)
E(5) H(4)
G(3)
F(3)
The critical time of a project is the shortest possible time requiredto complete the project.
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 8 / 15
![Page 9: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/9.jpg)
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
![Page 10: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/10.jpg)
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 criticaltime for each vertex. The critical time for a vertex is theprocessing time for that vertex plus the largest critical time of thevertices incident from that vertex.
2 The critical path for the project is the path from START to ENDwhose edges connect each vertex to its successor with thegreatest critical time.
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 10 / 15
![Page 11: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/11.jpg)
The Backflow Algorithm
Example (The Backflow Algorithm)
Start(0)B(5)
D(2)
A(6)
C(7)
End(0)
E(5) H(4)
G(3)
F(3)
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 11 / 15
![Page 12: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/12.jpg)
The Backflow Algorithm
Example (The Backflow Algorithm)
Start(0)B(5)
D(2)
A(6)
C(7)
End(0)
E(5) H(4)
G(3)
F(3)
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 11 / 15
![Page 13: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/13.jpg)
The Backflow Algorithm
Example (The Backflow Algorithm)
Start(0)B(5)
D(5)
A(6)
C(7)
End(0)
E(9) H(4)
G(3)
F(3)
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 11 / 15
![Page 14: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/14.jpg)
The Backflow Algorithm
Example (The Backflow Algorithm)
Start(0)B(14)
D(5)
A(11)
C(16)
End(0)
E(9) H(4)
G(3)
F(3)
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 11 / 15
![Page 15: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/15.jpg)
The Backflow Algorithm
Example (The Backflow Algorithm)
Start(16)B(14)
D(5)
A(11)
C(16)
End(0)
E(9) H(4)
G(3)
F(3)
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 11 / 15
![Page 16: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/16.jpg)
The Backflow Algorithm
Example (The Backflow Algorithm)
Start(16)B(14)
D(5)
A(11)
C(16)
End(0)
E(9) H(4)
G(3)
F(3)
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 11 / 15
![Page 17: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/17.jpg)
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
![Page 18: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/18.jpg)
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 inthe project.
2 Create a priority list with the tasks listed in order of decreasingcritical 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
![Page 19: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/19.jpg)
Example
Example (The Critical-Path Algorithm)
Start(16)B(14)
D(5)
A(11)
C(16)
End(0)
E(9) H(4)
G(3)
F(3)
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
![Page 20: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/20.jpg)
Example
Example (The Critical-Path Algorithm)
Start(16)B(14)
D(5)
A(11)
C(16)
End(0)
E(9) H(4)
G(3)
F(3)
Priority list: C, B, A, E , D, H, F , G
0 5 10 15 20
Processor 1Processor 2
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15
![Page 21: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/21.jpg)
Example
Example (The Critical-Path Algorithm)
Start(16)B(14)
D(5)
A(11)
C(16)
End(0)
E(9) H(4)
G(3)
F(3)
Priority list: C, B, A, E , D, H, F , G
C(7)
0 5 10 15 20
Processor 1Processor 2
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15
![Page 22: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/22.jpg)
Example
Example (The Critical-Path Algorithm)
Start(16)B(14)
D(5)
A(11)
C(16)
End(0)
E(9) H(4)
G(3)
F(3)
Priority list: C, B, A, E , D, H, F , G
C(7)
0 5 10 15 20
B(5)Processor 1Processor 2
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15
![Page 23: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/23.jpg)
Example
Example (The Critical-Path Algorithm)
Start(16)B(14)
D(5)
A(11)
C(16)
End(0)
E(9) H(4)
G(3)
F(3)
Priority list: C, B, A, E , D, H, F , G
C(7)
0 5 10 15 20
B(5) A(6)Processor 1Processor 2
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15
![Page 24: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/24.jpg)
Example
Example (The Critical-Path Algorithm)
Start(16)B(14)
D(5)
A(11)
C(16)
End(0)
E(9) H(4)
G(3)
F(3)
Priority list: C, B, A, E , D, H, F , G
C(7)
0 5 10 15 20
B(5) A(6)E(5)Processor 1
Processor 2
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15
![Page 25: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/25.jpg)
Example
Example (The Critical-Path Algorithm)
Start(16)B(14)
D(5)
A(11)
C(16)
End(0)
E(9) H(4)
G(3)
F(3)
Priority list: C, B, A, E , D, H, F , G
C(7)
0 5 10 15 20
B(5) A(6)E(5)
D(2)Processor 1Processor 2
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15
![Page 26: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/26.jpg)
Example
Example (The Critical-Path Algorithm)
Start(16)B(14)
D(5)
A(11)
C(16)
End(0)
E(9) H(4)
G(3)
F(3)
Priority list: C, B, A, E , D, H, F , G
C(7)
0 5 10 15 20
B(5) A(6)E(5)
D(2)H(4)Processor 1
Processor 2
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15
![Page 27: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/27.jpg)
Example
Example (The Critical-Path Algorithm)
Start(16)B(14)
D(5)
A(11)
C(16)
End(0)
E(9) H(4)
G(3)
F(3)
Priority list: C, B, A, E , D, H, F , G
C(7)
0 5 10 15 20
B(5) A(6)E(5)
D(2)H(4)
F(3)Processor 1Processor 2
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15
![Page 28: The Critical-Path Algorithm - Hampden-Sydney Collegepeople.hsc.edu/faculty-staff/robbk/Math111/Lectures/Fall 2014/Lect… · The Critical-Path Algorithm Lecture 32 Sections 8.3 -](https://reader030.vdocuments.site/reader030/viewer/2022040408/5ebaae762523562b6b5cd208/html5/thumbnails/28.jpg)
Example
Example (The Critical-Path Algorithm)
Start(16)B(14)
D(5)
A(11)
C(16)
End(0)
E(9) H(4)
G(3)
F(3)
Priority list: C, B, A, E , D, H, F , G
C(7)
0 5 10 15 20
B(5) A(6)E(5)
D(2)H(4)
F(3)Processor 1Processor 2 G(3)
Robb T. Koether (Hampden-Sydney College) The Critical-Path Algorithm Wed, Nov 19, 2014 15 / 15