Tuesday, March 2, 2010

Naamakarana

I just was thinking of some names for a company which I would start in the near future.

One up is Njanc Networks. (Not Just Another Networking Company)
Pronounced "yonk"

Shall come up with more. But just wanted to document this as soon as it struck me.

Friday, November 27, 2009

Theory of Gastronomy

In all the time I have been in Singapore doing my Masters, one fact screams out louder than others. Men may not be as organized and clean as the opposite sex, but they are most definitely better cooks. We may use 10 utensils to cook the same what a lady would use 2-3 for, but in all, the end result is way more tastier.

In this battle of the sexes, one guy who comes to mind is my room-mate. He is probably by far the best cook I know. He whips up amazing food in minutes. His long name reminds me of those olden day maharajs who used to supervise an army while cooking for a wedding - "Keshav Alias Vaibhav Vithukrishna Kamat" Anyways, his Hyderabadi Biryani is to die for. But my personal favourite are his Aaaloos. His food is the prime reason why I seem to be gaining weight in Singapore - away from home.

To be fair, I would definitely attribute the ladies with their ease of cooking. Cooking comes but naturally to them. They are aware of all the ingredients. And also, they gain invariance whatever they are cooking. Their subzis do not taste different whether you eat it in June or in December. On the other hand, whatever a guy cooks is directly dependent on his mood, and of course how well he can follow names of ingredients in recipes.

All in all, if you wanna have good food once in a while, ask your friend to help. Else, ladies will always be around to save the day.

Toilet Economics


Re-Posted from http://blag.xkcd.com/2009/09/02/urinal-protocol-vulnerability/

Urinal protocol vulnerability


When a guy goes into the bathroom, which urinal does he pick?  Most guys are familiar with the International Choice of Urinal Protocol.  It’s discussed at length elsewhere, but the basic premise is that the first guy picks an end urinal, and every subsequent guy chooses the urinal which puts him furthest from anyone else peeing.  At least one buffer urinal is required between any two guys or Awkwardness ensues.
Let’s take a look at the efficiency of this protocol at slotting everyone into acceptable urinals.  For some numbers of urinals, this protocol leads to efficient placement.  If there are five urinals, they fill up like this:

The first two guys take the end and the third guy takes the middle one.  At this point, the urinals are jammed — no further guys can pee without Awkwardness.  But it’s pretty efficient; over 50% of the urinals are used.
On the other hand, if there are seven urinals, they don’t fill up so efficiently:

There should be room for four guys to pee without Awkwardness, but because the third guy followed the protocol and chose the middle urinal, there are no options left for the fourth guy (he presumably pees in a stall or the sink).
For eight urinals, the protocol works better:

So a row of eight urinals has a better packing efficiency than a row of seven, and a row of five is better than either.
This leads us to a question: what is the general formula for the number of guys who will fill in N urinals if they all come in one at a time and follow the urinal protocol? One could write a simple recursive program to solve it, placing one guy at a time, but there’s also a closed-form expression.  If f(n) is the number of guys who can use n urinals, f(n) for n>2 is given by:

The protocol is vulnerable to producing inefficient results for some urinal counts.  Some numbers of urinals encourage efficient packing, and others encourage sparse packing.  If you graph the packing efficiency (f(n)/n), you get this:

This means that some large numbers of urinals will pack efficiently (50%) and some inefficiently (33%).  The ‘best’ number of urinals, corresponding to the peaks of the graph, are of the form:

The worst, on the other hand, are given by:

So, if you want people to pack efficiently into your urinals, there should be 3, 5, 9, 17, or 33 of them, and if you want to take advantage of the protocol to maximize awkwardness, there should be 4, 7, 13, or 25 of them.
These calculations suggest a few other hacks.  Guys: if you enter a bathroom with an awkward number of vacant urinals in a row, rather than taking one of the end ones, you can take one a third of the way down the line.  This will break the awkward row into two optimal rows, turning a worst-case scenario into a best-case one. On the other hand, say you want to create awkwardness.  If the bathroom has an unawkward number of urinals, you can pick one a third of the way in, transforming an optimal row into two awkward rows.
And, of course, if you want to make things really awkward, I suggest printing out this article and trying to explain it to the guy peeing next to you.

Discussion question: This is obviously a male-specific issue.  Can you think of any female-specific experiences that could benefit from some mathematical analysis, experiences which — being a dude — I might be unfamiliar with?  Alignments of periods with sequences of holidays? The patterns to those playground clapping rhymes? Whatever it is that goes on at slumber parties? Post your suggestions in the comments!


Edit: The protocol may not be international, but I’m calling it that anyway for acronym reasons.



Start Of Something New

Here we go again..
Decided to start blogging again. My previous blog was a hilarious disaster. I really didn't realize how much I changed until I re-read what I blogged before.
So, look out for successive blogs.