Thursday, September 30, 2021

Gandhi Jayanti

After my grandfather passed away, my grandmother came to stay with us. One day I asked her if she met Mahatma Gandhi.  “I didn’t see him. But, your grand father used to proudly tell everyone that he met Gandhiji and even touched him”, she said gushing. Her response surprised me. Because, they used to live in a very remote village called Kuppili. I remember having to walk 6 KM to reach that village in my childhood. Thankfully, its very well connected now. The very fact that Gandhiji was able to meet someone in such remote corner of country well before independence is fascinating. Not just that, I’ve never seen my grand father wear anything other than Khadi clothes. He told me that he took a pledge to wear Khadi throughout his life. How could a man convince so many people to take such an oath? How could a man influence so many people to give up their jobs to fight for an abstract idea called freedom? If that can’t convince someone that he’s a great leader, nothing else can

   I used to think that Gandhiji got more credit than he deserved. We have an impressive number of freedom fighters like Nehru, Patel, Bhagat Singh, Gokhale and the list goes on. Why should Gandhi get so much credit? Google tells us that British have colonised 171 countries in the world. It was said that the sun never set in the British Empire. It crushed the 1857 rebellion which was fought by the combined force comprising of Hindus & Muslims, Farmers, Sepoys and artisans, Armies of Awadh, Mughals, Jhansi and so on, ruthlessly. The crown seemed invincible. Imagine yourself living under such a rule. All of a sudden, you hear a story. A person came from south africa and successfully fought against the British with the help of farmers. He also led another successful agitation in Khaira and got the Britishers to waive the taxes on farmers. And what did he fight with? Truth and Non violence. All you need to do to fight against the mighty and unassailable empire is to speak truth, not hurt anyone, wear and use only Swadeshi. How simple is that? It is easy to see why his ideas appealed to so many people. They were honest, simple to follow and they were rooted in Indian tradition. Our epics extolled Harishchandra who spoke nothing but truth. Non violence is central tenet in two major religions born here, the Buddhism and the Jainism. It takes a huge amount of courage to even tread the path of a Bhagat Singh or Khudiram Bose. But, the path laid out by Gandhiji was simple to understand and easy to follow, from the first glance at least. That’s what made him so successful

  There’re so many great leaders across the world. Why should we make big deal about Gandhi? In my opinion, Gandhi stands out even in the pantheon of greats. It is easy to win over the hearts of your friends. Winning over the hearts of enemies is the herculean task. When religious violence ravaged India during the partition, we didn’t have enough resources to control violence on both the borders of our country. The then governor general, Mountbatten took a call to send the troops to border with West Pakistan. Gandhiji was sent to the eastern border. After Gandhi reached Kolkata, an angry mob surrounded his house and demanded to see him. Gandhi’s host was frightened for his safety. But, Gandhiji went out to talk to the protester. After an hour, the entire mob sat down and offered prayers for peace in India. Such was his persuasion power. In South Africa, where he was thrown out of a train, there’s a statue acknowledging his greatness. When I visited London last year, in front of the British Parliament, the law making body of country he fought against, there installed his statue. It might look diminutive like he did, but there’s no doubt in my mind who stands the tallest. 

PS: The incident in Kolkata was narrated by Balaji Viswanathan in one of his Quora answers


Thursday, September 16, 2021

Quantum - 1

