Why is 1/0 infinity but 0/0 undefined?

October 10, 2014 at 9:34 pm | Posted in interesting maths, Mathematics | 1 Comment
Tags: , , , , , , , , , , , , ,

When we were kids, we were taught that anything divided by 0 is infinity i.e. a very big number that cannot be calculated. As kids, we took the liberty of taking 0/0 as infinity as well and no one corrected us. As long as there was no finite definition of x/0, everyone was happy and so were we.

The time changed, we grew up, started using calculators & spreadsheets and suddenly came across this difference. When you divide any number other than 0 by 0, your calculator returns ‘E’ or error but when you divide 0 by 0, it returns undefined. Why is it so? Is x/0 actually infinity?

Let us dig a bit deeper into why is there a discrepancy.

Let us take a very simple equation: xy=1

i.e. y = 1/x

So when x = 1, y=1 when x = 1/2, y = 2, when x = 1/4, y=4 and so on.

So (x,y) ∈ (1,1), (0.1,10), (0.01,100), (0.00001,10000)……… (1/10^n, 10^n)

Thus we see when n increases to extremely large numbers, limit(x)->0 but limit(y)-> ∞.

Thus we can say if something is divided by 0, the output is infinity(∞). But wait.

What if in our case, x < 0?

(x,y) ∈ (-1,-1),(-0.1,-10),(-0.01,-100)…..(-1/10^n, -10^n)

The result is same but in the other direction i.e. limit(x)->0, limit(y)-> -∞.

That essentially means, y is ±∞ depending on which side of the number line we approach it. So it might be okay to assume x/0 = ∞ for basic mathematics purposes but in reality it might not be true.

If we draw a graph of y = 1/x, it looks like:

x divided by infinity

If x/0 is infinity, then why is 0/0 undefined?

We approach this problem with simple two dimensional coordinate geometry.

We take a simple straight line y = x. This line has an intercept of 0 and slope of 1.

y = x i.e. y/x = 1;

Some of the points that lie on this line: (2,2),(1,1),(0,0),(-1,-1),(-2,-2)

Do you see something? If (0,0) lies on this line, (0,0) must satisfy the equation y/x = 1; i.e. 0/0 = 1?

Take another line y=2x i.e. y/x = 2;

Some of the points that lie on this line: (2,4),(1,2),(0,0),(-1,-2),(-2,-4)

Great. (0,0) lies on this line too i.e. 0/0 =2?


We all know that we can draw infinite number of straight lines through 0, so 0/0 changes its values infinite times.

Moreover, we have innumerable other curves that pass through (0,0) y=4x^2 for example. An infinite number of curves fulfilling such equations pass through (0,0), so 0/0 has another infinite set of values.

Total number of values for 0/0 = ∞ x ∞

Which value of 0/0 to pick among the so many values of 0, when we are asked?

Best answer: Undefined

Keep reading. Keep sharing.

– Himanshu

Why do we break traffic lights? – A Quantitative Analysis

January 4, 2014 at 12:05 am | Posted in india | Leave a comment
Tags: , , , , , ,

India is my country and all Indians are my brothers and sisters. So this analysis believes in right to equality and assumes each of us to be equally prone to break a traffic signal. I am sure most of us would have broken a traffic signal atleast once in your lifetime or have seen someone breaking it.

Pb = Probability of breaking a traffic signal by you

Pc = Probability of getting caught when you break a signal

Pp = Probability that a policeman is standing on the traffic light to catch you

This analysis uses some basic approaches of game theory and Bayesian probability models. Please drop a comment if you have doubts in the analysis.

The Decision Tree

To start any analysis that involves probability, we should start with creation of the decision tree for various outcomes that can happen. If we draw a decision tree for a normal scenario:



Here we assume some more things:

  • The payoffs for breaking a traffic signal are definitely more than those for not breaking a signal.
  • When a rider does not break a signal, he loses some time and we can define the losses in financial terms.
  • When a rider breaks a signal, he saves time thus he does not lose any money (arbitrary)
  • When he gets caught, he has to pay some fine and some more extra money to the policeman to get away.


