Learn
Lesson · Networks: Flows, Paths and Assignments · Time instead of flow

Project Networks and the Critical Path

A project is a network whose arcs carry precedence and whose nodes carry durations, and nothing flows along it at all. A forward pass gives the earliest each activity can start, a backward pass the latest it can start without delaying the project, and the difference is slack. The activities with none form the critical path — and shortening one of them stops paying the moment a second path draws level.

ES(i) = max over predecessors p of EF(p), EF(i) = ES(i) + duration(i) LF(i) = min over successors s of LS(s), LS(i) = LF(i) − duration(i) slack(i) = LS(i) − ES(i) = LF(i) − EF(i) zero slack ⟹ critical project length = max EF = the LONGEST path through the precedence network a cycle in the precedence graph means no order exists, so nothing is computable shortening a critical activity pays until a second path becomes critical too
Two passes, one subtraction, and where the return stops

Core ideas

What this lesson establishes

The arithmetic is two sweeps and is over in a minute. The three ideas are about what the numbers mean and what they stop meaning as soon as you act on them.

1

The project length is a longest path, not a sum

Adding the durations up gives the time to do everything one at a time, which is not the question. The finish date is the longest chain of activities that must happen in order, and the forward pass computes it by taking a maximum at every node. On the lab's nine-activity project the durations add to 21 and the project takes 12.

2

Slack belongs to the activity; criticality belongs to the path

An activity with slack can start late without moving the finish date. But the slack is not private: two activities on the same non-critical chain share it, and spending it on one leaves none for the other. That is why the useful object is the critical path rather than the list of critical activities — and why the lab counts distinct critical paths rather than just naming zero-slack activities.

3

Shortening pays until something else becomes binding

Take a day off a critical activity and the project shortens by a day — once. Then some other chain, previously a day shorter, is the same length, and the next day off buys nothing at all. The lab draws the whole curve, and the interesting number on it is where it goes flat rather than its first step.

The material

Two passes, and what happens when you act on them

The definitions, the two sweeps in full on a nine-activity project, then slack, then the crash curve and the case where the first day already buys nothing.

Definition · A project network and its four times

A project is a set of activities, each with a duration and a list of predecessors that must finish before it starts. For each activity: ES is the earliest start, EF = ES + d the earliest finish, LF the latest finish that does not delay the project, and LS = LF − d the latest start.

The slack of an activity is LS − ES, equivalently LF − EF. An activity with zero slack is critical: any delay to it delays the whole project.

Nothing flows here. The arcs are precedence, the numbers on the nodes are times, and the quantity being computed is a longest path rather than a cheapest one. It is on this course because it is a network with a duality reading of its own: the critical path is the certificate that the project cannot be finished sooner, in the same way that a cut certifies a flow.

A 3 | B 2 after A | C 4 after A | G 5 after A | D 2 after B E 3 after C | H 2 after G | F 1 after D E | I 1 after F H forward pass ES EF backward pass LS LF A 0 3 0 3 B 3 5 6 8 C 3 7 3 7 G 3 8 4 9 D 5 7 8 10 E 7 10 7 10 H 8 10 9 11 F 10 11 10 11 I 11 12 11 12 slack = LS - ES A 0 B 3 C 0 G 1 D 3 E 0 H 1 F 0 I 0 project length 12 durations add to 21 critical A C E F I one critical path

Read the forward pass off the predecessors: F waits for both D and E, which finish at 7 and 10, so F starts at 10 and not at 7. The maximum is the whole of the rule. The backward pass is the mirror image: G is followed only by H, which must start by 9, so G must finish by 9 — and since G can finish at 8, it has a unit of slack.

Acting on it, and the point where it stops paying

Example · One day off C, and then nothing

C is critical, so shortening it by one takes the project from 12 to 11. Shorten it by two, three or four and the project stays at 11. The lab draws the curve 12, 11, 11, 11, 11 and reports that the return stopped after one unit.

The reason is on the screen at the moment it happens: with one day off C the project has two critical paths rather than one, and past that the length is held by A, G, H, I — a chain that C is not on. Every further day taken off C is spent on an activity that no longer controls the finish date.

This is the single most useful thing the method produces and it is not the critical path itself. Knowing which activity to shorten is easy; knowing when to stop shortening it, and which chain has become binding instead, is what keeps a schedule from absorbing money for nothing. The lab reports the slack of the chosen activity, what shortening it is worth, and after how many units it stops paying.

Example · A project where the first day already buys nothing

Six activities: A for 3, then two chains of two activities each, joining at F. Both chains take the same time, so the project length is 8 and every activity is critical — two distinct critical paths, A B D F and A C E F.

Shorten B by one and the project is still 8, because A C E F is untouched and still takes 8. The return stops after zero units. With parallel critical paths, shortening one activity is not enough; you have to shorten one on each path, or shorten a shared activity like A or F.

When there is nothing to compute

The forward pass needs an order in which every predecessor comes before its activity, and such an order exists exactly when the precedence graph has no cycle. Write A after C, B after A, C after B and there is no order at all: each of the three is waiting for one of the others. The lab names the loop rather than reporting a length, because “the project takes zero” would be a lie and “error” would not say what to fix.

