Introduction To Algorithm
Introduction To Algorithm
Algorithm
Step by step method of solving problems
Procedure
Data Structure
Specialized format for organizing and storing data
Properties of Algorithms
Input
Output
From the values the algorithms produces the output values from a specified set
Solution
Correctness
The algorithm should produce correct output values for each set of inputs
Finiteness
Introduction to Algorithm 1
The algorithm should produce the output after a finite number of stems for any
input
Effectiveness
MUST be possible to perform each step of the algorithm correctly and in a finite
amount of time
Generality
The algorithm should work for all problems of the desired form
Pseudo-code
Iterate across the array from left to right, searching for specified element
Binary Search
Greedy Search
Introduction to Algorithm 2
Examples
Finding a route between two cities with the smallest total mileage
Finding fiber links between network nodes using the least amount of fiber
Bubble Sort
Introduction to Algorithm 3