Prajwalan’s Weblog

Birthday Paradox

with one comment

We all have encountered coincidences of sort in our lives. For example, it happens that we keep on thinking about a particular person and suddenly we get a phone call or email or even a visit from that person. Similarly, we promise to meet someone at a particular time and venue but out of no where something emergency turns up and have to cancel the previously agreed meeting. A list of such coincidences can get very long. Mathematics also has a term for such coincidences and it is called Probability. There are so many things in Probability Theory that surprises us. And, one such is Birthday paradox.

In Probability Theory, ‘Birthday Paradox’ refers, that in a group containing certain randomly chosen people, there is a finite probability for some two people to have exactly the same birthday. For a group with 23 people, this probability is around 50%. This increases exponentially as the number people in the group increases. With as many as 80 people, the probability gets around 100%. This is of course, based on the idea that people are randomly chosen and each day is equally likely to become a birthday for someone.

For more details you may visit

Birthday paradox holds an important position in computer security also. It can be used to attack the hash functions. For example, let us say f is a hash function such as f(x) = y. With hash functions, it should be impossible to guess ‘x’ given ‘y’. In other words they are one way. Another characteristic is that it should be very difficult to find two inputs that yield same output i.e. it should be hard to find x1 and x2 such that f(x1) = y and f(x2) = y. This property is called collision resistance. But using birthday paradox it becomes relatively easier to find such collisions.

Today 16 May is my birthday. And, in facebook I have around 275 friends. Interesting thing is that I do not have a single friend whose birthday coincides with mine. So either some of them have entered incorrect birth date or hidden their birth date from display or for some reason facebook is not notifying me of this. Otherwise, based on birthday paradox I should have at least one friend with birthday today. Perhaps if I include the ‘near-miss effect’ then we can get some coincidences. For example, number of people with birthday separated by certain days. Such latitude will increase the probability of coincidence. But originally birthday paradox theory does not include this near miss effect.

Written by prajwalan

May 16, 2010 at 1:13 pm


leave a comment »

It is hard to find someone who doesn’t like any music at all. Music has many forms and varieties. They not only entice our ears but also refresh us and some even touch our soul and inspire us to do something particular. They reflect the culture, religion and history of the place from where they originate.  Hence music from different corners of the globe carry different sense, melody, harmony and notes.

Scientifically, music is an art form with sound as its medium [1]. Therefore, music is composed of sound waves vibrating with different frequencies and pitches [2]. One might wonder the difference between music and noise. While a particular sound pattern may be considered music by some, the same might be regarded as noise by others. However, scientists and researchers have attempted to point out the differences in mathematical terms. One source [3] mentions that “Music is sound with a discrete structure while noise is sound with a continuous structure.” Regardless of the mathematics behind music and noise, one thing is certain: music is what you find amusing and even noise can sometimes be musical to some.

As I write this article, I can hear chirping of birds outside my window. I find it melodious and I would consider it a music. But what about the birds? What are they trying to accomplish by making those sounds? Are they communicating? Or, are they just making some noise? I don’t believe that mathematics can explain that. They could be communicating or making noise, but I am finding it musical. So, noise or vocal communication can also be considered music. It all depends on the listener. There is a saying, beauty lies on the eyes of beholder. I would say something similar for the music also: “Musical value lies on the senses of perceiver”.

We have often heard that music has no language barriers. I believe this is true. Personally speaking, I listen to music from different parts of the world. It really does not matter what culture or religion or race the particular place belongs to.

Following are two links to music from Nepal.

Instrumental 1

Instrumental 2

You can visit the site for more music and songs from Nepal.

Please put links to some good music from your country or other countries you know in the comment below.

Written by prajwalan

May 13, 2010 at 4:01 pm

Happy Gautum Buddha Jayanti

leave a comment »

On this occassion of Gautum Buddha Jayanti, I would like to remind myself and the visitors of my blog with following quote by Gautum Buddha.


Your work is to discover your world and then with all your heart give yourself to it.

-Gautum Buddha


I hope I will be able to understand it and understanding it truely means, I should be able to implement it. I hope I will be able to do so. Likewise, I wish you will be able to understand it and implement it as well.

Written by prajwalan

May 9, 2009 at 6:35 am

Posted in General

Tagged with

I just faced one reality of my life

leave a comment »

There are times when we know that we have learned everything and we have done everything. But the reality is actually something different. The truth is strikingly the opposite of what we have been thinking. It is just a matter of time that we come face to face with it and feel as if this truth has slapped us right in our face. Today, I happen to experience something similar.

