Contents
Page No.
Abstract List of Symbols and Abbreviations List of Figures List of Tables
V VI VII VII
1. Introduction 1.1 1.2 General Organization of the Thesis
1 1 3 4 4 4 5 5 7 9 9 11 15 21 22 22 24 30 31
2. Preliminaries 2.1. 2.2. 2.3. Introduction Terminology and Notations Path complexity of a class
2.3.1. Introduction 2.3.2. The class Stack 3. Path complexity of the class BST 3.1. 3.2. 3.3. 3.4. State representation of BST Insert and delete operations on BST Path Complexity analysis of the class BST Bounds on path complexity of the class BST
4. Program for computing path complexity of the class BST 4.1. 4.2. Array representation of Binary Tree Program Listing
5. Conclusion References
IV
Abstract
Path complexity of a program is defined as the number of program execution paths as a function of input size n. This notion of program complexity has been extended to complexity of a class as follows. Class had data members and data operations. The notion of state for the class is defined based on structural representation of a class. We are assuming only those data operations that change state of a class. The path complexity of a class is defined to be the number of valid input sequences, each of them containing n data operations. We have analyzed the path complexity of the class Binary Search Tree (BST) based on the algorithms for insert and delete data operations. Later we modify program for delete operation to facilitate determination of path complexity for the class BST. The bounds for the path complexity of the class BST are determined. A program is developed to obtain path complexity of the class BST.
V
List of Symbols and Abbreviations
CFG FSD BST Control Flow Graph Finite state diagram Binary Search Tree An array of n ≥ 0 elements. Path complexity of program A over all inputs of size n>0. Path complexity of the class BST by insert and delete algorithms. Path