Search

# How Is An Algorithm Designed? Here’s The Thought Process Behind It

If we said that your day began and ended with an algorithm, it would still be an understatement. From turning off eerie chimes of alarm clocks to pulling down the curtains after binge-watching Netflix, modern man is under a deluge of algorithms.

Designing the right algorithm for a given application is a creative process. A problem has to be identified, a solution has to be sculpted out — sometimes remote and often oblivious to the domain of problem under consideration. Eventually, these pieces of solutions are threaded together to work in congruence with each other like a well-oiled contraption.

Being a successful algorithm designer requires a certain attitude — the ability to ask oneself questions to guide through the thought process. To use it effectively, you must not only ask the questions but answer them as well. For an algorithm designer, there is never an answer which says just “no”. But, “No, because…”

### Understanding The Problem

The first step for designing an algorithm is to begin with the premise of the problem itself, like, the components of an input and the desired results, or the importance of optimisation in obtaining the answers. Because this exploring this question will decide whether to use more or fewer steps in an algorithm. When the significance of an optimised solution gets decided, factors like speed come into the picture. As a numerical problem is different from a graph algorithm problem which in turn is different from a geometric problem. Different problems, different speed hence varied efforts.

### Redundancy Check

This is more or a less an obvious one because who wants to reinvent the wheel? Every problem will be searched for available solutions both popular and obscure ones. In case of finding none, an algorithm designer has to recheck for other domains with sub-branches that overlap with the problem under consideration.

### What Heuristics

Since, the above step gives an idea about the accuracies, time and speed, one can then conclude on the magnitude of effort required. And, if the solution is to be checked for precision and it needs a test which will lead to searching for the tests available or design a customised test. If a solution is found to be working then it should be checked for its repeatability i.e whether it gives approximately similar results with changing data; large value in the sample first or the smaller sample or a random one altogether. After determining the characteristic of the solution to certain samples, the ill-performing heuristics should be noted as well.

### Checks And Balances To Make A Case For ML Algorithms

The sections prior to this dealt with how to start with a problem at a fundamental level. From a machine learning perspective, which deals with large chunks of unprepared, non-linear data, questions such as time and speed and, accuracies become increasingly important and the modern day gadgetry provisions it as well, with all the advancements in computational devices.

The following are few questions a machine learning researchers would face or should ask before they posit a new algorithm:

• Are there any special cases for the problem under consideration?
• Why can’t this special-case algorithm be generalized to a wider class of inputs?
• How does the solution behave when few input parameters are left out?
• Is there a way to split the problem into two smaller problems? Does this suggest a divide-and-conquer algorithm?
• How can dynamic programming be used to exploit the order of the elements; like the branches in a decision tree?
• Can directed randomness be used to simulate the actual scenarios?
• Is the problem similar to NP-complete problem?
• If yes, then is that the reason behind improper efficiencies?

### Conclusion

Problem-solving is not a science, but part art and part skill. It is one of the skills most worth developing. And, finally, the most important question that a researcher should save for the last, like we did in the article is, why not start again from the beginning and work through these questions again and if any of these answers have changed since the last trip?  Noted author and computer researcher Steven Skiena rightly said, “In algorithms, as in life, persistence usually pays off.”

I have a master's degree in Robotics and I write about machine learning advancements.

### Telegram group

Discover special offers, top stories, upcoming events, and more.

### Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

### NVIDIA Planning Big Expansions in Japan

Prime Minister Fumio Kishida has extended billions of dollars in financial support to bolster TSMC

### Runway Partners with Getty to Build Video Generation Model for Enterprises

Runway enterprise users can refine RGM with their proprietary datasets, benefiting various industries like Hollywood,

### Modular Announces Partnership with AWS, NVIDIA

ModCon 2023 was Modular’s first developer conference.

### Air India Closes Historic Data Centres, Migrates to the Cloud

The closure of the data centres will further result in nearly a million dollar net

### India’s Fab Ambitions: Tall Promises or Work in Progress?

Despite numerous claims, India still does not have a fab.

### Extropic AI is All About e/acc of Generative AI

The startup wants to open source its technology, which the founder calls is “AI Manhattan

### AWS’ Multi-Layered Approach to Tech and Trust

For 17 years Amazon Web Services has followed a set of principles to reach the

### AssemblyAI Raises \$50 Mn for Superhuman Speech Recognition

The new model the company is building is trained on more than 10 million hours

### Top 6 Generative AI Jobs in India

As the year concludes, we’ve compiled a list of promising generative AI jobs for those

### AIM Top Ranked PG Data Science Programs (Full Time On-Campus) – 2023

A good course has high and well-balanced scores across all the parameters, making it at