Monday 17 February 2020

Blog Post #111 - Series #2 - Dissect and Analyze with the help of an all too familiar number!

In my earlier post, I had written about breaking down a complex problem into multiple smaller chunks using the example of finding n-th root of a number. In this post, we would look at the following - Given a particular scenario or use case or any problem statement, how important it is to evolve different perspectives and analyze various dimensions of the subject in focus. I would use a well known number in the digital world as an example just to illustrate how one could develop this skill by being patient and observant
65536 is synonymous with computers as 64 KB translates to 65536 Bytes. 65536 has also many factors of 2's multiple - 2 ^ 16, 4 ^ 8, 256 x 256, 16 ^ 4 and so on.
But a lesser known fact of 65536 is what I would focus on now given the theme of the current topic and it opens up a plethora of surprises. Let's dissect and break down 65536 digit by digit or carve out subsets, to reveal some amazing patterns
a) 65 - 13 x 5 (product of two primes)
b) 655 - 131 x 5 (product of two primes)
c) 6553 - Prime (product of two primes)
d) 553 - 7 x 79 (product of two primes)
e) 55 - 11 x 5 (product of two primes)
f) 53 - Prime
g) 653 - Prime
Go one step further and add or subtract combination of digits which are a subset
h) 65 + 536 = 601 - Prime
i) 655 + 36 = 691 - Prime
j) 655- 36 = 619 - Prime
k) 6 + 553 is 559 which in turn is product of two primes 13 x 43
l) 6553 + 6 is 6559 which in turn can be written as 7 x 937
m) 6553 - 6 = 6547 - Prime
n) 553 - 66 = 487 - Prime
Wow... A number which has 2 and its multiples as factors and is outright EVEN, exhibits a completely different behavior, when we dissect and analyze its digits or subset
This approach is pretty helpful in real life scenario, where given a use case or problem definition, it is imperative to break them down into multiple user stories or features and look at commonalities and patterns

Friday 14 February 2020

Blog Post #110 - The art of doing mental mathematics - Series #1

I was inspired by couple of videos I saw earlier today on kids doing mental mathematics calculations and hence decided to write a blog of slightly different nature and probably a series if this interests more folks. My intention is to remove the fear of Numbers and Maths in general and also make it more fun!

Background

I used to be fascinated by numbers from my junior school days (6th grade to be precise) and used to do mental Additions and Multiplications back then on a regular basis (Thanks to my classmate Ramesh who triggered this out of the blue noticing something that i had back then). After I enrolled into BITS, Pilani for my graduation, I started exploring mental mathematics to do n-th root of a number and logarithms - BITS was the perfect platform to explore as there was constant encouragement from my batch-mates and seniors, to do more

Now you may wonder why in the world someone has to do mental mathematics and calculate n-th root of a number when you can key in the same on a calculator or mobile these days and get the response! Yes there are enough options now and even 15 to 20 years back but performing mental maths really helped me to break-down complex problems and patterns and make you more inquisitive when you see patterns or numbers. Last but not the least, it also help remove the "fear" one has towards Maths as a subject

Enough of the preamble now and let's start with one simple example of how doing mental maths can probably help tickle our brain cells and help sharpen our analytical skills gradually as you experiment further


Example : Find the 31st root of 24 (Yes 24 ^ 1/31)!!

Must be wondering why I have taken an example of this nature.. The intent is not to teach someone how to find the root without using a calculator as it would require practice and time/effort but let's see how to break this down to simpler form and just work out the approach. The path to a solution is more important than the solution itself!

31 is a prime number and so there is no way find the 31st root as is. Hence let's look at the number nearby which has maximum factors

32 is closest to 31 and 31 can be factorized as 2x2x2x2x2

This would mean that we need to find five square roots of 24 in order to arrive at the answer. Now that sounds relatively simple compared to 31st root of a number isn't it?

Let's get into action

Step 1: Square root of 24 - 25 is the perfect square nearby and square root of that is 5. Knowing that, i would go with the law of approximation that square root of 24 would be ~ 4.9 (it doesn't matter if we need to get it very accurate as we still have more steps to go)

Step 2: Square root of 4.9... Not that easy but we know 2^2 is 4 and 2.5 ^ 2 is 6.25 (25x25). Since we have to find square root of 4.9, I would go with a number closer to 2.2 and see where we stand (22x22 is 484 and so 2.2 ^ 2 is 4.84). We are almost there. Let's go with 2.22 or 2.23 as the answer

Now drill down 3 more steps and as you go further this path, we will see that finding square root gets easier

Step 3: Square root of 2.23 is approximately 1.49 (2.25 square root is 1.5 and hence I went with 1.49)

Step 4: Square root of 1.49 is approximately 1.22 (since 144 square root is 12 and 1.44 would be 1.2)

Step 5: Square root of 1.22 is approximately 1.105 (since 121 square root is 11 and 1.21 would be 1.1)

Now what did we observe in Step 3 to 5? Most of us would remember squares upto 20 or 25 since we would have used it in some form or shape while doing Maths at school.. Invariably as you come down the chain while finding square roots, this trick would help us to arrive at the number

There is still one more step to be performed - Remember we started with 32nd root instead of 31 to ease the process and so we need to "adjust" the final answer. This would come by sheer experience but one thing we need to remember is that as n increases, 1/n decreases and approximation rule comes in handy

32nd root of 24 was approximately 1.105 and since I need 31st root, I will round it off to 1.108 or 1.109 (which is the final answer!)

In summary, while this technique may not give you near perfect answer but what you have managed to achieve is to breakdown a complex ask into smaller chunks and got your creative brain cells working.

This is especially important for students appearing in aptitude tests where they are not tested always to give answers upto 3 or 4 digits but given 3 or 4 choices, they need to identify the closest match - This is one area where practicing this comes very handy!


Have fun and try out few examples and I will back with another example in my next Blog post