Information about Computer Algorithm

Subscribe Us

header ads

Information about Computer Algorithm

 Home - Definition of Algorithm - Characteristics - Qualities - Representation - Example of Algorithm.

Definition : 

        Procedure for solving problems. Step by step description of how to arrive at a solution.It must be implemented using some programming languages (c,c++, Java , python,etc.)

         A algorithm is a sequence of unambiguous instructions for solving problems.

Example :

    For obtaining a required output for any legitimate input in a finite amount of time.

Full information about Algorithm
Computer Algorithm


Characteristics of Algorithm:

1. Written within a sequence.

2. Should be precise and unambiguous 

3. No instructions must be repeated infinity.

4. Guaranteed to terminate.

5. Produce the correct result.


Qualities of Good Algorithm:

1. Accuracy - provide exact result.

2. Memory - Require minimum computer storage.

3. Time - Lesser the time and better the quality.

4. Sequence - produce in a organized form.


Representation of Algorithm :

1. Pseudo code - mixture of natural and programming languages like constructs.

2. Flow chart - Diagrammatic representation .

3. Programming language - Like , c, c++ ,Java , python.


Example 1:

 sum of two numbers: 

Step 1 : Start

Step 2 : Read the value of A and B.

Step 3 : Set  sum = A+B

Step 4 : Stop


Example 2:

Step 1 : Start.

Step 2 : Read the value of A and B.

Step 3: If A>B then display B is Big.

Step 4 : Stop.




Post a Comment

1 Comments