Assigning Values to Variables:

We do not know how much the loss is, in terms of money, for the rider when he does not break a signal. We assume it to be Rs. 100 to start and then proceed with our calculations. Similarly the gains that he gets by breaking the signal is equal to Rs. 100/-

Number of vehicles at any signal: 10

Number of vehicles breaking signal: 2

Number of vehicles getting caught: 1

Probability of breaking a signal, Pb : 2/10 = 0.2

Probability of getting caught, Pc: 1/2 = 0.5

Probability that a policeman stands (we can safely assume that in India, we see a policeman 1 in 10 times), Pp : 1/10 = 0.1

Fine when the rider is caught: Rs. 500


Updating the Decision Tree:


Next we add the payoffs / losses at various options and try to calculate the average payoffs at the various option nodes.



All we are left to is to calculate the payoffs/losses at the nodes C, B & A and try to see if breaking a signal sounds more logical.

At node C:

Nett payoff = 0.5 * 100 + 0.5 * -500 = 50 – 250 = Rs. – 200/-

At node B:

Nett payoff = 0.1 * (-200) + 0.9*100 = -20 + 90 = Rs. 70/-

At node A:

Nett payoff = 0.2 * 70 + 0.8*(-100) = 14 – 80 = Rs. -66/-

This essentially means that if there is a policeman, it is more logical for the rider not to break the rule because average expected payoff (Rs. 100 * 0.5 = Rs. 50) is less than the average expected loss (Rs. 500 * 0.5 = Rs. 250). However, if there is no policeman, the payoffs for the user to break the red light are much higher (0.9 * 100 = 90). So when there is no policeman, it sounds better to him to break the rule because he is atleast getting Rs. 90/- out of his payoff of Rs. 100/- on an average.

Overall at node A, there is only one option through which he gets a positive payoff and that is by breaking the traffic signal. So it sounds more logical to the rider to break the rule. 

Next Steps:

If someone is interested in further analysing the behaviour using Game Theory of economics, he can approach the problem as under:

1. Change the payoffs and probabilities with real ones.

2. Calculate the threshold value of fine below which the rider will be tempted to break the law.

3. Calculate the optimum probability of a policeman standing on a traffic signal. 

Please contact me in case you need any suggestions on game theory or Bayesian probablistic models.


Online Coupon and Deals Market in India

October 10, 2013 at 7:54 pm | Posted in india, inetrnet, internet | Leave a comment
Tags: , , , , , , , , , ,

Coupon and deals market has always been something that can not be ignored by people. People love shopping and people love deals. So how does the market scenario look in India?

The eCommerce market stands at a whooping 70000 Crore today (2013). This comes out to be slightly more than 11 billion USD. Couponing and deals market basically works over the eCommerce market and if we take 10% as a heuristic in calculating the market size for coupons, it is still a very big number.

We conducted a survey and tried to find out the penetration of coupons in India. Here are the results:

Total number of respondents: 117
Gender based distribution: Male: 87%, Female: 13%
Age Group: 30-39: 77%, 21-29: 23%
Marital Status:Married: 67%, Never Married: 32%, Separated: 2%

More than 61% of them said that they shop often online.
Convenience was the biggest factor in shopping online closely followed by discounts. Very few people shopped online for variety.

67% of the people did more than 20% of their shopping online.
90% of these respondents used a computer or laptop to make the purchase. They were not sure with the security in mobiles.

65% of the people used Google Chrome to shop online closely followed by 26% people who use Firefox.

Most of these guys search on Google and Facebook for coupons before shopping online. Only 28% of them go to any coupon website.

Only 31% of them like the way coupons are presented to them currently. They do not like the clutter through which they have to find deals.

92% of them do not want to go to any coupon site. They would love to see a service that delivers coupons right on your browser.

