Dependency Graphs Math Example 4

Follow the full solution, then compare it with the other examples linked below.

Example 4

medium
A project has tasks with dependencies: BB depends on AA; CC depends on AA; DD depends on BB and CC. What is the minimum number of time steps needed if independent tasks can run in parallel?

Solution

  1. 1
    The critical path is A→B→DA \to B \to D or A→C→DA \to C \to D, both of length 3.
  2. 2
    Step 1: AA. Step 2: BB and CC in parallel. Step 3: DD. So the minimum is 3 time steps.

Answer

3Β timeΒ steps3 \text{ time steps}
The minimum number of time steps equals the length of the longest path (critical path) in the dependency graph. Parallelism helps but cannot shorten the critical path.

About Dependency Graphs

A dependency graph is a directed graph where nodes are variables and arrows show which variables directly influence which others.

Learn more about Dependency Graphs β†’

More Dependency Graphs Examples