Sunday, February 21, 2010

Most Used Digits

What are the most commonly encountered numerical digits? On first thought, it does not seem that any particular digit ought to be favored, as numbers seem to be randomly distributed; however, in fact some digits are more common than others.

I recently took a photograph of a used calculator lying around in my house, which should provide an instructive insight into the answer.
The wear patterns on the calculator suggest that the lower digits are used more often, in particular 0 and 1. Possible explanations for this distribution include Benford's law, which proposes that if one compiles several sources of real world data, the most common leading digit is 1; whereas for 0, it may appear often after rounding to a significant figure.

PS: I also wonder whether people would be capable of immediately determining the digit configuration if all the digits were non-visible due to wear.

Sunday, February 14, 2010

Portents of the Year to Come

Though I do not seriously believe in astrology, I did note the prediction for the Rat for the Lunar Year during the Countdown programme. One piece of advice that was given was, "Be careful with money and investments, beware of scams".

Prophetically, at 6:10 am, not even 400 minutes into the new year, I received an SMS. The contents of the SMS are reproduced below:
Congratulations! Your mobile phone no.has won (GBP) 560, 000 pounds in the ongoing Nokia UK promo. For claims, call +44702407 & email: claimprize@europe.com
Thanks to celestial advice I will not be taking up this otherwise fabulous offer.

Saturday, February 13, 2010

Findings from Playing Diablo 2 Excessively

It is quite evident from the fact that I am still playing Diablo 2 after more than 10 years that I have spent an excessive amount of time on it. However, it is only recently that I was able to attain a small measure of success in it, completing about 6 of the 7 available classes (I am now attempting the last class).

On Saturday I made an unexpected discovery; I was playing Diablo 2 with my earphones on when I was momentarily distracted by the television behind me (to be entirely accurate, it was the television programme, but this ought to be obvious). Since I was in town, there was no danger of any sudden death by stupid causes, so I removed by earphones and split my attention between the television and the usual logistics tasks done in town (selling loot, repairing gear, cubing etc).

I had an excess of gems, so I cubed them. As I was moving a gem into the Horadric cube, I heard a faint ring. Curious, I repeated the gem movement, and the ring was heard again. This was interesting; the earphones were placed relatively distant from my ears, and yet the faint tone was audible. Perhaps it was because the gem sound was sharp and of high frequency, hence it was more easily transmitted.

I next tried moving other items. Skulls were, perhaps expectedly, quite inaudible from the distance, since the dull "plopping" sound wasn't very sharp. The metallic clang from shields was somewhat more audible, but very significantly less so compared to gems. Charms were quite detectable from a distance, almost similar to gems, though it required some training as the sound wasn't quite as sharp as compared to gems. It was an interesting experiment to run.

Another finding made with the earphones off was that the game seemed to run slower; movements seemed more sluggish, and actions more delayed. In retrospect, sound may actually serve to affect our perception of time; a sound effect may not sound long but may actually occupy a significant amount of time and attention.

Perhaps playing without sound may serve to improve my neurokinetics.

Sunday, February 07, 2010

Observations During the Safari Zoo Run

Yesterday, I participated in the Safari Zoo Run '10. It was a run of intermediate distance (6.2km) through the Night Safari and the Singapore Zoo. The route wasn't perfect, with some uneven terrain near the end, and a lot of slopes (minor and major) during some parts of the run. Still, despite my relative lack of training (consider 4 years of no exercise and perhaps 4 weeks of running prior), my run timing was more than satisfactory from my own perspective (42 mins).

Though the attraction of the event was ostensibly being able to view the animals while running, I actually found the fellow runners to be of more interest. Some observations made during the run:

1) The Japanese Trio: There was a group of three Japanese runners, each armed with a digital camera. One of their member would sprint perhaps 100m ahead, and take a photo when the group caught up. Another member would then himself run 100m ahead to take the next photo. In such a leapfrog fashion, they managed to capture photos of themselves during the run. It was quite amusing, and the Japanese runners appeared to be quite enthusiastic and jolly about the entire affair, posing and waving for each photo-take. It couldn't have been an efficient method of running, though; I probably left them behind after perhaps the 1 or 2 km mark.

