What is involved in the process of program development?
Problem description
Algorithm
Program
Machine instructions (executable)
How is pseudocode created?
It’s created from using components of natural language to express algorithms
What are some issues with using natural language to represent algorithms?
Why is using pseudocode beneficial?
Define:
Sequential Algorithm
Sometimes called a straight-line algorithm; the order is followed in a linear fashion.
Define:
Control Operations
Define:
Conditional Statements

Define:
Loop

Define:
Continuation Condition
Determines if statement is true or false
Give an example of a loop.

Define:
Pretest Loop
Continuation condition is tested at the beginning of each pass through the loop
Define:
Posttest Loop
Continuation condition is tested at the end of the loop body, not the beginning.
Define:
Primitives
Instructions that computing agent understands and is capable of executing without further explanation.
Define:
Pattern Matching
Give examples of higher-level constructs.
Define:
Abstraction
Use of high-level instructions during the design process
Define:
Top-down Design
Viewing an operation at a high level of abstraction
How to test efficiency of algorithms?
Run Time Analysis
Big Oh
How to test efficiency of direct sequecing algorithms?
For a sequence of instructions, the cost of executing the sequence of instructions is, asymptotically speaking, the same as the maximum cost of the individual instructions.
For three instructions a, b and c:
where {a, b, c} represents direct sequencing of the three individual instructions.
How to test effeciency for conditional execution algorithms?
For a conditional statement, the cost of execution is the maximum of the cost of evaluating the condition and the cost(s) of the alternate instruction sequences
How to test the effeciency of iterative construct algorithms?
Applies to an iterative construct ( e.g., loop, for, while) that will cause the execution of a subset of instructions to be repeated a specified number of times.
The trick is to understand how many times the instructions will be repeated.
For k iterations, the general rule is: