In a world dominated by technology, you hear about these “algorithms” all the time. Every major tech company has one – Google, Facebook, Apple, etc. So what exactly are they? Well, I am no expert but I did watch a documentary on Netflix recently called “The Secret Rules of Modern Living: Algorithms” and I learned quite a lot. It turns out that algorithms are not exclusive to computers. The first algorithms were used thousands of years ago! Lets take a quick look at the history of algorithms as well as some famous ones featured on the documentary.
History
The first algorithms predated computers
So what makes an algorithm?
An algorithm can be defined as a precise set of instructions that always finish and can be applied in many different situations. They are usually used for highly repeatable tasks. That is why they are perfect for computers.
Sorting Algorithms
Sorting is probably the most important & common application for algorithms. The documentary runs through a couple really important types of sorting algorithms – bubble sort & merge sort. I will summarize them briefly below:
Bubble Sort
According to GeeksforGeeks.com bubble sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in the wrong order. Check out the gif below for how it looks visually.
Merge Sort
Again, GeeksforGeeks.com explains it best: Merge sort is a divide and
Some Noteable Algorithms
The documentary points out some algorithms used all the time. Below are some famous algorithms that you are most likely using everyday.
Google PageRank
Google’s page-rank algorithm is what made them what they are today. The algorithm ranks search results based on incoming and outgoing web-links. The documentary shows the algorithm in its most basic form by demonstrating how it works using a soccer match. The players act as the websites on a search results page while each pass of a ball represents a web-link. Check out the short clip here.
Camera face detection
Whenever you open your smart phone’s camera you may notice a little square that auto-attaches to everyone’s face in the frame. This is so that the camera will auto-focus on the subject’s face. The camera uses an algorithm that detects four abstract patterns that are distinct for faces.
Online Dating
I’m sure you are all familiar with the popular dating apps – Tinder, Bumble, Hinge, Match, etc. Well, all of those apps use a similar matching algorithm that matches users based on similar location, age, interests, and preferences. The documentary showed how the “stable marriage” matching algorithm works by using a deck of cards. Check out the example in this clip.
Wrap it up
I can keep going on about more famous algorithms but I am sure that you guys are already starting to yawn. I hope that this post was mildly useful and it demystified the world of algorithms a little bit. Let me know what you think on either my Linkedin or Facebook comments. Until next time, Richie Blogs out…