** PERT Chart: Calculating Times**

The time of events can be found as follows:

- The time of the initial node is 0.
- For each node
*j*in the topological sort after the first,*time*_{j}= max_{ (i,j) ∈ E}(time_{i}+ cost_{i, j})

By considering nodes in topological sort order, we know that the time of each predecessor will be computed before it is needed.

We can compute the latest completion time for each node, in reverse topological order, as:

- The latest time of the final node
*n*is*time*._{n} - For node
*i*,*latest*_{i}= min_{ (i,j) ∈ E}(latest_{j}- cost_{i, j})

Slack for an edge *(i,j)* is:
* slack _{i,j} = latest_{j} - time_{i} - cost_{i, j} *