An algorithm is a finite series of steps that help computers and humans solve problems.
Algorithms have been used for thousands of years.
Following a recipe is an example of an algorithm.
Making a pros and cons list is an example of an intuitive algorithm, which is less precise than a typical algorithm.
Optimal stopping algorithm helps you to know when to stop evaluating candidates (job candidates, partners, apartments, etc.) and make a decision. It states that when making a major decision, reject the first 37% of candidates to establish a standard and choose the next best that comes along.
Multi-armed bandit problems involve the challenge of strategically choosing from multiple options to maximize gains. For example, choosing which slot machines to use in a casino and for how long.
The Upper Confidence Bound algorithm is a solution to the multi-armed bandit problem.
Choose the option with the best expected value (e.g., slot with the highest jackpot).
Record the actual results.
Move to the option with the next best expected value if actual results are worse than the expected results (e.g., you expected at least $5 after 20 slot pulls but you received $0).
Adaptive clinical trials is what the medical world often uses to solve multi-armed bandit problems. It allows mid-course modifications driven by data rather than continuing a fixed plan. It involves constantly recording data and changing plans or stopping experiments immediately based on the results.
There are different algorithms that can help you sort items.
Insertion sort: take any item and put it in the correct order, repeat until done.
Merge sort: divide items into multiple sections and combine them together in order (e.g., for books, divide them into A-Z piles by the authors' last names, sort each letter's pile, then merge them together at the end).
Computers offer useful organization tips applicable to physical clutter too. Similar to how computers store frequently and recently accessed data in the fast cache layer, we can keep what we use frequently and recently close to our desk for fast access. Brains also work similarly, with recently reviewed info more recallable. So when prepping for a test, read your notes before bed to "cache" them for easy morning access.
“We say ‘brain fart' when we should really say ‘cache miss.'”
An algorithm to store and access items: use a small and easy-to-access bin for frequently used items, use a large bin for other items. As the small bin gets full, move the items that would be not used for the longest time into the large bin.
Remove unneeded items. “Sorting something that you will never search is a complete waste; searching something you never sorted is merely inefficient.”
Earliest Due Date algorithm: do the tasks with the earliest due dates first.
Moore's Algorithm: minimize the amount of late tasks by starting with the Earliest Due Date algorithm and then skip the tasks that would take the longest.
In computer science, priority inversion is when a lower priority task blocks a higher priority task from accessing a shared resource, forcing the high priority task to wait. This can cause delays in critical tasks and hurt real-time system performance. This idea also applies in real life when we do unimportant tasks before high-priority tasks.
For productivity, focus on one task until complete. Task-switching is time-consuming as each change requires a reset of working memory.
Distribution patterns help us make predictions. For example, the normal distribution states that most occurrences fall near the average.
Transmittal until breakdown is an algorithm in telecommunications in which you keep making a request to communicate until you either succeed or the system breaks down. This is the equivalent of calling your mom over and over again until she picks up.
Exponential Backoff is a network congestion control algorithm used in computer networking and telecommunications in which you double the time you wait to make another request at communication for each unsuccessful attempt.
Complex situations require complex models. However, overfly complex models or algorithms run into the issue of overfitting, where the solution considers so many variables that it becomes only suitable for the provided set of data and inaccurate for any other data.
Try to accept effective solutions that are good enough over theoretical perfection. When used judiciously, algorithms provide useful frameworks for decision-making despite limitations.
“Don't always consider all your options. Don't necessarily go for the outcome that seems best every time. Make a mess on occasion. Travel light. Let things wait. Trust your instincts and don't think too long. Relax. Toss a coin. Forgive, but don't forget. To thine own self be true.”
Practice computational kindness, make things easy and clear for others.
“Seemingly innocuous language like 'Oh, I'm flexible' or 'What do you want to do tonight?' has a dark computational underbelly that should make you think twice. It has the veneer of kindness about it, but it does two deeply alarming things. First, it passes the cognitive buck: 'Here's a problem, you handle it.' Second, by not stating your preferences, it invites the others to simulate or imagine them. And as we have seen, the simulation of the minds of others is one of the biggest computational challenges a mind (or machine) can ever face.”