Algorithm

UJJWAL GUPTA
Current Categories - C-programming

*Algorithm - An algorithm is defined as step by step procedure to perform a specific task within finite no of steps.
                                                                        or
A finite set of instructions that specify a sequence of operations to be carried out in order to solve a specific problem is called an algorithm.
 
example- Let us assume a common example of ATM machine to withdraw money.
To withdraw money,we follow the following steps.
1.swap the card.
2.Enter the code.
 3.put the desired amount.
4.withdraw amount.
5.cancel/clear.

*Characterisitc of an Algorithm-

1.Input -An algorithm have one or more inputs.The inputs may be texts,images or any type of files.

2.Output -An algorithm may have one or more outputs.Output always depends upon the output that means it has a specified relation with the input.

3.Finiteness -An algorithm must terminate after some countable no of steps.

4.Definiteness -Each step of algorithm must be precisely defined.that means it should be understable to the user. sometimes user may think that step is not definiteness due to the understabality of the algorothm. ex-A user is not able to understand,what should be given as input.then he would think that the algorithm is not defined correctly i.e. not definiteness.

5.Correctness -An algorithm should always have correctness property.so that it always give correct output according to the input.


 
MyFreeCopyright.com Registered & Protected
facebook-logo