Algorithms To Live By - Applying Algorithms To Everyday Things

Subscribe to my newsletter and never miss my upcoming articles

If you’re someone who tries to stay updated on today’s technology, you probably already know that computers use algorithms all the time to solve problems. Simply put, an algorithm is a finite series of steps that help solve a problem.

These algorithms have been carefully crafted to optimize the work that a computer needs to do. The reason why algorithms have to be very efficient is due to the fact that computer resources are limited.

Similarly, all our lives are constrained by limited space and time, limits that give rise to a particular set of problems.

Algorithms to Live By teaches us how to apply simple algorithms to make faster decisions and manage the chaos.

1. Optimal Stopping

The most common problem of all is the inability to choose when you are looking for an apartment, trying to find a place to eat, phone to buy, etc.

Our judgment is often clouded by the first thing that comes along, which we tend to perceive as the best option available. But then we continue the search in the hopes to find something better, and this goes on for a while.

Imagine an administrator who wants to hire the best secretary out of a hundred rankable applicants for a position. The applicants are interviewed one by one in random order. A decision about each particular applicant is to be made immediately after the interview. Once rejected, an applicant cannot be recalled. During the interview, the administrator can rank the applicant among all applicants interviewed so far but is unaware of the quality of yet unseen applicants. The question is about the optimal strategy (stopping rule) to maximize the probability of selecting the best applicant.

According to this algorithm, if you have 100 options, optimal stopping says to look at the first 37. Then, you should jump on the first that meets the standards derived from the previous 37.

And by extension, this algorithm can be applied to any decision that involves making a choice from the pool of options.

2. Scheduling

Every day has its challenges. It can be difficult to find the time to meet all your deadlines. This is the reason why there are so many productivity apps that focus on streamlining your to-do lists and reminders.

Computers have to do scheduling all the time, the processor has limited capacity and it can only run a few things at a time. It has a set of algorithms that it applies based on the task at hand.

For instance, if you’re juggling multiple tasks and not sure where to begin, use the Earliest Due Datealgorithm and always start with the task that has the closest deadline.

If time is running out and you know that you’re not going to get everything done, follow Moore’s Algorithm and skip the task that requires the most time; this way, you’ll get more tasks done overall.

If your to-do list is getting too long, go for the Shortest Processing Time algorithm: List your tasks in order of what can be done the fastest. This enables you to get lots of things done in a very short period of time.

3. Exploring vs Exploiting

The explore technique can be used when you start living in a new city. Initially, you should start exploring the places to eat or drink, but when you are about to leave the city, you should exploit the ones that you really liked.

The exploit technique tells you how to think about advice from elders. When your grandfather tells you which restaurants are good, you should listen — these are pearls extracted from decades of searching.

This is very valuable when you are starting something new, like writing blogs. When you are new to blogging, you can write on various topics and choose various styles of writing. You can experiment with what works and what doesn’t. Once you find your calling, you can stick to it.

I have written blogs on Medium before and now I am writing on Hashnode because I can self host my blogs. I tend to explore and exploit based on the situation and it helps me get the best outcome.

4. Organizing

Do you ever feel like you can’t find anything you’re looking for when you are getting ready for the office? Well, if you’re the kind of person who prefers a certain amount of organization, you can use sorting and searching algorithms.

These techniques are used in the file system of a computer which allows you to search for your files with a name within seconds. You can sort them with date modified or the type of the file.

But in essence, we use these techniques in our everyday life without knowing much about them. For instance, sorting a deck of cards uses merge sort where we divide the deck based on their suits and then combine them together.

Insertion sort comes into play when you are arranging the clothes in the closet, arranging them by their type, and maybe the frequency of usage.

Conclusion

It’s not only computers that use algorithms. When applied to our daily lives they help us in making concrete decisions and organize ourselves better. They will enhance the quality of our work and make us more productive in various situations. The task of solving difficult problems in our life can be easily tackled by turning to simple but powerful computer algorithms for help.

No Comments Yet