Need of Algorithm1. To understand the basic idea of the problem. 2. To find an approach to solve the problem. 3. To improve the efficiency of existing techniques. 4. To understand the basic principles of designing the algorithms. 5. To compare the performance of the algorithm with respect to other techniques. 6. It is the best method of description without describing the implementation detail. 7. The Algorithm gives a clear description of requirements and goal of the problem to the designer. 8. A good design can produce a good solution. 9. To understand the flow of the problem. 10. To measure the behavior (or performance) of the methods in all cases (best cases, worst cases, average cases) 11. With the help of an algorithm, we can also identify the resources (memory, inputoutput) cycles required by the algorithm. 12. With the help of algorithm, we convert art into a science. 13. To understand the principle of designing. 14. We can measure and analyze the complexity (time and space) of the problems concerning input size without implementing and running it; it will reduce the cost of design. Algorithm vs Program:A finite set of instructions that specifies a sequence of operations to be carried out to solve a specific problem of a class of problem is called an algorithm. On the other hand, the Program doesn't have to satisfy the finiteness condition. For example, we can think of an operating system that continues in a "wait" loop until more jobs are entered. Such a program doesn't terminate unless the system crashes. Given a Problem to solve, the design Phase produces an algorithm, and the implementation phase then generates a program that expresses the designed algorithm. So, the concrete expression of an algorithm in a particular programming language is called a program.
Next TopicComplexity of Algorithm
