Saturday, September 6, 2014

Introduction to Searching Algorithms

An Algorithm is a step by step process to find the solution for a problem.

A Search algorithm is an algorithm to find an item with specified properties among a collection of objects(usually similar type of objects).

Measuring the efficiency of an algorithm:
3 types:

1. Worst Case:
This is the case that causes maximum number of operations to be executed.
Here we calculate "Upper Bound" on running time of the algorithm.

2. Average Case:
We need to take all possible inputs and calculate computing time for all of the inputs. Then sum all the calculated values and divide the sum by total number of inputs.
We must know or predict the distribution of all cases here.

3. Best Case:
Here we calculate "Lower Bound" on running time of an algorithm.
This is the case that causes minimum number of operations to be executed.

No comments:

Post a Comment