learngraphtheory.org

Interactive Graph Theory Learning

Guest User

Using app without sign in

Graph Theory, Step by Step

20 lessons, 163 min|English, Arabic and German subtitles

Includes a certificate anyone can verifyPreview
Algorithm Selection

Select an algorithm and generate steps to begin visualization

This algorithm requires a directed graph. Check Settings tab to configure.

PERT Calculator

PERT project schedule calculator

Handles uncertainty in task durations by using three time estimates: Optimistic (O), Most Likely (M), and Pessimistic (P).

Time: O(V + E)
Space: O(V)
Use Case: Estimating project completion time when individual task durations are uncertain.
Algorithm Execution

Select an algorithm and generate steps to begin visualization

About PERT (Program Evaluation and Review Technique)

The Program Evaluation and Review Technique (PERT) extends critical path analysis to uncertain activity durations. Each activity gets three time estimates, optimistic, most likely, and pessimistic, from which expected durations and project completion probabilities are derived.

How it works

Each activity's expected duration is computed with the beta distribution formula (optimistic + 4 times most likely + pessimistic) / 6, with variance ((pessimistic - optimistic) / 6) squared. The network is then analyzed like CPM using expected durations, and the variances along the critical path sum to give the project variance. A normal approximation converts this into the probability of finishing by any target date.

Applications

PERT was created for the US Navy Polaris missile program in 1958 and is used wherever schedules face uncertainty: research and development, defense contracting, new product launches, and large IT migrations. It teaches how probability layers onto graph-based planning models.

Pseudocode

PERT is CPM with uncertainty attached. Each activity gets three estimates instead of one, which are collapsed into a mean and a variance before the usual network analysis runs.

// Per activity, from optimistic o, most likely m,
// pessimistic p (a Beta distribution approximation):
te[a]  = (o + 4m + p) / 6          // expected duration
var[a] = ((p - o) / 6)^2           // variance

// Then run CPM using te as the duration
run forward and backward passes with te
critical path = activities with zero slack

// Project-level uncertainty
E[T]   = sum of te over the critical path
Var[T] = sum of var over the critical path
z = (target - E[T]) / sqrt(Var[T])
P(finish <= target) = normalCDF(z)

The weighting of 4 on the most likely value comes from approximating a Beta distribution, which is skewed rather than symmetric, so the expected duration is generally not the most likely one. Summing variances along the path relies on the central limit theorem and on assuming activity durations are independent, which is the assumption most likely to be violated in a real project.

Worked example, step by step

Apply PERT to the same four-activity project used for CPM, now with three-point estimates instead of fixed durations.

Example graph: Activities with optimistic, most likely and pessimistic estimates: A (2, 3, 4), B (1, 2, 3), C (2, 4, 6), D (1, 2, 3). Dependencies as before: A and B precede C, C precedes D.

  1. Compute expected durations. A gives (2 + 12 + 4) / 6 = 3. B gives (1 + 8 + 3) / 6 = 2. C gives (2 + 16 + 6) / 6 = 4. D gives (1 + 8 + 3) / 6 = 2. These match the fixed durations used in the CPM example, so the network analysis is identical.
  2. Compute variances. A has ((4 - 2) / 6) squared = 0.111. B is also 0.111. C has ((6 - 2) / 6) squared = 0.444, four times larger, because its estimate range is twice as wide. D is 0.111.
  3. Run the network analysis. Using the expected durations, the critical path is A to C to D with an expected project duration of 3 + 4 + 2 = 9 days, exactly as in CPM.
  4. Sum the variance along the critical path. Variance totals 0.111 + 0.444 + 0.111 = 0.667, so the standard deviation is the square root, about 0.82 days. Note that C alone contributes two thirds of the total uncertainty.
  5. Answer a probability question. For a target of 10 days, z = (10 - 9) / 0.82 = 1.22, and the normal CDF at 1.22 is about 0.89. So there is roughly an 89 percent chance of finishing within 10 days.

Expected duration is 9 days with a standard deviation of about 0.82, giving roughly 89 percent confidence of finishing by day 10. The actionable insight is that activity C dominates the risk: it contributes two thirds of the variance, so narrowing its estimate range does more for schedule confidence than any amount of work on A, B or D. CPM alone would have told you C is critical, but not that it is where the uncertainty lives.