Thankfully Guppit.com is one such website that gives coupons to the users right on their browsers.

If you want to get more insights on this survey, you can contact me through posting a comment and I will share complete data with you.

Casteism in India – Some facts from the government database

March 5, 2013 at 4:12 pm | Posted in constitution, government, Independence, india | Leave a comment
Tags: , , , , ,

Some time back I analyzed the government database for crime against women in India. The results were surprising and insulting to our nation. Another issue that still exists in India even after 65 years of Independence is Caste-ism. So I thought of doing a similar study on the number of murders committed in the name of caste in the last decade (2001 – 2010).


Total number of deaths
444 (44.4 deaths per year).
If we consider the population of India then this number sounds too small. However, in a modern world like today’s even 4-5 deaths per year on the grounds of caste etc. are shameful.

Top States

  • Bihar – 179
  • Jharkhand – 59
  • Uttar Pradesh – 40
  • Chhatisgarh – 35
  • Madhya Pradesh – 27

That essentially means that top 5 states constitute ~77% of the total crimes in the name of caste. It is to be noticed that the five states are adjoining and similar communities live in the states. The people are hindi speaking, traditional, high level of believers and god fearing.

Most of the movies that are made around caste system show the protagonist to be based out of these states.

Complete list of all the states is as under:

No data is available from the north-eastern states. This can indicate either a perfect collaborative environment in which people from all the castes live, or a lack of data in the states.

Surprisingly Haryana and Uttarakhand show a zero figure. This is something I am unable to understand because of the reports of other types of crimes from these states.

Of the four southern states, only Kerala reports a zero figure. Probably some regression has to be done with overall education levels in a state vs. such crimes. I will do that and will post soon.

I am also surprised to see J&K in the list. They have other problems to solve rather than such issues.

This is it for now. My next step is to draw parallels between education and different kinds of crimes. Am hopeful that I will be able to find some correlation between education and such crimes that requires a narrow mindset which can be broadened by better and improved education.

Thanks for reading this post till the time.

Crime Against Women in India

December 19, 2012 at 1:52 pm | Posted in india | 3 Comments
Tags: , , , , , , , ,


यत्र नार्यस्तु पूज्यन्ते, रमन्ते तत्र देवता

यत्र नार्यस्तु ना पूज्यन्ते तत्र सर्व क्रिया विफ़ल: ।

This is an old saying in Sanskrit meaning “Places where woman is worshiped there the Gods delighted. Where Woman is not worshiped, there good deeds are without fruit!”

Ten times more worthy of worship than the Father is the Guru, but a thousand times more worthy than the Guru is the Mother!

I have drawn these adages, proverbs, sayings and whatever you want to call them from the Indian history. How do they apply to the present?

To understand more about crimes against Women in India, I did some thorough research on the internet – visited government databases, read news articles, read articles on various websites. Being an engineer, I cannot live without numbers and so calculated various numbers as well. Here is a summary of my analysis:

The growth rate of crime against women in India is more than the growth rate of Indian population itself. Such crimes were not reported to the police earlier because of social stigma but the number of cases reported has dramatically increased in the past few years. This can imply two things

1. Either the society has opened up towards taking help from the judiciary system and punishing the culprits or

2. The percentage of cases reported remain the same, however total number of cases have increased manifolds.

There is no answer to which of the assumption stated above is correct, but I personally wish that the second one is not true.

Crime against Women can be categorized under the following heads:

1. Domestic Violence

The incidents of domestive violence are higher among the lower Socio-Economic Classes (SECs). The Protection of Women from Domestic Violence Act, 2005 came into force on October 26, 2006.

2. Female infanticides and sex selective abortions

India has a high Male / Female ratio and the main reason contributing to it is the killing of female child long before they open their eyes to this world. A surprising but true fact is that tribes in India have better Male/Female ratio as compared to well developed urban societies. Dowry can be attributed to as the main reason for female infanticide. Dowry is still prevalent in most parts of India. To counter this problem, all medical tests that can be used to determine the sex of the child have been banned in India.

