Sub topic 3
Paths Through the Network and Their Lengths
This chapter assumes you know what a task, duration, milestone, and dependency are. It also assumes you can read a simple task list or Gantt chart. The focus here is how to measure complete routes through a project network.
What a path represents
An activity network is a graph of project tasks and their dependency links. A path is a connected sequence of tasks that starts at the project start and follows dependency arrows toward the project finish.
The length of a path is the sum of the durations of all tasks on it. For example, if a path contains tasks lasting 3, 2, and 3 days, its length is 8 days.
Consider this network:
The network contains two complete paths:
- Start → A → B → D → Finish: 3 + 2 + 3 = 8 days
- Start → A → C → D → Finish: 3 + 4 + 3 = 10 days
Tasks B and C can run in parallel after A finishes. Task D cannot start until both have finished, so the longer route controls when D can start. In this example, the route through C takes 10 days.
Why the longest path matters
When a schedule has no resource limits and uses fixed task durations, the project cannot finish earlier than its longest complete path. This is because every task on that path must finish before the project can finish.
The longest path is therefore the schedule's critical path, although the formal critical-path calculation also checks timing flexibility, called float. A shorter path may have some spare time because it joins the longer path at a later task.
| Path | Calculation | Length |
|---|---|---|
| A → B → D | 3 + 2 + 3 | 8 days |
| A → C → D | 3 + 4 + 3 | 10 days |
Do not add all tasks in the project to find its duration. Adding both B and C would count parallel work twice. Instead, calculate each complete path and compare the path lengths.
tasks = {
"A": (3, []),
"B": (2, ["A"]),
"C": (4, ["A"]),
"D": (3, ["B", "C"]),
}
finish = {}
for task, (duration, predecessors) in tasks.items():
start = max((finish[p] for p in predecessors), default=0)
finish[task] = start + duration
print(finish)
print("Minimum project duration:", max(finish.values()), "days")The dictionary is listed in dependency order, so each predecessor has a finish time before its successor is processed. The result is 10 days. This calculation finds the earliest possible finish under the stated assumptions. The forward and backward passes later provide a more complete view of timing and float.
Check your understanding
Exercise
Tasks A, B, and C form one path with durations of 2, 5, and 1 day. Tasks X and Y form a second path with durations of 4 and 3 days. Both paths finish at the project milestone. Which path sets the minimum project duration?
Show answer
The A → B → C path is 8 days. The X → Y path is 7 days, so the 8-day path sets the minimum project duration.