Sunday, November 20, 2011

Probability calculations for Words with Friends

In Words with Friends, sometimes it is helpful to know the probability of your opponent having a certain letter in his hand. While this may sound like a daunting task, it is actually quite simple and can be modelled with a hypergeometric distribution, which is most commonly used for sampling without replacements. The formula is given as:


where N refers to the population size, n the number of draws, m the number of 'successes' in the whole population, and k the number of successes that you want to calculate. The brackets relate to a binomial coefficient such that:


Let's use a simple example to test first. What is the probability that your opponent has a 'X' in the first round, assuming that you don't have one in your hand?

In this case:
n = 7, because each player starts with 7 tiles.
N = 97, because each player starts with 7 tiles and I don't have a 'X'. 
m = 1, because there is only one 'X' in the whole game.
N - m = 96, which refers to all the non 'X' tiles in the game.
k = 1, because you want to find the probability that your opponent has one 'X' in his hand.

P(X = 1) = [ 1! / ( 1! x 0! ) ]    x    [ 96! / ( 6! x 90! ) ]    /    [ 97! / ( 7! x 90! ) ]
= 7 / 97 
= 7.22%

Let's check this with just logic and simple probability instead of the formula. Your opponent has 7 tiles in his hand, so this is equivalent to 7 draws.

Probability that he draws a 'X' in his first attempt = 1 / 97
Probability that he draws a 'X' in his second attempt = 96 / 97  x  1 / 96  = 1 / 97
Probability that he draws a 'X' in his third attempt = 96 / 97  x  95 / 96  x  1 / 95 = 1 / 97

...and so on until the seventh attempt. Now, it is obvious that the probability is 1 / 97 for each attempt, so in total, the answer is 7 / 97, which is 7.22%. 

Of course, the hypergeometric distribution can be used to calculate more complicated scenarios, like for example, what is the probability that your opponent has 2 'S' in his first round, assuming you have none in your hand?

This time, m = 5 (there are 5 'S' in the game), and k = 2. The other variables remain the same.

P(X = 2) = [ 5! / ( 2! x 3!) ]   x   [ 92! / ( 5! x 87! ) ]   /   [ 97! / ( 7! x 90! ) ]
= 3.83%

However, it would be more apt to calculate the probability that your opponent has at least 2 'S' in his first round. This means we want to find P(X ≥ 2), which means P(X = 2) + P(X = 3) + P(X = 4) + P(X = 5). Doing the calculations would give you an answer of 4.05%.

This distribution can be easily replicated on Microsoft Excel with the function FACT() for factorial (for the Binomial coefficient).

It should be noted that this method may not be 100% accurate due to the fact that you can use less than 7 tiles at one go. So it is likely that your opponent will hoard the better tiles like 'S' or blank and wait for an opportunity. Thus the calculations above can be thought of as 'the minimum probability' that your opponent has a particular letter.

Saturday, November 19, 2011

Orchard Cafe @ Orchard Hotel

I went for breakfast with my mother at Orchard Cafe this morning, because we had a $50 voucher from à la carte. The breakfast dishes were not cheap - for example, a Japanese breakfast set, which consists of a bowl of rice, baked salmon, and miso soup, costs $28, while a plate of nasi lemak costs $15. The Orchard Cafe Breakfast comes with a choice of either two eggs or an omelette with various ingredients, bacon, chicken sausage, and a choice of juices and coffee or tea.

I checked with a waitress to see if we could use the voucher for the buffet, and was told that we couldn't - we could only select items from the menu. Since we also had the à la carte membership card, I suggested using it for the buffet instead (50% for 2 pax) and use the voucher another time. The waitress apologised and said that the card was not valid for the buffet too. Oh well.

In the end, we decided on the Orchard Cafe Breakfast ($32) and an Eggs Benedict ($15), and asked the same waitress over.

Me: Can we have one Orchard Cafe Breakfast and one Eggs Benedict?

Waitress: Oh, the Orchard Cafe Breakfast is actually the buffet, so you will have to take it yourself.

Me: Huh? So can we use the voucher for this then?