3. Child Marriage

According to UNICEF’s “State of the World’s Children-2009” report, 47% of India’s women aged 20–24 were married before the legal age of 18, with 56% in rural areas. The report also says that 40% of the total child marriages in the World happen in India.

4. Dowry

A 1997 report claimed that at least 5,000 women die each year because of dowry deaths, and at least a dozen die each day in ‘kitchen fires’ thought to be intentional. In 1985, the Dowry Prohibition (maintenance of lists of presents to the bride and bridegroom) rules were framed. According to these rules, a signed list of presents given at the time of the marriage to the bride and the bridegroom should be maintained. The list should contain a brief description of each present, its approximate value, the name of whoever has given the present and his/her relationship to the person.

5. Sexual Harassment & Rape

Eve teasing is a euphemism used for sexual harassment or molestation of women by men. Many activists blame the rising incidents of sexual harassment against women on the influence of “Western culture”. In 1987, The Indecent Representation of Women (Prohibition) Act was passed to prohibit indecent representation of women through advertisements or in publications, writings, paintings, figures or in any other manner.

In order to analyze rapes in India, I downloaded data from the government’s National Crime Record Bureau and did some analysis on my own. Here is the summary.

Rape Map of India (Darker = More number of Rape Cases)


In terms of Total Number of Rapes Reported (click on the image for better viewing):


The number of cases alone in Madhya Pradesh are more than double of those in Uttar Pradesh. Surprisingly West Bengal has the second most number of reported rape cases. Compare the size of Karnataka and Delhi and the number of rape cases in the two states.

Some major high-sensitivity cities in India were studies and the report was surprising:

Mumbai reported 201 cases of rape, Bangalore 65, Kolkata 32, Pune 91, Chennai 47 and Delhi 414.

However the most surprising of them all was the following result:


Tier 2 cities in Madhya Pradesh (Bhopal, Indore and Jabalpur) show large number of reported cases.

Jabalpur reports 1:13016 (Rape Cases:Population), which is the highest in any city in India. Similarly Kolkata reports 1:140209 which is the lowest in any city in India. So what can be inferred from this data is that even though Kolkata reports less number of reported cases, the cases in other areas of West Bengal are high and that can be attributed to low education levels.

Total number of reported cases in Delhi is more than double in Mumbai. Delhi comes third in the list of cities prone to rape. The sequence goes like this:

1. Jabalpur (1:13016)

2. Bhopal (1:24598)

3. Delhi (1:26589)

Ahmedabad (1:113685), Bangalore (1:129630) & Kolkata (1:140209) remains the safest cities in India.

I am not deducing anything out of the data at the moment but I would love to find out a detailed correlation between education levels and such incidences.

Feel free to comment on this post and use this data wherever you want to use it.



मज़ा लिया जाए – Ghazal

December 12, 2012 at 11:42 am | Posted in india | Leave a comment
Tags: , , , , , , , , ,

दिन है इतवार का मज़ा लिया जाए
थोडा इंतज़ार का मज़ा लिया जाए

जवानी का पतझड़ कब का गुज़र गया गया
बुढापे  की बहार बहार का मज़ा लिया जाए

कलम दवात मेरी पूरी ज़िन्दगी को खा गए
खंजरों की धार का मज़ा लिया जाए

बेईमान हो गए तो उनकी हैसियत बदल गई
फिर से इमानदार का मज़ा लिया जाए

पहली नज़र में ही उसे दिल दिया मैंने
मोहब्बत की इस हार का मज़ा लिया जाए

कभी कभी बच्चे भी बनके देख लो यारों
माँ के उस दुलार का मज़ा लिया जाए

घटनाएं रोज़ ही होती रहेंगी नया कुछ नहीं है
चलो पुराने अखबार का मज़ा लिया जाए

Hindi ki Kahaani