Complexity, and where it comes from

Time: O(V + E) · Space: O(V)

Computing the expected duration and variance for each activity is constant work per activity, so O(V). The network analysis is the same topological sort plus two sweeps as CPM, at O(V + E). The probability calculation is a single normal CDF evaluation, which is constant time. So PERT costs the same as CPM asymptotically and adds only a small constant factor. The real cost of PERT is not computational, it is the effort of eliciting three defensible estimates per activity instead of one.

When to use PERT (Program Evaluation and Review Technique), and when not to

PERT sits between deterministic scheduling and full simulation. How much rigour you need decides which to reach for.

AlternativePrefer it whenCost
CPMDurations are well known from experience. Simpler, and the uncertainty machinery would add nothing.O(V + E)
Monte Carlo simulationYou need accurate probabilities. Avoids the single-critical-path assumption and handles correlated durations.O(runs·(V + E))
RCPSPResource contention rather than duration uncertainty is the binding constraint.exponential
Critical chainYou want to manage buffers explicitly rather than pad each activity estimate individually.O(V + E)

Common pitfalls

  • Summing variances along only one critical path. This is the best-known weakness of PERT. When a near-critical path has high variance, it can easily become the actual longest path once durations are realised, so the true project variance is larger than PERT reports. PERT is therefore systematically optimistic about schedule confidence. Monte Carlo simulation does not have this flaw.
  • Treating expected duration as most likely duration. The Beta approximation is skewed, so te generally differs from m. With estimates of 2, 3 and 10, the most likely value is 3 but the expected duration is 4. Reporting the mode as if it were the mean understates the schedule.
  • Assuming activity durations are independent. Variances only add if durations are independent. In practice a single cause, a key person leaving or a supplier failing, delays several activities at once, and correlated delays make the real variance much larger than the sum.
  • Applying the normal approximation to short paths. The central limit theorem needs enough activities to be credible. On a critical path of two or three activities, the normal assumption is shaky and the resulting probabilities should be treated as indicative rather than precise.
  • Gathering three estimates that are not independent judgements. If the optimistic and pessimistic figures are produced mechanically as the most likely value plus and minus a fixed percentage, the variance carries no real information and PERT degrades into CPM with extra arithmetic.

Frequently asked questions

What is PERT?
The Program Evaluation and Review Technique is a project scheduling method that handles uncertain activity durations. Each activity gets optimistic, most likely and pessimistic estimates, which are combined into an expected duration and a variance. The network is then analysed as in CPM, and the variances give the probability of finishing by a target date.
What is the PERT formula?
Expected duration is (o + 4m + p) divided by 6, where o is optimistic, m is most likely and p is pessimistic. Variance is ((p - o) / 6) squared. The weight of 4 on the most likely value comes from approximating a Beta distribution, which is skewed, so the expected duration usually differs from the most likely one.
What is the difference between PERT and CPM?
CPM uses one fixed duration per activity and identifies the critical path and float. PERT uses three estimates per activity to produce an expected duration and a variance, letting you say how likely a target completion date is. The network analysis is identical; PERT simply feeds it expected durations and carries uncertainty alongside.
How do you calculate the probability of finishing on time in PERT?
Sum the expected durations along the critical path to get the expected project duration, and sum the variances along the same path to get the project variance. Then compute z as the target date minus the expected duration, divided by the standard deviation, and read the normal CDF at z. In the example above a 10-day target on a 9-day expected duration with standard deviation 0.82 gives about 89 percent.
What are the main limitations of PERT?
It sums variance along a single critical path, so a high-variance near-critical path is ignored and confidence is systematically overstated. It assumes activity durations are independent, which correlated real-world delays violate. It also relies on a normal approximation that is weak when the critical path has few activities. Monte Carlo simulation addresses all three.

Related algorithms: Critical Path Method (CPM), RCPSP (Resource-Constrained Project Scheduling), Topological Sort

Interactive Controls
Basic Actions
• Double Click → Add Node
• Drag → Move Nodes
• Shift + Click → Connect Nodes
• Right Click → Context Menu
Advanced
• Ctrl + Click → Multi-Select
• Delete Key → Remove Selected
• Double Click Edge → Edit Weight
• Ctrl + Drag → Pan View

Zoom Controls

100%
Nodes: 4
Edges: 4