I’ve been reading a bit of popular science articles on quantum mechanics recently. In this post, I’d like to share a bit of what I understood, because I found it really exciting. If any of you find inaccuracies in this post, let me know. I will fix them

   There’s so much jargon and equations involved in learning quantum mechanics, which makes approaching the subject scary. Half of what I read goes over my head. But, the physics underlying those equations seems beautiful. Let’s begin this post by answering a question, ‘What’s the difference between classical physics & quantum physics?’

   Let’s take a bike moving at the speed of 80KMPH from Bengaluru to Chennai. We’re assuming that the road is perfectly straight without speed bumps, there’s no traffic and the bike is going to maintain its speed forever. How do we describe the bike? We can say, the bike is currently(at 10PM on 16/09/2021) 30KM away from Bengaluru going towards Chennai at the speed of 80KMPH(speed + direction gives us velocity) with no acceleration. If someone asks us where the bike will be at 11PM, we can say that it is going to be 110KM away from Bengaluru on its way towards Chennai. There’s a certainty here. 

  In Quantum mechanics, there’s a loss of certainty. It’s a bit like the real world. In a real world, the bike will never be able to maintain a constant 80KMPH. There’re speed bumps, there’re toll gates, there’s traffic, there’s friction, the road isn’t perfectly straight, there’s the minor issue of driver fatigue too. So, Quantum mechanics gives us the probability of the rider position. It can say, the driver will be 110KM away from Bangalore on way to Chennai with probability 0.33, 100KM away with probability 0.25 and so on. If the rider makes a huge number of trips from Bengaluru to Chennai, we can test out if the probability values are accurate or not. In Quantum mechanics, the state of particle is given by wave function and it indirectly tells us about the probability.

   Secondly, how do we calculate the wave function? To do that, we make some assumptions, like boundary conditions. For example, we could assume that a school going kid will be present within the premises of school on a working day. So, we assume that the probability of kid present outside of school is 0. Similarly, if we add up all the different probabilities of the kid present in each place in school, we should get 1. In simple terms, it means that we’re assuming, the kid will be present in school and not anywhere else. Similarly, we try to characterise the system and solve its hamiltonian. Basically, we solve some equations by placing some more constraints of energy and use that to get the wave function. We will see how this will be used later in the post. 

   Thirdly, the most important principle of Quantum mechanics in so far as I understood it is hidden within name. It’s quantisation. What’s Quantisation? Let’s say someone told you, I’ve some notes of money in my wallet and asked you to guess a note. What would you guess? You could guess that I’ve a 10 rupee note, or a 20 rupee note, a 50, 100, 200, 500 or a 2000 rupee note. You’ll never guess that I’ve a 72 rupee note in my wallet. Because, we all know that RBI doesn’t print a 72 rupee note. So, that’s an illegal note. Similarly, quantum mechanics postulates that the observables of system are quantised. For example, it states that the energy/momentum/position/velocity or any other observable can only take one of the allowed values for that observable. It never takes illegal values. If we know the wave function of the particle and characteristics of the system, we can calculate the probability for the observable to be one of the quantised value. If we recall our high school physics, we can find some examples. The angular momentum of electron is quantised. Similarly, the energy of an electron is quantised.

  How do we calculate what quantised values does a measurable like energy take? Usually, we characterise the system in form of a Matrix. For example, to calculate energy of a particle in hydrogen atom, we first characterise the system as a Hamiltonian Matrix(My understanding is that most of the research in quantum mechanics deals with figuring out these matrices for various observables under various conditions). The eigen values of this matrix are the quantised values that our electron is allowed to take. This is another postulate of quantum mechanics.

  Okay, now that we’ve quantised values, how do we calculate the probability that electron’s energy is particular eigen value? All we need to do is to write wave function as a linear combination of its eigen vectors. The square of normalised coefficients of these eigen vectors gives us the probability corresponding to that eigen value. To give an inexact parallel, we can think of it as a factorisation in powers of primes. For example, 56 can be written as 8 * 7 which is (2^3 * 7). So, when we reduce 56 as multiples of powers of primes, we get that it has 2 raised to power 3 times, and 7. Here 2 and 7 are similar to eigen vectors. Their powers, 3 and 1 can be treated as their coefficients or the terms which help us determine the probability that the observable takes a particular quantised value. Their squares would be the odds of that particular value. For example, it could take value corresponding to 2 as 3^2 I.e 9/10 times. And value corresponding to 7, 1 out of 10 times

  

Wednesday, September 8, 2021

Malayajata

 After winning Lanka, Lord Rama returned to Ayodhya with Sita amidst a huge fanfare. People showered flowers over the royal couple all along the way. It seemed as though the Gods are showering flowers from the heavens. The ears reverberated with the chants of ‘Jai Sri Ram. Sita Mata ki Jai’ The celebrations never ceased in the city of Ayodhya. It seemed that no force can touch the invincible Ram. However, he was getting tormented by endless nightmares. He often woke up mid sleep screaming ‘Sita! Lakshmana!’ The queen was very worried. She summoned the royal doctor. He was flummoxed too, as Lord Ram showed no other signs of sickness. This went on for a while

