next up previous contents
Next: Implementation Model of Combination Up: Phase I Previous: Fast Implementation Model

   
Fast Implementation Time Complexity Evaluation

The time complexity T(n) of the implementation model described in
Section 3.1.1 depends on the time complexity of the priority queue operations. The pseudo code of the algorithm is available in Appendix A, Section A.1. Let n denotes the number of elements in a priority queue. The following notation is used:

The time complexity of the initialization in Phase I is:

T(n)Initialization= n + nPQInsert(n)

The most expensive scenario of the main loop of the Combination phase of the algorithm is the case of combining two terminal nodes:

$T(n)_{MainLoop} \leq n (PQDeleteMin(n) + 4PQDelete(n)$
+3PQMerge(n) + PQInsert + c2)

If the priority queue data structure chosen supports operations with the asymptotic time $O( \lg n)$ then the time complexity of Phase I is:
T(n) = T(n)Initialization + T(n)MainLoop
$T(n) = c_1n\lg n + c_2n \lg n + c_3n + c_4 \leq c_5n \lg n$
$T(n) = O(n \lg n)$;

The units of space required by the data structures in Phase I are:

S(n) = 6n = O(n)


next up previous contents
Next: Implementation Model of Combination Up: Phase I Previous: Fast Implementation Model
Sashka Davis;961;icsg6;
1999-01-14