## What is Algorithm?

The algorithm is a set of rules defined in specific order to do certain computation and carry out some predefined task. It is a step by step procedure to solve the problem.

The term Algorithm was coined by the Persian mathematician al-Khwarizmi in the ninth century

The algorithm is a set of rules which are used to solve real-life problems. It provides a loose form of a solution in a pseudo-programming language.

Algorithms are, in essence, a sequence of instructions that must be followed step by step in order to perform anything helpful or solve a problem. A cake recipe, for example, may be thought of as an algorithm for producing a cake.

So, what exactly is an algorithm? They may be thought as as small instruction manuals that inform computers how to accomplish a particular task or alter provided data.

Given the algorithm, it is easy to program the solution. It bridges the gap between natural language description of the solution and syntax of programming language.

## How Computer Algorithm Works?

Algorithms in computers operate on the basis of input and output. They take the input and apply each step of the algorithm to it to produce a result.

A search engine, for example, is an algorithm that takes a search query as input and searches its database for things that are relevant to the terms in the query. The findings are then output.

Algorithms can be simply seen as flowcharts. The input generates steps and questions that must be addressed in the correct order. The produced result is the outcome when each step of the flowchart is completed.

### Take Away

• An algorithm is a collection of instructions for completing a task or solving a problem.
• Algorithms are used in every computerized device to reduce the time necessary to accomplish tasks manually.

## Types of Algorithms

Algorithms are categorized according to the concepts they employ to complete a task. While there are other types of algorithms, the following are the most fundamental categories of computer science algorithms:

• Brute force methods: All potential solutions are tried until a suitable solution is identified.
• Divide and conquer algorithms: They divide the problem into smaller subproblems of the same type, solve those smaller problems, and then combine the answers to solve the original problem.
• Randomized algorithms: They find a solution to a problem by using a random number at least once during the calculation.
• Greedy algorithms: They discover the best answer at the local level with the goal of finding the best solution for the entire problem.
• Recursive algorithms: Such algorithm tackle the smallest and simplest version of a problem before moving on to solve ever bigger versions of the problem until the original problem is solved.
• Backtracking algorithms: This class of algorithms split the problem into subproblems, each of which can be solved; however, if the desired answer is not obtained, move backwards in the problem until a path that advances it forward is identified.
• Dynamic programming algorithms: They divide a complex problem into simpler subproblems, then solve each of those subproblems just once, saving the answer for future use rather than re-computing it.

## Why Understanding of Algorithm is Important?

Algorithmic thinking, or the ability to define specific methods to solve a problem, is essential in a variety of areas, including machine learning and artificial intelligence. We utilize algorithms and algorithmic thinking all the time, even if we aren’t aware of it. Students can use algorithmic thinking to break down problems and conceive solutions in terms of discrete stages. Understanding and using an algorithm necessitates students developing disciplined thinking and reasoning skills.

## Donald Knuth – The Father of Algorithm

Donald Ervin Knuth is an American author. is an American computer scientist, mathematician, and was professor at Stanford University professor. He received the ACM Turing Award in 1974, which is regarded as the “Nobel Prize” in computer science. Knuth has been named the “Father of Algorithm Analysis.”

Knuth authored the seminal “The Art of Computer Programming” as an associate professor at Caltech, a seven-volume collection that rapidly became a go-to book for anybody interested in the how’s and why’s of computer programming.

Knuth also authored “Surreal Numbers”, a book about alternative number systems, as well as several papers and contributions to recreational mathematics. He pioneered the concept of “literate programming,” which encouraged programmers to conceive of programming as works of literature or prose. Knuth was admitted into the National Academy of Sciences in 1975 after receiving several honors. He is a real pioneer in one of the most fundamental areas of computer science, the art of programming.

## Books Authored by Me

I have authored 8 books (as on August, 2021) for various reputed universities of country including Savitribai Phule Pune University, Gujarat Technological University, Punjab Technical University, Uttar Pradesh Technical University (Now, Dr. A. P. J. Abdul Kalam Technological University) etc. Some of the books are listed here. On this platform, I will be sharing my years of experience in lucid, simple, and easy to understandable language with examples. Hope this will help to clear your doubts about tricky concepts of Design and Analysis of Algorithms.