Page 111 - TP_Pro_V5.1_Class6
P. 111

ALGORITHM


                 In our daily lives, we often follow step-by-step instructions to complete tasks, such as following a
                 recipe to cook a meal or a set of directions to reach a destination. These sequences of actions are
                 examples of algorithms in everyday life. Just as these instructions help us achieve specific goals
                 efficiently, algorithms in computer science provide a structured approach to solving problems
                 and performing tasks.

                 An algorithm is a set of instructions or steps in a specific order to solve a problem or to complete
                 a task. In other words, algorithms are the building blocks of computer programs that comprise a
                 sequence of operations  to be performed by the computer in a specific order to solve a problem.





                                Which algorithm is used by Google Maps?



                 CHARACTERISTICS OF AN ALGORITHM
                 An ideal algorithm has the following characteristics:

                   Precision: Each step is precisely defined.

                   Uniqueness: The result of each step can be uniquely identified and only depends on the result
                   of the preceding step.

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

                   Well-Defined Output: The output produced by the algorithm must also be clearly specified and
                   precisely defined.

                   Effectiveness: The algorithm should be efficient in terms of time and space.


                 USES OF AN ALGORITHM
                 An algorithm is mainly used for:                                  Just as a peacock’s call can
                                                                                 signal upcoming rain, computer
                   Performing data processing
                                                                                   algorithms can predict future
                   Performing logical and mathematical operations                 events based on data patterns.
                   Manipulating data

                   Searching for a particular data




                           WRITING AN ALGORITHM

                 Algorithm provides a step-by-step solution to the problem. Let’s write an algorithm for some
                 problems.



                                                                                 Algorithm, Flowchart and Mind Maps  109
   106   107   108   109   110   111   112   113   114   115   116