September 14, 2012 at 12:48 pm | Posted in india | Leave a comment
Tags: , , , , , , ,

युग बदल गया अब वो हिंदी न रही
सलवार की जगह जींस आ गयी, और माथे पे बिंदी न रही |

कल तक जो दुपट्टा था आज वो stole हो गया
अरे हिंदी का आसन बुरी तरह से डांवाडोल हो गया |

हिंदी बोलने में आजकल के संस्कारी युवा झिझकते हैं, शर्माते हैं
अधकचरा अंग्रेजी बोल कर अपने जैसे ही लोगों में upclass कहलाते हैं |

हिंदी की इज्ज़त सिर्फ सितम्बर के राजभाषा मास में होती है
बाकी के महीने ये किसी कोने में दुबक कर सोती है |

अगर आगे बढ़ना है तो हमें इसे ऊपर उठाना होगा
हिंदी की आग को हम सबके अन्दर भड़काना होगा
वरना मेरे दोस्त, अधकचरी भाषाओँ में हम कहीं खो जायेंगे
जिन संस्कारों को दुनिया मानती है उनमे भी  हम अधकचरे हो जायेंगे |

What my English teachers taught me :)

June 18, 2012 at 10:13 pm | Posted in fun, humour, india, knowledge | Leave a comment
Tags: , , , , , , ,


Ha Ha ha..

Unknown Medical Facts

June 9, 2012 at 3:57 pm | Posted in india | Leave a comment
Tags: , , , , , , ,

Unknown Medical Facts

300 Ramayanas

November 2, 2011 at 8:37 pm | Posted in hindu, india, knowledge | 2 Comments
Tags: , , , , , , , , ,

I found this post highly interesting. It was posted on some web site:


How many Ramayanas! Three hundred? Three thousand? At the end of some Ramayanas, a question is sometimes asked: How manyRamayanas have there been? And there are stories that answer the question. Here is one.

One day when Rama was sitting on his throne, his ring fell off. When it touched the earth, it made a hole in the ground and disappeared into it. It was gone. His trusty henchman, Hanuman, was at his feet. Rama said to Hanuman, ‘Look, my ring is lost. Find it for me.’

Now Hanuman can enter any hole, no matter how tiny. He had the power to become the smallest of the small and larger than the largest thing. So he took on a tiny form and went down the hole. He went and went and went and suddenly fell into the netherworld. There were women down there. ‘Look, a tiny monkey! It’s fallen from above!’ Then they caught him and placed him on a platter (thali). The King of Spirits (bhut), who lives in the netherworld, likes to eat animals. So Hanuman was sent to him as part of his dinner, along with his vegetables. Hanuman sat on the platter, wondering what to do. While this was going on in the netherworld. Rama sat on his throne on the earth above. The sage Vasistha and the god Brahma came to see him. They said to Rama, ‘We want to talk privately with you. We don’t want anyone to hear what we say or interrupt it. Do we agree?’

‘All right,’ said Rama, ‘we’ll talk.’

Then they said. ‘Lay down a rule. If anyone comes in as we are talking, his head should be cut off.’

‘It will be done,’ said Rama.

Who would be the most trustworthy person to guard the door? Hanuman had gone down to fetch the ring. Rama trusted no one more than Laksmana, so he asked Laksmana to stand by the door. ‘Don’t allow anyone to enter,’ he ordered. Laksmana was standing at the door when the sage Visvamitra appeared and said, ‘I need to see Rama at once. It’s urgent. Tell me, where is Rama?’ Laksmana said, ‘Don’t go in now. He is talking to some people. It’s important.’ ‘What is there that Rama would hide from me?’ said Visvamitra. ‘I must go in, right now.’

Laksmana said, ‘I’ll have to ask his permission before I can let you in.’ ‘Go in and ask then.’ ‘I can’t go in till Rama comes out. You’ll have to wait.’

