Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 85 - 2505_CoreGPT(Podar)_Flipbook_C6
P. 85

    To summarise, an algorithm is a step-by-step procedure designed to solve a problem. A computer
                     program is essentially a detailed algorithm. Before writing an algorithm, the problem or task

                     must be thoroughly analysed and clearly defined to ensure an accurate and effective solution.
                     Clickipedia

                               Ada Lovelace is credited for the evolution of the concept
                               of algorithm.

                     Characteristics of a Good Algorithm

                     The main characteristics of a good algorithm are:

                        Precision: Each step is precisely defined.
                        Uniqueness: Result of each step should be uniquely identified and only depend on the result
                        of the preceding step.

                        Finiteness: It should stop after a finite number of instructions are executed.
                        Input: The input to an algorithm must be clearly specified and precisely defined.

                        Output: The output produced by the algorithm must also be clearly specified and precisely
                        defined.
                        Effective: The algorithm should be efficient in terms of time and space.

                     Uses of an Algorithm

                     Algorithm is commonly used for:

                        Performing data processing                 Performing computer and mathematical operations

                        Manipulating data                          Searching for a particular data

                           SOLVING PROBLEMS WITH ALGORITHM

                     The construction of the Algorithm is the stage which requires creative thinking and finding the
                     best possible combination of steps to get the result. For example,

                     A. Algorithm to find product, sum and difference of two numbers
                     Step 1  Start.

                     Step 2   Read two numbers and store them in A and B.
                     Step 3   Multiply two numbers A and B and store the result in Product.

                     Step 4    Print the product.
                     Step 5   Add two numbers A and B and store the result in SUM.

                     Step 6   Print the sum.
                     Step 7   Subtract the number B from the number A and store the result in Difference.

                                                                                           Algorithm and Flowchart       83

| 80 81 82 83 84 85 86 87 88 89 90 |