2) The Tudong Runner: There was a Muslim woman running with the tudong headdress. I do not recall whether she was wearing the Safari Zoo dry-fit running tee; but in any case, running with a piece of cloth covering the head doesn't exactly seem very clean or hygienic. However, I do wonder if a specialized running headdress for Muslim women has been invented; I imagine that a headdress made of dry-fit microfiber (the stuff they make running tees and shorts out of that manages to absorb and evaporate sweat fast) would be better than one made of ordinary cloth.

3. Mother and Child: The Safari Zoo run was partly catered for young runners and the family, hence there were a number of parents running with their children. At around the 1km mark, there was a mother chastising her son (while running) for not adopting the proper running technique, while giving her son pseudo-advice (it's a short distance ! Before you know it it'll be over). If I were to be in the shoes of the son I'll be fairly irritated; I might have been motivated to run faster just to shake her off. Furthermore it is a waste of energy to talk while running.

4. Constantly Overtaken: The runners were dispatched in waves spaced about 5 minutes apart, probably to ensure that the running paths are not clogged with runners (which often happens during runs where bunches of runners can form, much like traffic jams). I was in the second wave. I probably overtook all the people that were slower than myself within the first two kilometers; for the rest of the race, I was constantly being overtaken. But, for the same reason, I could have tried to raise my speed as a result, hence I was faster than I expected (I was expecting 45-50 mins, based on some prior training).

5. Jacked Prices: After the run I went to the convenience store in the zoo, just to take a look at the prices. They were indeed inflated. A bottle of green tea usually costs about $1 at the right places; in convenience stores, they cost $2 (due to the 'convenience ' factor); at the zoo, it costs $3. I am intrigued; the traffic to the zoo couldn't have been poor. The rent must have been high, then.

Sunday, January 31, 2010

GDP, GNP, and Quality of Life

It seems to me that measuring national progress against the benchmarks of GDP or GNP is, while not entirely unjustified, somewhat misguided. How does one benefit as a result of such increases in GDP or GNP? It is quite an abstract measure, but perhaps some might defend these queer yardsticks by claiming, "If GDP/GNP increases, this likely means that my income has increased!". Even if such a statement is true (which it may not be), I ask, "So what? How is that good?".

The subtext is, of course, that an income increase is good as it raises one's quality of life. But that raises a question- why not simply use the quality of life as a direct measure of national progress!

We of the modern age run the risk of mistaking financial strength as a core good. It is not; obviously our quality of life is by far the most important. Admittedly, GDP and GNP may be somewhat indicative of the average quality of life in a country, but this is at best a coarse measure. We ought not to focus on increasing GDP and GNP while losing sight of the true goal, which is to raise our quality of life. By concentrating on the wrong measures of progress, we are confounding ourselves, and exposing ourselves to a life of wealthy misery.

Sunday, January 24, 2010

Wuxia: Part 1

Even the most ignorant of people amongst all the sects and schools in the entire Wulin know about the tumultuous event that happened fifty years ago. Then, the treacherous Shangguan Bo destroyed one of Wulin’s five major sects and almost sparked a war between nations. Fortunately, Shangguan Bo was stopped by the heroic Ren Juzhong, master of the Ren manor. Ren Juzhong was a good friend of Shangguan Bo, but he was able to put friendship aside and justly execute heaven’s way, killing Shuangguan Bo. Thus, a catastrophic war was barely avoided.

Shangguan Bo, before he was revealed to be a traitor and a man of great evil, was widely admired as a master of many arts, well deserving of the character “learned” in his name. He had acquired mastery in astrology, calligraphy, painting, and martial arts, among many other things. But it was his skill in venoms that caused the most harm to the world; he had invented a poison so deadly and ingenious that it was unparallel in history. This poison was called the “Seven Day Intestine Dissolving Powder”; dissolved in water, it was colourless, odourless, and tasteless, absolutely undistinguishable from just water; after consuming it, the victim would have no indication that he was poisoned until seven days later, where worms would gorge and consume the victim’s intestines from the inside. Lastly, the poison was impossible to neutralise by any medicine or remedy, and could not be expelled by internal energy either. It was indeed an ultimate toxin and weapon.

It was through underhanded trickery that Shangguan Bo managed to get the members of the Mofeng Sect to consume the Seven Day Intestine Dissolving Powder. None of them had suspected that they were poisoned. On the fifth day, Ren Juzhong arrived at the main hall of the Mofeng Sect with the Divine Doctor Xue and his young pupil. Ren Juzhong had learnt of Shangguan Bo’s evil plans through the great resources of his manor. Originally, the Ren clan was a family of wealthy traders with branches in many cities and towns within the empire, but they found that their trade routes and branches were also good for gathering information. Eventually, they began to deal exclusively in the trade of information, which only their resources and reach could gather effectively; and thus, the Ren manor became the centre of the most massive engine of news and rumors and secrets that the Wulin had ever seen. Thanks to this enormous and unrivalled engine, Ren Juzhong learnt of the poisoning plot, and tried to prevent it, but he knew he was too late. Hence, he had instead sought out the world’s greatest physician, Divine Doctor Xue, in an attempt to save the Mofeng Sect. Unfortunately, the Seven Day Intestine Dissolving Powder was indeed the chief among poisons; all the Divine Doctor could do was to diagnose that the Mofeng Sect members had been poisoned by some unknown poison. Indeed, at that point of time the Seven Day Intestine Dissolving Powder was unknown to the world, for Shangguan Bo had invented it in secrecy. Though the Divine Doctor was known for his ability to cure even diseases he had not encountered before, he was truly stumped by this new and mysterious poison; he was only able to witness the gruesome deaths of everyone in the Mofeng Sect, from the most skilled elders to the most junior of disciples. The Divine Doctor was so shocked by this scene of death, and so ashamed by his inaptitude, that henceforth he returned to his home in the mountains and went into a prolonged period of retreat, trying to research some cure to counter this potent poison that could only be described as being a devil’s gift from the eighteenth level of hell.

Monday, January 11, 2010

Chinese Blackjack (Ban-luck)

Chinese Blackjack, otherwise known as "Ban-Luck" to some Singaporeans, is interesting in that it is an almost symmetric game between the player(s) and the dealer. This is because the payouts and scoring rules are identical for both player and dealer, which contributes to the simplicity of the game. In fact, if the dealer chooses to play in a particular fashion, namely hitting his cards before revealing the players' hands, then it does become a perfectly symmetric game.

Conversely, a dealer's house advantage comes solely from being able to selectively reveal some players' hands before hitting. In other words, the dealer has an advantage in that he is able to first beat hands which are likely to be weaker (by being busted), and that he is able to further build up his hand to confront stronger hands.

Out of a pure curiosity, I was considering some potential strategies for Chinese Blackjack. However, most player strategies are likely to have a minimal impact, due to the inherently limited strategic nature of the game. Chinese Blackjack forces the player to draw til at least 16, in which case it is (by statistical reasoning) unwise to draw further. The only exception to this rule is when one has a 'soft' hand, comprising of one Ace. Though I have yet to perform a through analysis of the mathematics, I believe that it is better to hit in this case. There is a small chance of improving one's hand, but the main issue is to confound the dealer's opponent model by tricking him into believing that you have a busted hand.

As a dealer, there is much more room for strategic analysis. It is quite possible to compute, via extended Monte Carlo simulation, the probability of a 4, 3 card hand being busted (assuming the basic opponent model given by the hit-til-16 rule). Furthermore, with some computing power or pre-computed tables, it is possible to obtain the precise odds of a player's hand being superior to yours, and the odds of a drawn card improving your hand, given the already exposed hands. However, I have my doubts regarding the feasibility of such implementations.