One day, one of Sita’s maidens told her about Malayajata. It’s a flower which grows in Himalayas in once in a million years. Legend has it that, Dhanvantari got impressed with the hospitality of the local Jatava tribe and gifted it to them for hosting him. The flower is a cure-it-all. Lord Ram and Sita visited Jatavas to try their luck. The tribe, known for their hospitality, offered the king a concoction made of Malayajata flower. Instantly, he got cured. 

  Cut to the modern day, the hamlet is still inhabited by the Jatavas. From high up, it looks like a misplaced green dot in a white and brown portrait. Modernity bypassed the village from its periphery. Numerous adventurers visited the village to explore the famed Malayajata flower. No one in the recorded history of humans saw the flower bloom from the tree. However, the locals worship the tree with utmost devotion. The women decorate the tree with twigs, flowers, and leaves from surroundings. It’s said that the birds endemic to the region protect the tree from being inhabited by migrant birds. No one has ever seen a bird on the top of the tree.

 

  This legend has attracted a man called Rajan. He is a renowned botanist. He stole a branch from the tree to his lab. Through the latest advancements in science, he modified the genetic sequence in the branch such that it flowers every year. He went back to the Malayajata tree and grafted the genetically modified branch, unbeknownst to the tribe. 

 

  The next year, for the first time in the recorded history, the tree bloomed. The Jatavas are ecstatic. They organised a huge feast. The chief delicacy was the concoction using the flower. The custom in these feasts is that the tribal lord begins eating, the entire tribe follows. As soon as he takes a sip of the concoction, he collapses on the floor vomiting blood. The feast is over.

  So, coming to the final question. Is the legend wrong, or the science?


PS:This story is completely my own and not derived from any other source

  

  

 

Thursday, September 2, 2021

How is our data used?

It’s no secret that the entire world is worried about the privacy of citizens. There’re concerns that modern companies know way too much information about us. This post is my thought experiment where I try to explain how I think our data will be used by Google to deduce information(As mentioned, this is a thought experiment. I'm not sure if Google does this or not)

  Let’s start with a simple use case scenario. I want to setup a Kirana store and I approached Google to help me. How can Google help me? To begin with, it can tell me average cost to lease a store in different parts of city. This is child’s play. It can tell me the potential of a given area. For example, let’s assume if everyone in the colony is using google pay exclusively to make payments. Google knows the monthly expenditure of people in the colony. Furthermore, Google made it mandatory to turn on device location before making payment. So, Google can also tell me the revenue of each shop present in the colony. What else can I know from Google? It’s a common observation that people prefer to shop with someone who shares a similar background. For example, a Telugu person might prefer shopping with a Telugu shopkeeper. Google can deduce these patterns and tell me. It knows that I speak Telugu from my Youtube & browser search history. Even if I’m cautious and always use private browsing, it can deduce the IP address associated with my phone and correlate it with my searches. Similarly, it can deduce the mother tongue of the shopkeeper. From this information, it’s trivial to make the above connection.

  Is that all? No. Google can help me manage my inventory. For example, people from the colony might be going to a rice mart 5 KM away from the colony to purchase rice every month. It can be inferred that, no one is selling rice at cheap price in the colony. So, Google can suggest me to stock up rice and sell it at a particular price to make profits. Similarly, it can tell me exactly what items should I stock up on, what items are not necessary. 

  This is how browser history and location can be used to glean information from us. Now, let’s go a bit deeper. Can Google know who is dating whom? If I’ve to make a guess, I’d say yes. If I’ve the data that Google has about people, how would I figure this out? Let’s take a hypothetical case where I’ve to figure out who a person named Vijay is seeing. First thing I’d do is to guess the gender of person. That’s really easy. Vijay would’ve searched for ‘best razor to buy’. Or, he’d have searched for ‘Should guys remove their shirt before entering sanctum in Kerala’. It’s also trivial to know his sexual orientation from browser history. Let’s say that, he’s a straight guy. With these two data points, I’ve cut the search space for the potential girl friend. How do I proceed now? I will make a list of IP addresses of girls he has hung out a lot with. I also record the locations where he hung out with these girls. That cuts down the search space even further. I can eliminate most of his female colleagues by using the fact that he will be within their proximity mostly in office premises and not in restaurants and malls. Okay, a person might hang out a lot with siblings too. How do you distinguish a girlfriend from sibling? That’s easy. If Vijay is staying with his sister, both share the same home. They might have similar usernames. They might be located at same place on the day of Rakhi. There’re huge number of ways to deduce just based on data if the girl is his sister or not. That leaves us with the final question. How do we distinguish girlfriend from a girl friend. Again, we can deduce this from locations of people on valentines day, purchase history of the person before meeting the girl. We can also deduce this based on the kind of locations they meet.

  I personally think, any question about us can be answered comfortably with the kind of data Google/FB/Amazon has about us. You might be able to cheat yourself but you can't cheat Google. Beware!