Waitress: Uhh... yes.

Me: What the hell?

Okay I didn't say the last part aloud, but that was what went through my mind. Firstly, the way the Orchard Cafe Breakfast was described in their menu made it seem like an à la carte order, because you had to choose between two eggs done in any style or an omelette. Secondly, the voucher isn't valid for the buffet because it can only be used for the menu items - but the buffet is on the menu so it's okay? Sounds like a circular reference error on Microsoft Excel!

Food-wise, nothing really stood out from the buffet. The fried eggs, chicken sausages, ham slices, and nasi lemak were decent, the lamb sausages and 油条 were not good, while the chawanmushi was downright horrible - easily the worst chawanmushi I have ever eaten in my life. It was too hard, had no taste, and the crab stick and mushrooms inside were hard, stale, and tasteless. Thumbs-down for the buffet. Not going to come here for breakfast anymore.

Thursday, November 17, 2011

Immortals

I caught Immortals today, being someone who loves Greek mythology and has read such stories since I was young. (NOTE: Spoilers below.)

Here is the synopsis from Rotten Tomatoes:

The brutal and bloodthirsty King Hyperion (Mickey Rourke) and his murderous Heraklion army are rampaging across Greece in search of the long lost Bow of Epirus. With the invincible Bow, the king will be able to overthrow the Gods of Olympus and become the undisputed master of his world. With ruthless efficiency, Hyperion and his legions destroy everything in their wake, and it seems nothing will stop the evil king's mission. As village after village is obliterated, a stonemason named Theseus (Henry Cavill) vows to avenge the death of his mother in one of Hyperion's raids. When Theseus meets the Sybelline Oracle, Phaedra (Freida Pinto), her disturbing visions of the young man's future convince her that he is the key to stopping the destruction. With her help, Theseus assembles a small band of followers and embraces his destiny in a final desperate battle for the future of humanity. 

The show was a total let down. Other than the whole plot not staying true to the original Greek mythology at all (really, not at all!), it was also filled with holes and gaps that are so big that it couldn't even hold rocks.

The movie seemed to revolve around the Bow of Epirus, which is supposedly so powerful that its wielder can conquer the world and defeat Gods. In the end, King Hyperion only used it once - to destroy the gates of a fortress. After the gates fell, he had the chance to send several more arrows in (yes, ammo is unlimited) to wreak more destruction. But he didn't. Hmm. Other usages of this legendary bow were minor and hardly worth mentioning.

When the fortress was breached, the soldiers panicked and tried to flee. Theseus managed to hold them together with a speech in a lacklustre tone that was barely audible. In just a few seconds, all of them had such a huge morale boost that they were banging their shields and pumping their spears in the air. Nice. Obama could learn a thing from two from Theseus, man.

Also, this is a Greek movie, dammit. Why is the oracle so obviously Indian? She looked so out of place, and as one movie reviewer said, she has to be "the loosest virgin in the Peloponnese". Her reason for sleeping with Theseus? "I want to see the world with my own eyes." (if she loses her virginity, her oracle powers would be lost as well) Oh my god. I didn't need extra cheese to go with this.

I thought Titans are supposed to be big. Huge. Enormous. Gigantic. The movie's Titans were human sized, and the way they were imprisoned in a cage with long bars across their mouths made them perfect for table soccer.

The caged Titans, from Immortals. Table soccer, anyone? Source: Latinoreview.com

I should have checked Rotten Tomatoes first before watching (they gave it a score of 38%). When King Hyperion said, "His pain has just began", I think he was referring to some of the audience.

Heng Kee @ Hong Lim Food Centre

I was a 'late learner' when it comes to curry chicken noodles, because since young, I have been eating curry chicken only with rice. So the notion of eating it with noodles seemed rather foreign to me. However, the first curry chicken noodles I tried at Heng Kee in 2006 converted me totally.

