Ten Algorithmic Principles Every Software Programmer Should Understand

Intersog
Intersog
Jul 10, 2017 · 3 min read

Memorizing algorithms isn’t something that can be accomplished easily as software code can be infinite. Furthermore, there is no real benefit to doing it. What’s important for software engineers is to learn and understand algorithmic principles.

This is because programmers develop algorithms using a finite set of instructions, so it can be advantageous to understand the various constructs used to build algorithms.

Understanding algorithms is a way of thinking that will enhance your skill set. When you are equipped with this knowledge, you will be able to take a look at an algorithm and quickly understand why it’s set up in a certain manner.

It essentially works as a filter when you’re in evaluation mode subconsciously scanning through various principles when you encounter a problem. This almost becomes second nature to most developers who repeat this process on a daily basis.

So what principles should you be aware of? Here are 10 important algorithmic concepts that every programmer should know.

1. Matrix operations

As data science grows at lightning speed, it’s important to understand that matrix multiplication is a lot faster than you would expect. Further, great minds have developed incredibly unintuitive algorithms to make matrices multiply in a way that is anticipated.

Often, these algorithms aren’t necessarily used as the MPI and BLAS libraries provide incredibly fast matrix multiplication. Whenever you’re able to do multiple calculations in terms of matrix operations, your life will be a lot easier.

2. Backtracking

When it comes to general algorithms, backtracking is a popular option to find all (or some) solutions to computational problems. These can be constraint satisfaction problems which incrementally builds candidates to the solution while at the same time abandoning each partial candidate “c” as soon as it’s determined that “c” can’t be completed to a valid solution.

Backtracking can only be applied for problems that admit the concept of a partial candidate solution followed by a comparatively quick test to ascertain if it can be completed to a valid solution. If the table is unordered, it will be totally useless for locating any given value.

Further, since backtracking can eliminate a large number of candidates with a single test, it can be a lot faster than brute force enumeration of all complete candidates.

3. Binary search

Binary search is an important concept that shows up on everything from databases to convex optimization. When you need to find a specific value buried deep inside a large set of things, you can rapidly figure out which direction you have to go by utilizing binary search.

4. Karatsuba algorithm

The Karatsuba algorithm follows a “divide and conquer” approach to fast multiplication. Fast multiplication is important and this is achieved by breaking down large numbers into smaller numbers to enable multiplication of smaller numbers.

This method can only be applied to multiply the numbers in all base systems (for example, base-10, base-2, etc.).

5. Dijkstra’s algorithm

The Dijkstra’s algorithm is named after the computer scientist who first conceived it in 1956 (published three years later), Edsger W. Dijkstra. It can be described as an iterative algorithm that offers the shortest path from one specific node to all other nodes on a graph.

There are many variants of Dijkstra’s algorithm, but it’s the original variant that found the shortest path between two nodes. However, a variant that’s more common fixes a single node as the “source node” and then goes on to find the shortest paths to all other nodes in the graph which creates a shortest-path tree.

6. Linear least squares

Continue reading in our blog…

Intersog

Written by

Intersog

Chicago-based provider of full-cycle custom software engineering and IT staffing solutions with own R&D Centers in North America and Europe.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade