Taming the Wilderness

nature_tree_forest_ray_sunlight-3056.jpg!d

Okay, here we are! Back at it again! I’m really sorry. But I had a bunch of deadlines converge on me and I just couldn’t keep up with the workload. A lot of you guys might not know this. But I also, write an idea journal for myself. It is a less curated version of my blog where I just randomly scribble about flight patterns in Pacific Gulls to what would happen in a universe with negative gravity. These are all my personal projects that I like to keep alive for the purposes of my mental sanity.

Some of these ideas make it to the blog. But as anyone who has done any real science will know. There is no such things as an abundance of answers in this world. Mostly, there is an abundance of questions. Some of which, I don’t even know how I would begin to answer. I like to further divide these into two more categories: Good questions and Bad questions.

A lot of people don’t think there can be bad questions. In my experience, this is not true. I have often found that the overwhelming majority of questions that are asked by me and to me are bad questions.

You would think that I would judge the people asking these. But I cannot. Since I am party to it as well. I think that any person who has tried to learn anything truly new to them has asked, at the very least, a few bad questions.

The famous example I like to give is: “how many kilometers is the temperature?”. This is an example that is (if not very rigorous) simple enough that most people who see it at least understand the existence of such an error.

So yes, there are bad questions asked all the time and my journal is full of these. There are some questions that are good. But of these, many are the of the kind that I don’t have the faintest idea of how to approach. And then there are others that I actually solve, only to discover that faceless horde of the internet has already solved it for me.

I was thinking about number theory (As one does sometimes): the twin prime conjecture. A conjecture is something that appears to be true but doesn’t currently have a formal and rigorous mathematical proof.

Twin primes are prime numbers whose difference is 2. So we have 3 and 5, 5 and 7, 11 and 13, 17 and 19 and so on. The conjecture is that there are infinitely many twin primes.

No one has the faintest idea how to prove this tantalizingly obvious concept. And this is one of the best things about number theory as a branch of math- It is extremely easy to understand some of these problems. Even if they are mind-crushingly difficult to solve.

So where do I fit into this story? Well, last year at about 1 pm in the night I was lying in bed and thinking about this problem. And I was struck by an observation: Every twin pair of twin primes (other than 3 and 5) has a multiple of 6 between them. 5 and 7, 11 and 13, 17 and 19. Could this be a pattern?

And I was off! Thinking about this, more and more. It was such an elegant and subtle thing. I had to wake up and look at a list of twin primes on the internet and lo and behold! It was true, every twin prime sandwiched a multiple of 6 in between! It seemed like the universe had only one recipe for the sandwich of a twin prime. And the filling was always a multiple of 6!!

Then, an even more general observation struck me! Every prime number (larger than 3) had a multiple of 6 either after it or before it.

But an observation is no good in math unless you can prove it. So I had to get out my notebook and pencil (Yes I still use a pencil as an adult! So what?) and was quickly trying to find a proof for this.

There are a few ways that I could prove this. But as the benevolent blogger that I am, I will use the simplest way here.

Every number greater than five (which is the first prime number after 3), let’s call it ‘k’, can be written as one of the six: k= {6n, 6n+1, 6n+2, 6n+3, 6n+4, 6n+5}. (where n is a natural number)

Now for a number to be prime it cannot give a natural number on being divided by another natural number. (except one and the number itself)

So what happens with the way we have defined numbers now

a) (6n) / 6 = n and 6 / 2 = 3

b) (6n+2) / 2 = 3n+1

c) (6n+3) / 3 = 2n+1

d) (6n+4) / 2 = 3n+2

As you can see, in each of the four cases we have at least one natural number that can divide the original number ‘k’ to give another natural number, which is not 0 or ‘k’ itself. So these four cases are never prime.

The only exceptions are 6n + 1 and 6n + 5.

These are numbers that are always adjacent to 6n or 6(n+1). Both of which are multiples of 6!!

So there you have it. Proof! Prime numbers greater than 3 are indeed adjacent to a multiple of 6.

But, I could never figure out how to use this result for the more general twin prime problem despite several hours of thinking.

And then, severely sleep deprived at this point, I decided to google this. (Some would have said this should be the first step.)

But then, after googling this a bit. I came to the disappointing realization. I found this site (From the University of Tennessee at Martin), which called this “Perhaps the most rediscovered result about primes numbers”.

Which means that generations of students saw this seductive problem and came to this precise conclusion independently of each other and were all disappointed to see hordes of thinkers before them, had already considered and abandoned this seductive intellectual dead-end.

Was I disappointed in seeing this? No doubt! It was already 3 pm on a weeknight. I had sacrificed my sleep. I had been called an amateur mathematician by some stranger who didn’t even know of my existence. And most importantly I felt the weight of my ignorance and narcissism rest on me for that brief moment.

But I would be lying if I didn’t admit that I also felt an excitement in this feeling! I had my ignorance laid bare to me and this meant I could learn something new.

The best feelings that one can often hope for in a career of science is a sense of humility when confronted with the vastness of knowledge, the even greater sense of humility when confronted with the vastness of ignorance. and our improbable capability to reduce some of the latter.

The unknown is scary! And rightly so. For our cave-dwelling ancestors, the unknown could have meant death. Arguably this continues to be true in the modern world. But what is remarkable to me is the fact that we can choose to expand our sphere of knowledge more and more. Sometimes, through the work of thinkers long gone and other time through painstaking thought and effort and math (yes you usually need math).

The simplest way to get a child to sleep in a dark room is a night lamp. That is what knowledge is to ignorance. It can’t light everything. But it is enough for one room.

But coming back, this is the inevitable fate of most of the good questions I have in my journal. So you might ask what, if anything, did I achieve in making this observation and by the tiny proof I presented here. The answer is: I solved something on my own.

A Rubik’s cube is a puzzle that was solved long before I was even born. And there are a lot of people who will look up the algorithm to solve it so that they can amaze people at parties. I never understood that. To me, that is like buying a trophy from a gift shop instead of winning the trophy for yourself.

It is not the trophy but how you get it that makes it joyful and satisfying.

Don’t mistake me, I do think there is value in reading. I do a lot of that for a living (but you might have guessed, I am not a mathematician!). Ultimately science is about questioning existing ideas and verifying repeatable experiments as it is about reading great thinkers and their ideas.

And that is something I don’t want to forget. I continue to write in my journal even when I don’t write my blog posts. Because these blog-posts need to have a beginning, a middle and an end.

I don’t need to restrict myself in my journal. Often my journal entries will end with the phrase “dead end!”, “does this mean anything?”. Or worse it will end with, “question made no sense, apparently!”. I don’t post these on my blog very often. Because this blog is about ideas that I have been able to develop to some satisfying degree or have neat mental ‘box’ to put them in. A half-developed idea that was abandoned by me, doesn’t make for an engaging read.

But I do find great joy in just being baffled by simple things that exist in direct defiance of my understanding. And in willing a small minority of these into being categorized and labeled in term of something more familiar.

To some extent that is why I have chosen my career in science. But regardless of what you do. I’d definitely recommend keeping an idea journal. It’s an idea I picked up while checking out a documentary on the life of Leonardo da Vinci. Who did this as well, as have a lot of people.

Often our journals go into the territory of dear diary nonsense. And there is perhaps a place for a different personal-journal for that purpose. But I do recommend an idea-journal if you don’t already keep one. It is remarkably fun!


A small update: This is definitely going to be a weekly blog moving forward. it’s quite hard to keep up with my old schedule for a hobby-blog. I might even not post for a while sometimes. Hope you guys understand! I’m still figuring this all out!

Many of my readers like to binge the blog. So in the meantime, maybe you can check out some of my earlier posts. Feel free to go back to the first post and scroll through them all (the calendar in the sidebar should help)! Here are some of the popular ones though:

Childish

Sports: The Best Thing Ever!

Disagreements

A Poem for Diwali

Textiquette: We all text let’s do it better!

Kitchen Chemistry: Milk

Lightning Cannons

Dissecting ‘Socha Hai’

Bad Movie vs No Movie


If you like this post and are not subscribed to this blog by email, Go ahead and click the link in the sidebar! If you are following the facebook page, you might not get all the notifications unless you have checked the options to see posts from the flying puppy first. So if you don’t want to miss all the new posts coming out, be sure to follow the blog by email! Also, do share this article with a friend who might be interested in learning new cool things every day!

Math vs Valentines Day

Slot_machine

With Valentines week around the corner. Instead of talking about the bizarre and arbitrary nature of such an occasion and bumming everyone out, I thought I’ll write a post on the mathematics of relationships. You’re probably thinking, “What a nerd! You can’t explain human interactions with math!”

Yeah, maybe not! But its fun to do math so shh!

Anyway, that genius-level critique aside. There are some really cool mathematical analyses available on the subject. And researchers are increasingly able to model several specific aspects of human relationships. Many of these are in their infancy. I am definitely not recommending you to live your life on the advice of a random blogger on the internet. (Let alone a flying puppy!) You can say that this post is more about my love of math than the math of love 😉

So, with all that out of the way, let’s jump right in!

Problem Statement: What is the best strategy to find the best possible life partner?

This one’s really hilarious. There is a game theory analysis to be found in the Optional Stopping Theorem.

This was originally developed to model slot machines in casinos. So let’s take a step back and analyze slot machines before we start applying it elsewhere! Here are the rules:

You start the game by putting a coin in a slot machine and pulling a lever. You get a random number on the screen indicating the number of coins you have won.

At this stage, you have two choices, either keep these winnings and go home. Or reject the winnings entirely and try again with a coin.

You cannot continue to play if you decide to take the winnings. And you cannot keep the old winnings if you decide to try with a new coin.

Now here is the problem. You have only a finite number of coins (attempts), say 100. So the question is what strategy has the maximum chance of getting the maximum winning?

It has been noticed that this problem is very nearly similar to looking for a relationship.

You meet several people, you like some people more than others. But once you pick someone, you cannot choose another.

So what does the optional stopping theorem have to say?

It says this (paraphrasing to make it less technical), the strategy in such a game that has the maximum chance of getting the maximum result, is to use 37% of all the coins you have and reject every single win for that first 37%. Record the maximum value you get in this sample and call this V1.

Now start using your remaining coins. Stop at the first result that is larger than V1. This new number V2 will have a 37% chance of being the highest value.

You’re probably thinking, “37% !?! Those are terrible odds!” Well, I don’t know what to say to you. Except that under this model, it can be mathematically shown that this is the method with the highest chance of success. The proof of it is really simple and anyone with a high school mathematics should be able to follow it. It will need you to know some calculus though. let me know if you need help with it (it does have needlessly complicated phrasing in the wiki page)

So if you reject the 37% potential suitors and then select the first one better than the first 37%. You will select the best suitor out of them all about 37% of the times. And mathematically, that’s the best chance you have of getting the optimal result.

Seems cold? Well, it’s just math!

It is good to remember at this point that these are all only probabilities. And a maximum probability is not a certainty. And probabilities do not mean anything for microstates. If a 100 people used this strategy it would work for about 37 of them. It is one of the funny things. It is the best strategy mathematically. But if you used it personally, it will still fail you most of the time. (Go figure!)

It is easy to see why even this optimum strategy fails 63% of the time. There are two simple examples:

If you were to meet the ideal person in the first 37%? Well, under this strategy you’d have to reject them.

