Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 66 - 2606_PlugGPT_C6_Flipbook
P. 66

    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: It should be able to produce a correct output with optimal use of time and space
                        resources.

                      USES OF AN ALGORITHM

                      An algorithm is mainly used for:                                  Just as a peacock’s call can
                         Performing data processing                                    signal upcoming rain, computer
                                                                                        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.

                       64   Premium Edition-VI

| 61 62 63 64 65 66 67 68 69 70 71 |