In REQUIREMENTS:
number 2: To find the critical path in a
graph G, we need to add a source node s and a sink node t. We have not
described the exact way to do that, but it is not difficult. If we have |V|
nodes initially in the graph, numbered from 0 to |v| -1, we add another two
nodes in the graph: s will be numbered |V| and t will be numbered |V| + 1. we
then find the nodes that have no node pointing to them: these will be connected
with s. following that, we find the nodes that point to no other nodes: these
will be connected to t. implement this scheme so that you have a program that
carries out the whole procedure for detecting critical path
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 1 | 2 |