Another case is if, unfortunately, you meet the worst people ever, in the first sample of 37%. Under this strategy, you’d have to settle for the first person that is slightly better than these crappy people. Maybe a really awesome person is waiting all along at the end of the line. But you’d have to settle for someone just marginally better than crappy, under this strategy.

So yeah, it is not a certain strategy. But an optimum strategy. It is possible to get lucky with a poorer strategy. But this one would succeed at a higher rate than any other.

But the real question is, is the optional stopping problem a valid model of relationships? Probably not! There are all sorts of assumption in a model like this.In real life, you can sometimes come back to people you have rejected. And how much you like somebody can change over time to a greater or lower value. And it is also illogical and also sociopathic about using a scalar to evaluate something as complex as compatibility. So take this model with a pinch of salt. And a lot of people who are older and wiser than me will tell you life is not about finding someone who is good at any one particular thing but to optimize many different and complicated things.

In real life, you can sometimes come back to people you have rejected. And how much you like somebody can change over time to greater or lower value. And it is also illogical and sociopathic to use a scalar to evaluate something as complex as compatibility.

A lot of people who are older and wiser than me will tell you life is not about finding someone who is good at any one particular thing but to optimize many different and complicated things.

So we come back to the genius level analysis of ‘Life is complicated’. One of those deep sounding phrases that are completely useless for anything practical.

But, a significant number of relationships do follow the model given by the optimal stopping theorem (logical or not, the fact remains that a surprising number of people have a scalar approach to a relationship). And it is fascinating to see how we can come up with an optimal strategy. With a few basic assumptions.

On a personal note, I think this model could be extrapolated to an N-dimensional space, using some vector calculus. Maybe I’ll do the math someday when I have more time. That should help with the whole ‘life is complicated’ critique. An infinite dimensional vector should be able to model an infinitely complicated person/relationship.

I’d expect optimal success probability to drop as the vector size grows. But you never know!

If you want to read more on these subjects: I’d recommend the book: The Mathematics of Love by Dr. Hannah Fry. Where she talks about all of this and more fun stuff! I’ll post another article on this subject when I get the time. (I was planning to include some other problem statements too but the post became too long!)

That’s all for today. See you next week folks! Have fun!


A small update: I have a lot of work piled up in my research lately, so I have shifted this blog’s schedule to weekly posts. I will try to get back to my original schedule  (MWF) soon.

Many of my readers like to binge the blog. So in the meantime, maybe you can check out some of my earlier posts. Feel free to go back to the first post and scroll through them all (the sidebar should help)! Here are some of the popular ones though:

Childish
Sports: The Best Thing Ever!
Disagreements
A Poem for Diwali
Textiquette: We all text let’s do it better!
Kitchen Chemistry: Milk
Lightning Cannons
Dissecting ‘Socha Hai’


If you like this post and are not subscribed to this blog by email, Go ahead and click the link in the sidebar! If you are following the facebook page, you might not get all the notifications unless you have checked the options to see posts from the flying puppy first. So if you don’t want to miss all the new posts coming out, be sure to follow the blog by email! Also, do share this article with a friend who might be interested in learning new cool things every day!

On the Nature of Roundness

The_Earth_seen_from_Apollo_17
The Blue Marble is a famous photo from Apollo 17

Roundness has always been a fascinating concept to me. It is quite the curious concept. One that is all around us.

 

Let us start with the most obvious question. Why are so many things round in shape? From planets to soap bubbles we see round things are all around us. Most of this comes back to symmetry arguments. Most forces have no preference for direction (in everyday experience, don’t send me comments on CPT symmetry, i discussed it in an earlier post). And when these forces act, we get the only shape that is the same in all directions, a round sphere.

Our own tiny size often gets in the way of truly appreciating the roundness of our planet. We are often used to seeing huge mountains and deep oceans. But, Mt Everest, at about 8.848 km is about 0.14% of Earth’s radius (6371 km). And Mariana trench, at its deepest, is about .17% of the radius of our planet. In contrast, the skin of an apple is about .4% of its radius. So if the earth were the size of an apple and we were to run our finger along its surface it would seem pretty smooth to touch, despite all its majestic peaks.