Two smaller refusals are worth the same treatment. An activity waiting on something that is not in the project is refused by name, and so are two activities sharing a name. Both are typing errors, and both would otherwise produce a schedule that looks complete.

What this lesson does not do is cost anything. Real project crashing trades money for time, with a cost per day for each activity and a budget, and that is a linear programme of its own — a perfectly good one, and not this course's. What is here is the structural half: which activities can be shortened usefully at all, and for how long.

Interactive

Project networks and the critical path

Shortening a critical activity helps — until a second path becomes critical, and then it does nothing

Earliest, latest and slackthe project length is a longest path, and criticality belongs to the path
a critical activity: zero slackan activity with slackthe activity being shortened

Method

Scheduling a project and deciding what to shorten

Order first, then forward, then backward, then subtract. Only after all four does any decision get made.

1

Put the activities in an order with every predecessor first

If you cannot, the precedence graph has a cycle and there is nothing to compute. Find the loop and fix the data; no amount of care with the arithmetic will help.

2

Forward pass: ES is the largest EF among the predecessors

Start at zero for activities with none. Take the maximum, not the sum and not the most recent; an activity waiting on three others waits for the last of them. The largest EF in the project is its length.

3

Backward pass: LF is the smallest LS among the successors

Start at the project length for activities with none. Take the minimum: an activity feeding three others must be done in time for the earliest of them.

4

Subtract, and list the critical activities and the critical paths

slack = LS − ES. Zero means critical. Then chain the critical activities together into paths — there may be more than one, and how many there are is what decides whether shortening any single activity is worth anything.

5

Shorten a critical activity one unit at a time, re-running both passes

Do not assume the saving continues. Re-run the passes after each unit and watch for a second path reaching the same length; that is the moment the return stops, and it is usually much sooner than expected.

Passes, slack and what shortening buys

Score 0 / 0

Nine activities, twelve days, and one day's worth of improvement

The whole schedule, then what happens when the obvious activity is shortened. Every figure is what the lab reports as the crash control is moved.

PROJECT A 3 | B 2 after A | C 4 after A | G 5 after A | D 2 after B E 3 after C | H 2 after G | F 1 after D E | I 1 after F H ES EF LS LF slack A 0 3 0 3 0 critical B 3 5 6 8 3 C 3 7 3 7 0 critical G 3 8 4 9 1 D 5 7 8 10 3 E 7 10 7 10 0 critical H 8 10 9 11 1 F 10 11 10 11 0 critical I 11 12 11 12 0 critical length 12, one critical path A C E F I durations add to 21, which is not the answer to anything here SHORTEN C by 0 1 2 3 4 length 12 11 11 11 11 paths 1 2 1 1 1 critical ACEFI | ACGEHFI | AGHI | AGHI | AGHI the return stops after ONE unit at that unit a second path draws level; past it, A G H I holds the length and C is not on it G has one unit of slack, so shortening G is worth nothing at all until that unit has been used up somewhere TWO PATHS FROM THE START A 3 | B 2, C 2 after A | D 2 after B, E 2 after C | F 1 after D E length 8, every activity critical, TWO paths A B D F and A C E F shorten B by one: still 8. The return stops after ZERO units.

The row of path counts is the row to read. It goes from one to two and back to one, and the two is where the improvement ended: a second chain reached the same length, and one more day off C left that chain untouched.

For a rehearsal, shorten G instead. It has a unit of slack, so the first day buys nothing; the second and third then start to matter, because by then the chain through G has become the binding one. Slack is a budget that has to be spent before anything else happens.

The harder rehearsal: on the two-path project, shorten F — the activity both chains pass through. One day off F takes the project from 8 to 7, because both paths shorten together. A shared activity is worth more than a private one, and the crash curve is where that becomes a number rather than an intuition.

Common mistakes

1
Adding the durations upThat is the time to do the project with one worker and no concurrency, and it is usually far larger than the answer — 21 against 12 on the lab's example. The forward pass takes a maximum at every node precisely because independent chains run at the same time.
2
Treating slack as private to an activityTwo activities on the same non-critical chain share their slack: use it on the first and the second has none left. The list of critical activities does not capture this and the list of critical paths does, which is why the lab reports the paths and counts them.
3
Assuming a critical activity is worth shortening indefinitelyThe saving lasts exactly until a second chain draws level, which on the lab's project is after a single unit and on its two-path project is immediately. Money spent past that point buys nothing, and nothing in the schedule says so unless you re-run the passes and look at how many paths are critical.

Check your understanding

✓
Finish when you can schedule a project by hand and say how much shortening any given activity is worth.

You should be able to order the activities, run both passes taking a maximum forwards and a minimum backwards, compute slack, list the distinct critical paths rather than just the critical activities, and find the point at which shortening a chosen activity stops reducing the project length.

Note: The critical path is a certificate: it is a chain of activities that must run in order and takes as long as the project does, so no schedule can finish sooner, and anyone can check it by adding up five numbers. That is the same shape of argument as a cut bounding a flow, and the rest of this course is about making that resemblance precise. “Shortest Paths and Node Potentials” starts with the simplest case, where the certificate is one number attached to each node.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.