Analysis Rules for Program Statements

Steven J. Zeil

Old Dominion University, Dept. of Computer Science

Table of Contents

1. Individual Statements:
1.1. Assignments
1.2. Function/Procedure calls
1.3. Loops
1.4. Conditional statements
2. Combining Statements
2.1. Sequences of Statements
2.2. Nested Statements
2.3. Recursive Functions
3. The Importance of Understanding

Now that we have seen how to manipulate big-O expressions, the next step is to figure out where we get them from in the first place. We are going to take this in two steps. First, we will look at rules for analyzing individual algorithm statements and assigning big-O worst case time for each of those. Once we understand those rules, we will be ready to move on to a fairly simple procedure for analyzing algorithms, and we won't need to reduce everything to individual additions, multiplications, etc., as we've done so far.

In the Forum:

(no threads at this time)