Throughout my education I thought I had practical experience or say knowledge of a crucial topic of my area. I thought if I ever have to implement it professionally I would be able to do so just like that. And earlier today, completely forgetting that I was already introduced to similar methods, I was searching of ways to implement it. But now suddenly I happen to come to know about it and that I have already learned in the past. I have come to understand that I learned it theoretically but I never did it in practical. I realize that I was putting myself into an illusion of knowing everything about it. This is the result of too much theoretical learning and little practical. I think I do not want to reveal what that crucial topic is, but I will tell that it is a very important aspect of my education and my master’s degree.

Oh, I just said something that certainly sounds strange for anyone from my area and with background similar to mine. The term “too much theoretical learning and little practical” may sound awkward and hard to convince yourself. But for many people this, I believe, is true. Like I said, it is just a matter of time when you come to know this reality.

Written by prajwalan

February 17, 2009 at 9:22 pm

Posted in Personal

Tagged with

A protocol for two Italians to pass through a door

leave a comment »

The protocol goes as below.

A: Please.
B: Please.
A: I insist.
B: So do I.
A: OK then, thank you.
B: You are most welcome.

The protocol is zero-knowledge because it can be simulated without knowing
any of the secrets of these Italians; in fact, the execution is independent of their
secrets as well as of anything else.

Loosely speaking, zero-knowledge proofs are proofs that yield nothing beyond
the validity of the assertion. That is, a verifier obtaining such a proof only
gains conviction in the validity of the assertion.

Source: Silvio Micali, 1985 and A Brief Introduction to Zero-Knowledge (by Oded Goldreich)

Written by prajwalan

February 15, 2009 at 11:26 am

I am addicted to “The X Files”

leave a comment »

I don’t remember exactly, but the last time I watched X Files, I must have been in grade 6 or 7. Those days, an Indian channel called “Star TV” used to broadcast the series. Back then, I did not understand any episodes. Yet, I kept myself glued to the TV screen, each night the show was on the air. Without understanding, the story and characters in the series, I fell in love with it. I was not able to watch all the episodes and missed several episodes in between. Nonetheless, each episodes were/are different and as such that was not much of problem.

I think the first episode of X Files, that I watched, was called “Soft Light” from season 2. I can’t expressed how much I liked the episode. I think the reason, I like X Files and the reason millions of people out there like it, is that it deals with some of the most intricate topics that haunt us. It deals with the questions, of whose answers, we were also searching from a long time back. The alien invasion, bio weapons, supernatural are the topics that are yet unanswered. Many people do not even believe they exist. But deep down inside everybody, there is that something that makes people wander around searching answers, searching the proof of their existence.

I have watched all the episodes of X files from season 1 to 7. That will make around 150 episodes or more. There are eleven seasons altogether. I am looking out for DVD of rest of the seasons. But no matter how much I watch, I just can get enough of it.

For now thats it. I will post more on the X Files in days to come.

Meanwhile, you can enjoy some of the stills from different episodes of the series.

Written by prajwalan

December 19, 2008 at 1:03 pm

Best of Karna Das

leave a comment »

I am a big fan of sentimental songs, particularly those sung by Karna Das. I just love the way he sings. His singing style is really unique and heart touching. Many of his songs are so dear to me that I listen to them several times each week or sometimes everyday. Yet, I can’t get enough.

I have listed some of the best songs by him. I hope you will also like them.

1. Sunsan raat shital pawan


सुनसान रात सितल पवन, साथी तिम्रो याद बिदेशी भुमी
बिती रहेछ जिवन यहाँ, माया तिम्रो हो पत्र चुमी
सुनसान रात ….
कहिले हाँस्छु कहिले रुन्छु, माया म है पागल सरी
तिम्रो तस्विर हेरी रहन्छु, तिम्रो पत्र है पढछु घरी
तिम्रो पत्र है पढछु घरी घरी ।
सुनसान रात ….
ला ला ला ला ला ला ला
हाम्रो मिलन को मधुर क्षण आउदै छ नजिक सुस्तरी
कसम छ है तिमी लाई नभयी निराश, माया बस है बाटो हेरी
माया बस है बाटो हेरी ।
सुनसान रात सितल पवन, साथी तिम्रो याद बिदेशी भुमी
बिती रहेछ जिवन यहाँ, माया तिम्रो हो पत्र चुमी
सुनसान रात ….


2. Ma mereko chaina aajhai


3. Hamro prem ko katha


4. Kehi pal aaba baki cha


5. Tyo premko balidaan


6. Kati bibaas cha tyo jeevan


 7. Jindagi ko ke bharosa


8. Purano dunga, pani ko chaala


9. Anautho betha bhayecha mero prem kahani


10. Timro mero sambandha ko


If you have lyrics of these songs or any other songs by Karna Das,

then please send me or put them as comments.

I will apprecitate that a lot.

Written by prajwalan

October 29, 2008 at 3:01 pm