Heng Kee curry chicken noodles, $6.50
Their curry tastes very unique, with a very slight tinge of sweetness. As someone who doesn't really have a liking for sweet stuff, I should emphasise that this sweetness is really very slight, in case some people get turned off by a sweet curry. The tao pok and potatoes have been immersed in the curry for a long time, so what you get is very soft tao pok and a potato that crumbles easily. Strangely, the chicken is not stewed together with the curry; it is just normal steamed chicken that is added into your bowl after you order it. But it still tastes perfect when combined together, and you won't feel that the chicken is a separate part of the dish. 

When the noodles are ready, the uncle would actually add scoop some oil from his curry pot and drizzle it into the bowl. After painstakingly removing the oil several times, I finally remembered to ask the uncle not to add any oil. 

When I first tried it in 2006, their curry chicken noodles came in three prices - $3 / $4 / $5. It then became $4 / $5 / $6, and not long after, $4 / $5 / $6.50. $4 gives you a small bowl with no choice of chicken parts. $5 gives you a bigger bowl with a choice of chicken parts, but no chicken drumstick or thigh. $6.50 obviously offers the biggest bowl with chicken drumstick and thigh. Unsurprisingly, there is always a long queue and each bowl takes quite some time to prepare, so to make my time more worth it, I will always order the $6.50 bowl. Their chilli is actually more salty than spicy, and also with a slight tinge of sweetness. It is a must-have with the chicken!

Till now, it is still the best curry chicken noodles I have ever tried. There is another outlet directly above, but Heng Kee wins it easily. Recently, after Hong Lim Food Centre was renovated, a third outlet opened upstairs too, but I didn't bother to try. Some of my friends said that the curry chicken noodles at May Hua Food Court (near Golden Shoe Car Park) is good, but one sip of the curry proved otherwise.

One thing to note - remember to bring tissue paper. The bowl is served with the spoon inside, and very often, the spoon is 90% immersed in the curry (look carefully at the spoon in the picture), so you would need to clean the spoon first before eating.

'Cheapskate' motorists? No, dumb writer

In today's Straits Times Forum:

"THE public carpark behind Far East Shopping Centre is popular because it provides cheaper parking for the Orchard Road area. Unfortunately, there are motorists who exploit this by waiting for their friends or family members in their cars, without displaying carpark coupons.
I had an unpleasant experience there on Monday about 11.30am while trying to find a parking space. The driver of a Mercedes-Benz was reading newspapers at the wheel, without coupons being displayed on the dashboard.
I approached her to check if she intended to park her car. She said she was waiting for her daughter but did not intend to use a parking coupon.
That driver was not alone. Other motorists were also occupying parking spaces without paying for them.
The carpark was full and there were many motorists queuing for parking spaces.
How does the Urban Redevelopment Authority (URA) deal with such motorists who prevent others from legitimate use of parking spaces?"
Jeyarani Anita Henry (Ms)

Is there anything wrong with someone parking their car in a parking slot while sitting inside the car at the same time? So what does the writer want?

1) To ban people from remaining in their cars when they park their car in a public car park?

2) Force them to put coupons even though they are sitting inside?

Does it mean that if the driver waits inside the car but also displays a parking coupon, the writer will be satisfied?  The driver wastes one parking coupon, the writer still does not get a slot. So who wins? The government, of course. The revenue of one parking coupon is earned for nothing. 

Sunday, November 13, 2011

Why I don't want kids

Among my friends and family, I am rather well known for detesting kids. So a natural by-product of this is that I don't want any kids, even after I get married. I see parents at NTUC Fairprice with screaming and running kids, and it certainly helps to reaffirm my views (while trying to suppress the urge to knee one in the face).

Reasons? Plentiful.

1) They are expensive. I don't need to elaborate on how expensive living in Singapore is. Having a kid on top of that? Diapers, milk powder, clothes, textbooks, school fees, toys, repairing the furniture, unclogging the toilet bowl? I would rather spend the money on figurines or vacations.

2) They are troublesome. You need to spend an obscene amount of time on them and yet still suffer a lot of headaches. And when they become teenagers, multiply the headaches by ten.

3) Because they require so much time and money, you can't do what you want. You can't just go out for a dinner and movie without ensuring that someone can take care of them. While having a maid is an option, I don't trust maids (my family has had more than eight maids) and most of them are either dishonest, lazy, or take you for granted when you treat them well.

4) To me, the most irritating sound in the world is a kid's wailing or screaming. If only someone can invent some sound-proof mask for kids... 

5) Being a parent is a thankless job (just like being the government). They do not know how much you have sacrificed for them. And even if they do, they may not appreciate it. 

6) You can't control what kind of person your kid will turn out to be. While good parental guidance can help, it may not overcome traits which the child is born with. Even if you treat them well and bring them up well, they may not be filial. Two people especially stand out in my mind. Let's call them A and B.

A's parents are not well-to-do, but in order to send A to the US for his university education, they scrimped and saved. But when A was at the US, he told his friends (with no remorse) that he doesn't care what his parents have done for him. In fact, he even used his parents' hard-earned money to buy an expensive car, and thinks that there is nothing wrong with it. 

B is someone who has no qualms about leeching off his parents, despite his parents not being especially wealthy too. He thinks that spending other people's money (including his parents) is an especially wonderful feeling, and if he had his parents' credit card, he will "swipe-swipe-swipe" and buy a house, a car, everything. When I remarked that that seems to be a life of a parasite, he responded defiantly "And what's wrong with that?"

I don't know A personally. He was just someone my friend knew, and my friend was so upset with him that she stopped talking to him ever. But I know B personally, and from what I know, his parents have not done anything to betray him or insist that he send money home to Malaysia. (Then again, I do know that he doesn't send any money home) So what led to him developing such a character?

So in choosing not to have a kid, I am actually following the best risk management approach - risk avoidance. I think there are other better things I can do with my life. However, I acknowledge that this is only how I feel currently, and that it may change with time. 

The common arguments people give me when they hear that I don't want kids. 

1) What about when you grow old? Aren't you afraid of ending up being old and lonely?

Come on, there is no guarantee that your kids will visit you after they grow up and start their own families. Also, like what I mentioned earlier, even if you bring them up the proper manner, they may not grow up to be filial. 

People without children also spend their lives differently, and this may include forging more social ties with friends, colleagues, pets, and so on. 

2) But kids are so cute!

"Cute" is subjective. You may think that a kid is the cutest thing ever in the whole world, but in my eyes he is just a rascal that sucks your time, money and energy away and uses them to produce noise, tears, and shit.

Q3: Wait till you grow older. You may change your mind by then.

This is the only argument that I acknowledge and agree with. But I do know for certain that for now - and in the near future - no kids for me. 

Saturday, November 12, 2011

Seng Kee Minced Pork Noodles @ Changi

I don't usually travel to the eastern part of Singapore, but Seng Kee Minced Pork Noodles is a place which is definitely worth my time (and petrol). Located at 316 Changi Road, it stands out because the whole place belongs to them, unlike the usual standalone stall in a hawker centre. 

I arrived here at 520pm on a Saturday, and was greeted (pleasantly) with an almost-empty restaurant. 


Braised pork ribs, $5
The pork ribs were obviously braised for quite some time, because even the soft bones can be eaten easily. The flavouring had also seeped into the meat totally, so what you get is a plate of very delicious and soft pork ribs.


Bak chor mee, $4.50
This is their standard bak chor mee. On its own, it was already very good, until I tried their special version with egg and mushroom sauce...



滑蛋肉挫面 - Bak chor mee with mushroom and egg sauce, $6
This is definitely one of the best bak chor mee I have ever eaten. Of course, with its thick sauce, it is rather different from the traditional bak chor mee, so a comparison may not be fair. The sauce was so rich, thick and delicious that every mouthful was (almost) greeted with a contented sigh. In fact, thinking about it when I am writing this makes me feel hungry again!


Fish maw soup with pork tendons, $12
A huge bowl of soup which is practically saturated with ingredients - fish maw, minced pork, mushrooms, pig liver, sliced pork, black fungus, and pork tendons. Unsurprisingly, this soup was extremely sweet and tasty. However, I think the pork tendons were quite unnecessary, so the standard fish maw soup ($8) should suffice.

After I finished my dinner here, I was already making plans to bring my whole family here soon. I am actually very surprised that there is no long queue at a restaurant that serves such fantastic food! Since the restaurant opens from 8am to 10pm, I figured that the crowds would come more often on weekdays for dinner and weekends for breakfast or late dinner.

Tuesday, November 8, 2011

Deceptive Advertising #2

While having breakfast at Serangoon Garden this morning, someone gave me a brochure for an upcoming condominium near my place - Cardiff Residence, which is located along Lorong Chuan. Since I was very familiar with this area, I looked at the condo location more carefully and was rather appalled by how misleading the brochure is.

This is a picture of the brochure.


Stamford American International School and Australian International School are actually located further down Lorong Chuan road, but this was still acceptable. What I couldn't accept is where they placed Serangoon MRT station and NEX Shopping Mall. Google Maps shall be our judge for reality in this post.

Google Maps. Green circle = original location of Serangoon MRT and NEX. Red circle = developer/agent's location of Serangoon MRT and NEX

So according to the brochure, Serangoon MRT station and NEX have been transported around 1km away from their original location at Upper Serangoon Road to along Serangoon Avenue 2 and Boundary Road. While they did include a disclaimer - "This artist's impression is preliminary only and should not be considered as representation of facts" - this is just too blatantly wrong and false. 

Thursday, November 3, 2011

Uncle, take it easy lah

I used to see this irritating uncle in the morning when I take the Circle Line MRT to work. He is perpetually in a rush, and when the train arrives at Lorong Chuan, he would get off the cabin and move to the head of the train - so that he is closest to the escalator at the next stop, Bishan. And he would time himself such that he goes into the cabin last. Why? So that he can be the first to get off. 

After not seeing him for several months, I met him again this morning. This time, he was already at the train head, standing right in front of the train doors. When the train doors opened, he grudgingly moved aside slightly to let people in. I happened to be the last, so I (purposely) took his original spot. I could tell that he was a bit flustered and irritated as he kept on throwing quick glances at me. A few seconds later, he even tried to inch towards me in an attempt to position himself better to be the first one out. But I stood my ground and even put my paper-bag strategically beside me to fend him off. All this while I had my eyes fixed on my PSP.

So when the train reached Bishan, I was the one first out. Unsurprisingly, he quickly overtook me and half-ran up the escalator to catch the North-South train. I looked at the sign - 'Train Arriving' (which actually means Train Arrived) - and from the number of people who were walking in my opposite direction, I figured that the train would be leaving soon and I wouldn't make it. So I took it easy. 

Uncle didn't, however. When I reached the North-South train, the train had just left and he was nowhere in sight. Evidently, he had managed to catch the train. Damn it.

The 30s syndrome

Today, I had lunch with an old friend I have known since JC. So this makes 2011 the 14th year I have known him.

He said that he is feeling old, now that he is 30 years old. He used to go clubbing almost every weekend, drink till 3 to 4am and go home roaring drunk, and spend hundreds of dollars in the process without batting an eyelid. But now, he prefers to stay at home or to spend more time with his girlfriend. He used to drink iced water whenever possible; now he drinks warm water. It's the thirties-syndrome, he claims. 

If this is the case, it seems that I have reached 30 years old at least 4 to 5 years ago. If I get requests to go clubbing on a Friday or Saturday night, I would decline them 90% of the time. To me, such activities are a waste of time and money, and I would need to spend the whole weekend recuperating. I would rather do what I do every weekend - having breakfast with my mother and my dog, swimming, practising the piano or cello, going out with my girlfriend, and clearing some work so that I don't have to work too late on weekdays. 

Such activities give me a strong sense of self-satisfaction and fulfillment, and I would feel that my weekend has been utilised fully and not wasted on sleeping.

On the issue of drinking warm water, I used to drink cold water all the time too, including early in the morning. If there was no cold water available, I would even add ice (an ex-colleague looked aghast when she saw me do that at 830 in the morning). Now, it's room temperature water for me most of the time.