The art of making Simplifying Assumptions[Technique Tuesdays]
Whether it's System Design, Competitive Programming, Problem Solving, or Math, this technique will help you.
To learn more about the newsletter, check our detailed About Page + FAQs
To help me understand you better, please fill out this anonymous, 2-min survey
Recommend this publication to Substack here
Let’s say you’re really struggling with a problem,
No matter what you do you can’t come up with a solution. Maybe you were paid to work on a project, and you’ve hit some unexpected errors. No matter how much you try, you can’t figure out the solution. What can you do here? Give up? Switch Careers? Take all the money you got for this project and run away to Lagos? Before you do, I have a technique that will help you. So no need to make those flight reservations just yet.
The technique is making simplifying assumptions. Simply put, we look at our super hard question. And we say nope. Let’s solve an easier problem. Which easier you ask? Simple, an easier problem related to our hard one. Take our hard problem, change a few details about it, to produce an easier problem. Once we solve that easier problem, we will have some insight on how to solve the hard problem.
This might seem silly, but this is very powerful. You’ll see this technique a lot in Math, Theoretical Computer Science, and even AI/Machine Learning. Software Engineering is quite literally built on the back of this technique. It even shows up in Leetcode/Competitive Programming from time to time. A lot of programming gurus online try to explain this idea, but they don’t do a very good job. Fear not. The Most Woke writer in Tech has got your back. This post will cover the art of making these assumptions.
Instead of trying to do everything, simplifying assumptions allow you to focus on a few things well.
-Devansh (yes, me)
Key Points
How to make Simplifying Assumptions- We’ve already discussed what they are. So let’s go over how to make them. First, you have to look at the problem. Evaluate where it can get tricky. These are great places to make those assumptions. Let’s now cover a few of those areas where you can look.
Loosen Computational Constraints- One of the easiest ways to come up with optimal solutions is to sometimes go for the brute force solutions and build up from there. Create the brute force, identify where the solution is inefficient, and fix that specifically. Going straight for the efficient solution is going to require a lot more brain power.
Accept Tradeoffs in performance metrics- Take the Bloom Filter which we covered here. Instead of chasing perfect performance metrics, they trade off some accuracy for a sharp reduction in costs. Look at the priorities of a solution, and decide to ignore some of them to create your solution. This approach will help a lot when you start designing systems. This is also why all the
Reduce Scale- It’s easier to design solutions for 10 people than for 1000 people. While there are some problems that occur with scale, sometimes it pays to first focus on keeping it simple and scaling your solution up later. Otherwise, you will be pulled in too many directions.
Simplify the input- Take the IID assumption in Machine Learning. It states that your data has to follow some rules. A video with more details is linked below. While this makes ML not applicable to certain problems, no one will argue that Machine Learning isn’t one of the hottest fields right now. Similarly, if your problem is too tricky, it can be helpful to restrict the domain of your input to something more manageable.
Pick your battleground- Sometimes, it is easier to optimize on certain platforms and domains to match your needs. Focusing on only the easy ones can allow you to build your platform quicker. The experience of building these can be leveraged into building your solutions on the harder platforms later.
The problem is that there are many areas you can make simplifying assumptions. How can you decide what the most effective ones will be? This comes from practice. However, you obviously will not get to design systems/solve programming problems every day. This is where you should use the experience of others.
As you look at websites/app/services online start breaking them down into the components (platform they’re built on, inputs/processing, scale, performance metrics, etc). Look at the simplifications made for each component. Evaluating these simplifications will teach you a lot about which assumptions are more or less important. Think of this newsletter. What kinds of simplifying assumptions am I making in my operations? Comment/email/Reach out to me through social media with your answers.
Additionally, to those of you that want to master this even further, I have some homework for you. Look over the linked Math Monday on Mathematical Induction and how it helps with Recursion. There is a variant of Induction called Strong Induction. Look into that. Also spend some time learning about the Probability distributions, and where each one is applicable. This will give you a very strong base for understanding how effective simplifying assumptions are made.
Before proceeding, if you have enjoyed this post so far, please make sure you like it (the little heart button in the email/post). I also have a special request for you.
***Special Request***
This newsletter has received a lot of love. If you haven’t already, I would really appreciate it if you could take 5 seconds to let Substack know that they should feature this publication on their pages. This will allow more people to see the newsletter.
There is a simple form in Substack that you can fill up for it. Here it is. Thank you.
https://docs.google.com/forms/d/e/1FAIpQLScs-yyToUvWUXIUuIfxz17dmZfzpNp5g7Gw7JUgzbFEhSxsvw/viewform
To get your Substack URL, follow the following steps-
Open - https://substack.com/
If you haven’t already, log in with your email.
In the top right corner, you will see your icon. Click on it. You will see the drop-down. Click on your name/profile. That will show you the link.
You will be redirected to your URL. Please put that in to the survey. Appreciate your help.
I see you living the dream.
Go kill all and Stay Woke,
Devansh <3
To make sure you get the most out of Technique Tuesdays, make sure you’re checking in the rest of the days as well. Leverage all the techniques I have discovered through my successful tutoring to easily succeed in your interviews and save your time and energy by joining the premium subscribers down below. Get a discount (for a whole year) using the button below
Reach out to me on:
Instagram: https://www.instagram.com/iseethings404/
Message me on Twitter: https://twitter.com/Machine01776819
My LinkedIn: https://www.linkedin.com/in/devansh-devansh-516004168/
My content:
Read my articles: https://rb.gy/zn1aiu
My YouTube: https://rb.gy/88iwdd
Get a free stock on Robinhood. No risk to you, so not using the link is losing free money: https://join.robinhood.com/fnud75