8 | How binary search saved lives, First Principles Thinking & More
How an algorithm was invented and saved lives
Apologies. Apologies.
I’ve been off the grid for a while now. The last issue was sent in September and I stopped writing because of….reasons. Procrastination was definitely not one of them(😅)
The newsletter has grown quite a bit since then. Am sending this issue to ~160 people. Unbelievable.
If you are new here — Hey! I’m Mahaprasad and this is my weekly newsletter!
There are structural changes this time(and henceforth).
Each issue will have 4 sections:
Brain Food (highlight)
One Quote
One thread
Cool resources
Let’s dive into this issue!
Brain Food
A simple algorithm
Binary search / Group testing
It’s an algorithm that most of us are aware of. There’s a 100% chance that you would have used it but might not know it’s actually called “Binary search”.
Imagine searching up a word in a dictionary. Would you go through each and every word from the start of the dictionary?
If you had loads of time to kill, you probably would.
Here’s what any sane person would do:
- Flip open a random page
- If the required word is not on it — turn to the nearest page it might be on.
- Still not on it? — turn to the nearest page that it might be on.
- and voila! You finally found it!
Through this process, we kept reducing our sample size until we arrived at our desired result. Simple.
There’s a 100% chance you have used this method earlier.
The U.S. Army and Syphilis
The invention of group testing can be traced back to WWII.
Syphilis was a problem back then. The U.S. Army wanted to weed out all men who called up for enlistment.
The presence of syphilis could be identified with a blood test. However, individually testing the blood sample of each new recruit costs lots of time and resources. Thus, the U.S. Army had to face the following problem:
Is it possible to test N people with less than N tests?
Statistician Robert Dorfman came up with a simple solution for this. Instead of going down the hardcore mathematics approach, I’ll simplify it.
Imagine that there are 100 people and exactly 1 of them has the disease.
We could test each one of them and do a total of 100 tests. But that would be a waste.
We do this instead:
You divide the people into 2 equal groups of 50. Take their blood samples and mix them. Conduct the test.
The test will result positive for exactly one sample group. Discard the other 50. People remaining: 50
Divide the sample group into equal groups of 25 now. Take their blood samples and mix them. Conduct the test.
The test will result positive for exactly one sample group. Discard the other 25. People remaining: 25
Keep continuing this process until you find the one with the disease.
The total number of tests done? SEVEN(7)
Instead of having to test each person and come up with the results, through this approach, we saved time, energy, and resources!
That was some big brain shit, wasn’t it?
Note: Group sorting isn’t exactly Binary Search. In this example, if you were to number each test subject from 1 to 100, then it might be called a modded version of binary search.
Quote
Almost everything will work again if you unplug it for a few minutes — including you.
~ Anne Lamott
Wifi isn’t working? Unplug it.
Often times disconnecting from this constant bombardment of information and taking up a break is what gives clarity to push forward and sustain.
Thread I loved

We live in a world where those who triumph know things that aren’t taught anywhere. These razors can only come from experience.
Gagan Biyani breaks down 22 such skills that will help you grow in your personal and professional life.
Cool shit
This is a collection of all the newsletters am subbed to. There are approximately 45 of them :P
You might discover some hidden gems. Take a look.
Breaking things down to their fundamental principles is a “must” skill.
Check the website out. You will absolutely not regret it.
Liked what you just read? Share it on Whatsapp, Twitter maybe?
Have a productive week ahead!
Rooting for you 💖
Mahaprasad
Beautifully curated ✨
Loved it! Looking forward to read it every week!:)