pb finally made it back home…

•January 28, 2010 • Leave a Comment

only to find that things had changed , to say the least .


he had lost his entire village to the peanut butter cookie monster maker .


yup , cny baking season is back – a time when i always seem to be splattered with eau de beurre (butter) , the home is filled with the constant scent of freshly baked goodies , and the ants never seem to get enough of me .


post.script : unfortunately , peanuts were harmed in the making of this snippet .

and i should probably never be allowed to write childrens’ stories .

please pay attention , guys : international choice of urinal protocol

•January 26, 2010 • 2 Comments

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.

(from xkcd)

and that’s why…

iban ponders wardrobe change

•January 25, 2010 • Leave a Comment

green thumb-ing

•January 20, 2010 • Leave a Comment

despite the complaints from many over the seemingly neverending rain recently , i actually rather welcomed the wet cooling weather . not just because i enjoy lower temperatures rather than endure the suffering heat, but more so because i have been nursing a new addition to the garden :

it actually wasn’t the taste of the fruit or the size of the seed that persuaded me into such an endeavour . mum joked that i could tell future generations over a feast of durians the tale of how planted the seed some years ago . somehow , the prospect of that was perhaps just too beautiful to miss out on .

the past couple of weeks have also been marked by an abundant harvest of our mangoes .

there were so many we had a few after dinner every single night . even till now , they’re still some sitting in the fridge .

one of my aunties came by with rambutans from my grandma’s backyard too .

complimentary durian included .

ah . the joy of being surrounded by an abundance of home-grown fruits :)

crossing the line

•January 8, 2010 • Leave a Comment

KL church torched

Policemen at the scene after the fire. – Picture courtesy of Metro Tabernacle

KUALA LUMPUR, Jan 8 — A city church in the leafy Desa Melawati suburb was set on fire at midnight as police warned angry Muslim groups not to protest a controversial ruling allowing Catholic weekly Herald to use “Allah” in its national language section.

The attack on the Metro Tabernacle A/G, an Assemblies of God church in Jalan 4/4C Desa Melawati, completely gutted its administrative office on the ground floor. There were no reported injuries in the midnight attack.

Police have yet to identify the attackers and no one has claimed responsibility for the attack which could be related to anger over the Dec 31 court ruling. The judgment has been suspended pending government appeal.

According to an eyewitness who had just finished a drink at a coffeeshop located directly across the church, three or four persons on two motorcycles stopped in front of the church.

“They proceeded to break the glass panels on the ground floor before pouring some flammable liquid and setting off a fire,” said a statement issued by the church.

The church is housed in a three-storey shoplot with the office on the ground floor. Church officials have lodged a police report over the incident.

Earlier in the night, the judiciary website was defaced and later taken offline.

The Metro Tabernacle is not affiliated to the Roman Catholic Church which had challenged a 2007 order to stop using “Allah” to describe the Christian God in the Herald’s Bahasa Malaysia section.

The Herald is tightly circulated among the mainly Muslim country’s estimated 850,000 Catholics who worship in English, Mandarin, Tamil and Bahasa Malaysia.

The Roman Catholic Church had agreed not to object to suspend the judgment out of “national interests” as Muslim groups objected to the ruling and threatened to protest.

The groups have organised protests after Friday prayers at two mosques in Kuala Lumpur today despite police orders not to proceed.

Prime Minister Datuk Seri Najib Razak and his cousin Home Minister Datuk Hishamuddin Hussein have backed the right to protest within mosque grounds to the chagrin of many who have been previously detained at opposition gatherings.

Meanwhile, Kuala Lumpur police chief Mohamad Sabtu Osman said it was premature to link the attack on the church to the protests over the Allah ban.

”We are still investigating,” he told the Associated Press. He also urged Muslims not to participate in the planned protests, adding that police would be stationed at mosques to monitor the situation.

Police limit gatherings in public to five people and usually take tough action, including using tear gas and chemically-laced water from water cannons, to disperse protests.

(from the malysian insider)

congratulations . in the defense of something held dear and sacred , they have actually tarnished the very cause they were defending .

let us all take a moment to applaud such a well-thought , valiant , and heroic act .

as someone (somewhat) aptly put it this morning , “might as well just tell me when i have to walk around town with a star pinned on my sleeve and get it over with” .

“Father , forgive them for they know not what they do”

(luke 23:34)

two . oh . one . oh

•January 2, 2010 • Leave a Comment

i’ve always said that i’ve never been one of those who believed in making new year’s resolutions . this year isn’t going to be an exception .

okay okay . maybe i’ll make one . just one :

don’t screw up when i write dates on stuff .

repeat to self – two oh one oh not two oh oh nine , two oh one oh not two oh oh nine .

happy new decade to you too :)