Interestingly, gravity is not the only force that acts on our planet, its spin, about its axis, creates a bulge at the equator? So while smooth, earth is not a perfect round

Funny thing about rotation, it’s always two dimensional. Which means, the sheer act of it creates a bias towards one of the directions. But in the remaining two directions, there is no preference. As a result, we find many objects take a two-dimensional roundness- A disc or a ring. These two forces are often at odds at the astronomical scale, creating squashed spheres. In extreme cases, like galaxies or the plane of the orbit of the solar system, they are completely two dimensional.

 

drop-159527_640
A cartoon raindrop

 

Another force that makes round things is surface tension. It is the reason soap bubbles are so round. And it is a pretty strong force. In fact, this is why I get pissed off when someone draws raindrops in the shape of teardrops. Rain is not shaped like that. It is closer in appearance to a sphere, only very slightly squished at the bottom because of air resistance. It is much closer to a sphere than anything. Because surface tension – spherically symmetric force- dominates! This is how metal ball bearings are made. A drop of metal is dropped from a height, it becomes a sphere immediately as a result of surface tension. As it falls down it is cooled in the air and solidifies into a nearly perfect sphere. So falling drops of liquid are near perfect spheres!

 

raindrop-1358708_640
A real raindrop

 

If you are interested in round objects, here’s something fascinating: KIC 11145123, which was discovered by the famous Kepler telescope in 2016. It is the roundest object ever discovered. It is a star that is rotating about its axis at an extremely slow rate. And the dominance of gravity makes it near perfectly round. With a 3 km distortion of a radius that has a radius of about a million!!! That’s insane!!

Of course, any discussion about the round things is incomplete without discussing pi. There is an ancient problem called squaring the circle. Where you take a physical circle and try to convert it into a square using only a compass and a straight edge (Not one with measurements like a scale, just an ordinary straight edge) in a finite number of steps. This is impossible to do.

You would think that this is because pi is irrational and hence can’t be constructed. But that is not true. Irrational numbers can be constructed all the time. For instance, a right-angled triangle with a unit edge gives us the square root of two along the hypotenuse- an irrational number.

So, why can’t we construct pi?

This is because pi is something beyond irrational. It is a different category of a number called transcendental number. The natural base of log ‘e’ is another example of a transcendental number.

So what are these? These are numbers which never appear as the solution of a finite order polynomial.

You must have heard that some infinities are larger than some other infinities. For example, there is an infinity of positive integers and infinity of negative integers. But the total number of positive AND negative integers is the same kind of infinity. These are all called countable/listable infinities (Aleph-0). We can list them one by one: 1, 2, 3… or 1, -1 , 2, -2, 3, -3…

The set of all real numbers though is uncountable. If we started from zero we wouldn’t be able to find the next number (0.000000—-01 ??). So this is a larger infinity (Aleph-1).

It can be shown that the set of transcendental numbers is an even larger infinity. So that’s pretty crazy, considering the fact that most of us have never even heard of them.

It’s also cool to distinguish the ideal circle from a real circle. Pi is defined only for an ideal circle since a real circle will have irregularities, at least at the molecular scale. I pointed out in my last post how about 31 digits of pi are all we need for any real application in the universe.

But coming back to the physical world. Here’s a question for the conspiracy theorists. Could the earth be flat instead?

Well, No!

But, what if we were traveling at the speed of light towards the earth at the speed of light? At that speed, the direction in which you are traveling would be so squished from your perspective that now the whole universe would be a flat two-dimensional concept from your perspective.

So the earth and indeed, every sphere would appear as a perfectly flat disc, in a perfectly flat universe if you are traveling at the speed of light.

But you can’t travel at the speed of light. For that, you’d need to be massless, like a photon.

So while the earth may be flat if you’re a photon, it is always round!