‘If you don’t go in and announce my presence, I’ll burn the entire kingdom of Ayodhya with a curse,’ said Visvamitra. Laksmana thought, ‘If I go in now, I’ll die. But if I don’t go, this hotheaded man will burn down the kingdom. All the subjects, all things living in it, will die. It’s better that I alone should die.’

So he went right in. Rama asked him, ‘What’s the matter?’ ‘Visvamitra is here.’ ‘Send him in.’

So Visvamitra went in. The private talk had already come to an end. Brahma and Vasistha had come to see Rama and say to him, ‘Your work in the world of human beings is over. Your incarnation as Rama must now be given up. Leave this body, come up, and rejoin the gods.’ That’s all they wanted to say.

Laksmana said to Rama, ‘Brother, you should cut off my head.’ Rama said, ‘Why? We had nothing more to say. Nothing was left. So why should I cut off your head?’

Laksmana said, ‘You can’t do that. You can’t let me off because I’m your brother. There’ll be a blot on Rama’s name. You didn’t spare your wife. You sent her to the jungle. I must be punished. I will leave.’ Laksmana was an avatar of Sesa, the serpent on whom Visnu sleeps. His time was up too. He went directly to the river Sarayu and disappeared in the flowing waters.

When Laksmana relinquished his body. Rama summoned all his followers, Vibhisana, Sugriva, and others, and arranged for the coronation of his twin sons, Lava and Kusa. Then Rama too entered the river Sarayu. All this while, Hanuman was in the netherworld. When he was finally taken to the King of Spirits, he kept repeating the name of Rama. ‘Rama Rama Rama

Then the King of Spirits asked, ‘Who are you?’ ‘Hanuman.’ ‘Hanuman? Why have you come here?’ ‘Rama’s ring fell into a hole. I’ve come to fetch it.’

The king looked around and showed him a platter. On it were thousands of rings. They were all Rama’s rings. The king brought the platter to Hanuman, set it down, and said, ‘Pick out your Rama’s ring and take it.’ They were all exactly the same. ‘I don’t know which one it is,’ said Hanuman, shaking his head. The King of Spirits said, ‘There have been as many Ramas as there are rings on this platter. When you return to earth, you will not find Rama. This incarnation of Rama is now over. Whenever an incarnation of Rama is about to be over, his ring falls down. I collect them and keep them. Now you can go.’

So Hanuman left.

This story is usually told to suggest that for every such Rama there is aRamayana. The number of Ramayanas and the range of their influence in South and Southeast Asia over the past twenty-five hundred years or more are astonishing. Just a list of languages in which the Rama story is found makes one gasp: Annamese, Balinese, Bengali, Cambodian, Chinese, Gujarati, Javanese, Kannada, Kashmiri, Khotanese, Laotian, Malaysian, Marathi, Oriya, Prakrit, Sanskrit, Santali, Sinhalese, Tamil, Telugu, Thai, Tibetan—to say nothing of Western languages. Through the centuries, some of these languages have hosted more than one telling of the Rama story. Sanskrit alone contains some twenty-five or more tellings belonging to various narrative genres (epics, kavyas or ornate poetic compositions,puranas or old mythological stories, and so forth). If we add plays, dance-dramas, and other performances, in both the classical and folk traditions, the number of Ramayanas grows even larger. To these must be added sculpture and bas-reliefs, mask plays, puppet plays and shadows plays, in all the many South and Southeast Asian cultures.” Camille Bulcke (1950), a student of the Ramayana, counted three hundred tellings. It’s no wonder that even as long ago as the fourteenth century, Kumaravyasa, a Kannada poet, chose to write a Mahabharata, because he heard the cosmic serpent which upholds the earth groaning under the burden of Ramayana poets (tinikidanu phaniraya ramayanada kavigala bharadali). In this paper, indebted for its data to numerous previous translators and scholars, I would like to sort out for myself, and I hope for others, how these hundreds of tellings of a story in different cultures, languages, and religious traditions relate to each other: what gets translated, transplanted, transposed.

Next Page »

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: