1 2 Activity Prerequisites Time required α 1 5 α 2 4 α 3 3 α 4 α 1 5 α 5 α 2 5 α 6 α 2 6 α 7 α 3 8 α 8 α 3 9 α 9 α 4 α ID: 646557
Download Presentation The PPT/PDF document "Activity Networks Charles.DeMatas@sta.uw..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Activity Networks
Charles.DeMatas@sta.uwi.edu
1Slide2
2
Activity
Pre-requisites
Time required
α1- 5α2- 4α3- 3α4α1 5α5α2 5α6α2 6α7α3 8α8α3 9α9α4, α5, α7, 3α10α4, α510α11α6, α8 4α12α9, α11 2
Example 1
. Slide3
3
The data is often illustrated in an
activity network
.
Example 1 (cont’d) α2
start
end
α
1
α
3
α
6
α
5
α
4
α
7
α
8
α
12
α
11
α
9
α
10
α
13
dummy
activitySlide4
4
Example 1 (cont’d)
4
start
end
5
3
6
5
5
8
9
2
4
3
10
0
dummy
activitySlide5
5
Activity
Pre-requisites
Time required
α1- 8α2- 6α3α2 1α4α216α5α213α6α1, α3 6α7α5, α8 2α8α6 5α9α4, α7 7α10α613α11α5, α810α12α1, α319
α
13
α
9
,
α
10
4
Example 2
. Slide6
6
α
2
start
end
α
1
α
3
α
6
α
5
α
4
α
7
α
8
α
12
α
11
α
9
α
10
α
13
Example 2 (cont’d)
Slide7
7
6
start
end
8
1
6
13
16
2
5
19
10
7
13
4
Forward labelling. Labelling method.
-Label the Start node 0.
-Locate a node where all the immediately preceding nodes are labelled. Label this node.
0
6
8
14
19
22
29
33
Example 2 (cont’d)
Slide8
8
Forward labelling gives the
earliest start time
for each event.
More formally the vertex labels are determined by the following rule.For a vertex v, let u1, u2,…, uk be the immediately preceding vertices. Let l(x) denote the label of x. Then if ui are already labelled for i=1,2,…,k then This gives the earliest starting time for activity v.The label at the end vertex gives the minimum time required for the entire project. Slide9
9
6
5
5
3 3711l(v) = max{3+5, 6+5, 7+3} = 11.
v
8
8
5Slide10
10
Backward labelling.
6
start
end
8
1
6
13
16
2
5
19
10
7
13
4
0
6
9
15
20
22
29
33
-Label the End node with the shortest time for the project.
-Locate a node where all
the immediately
succeeding nodes are labelled. Label this node.
Example 2 (cont’d)
Slide11
11
Backward labelling gives the
latest start time
for each event which will not make the entire project longer than its minimum time requirement.
The vertex labels are determined by the following rule.For a vertex v, let u1, u2,…, uk be the immediately following vertices. Let l(x) denote the label of x. Then if ui are already labelled for i=1,2,…,k then This gives the earliest starting time for activity v. Slide12
12
6
5
v
41317 7l(v) = min{15-5, 13-6, 17-4} = 7. 15
16
5
1
3
15
4Slide13
13
The
float
time
for an event is the difference between the latest start time and the earliest start time. The float times are as follows. There is always a path from start to end on which the
start
end
0
0
1
1
1
0
0
0
float times are all 0. Such a path is called a
critical path
.
Example 2 (cont’d)
Slide14
14
N.B. Any extension in the duration of an activity along a critical path will lead to an extension in the duration of the entire project.
Slide15
15
Both forward labelling and backward labelling can be done on the same diagram.
6
end
8
1
6
13
16
2
5
19
10
7
13
4
6
22
29
33
19
14
8
0
33
29
22
20
15
9
6
0Slide16
16
Activity
Pre-requisites
Time required
Earliest Start timeLatest Start timeEarliest Finish time LateSt FiniSh Timeα1- 8α2- 6α3α2 1α4α216α5α213α6α1, α3 6α7α5, α8 2α8α6 5α9α4, α7 7
α
10
α
6
13
α
11
α
5
,
α
8
10
α
12
α
1
,
α
3
19
α
13
α
9
,
α
10
4
Example2
.
Without
drawing
0
0
6
7
6
22
619
8
14
14
19
198
6
maX
of 8 and 7
21
22
29
14
27
maX
of 22 and 21
19
29
8
27
29
33
maX
of 8 and 7
maX
of 29 and 27 Slide17
17
Activity
Pre-requisites
Time required
Earliest Start timeLatest Start timeEarliest Finish time LateSt FiniSh Timeα1- 8α2- 6α3α2 1α4α216α5α213α6α1, α3 6α7α5, α8 2α8α6 5α9α4, α7 7
α
10
α
6
13
α
11
α
5
,
α
8
10
α
12
α
1
,
α
3
19
α
13
α
9
,
α
10
4
0
0
6
7
6
22
6
19
8
14
14
19
19
8
6
20
2229
14
2719
29
8
2729
33
Example2
.Cont’d
3329
3314
33
23
29
16
29
2222
20
20
min of 20 and 29
15
min of 15 and 16
15
9
20
min of 20 and 23
7
22
6
9
min of 9 and 14
8
6
min of 8, 6 and 7
0
9
min of 9 and 14
1Slide18
18
Property 1:
In an activity network there are no directed cycles.
Proof:
A cycle would imply an endless sequence of activities each one preceding the other. □
Some properties of activity networks.
Slide19
19
Property 2:
(a) In the forward labelling process, there is always an unlabeled node where all the immediately preceding nodes are labelled.
(b) In the backward labelling process, there is always
an unlabeled node where all the immediately succeeding nodes are already labelled. Proof of (a): Consider any unlabeled node u1. If all the immediately preceding nodes of u1 are labelled, then u1 is a node we are seeking, and we are done. Otherwise there is a node u2, immediately preceding u1 which is unlabelled. If all the immediately preceding nodes of u2 are labelled, then u2 is a nodeSlide20
20
we
are seeking
, and we are done
. Otherwise, there is a node u3, immediately preceding u2 which is unlabeled. In this manner we generate a sequence of unlabeled nodes u1, u2, … . Now, the nodes are all distinct. (why?) Since we only have a finite number of nodes this sequence must terminate at some node uk. Now, uk can only be a node for which every preceding node is labelled. This is a node we are seeking. □ The proof of (b) is similar. Slide21
21
Definition
In an digraph (directed graph), a vertex at which all the arcs are leaving is called a
source
.A vertex at which all the arcs are entering is called a sink.v
u
w
x
u and v are sources. w and x are sinks. Slide22
22
Theorem
In an digraph (directed graph) with no cycles, there is at least one source and one sink.
This can be proved in a similar fashion to the previous result.Slide23
23Slide24
24
Definition
A
path
in a digraph (directed graph) a sequence of arcs e1, e2, …, ek, such that, for any i, ei is entering the same vertex that ei+1 is leaving, and for i<j, arc ej does not enter the same vertex that ei is leaving. e1
e
2
e
3
e
4
e
5
e
6Slide25
25
Theorem
In an activity network, the labels obtained in the forward labelling process give the shortest path lengths to that vertex.
Proof
Left as an exercise.Slide26
26
rajeshlakhan.weebly.com
THE ENDSlide27
27
6
8
1
613162519107134Slide28
28
b
c
e
df681419222933Slide29
29
e
1
e
2
e
3
e
4
e
5
e
6