Different Costs (Part 2)

This is the second part of my “Learning from Algorithms” series where we explore what we can learn from algorithms and how to apply this knowledge in our daily lives. You can find the first part on “Input and Output” here.

Everything has a cost. Colloquially, this often means money. However, algorithms teach us that the cost of an action can be more nuanced. Algorithms know two main currencies: runtime and memory. You either ask “How long does it take to do the task?” or “How much memory do I need to do the task?”. For example, there are about 249 million search results for “cute kittens” (memory) on Google that were retrieved in 0.34 seconds (run time). 

If I were to store all 249 million search results for “cute kittens” on my hard drive I could load them even faster, but I would need a mighty big data storage! The relationship between runtime and memory is generally inverse. If I need to implement a faster algorithm I often have to provide more storage. If I need to make do with less memory, my algorithm might run slower.

This drives home the point that, for algorithms, there are different kinds of costs. You can also think of it like bank accounts with different currencies. The actions you take can increase and decrease each currency. This holds true not only for algorithms, but for daily tasks as well. For example, if I order a takeaway I gain time (do not need to cook), I have more headspace (no need to plan in advance), but I lose money (generally more expensive than alternatives).

A wide array of such “currencies” exists. While I thoroughly enjoy the occasional takeaway, I realised that, if time permits, I actually love the process of sourcing a new recipe and then preparing it. A very powerful currency comes into play here: joy. The only part I don’t like is the grocery shopping (takes too long), and therefore I am happy to pay a premium for my groceries being delivered to my door.

In our capitalistic society we often revert back to money. However, our actions may not make sense if we look at it purely from the monetary perspective. Take the concept of a pub. Arguably, I could have a drink of almost identical quality at home, but I nevertheless choose to pay three times more when I go to a pub with my friends. While it does cost money, I fill up the “social currency”. Taking an Uber is certainly more expensive than taking the bus, but I save time and gain comfort.

I invite you to observe the costs and gains of the actions you take. Is the implicit “price” you pay in line with your values? What is the “price” you are willing to pay? Stay tuned for the next part of the “Learning from Algorithm” Series where we explore how these costs can be optimised. 






Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s