Tuesday, December 30, 2008

Divisiblity Tests

I describe a method to generate a divisibility test for the divisor 13.

For a dividend B, express B in terms of its digits, i.e,
B = 10X + Y , where Y is the ones digit and X are the digits left of Y.

Working in modulo 13, if B is divisible by 13, then
10X + Y ≡ 0 .

We then propose a divisibility test that uses X and Y to check the divisibility. We propose
X - KY ≡ 0 ,
meaning that we subtract K times Y from the X digits and test whether 13 divides it.

Manipulating and substituting,
10KY + Y ≡ 0 => (10K+1) ≡ 0 .

Solving the equation, we obtain a value of K = -4. Hence, to test whether a number is divisible by 13, we take the ones digit, multiply it by 4 and add it to the digits on the left. If the result is divisible by 13, then the number is divisible.

To demonstrate the use of the test, let us test the numbers 1234, 2468, and 1781. For 1234, 123 + 4*4 = 139, which is clearly not divisible by 13. Hence, 1234 is not divisible by 13. For 2468, 246 + 4*8 = 278. We can recur the test, 27 + 4*8 = 59, and hence 2468 is not divisible by 13. Lastly, for 1781, 178+4 = 182, 18 + 4*2 = 26. Hence, 1781 is divisible by 13.

The method for generating the divisibility test is general, and can be extended to other numbers. However, for larger numbers, it might be necessary to compute the tens and hundreds digits (and increasingly higher powers of ten), so it might not be feasible for very large numbers.

As a last note, divisibility tests are useful for trivial tasks such as prime factorization using your head.

Thursday, December 25, 2008

Musings on Transport Subsidies

During a dialogue session with Macpherson residents on Sunday, Transport Minister Raymond Lim, in response to questions on the rising cost of public transport, revealed that it would take a further 1.5 percentage point hike in GST if bus and train rides were to be made completely free.

On certain levels, the argument is attractive. As a libertarian and a minarchist, one of my beliefs is that governments should be as small and limited as possible. The argument for minarchism is similar to that raised by the Transport Minister- that ultimately, governmental interference (for example, in the form of subsidies) is circular, taking with one hand and giving with the other. More importantly, the objection is that such interference is pointless and inefficent.

Though the arguments for minarchism are actually deeper, the theory does appear to stick to the issue of public transport. It is a simple solution to demand transport subsidies from the Government, but ultimately, is not the Government funded by the taxpayer? In effect, transport subsidies are tantamount to the public transport user being subsidized by the private transport user, which may or may not be desirable, depending on your views on wealth redistribution.

There is, however, one mistake in the prior reasoning. That mistake is to assume that the game is zero-sum, and that subsidies take X from a person and distributes X to another. and that there is no change in overall utility. For certain goods, especially public goods, this may not be true. In some cases, total utility can be increased by redistribution. One notable example is that of economic stimulus packages, which, by taking tax money and redistributing it to the citizens, might initially appear to be foolish, but is actually somewhat a prudent measure, since it encourages economic growth in the hope that the tax money lost could be more than recouped by the growth in the tax base.

Having raised the idea that subsidies might not be zero-sum, let us try to explore how this can be so. To speed up affairs, let us ask whether a sum X spent in transport subsidies can possibly generate a greater sum Y in additional economic growth. To answer the question, we need to study the effects of the additional mobility granted by the corresponding reduction in public transport costs.

Firstly, I could postulate that the gain in mobility may generate a weak rise in consumer spending, since we are less deterred from going out, though I admit that any rise in spending would most likely be minimal. A second effect is that retail competitiveness would increase, as consumers are less likely to be locked in to vendors from the neighborhood. This might lead to smaller shops (pop-and-mom outfits) being negatively affected, since the advantage of locale would be eroded.

A more important effect is that of jobs. Traditionally, distance (from the home to the workplace) is one barrier to the choice of jobs available to a worker. While there may be many job opportunities, many jobs are not possible or at least less attractive due to the commuting distance, and also commuting cost. Corresponding reductions in the cost of commuting may see a rise in employment rates, or of worker quality.

It might be possible that subsidies for public transport may generate more utility than their cost, though very careful studies must be made to quantify arguments for it, as I admit that the arguments I put forward in this post are at this stage entirely hypothetical. In particular, the issue of how the subsidies are to be funded should also be taken into account, as certain forms of funding are likely to destroy or erode gains made from the subsidies. For example, additional consumption taxes are likely to dampen or even reverse growth in consumer spending. Hence, more research would be desirable to shed more light onto this matter.

Monday, December 22, 2008

How To Procrastinate

I have acquired some absurdly bad procrastination habits lately. Lots of things are being put off, though these are not by any means important matters, which is both assuring (well, it's only the unimportant things) and terrible (well, even the unimportant things are being put off!).

One telling indicator: My Firefox starts up with many tabs, and I think the leftmost two or three tabs have been there for a couple of days. My "TEMP" bookmark folder is increasing in size too.

I've got to devote more time to actually reading those webpages.

Saturday, December 13, 2008

The Amazing Tale of Intrigue


The wicked witch had run out of her supply of children and was feeling hungry. Due to the poor economic climate, buying children off the market was costly, and so the witch decided to do things the old way, which was to catch some.

After breaking off two large baskets of sweets from her candy house, the witch moved to the traditional kid-luring location. The efficacy of the bait amazed even herself, as a child lunged towards her before she even reached the location.

But it was not to be! The child was not prey, but predator! The brave blue boy stunned the witch with a leap attack, and carried off the two baskets of lures. The unprecedented attack shocked the witch - could this boy be the fabled witch-slaying hero? The witch recalled the many cases of mysterious witch-deaths, such as one dying after "accidentally" climbing into the kitchen oven, and another being crushed to death by a falling house.

No chances could be taken, the crone thought. Cackling, she took out a spell scroll, disguised as currency, from her purse. She started chanting the activation words, but the child-hero acted swiftly, using kungfu to interrupt the spell. He focused his internal energies into his palms and blasted the witch. The power of the spell and the energy blast mixed together, and neutralized each other.

Her spell neutralized, the witch had to use the last resort, which was also kungfu. She raised her palm to attack, but her actions were far too slow. The child-hero had the time to change his clothes, and to take out a hose and spray water over the witch. The witch writhed in pain, as all witches were weak to water. One notable relative living in the west was even slain by immersion.

The child-hero took the witch back to the secret headquarters for interrogation. This move would prove to be a mistake, since there was a secret double agent in the organization. The boy was caught unawares by a sneak attack and was defeated.

The witch took the boy back to her candy home, where she intended to cook the boy. Unexpectedly, a deus ex machina happened, and a taxi popped out from empty space. Riding inside it was Captain Mustache, one of the most famous superheroes in the world. The greatest battle of the century was about to begin...

Thursday, December 04, 2008

The Game

There is a game which everyone plays. It is a queer game, though. Some are unaware that they are playing. Others play without knowing their final goals in the game. Still, all play the game.

There are many possible objectives in the game. Some choose to pursue material wealth, seeking to collect the most riches. Others choose to collect the most company, amassing the most friends and favor. Yet some more play the game seeking a simpler victory, one that is completed with a partner. There are indeed many ways to win the game.

Curiously, while the game is not difficult to win, many dawdle aimlessly. They pursue meaningless goals which are unrelated to their winning conditions, hence wasting time and resources. Some pursue grades blindly with their final aim being wealth and not education, and yet these players are unaware of the other game plans that would bring them closer to their goal, and faster. Other players pursue wealth and career, but are unaware that their winning condition is happiness, and that their futile moves bring them further and further away from winning.

It seems trivial, but the first step to winning the game is to learn what the winning condition is. Otherwise, one would find himself playing the wrong game, and losing.

Are you playing the right game?

Sunday, November 30, 2008

Poorly Structured Exam Questions

For engineering exams, I absolutely hate poorly structured exam questions, particularly questions that have a heavy weight. It is my opinion that such questions serve little purpose.

Before I proceed to expound upon my views, allow me to more clearly describe the item of my ire. Poorly structured exam questions are exam questions that only contain 1 main question (no sub-items), and yet have a considerably high weight assigned to it. For example, "Describe how XYZ can be ZZZ. [25 marks]" is one such problem. Such questions require the student to perform certain tasks, but do not clarify what exactly is required of the student.

Now, imagine a hapless student attempting to address such a question. Given such an ambiguous problem, what can the student do? He has no choice but to adopt the safest approach, which is to construct an answer that is as foolproof as possible. The result is a voluminous answer, which is comprehensive but also largely irrelevant.

It puzzles me to learn that markers of exam scripts often have reference marking schemes, which detail which points are correct, and of the proper score to assign to those points. If there is already a set of criteria which the examiners are looking for, why should the criteria be kept secret? What harm would it pose to give students an idea of what answers are required?

It would be infinitely easier to properly structure the question into smaller and more detailed parts, or to provide a clear description of which points or areas should be discussed in the answer. Adopting such actions would clearly reduce the amount of irrelevant material in the answers. It would also be easier for the markers to mark the exam scripts. A mutually beneficial scenario, in other words.

It is my opinion that poorly structured exam questions are the mark of a lazy problem setter. However, such laziness does not go unpunished, since the same setters would have to suffer the large volume of inflated answers that is a direct consequence of their laziness.

Secret Reseach Project 3: Authorship Attributor

During the term, I developed a program that was able to attribute a document to its correct author. In other words, given a sample document, the trained program would be able to indicate who wrote it.

The theoretical basis for the authorship attributor is that different authors have different active vocabularies and different word preferences. Hence, this difference can be exploited to differentiate between writings of different authors, as long as enough of their prior work is known.

The program employed genetic algorithms to evolve simple rule-based classifier systems. The final performance on the test set, the Federalist Papers, was generally good, although slightly inferior to existing methods.


























































P L M C Average % Correctly
Classified
Average No. of
Active Rules
100 25 100 5 91.67 4
50 25 100 5 78.33 5
100 10 100 5 88.33 2
100 25 10 5 73.33 11.2
100 25 100 25 83.33 4.6
100 25 10 25 78.33 7.6
Table: Performance of Classifiers for Given GA Parameters

The key weakness of my proposed approach is that is too simple, employing only a voting framework of rules. Furthermore, the individual rules consider only the relative frequencies of pairs of word, which is an approach that is not generalizable. In other words, while the existing approach may be useful for a pairwise classifier, it is likely to be useless for developing a universal attributor capable of differentiating between any number of candidate authors.

Still, in terms of potential, I believe that this particular research project has more potential for improvement than my previous research projects. In particular, the rule combining system can be improved from the voting framework currently used. Furthermore, the rules used can be made more general versions with little modification. Additional criteria could also be included.

I hope to revisit this problem at a later point in time.

Saturday, November 29, 2008

A Physics Thought Experiment

Consider the scenario illustrated by the following diagram:


There is a hot object initially at temperature T. The hot object is instantly teleported into a larger container, which contains a perfect vacuum and has a perfectly reflective inner surface. The closed container is perfectly reflective at all frequencies.

Assume that the container is magically suspended in the larger container. As the container contains a perfect vacuum, no heat is lost by conduction or convection. Heat can hence only be lost by radiation.

Does the final temperature of the hot object depend on the size of the larger container?

Wednesday, November 12, 2008

Factoring on the Go

Yesterday, I started factoring numbers. Apart from being a method to make waiting less mundane, it also works the brain.

I managed to factor the numbers from 1 to 100 while waiting for my bus to arrive. This would have been a minor feat, were it not for the absurd frequency of the bus service.

I also managed to factor 638 before 6:39pm. After more practice, I hope to be able to perform faster factoring.

Friday, October 31, 2008

On Empires

No empire is eternal; All empires are destined to die.

There are three ways in which empires die- Decay, disintegration, and destruction. The first two deaths are internal, while the last is external. Decay occurs through decadence or gradual weakening of the state; Disintegration is when the empire splits into multiple factions, each opposed to another; Destruction happens when an external power annexes or disbands the empire.

There have been many vast empires, often made by the power of a single great conqueror. However, while there are vast empires, and while there are lasting empires, there are no vast empires that last long. The conqueror's empire, fueled by expansion, is doomed to fail, as when the conqueror dies, few can fill his void. Alexander was great, but the Macedonian empire disintegrated upon his death. This tale is repeated throughout history.

Perhaps the greatness of a conqueror should not be based on how vast an empire he commands, but on how long his empire can endure his absence. A ruler that spends his energies on strengthening the organs of the empire, that focuses on longevity rather than size, might be able to create an entity that by far survives himself.

And yet, the resulting nation might only be staving off the inevitable. The stronger the systems that prop an empire, the more inflexible the same systems become. With the passage of time, the same rules that ensured strength in the past would become inefficient and irrelevant. The nation does not die outright, but rather fades into the shadows. It decays.

Sometimes, I wonder about the fate of Singapore. Admittedly, many systems are in place to ensure the survival of this nation. And yet, while the same systems are immutably strong, they are also lacking in flexibility. Hence, while I do not think Singapore will experience a catastrophic end, I do fear that eventually, it would fade into irrelevance.

Wednesday, October 29, 2008

The Heart in the Freezer of a Provision Shop

At the end of the street, where the road curved upon itself to form a U-turn, there stood a small, dingy provision shop. The shop was staffed only by its owner, a man entering his middle age, and whom was known only as "Uncle" or "Shopkeeper". The shopkeeper was a man of few words and fewer emotions, and this aloof demeanor served as a ward to keep the otherwise unruly children of the neighborhood away.

I often visited the provision shop, as it was the nearest to where I lived. The trips there were short affairs often made shorter by the clinical and businesslike manner of the provision shop owner. Items were gathered, prices tallied, and change given. Very often, the only words exchanged were the names of the desired provisions, and the total cost of the purchases.

Only once did I manage have something resembling a conversation with him. I remember that it was a warm day in April, where the air was humid and clinging. I gave up trying to fight the stale and uncomfortable atmosphere that seemed to linger in my apartment, and left it to seek for cooler refuge, namely the new cafe up the street which had the boon of air conditioning. Still, the pilgrimage was of some distance, and the heat got to me the instant I made a step outdoors. I made a stopover at the provision shop to buy something cool to relieve the heat.

By coincidence, the ice cream freezer in the front of the shop was empty. It was only a moment later that I realized that the freezer was silent - it had probably malfunctioned, and its contents moved elsewhere. The shopkeeper, seemingly having read my intentions, wordlessly directed me to the back of the shop, where a larger freezer was located. He then left me to make my own selections.

This freezer was probably meant for storing provisions in reserve and not for display, as the freezer doors were thick and opaque rather than being glass paneled. Without a clear view of where the ice cream was stored in the freezer, I had to rummage blindly amongst the contents of the freezer. I could have asked, of course, but the downside of spending more time looking was more than displaced by the relief provided by the cool draft of chilly air from the freezer.

It was then that I noticed, in the back of the freezer, a large block of ice encasing a dull, reddish lump. I wanted to bring the ice block closer for a better look, but the shopkeeper immediately appeared behind me, and intoned,"That would be my frozen heart."

And he told me a tale, a tale of a young man and his childhood sweetheart. Times were bad, and the young man left his hometown to seek work. Promises of eternity were made amidst tears of temporary parting.

Everything else faded, but Time, cruelly, did not dull the feelings of the young man.

One day, a single letter, hesitantly written, was delivered to the mailbox of the man. On that same day, the man cut out his heart, and froze it within the recesses of his freezer.

I was so taken aback by the shopkeeper's tale that I had absentmindedly left the freezer door open, though, somehow, the chilly draft matched the atmosphere of his tale perfectly. I was expecting more of his tale, but it had ended as abruptly as it had started.

"Please shut the freezer door. The warm air might thaw the contents, and lead to spoiling."

I shut the freezer door, while the shopkeeper left and headed for his usual position at the counter. As he moved away, I managed to catch one final line from the reticent man.

"But things frozen will still spoil, as the freezing merely slows the decay..."

Wednesday, October 15, 2008

Buried Treasure

This story is the second of a trio. Read the first here.


With heavy panting, we dragged the chest out of the shoveled pit. Eagerly, we opened the chest. Yes! The treasure of Gold Rogers was ours to keep!

It was by a fluke of luck that we had chanced upon the map leading to this secret location- we had overheard a bunch of drunk and loose-lipped fools blabbering out the site where this remarkable horde was buried. Still, only our sheer tenacity had enabled us to evade our pursuers, who were all equally intent on the treasure which now lay in front of us.

Though we had the treasure, we knew that there was no reasonable way to carry it to safe shores now. News had gotten out that Gold Rogers' treasure was being unearthed, and the authorities were on the lookout for anyone with a sudden and unexplained horde of gold. Pirate gold was a seizable asset, and none of us had any intention on enriching the government and being left empty-handed.

There was only one alternative, which was to wait for the news to die down. Of course, in the meantime, the treasure had to be hidden somewhere. Fearing that the original location would be easily compromised, seeing as to how easily we had unearthed it, we decided on a new location to rest Gold Rogers' gold.

And thus, we buried his treasure and left the island. On making landfall, we decided to drink in anticipation of the day when we would finally retrieve our well-deserved gold.

Wound

The following story is the first of a trio that I wish to write.


It was then that I noticed a healing scab on my arm. It was a long, thin scab, perhaps from a paper cut. But I really had no idea when I had gotten the superficial wound.

It seemed to be healed, with the edges of the scab being flaky and dry. Unwittingly, I began rubbing at the scab, slowly peeling it away.

A thin sliver of blood oozed out. The wound had not completely healed after all.

Monday, October 13, 2008

Thunderboil Fingers

The old man pointed at the wall, and streams of energy streaked out, puncturing and piercing the plastered surface. Seemingly amazed at his ability, he continued to repeat his actions, leaving the wall pockmarked.

Flabbergasted by this reality-defying act, I genuflected before him and asked how he acquired the divine skill. He did not seem to notice me, and started mumbling to himself.

"Finally, after 80 years, I have mastered the mysteries of the Thunderboil Fingers !! They had thought me to be mad, locking me up in this sanatorium, but now I can finally prove my sanity !"

The old man then turned to me, and continued.

"When I was a young boy, I saw an old man practicing the skill. Amazed, I implored him to teach me his art. He gave me a manual for the Thunderboil Fingers, which I have been practicing ever since. He warned me that the skill should be studied slowly, and the effects would only be apparent after a very long period of study."

"And so, I practiced daily, though I never saw any results. People thought me to be mad, but I knew in my heart that one day, I would prove everyone wrong. Now, finally, after over 80 years, I have mastered the skill !"

As the old man was speaking, tears came out from his eyes. The moment which he had been anticipating for his whole life was apparently too emotional for him to bear.

Then, he died. It was quite possible that the exertion had exhausted what feeble strength that he had. I searched the old man's body, and found the manual for the Thunderboil Fingers. It was a complex and arcane work, clearly requiring much study to understand.

The sanatorium management came and asked me to explain the events that had transpired, and I gave a clear account of what happened. When I pointed to the hole-ridden wall as evidence for my account, they were unconvinced, and claimed that I had drilled holes into the wall.

They claimed me to be insane, and locked me up, possibly for life. In this clearly unfair situation, what else could I have done? I started practicing the Thunderboil Fingers.

Just you wait, I'll be out in no time at all.

Writing and Perfection

It was something that I gradually came to realize, and then grudgingly accept- that I am indeed a writer of limited skill and variety.

Upon reviewing the past few pieces of fiction that I had written, my limitations were obvious. Everything I wrote was of a length shorter than that of a short story, and none of the stories were happy in setting or ending. To express this in another manner, I am only capable of writing short, gloomy tales.

After a brief conversation with a friend, I arrived at the conclusion that my writing was somewhat characteristic of my personality. I have no patience for the bells and whistles, for characterization or description. When I read, my eyes filter the most useless pieces of information and retain only the most concise of statements. One consequence of this is that I have utterly terrible spelling, as I simply do not vocalize the words that I read.

It dismays me that ultimately, I am unable to externalize the tremendously perfect ideas that do exist in my brain. In my head, everything is perfectly visualized, and perfect in character. Viewing the stories is akin to watching a movie or living a scene in life. Yet, translating that vague perfection is difficult, even impossible.

Perhaps one reason why I only write short gloomy tales is that it is much easier than to externalize perfection. The entire point of gloomy tales is to invoke thought, and to encourage philosophy. The mechanism therefore serves the purpose. However, the stories that exist in my head are to invoke perfection, to convey ideals. As such, I avoid writing.

Perhaps when I have acquired sufficient skill and courage will I then attempt to put to paper what I consider to be my most promising ideas. Otherwise, I fear that I will only mar and taint, and hence not do justice to, what would originally be complete and beautiful.

Monday, October 06, 2008

On Talent

Each of us has an internal ranking list of talent, where we, whether consciously or unconsciously, judge others and rank them on basis of their talent. This list determines much of our attitudes to others, of whether we are deferring or condescending, or of whether we are to admire or to hold in contempt.

Sometimes, we will encounter individuals who are of vastly inferior talent, and yet hold stations or possess achievements far beyond their innate capabilities. Such individuals draw out our negativities, especially if their innate talents are lesser than that of ours, and yet their accomplishments are greater than that which we have achieved. We would deny, of course, that such negativities are merely green envy, and that which is "mistaken" as envy is merely a natural distaste for the unfairness of the world.

It is indeed true that unfairness is ever present in this world. Those born into families of great wealth and power have a paved path to success. Some have the fair hand of lady fate to thank, being blessed with a series of fortunate events that were in no part a result of their own actions. We all know of such individuals, who we might rightly judge to be sorely unworthy.

Then, there are a select few that have little talent to speak of, nor do they possess any inherent or unfair advantage. And yet, through sheer perseverance and hard work, they achieve what is thought to be impossible. These individuals, far more than those examples stated earlier, incite our hate and envy, for they possess what we lack the most.

If we ask anyone to choose between being talented or hardworking, most would choose the former. This seems odd. We decry of familial wealth as being an unfair advantage, and deem those with supreme luck as being undeserving. And yet, would talent, which comes from the womb and is not a result of our actions, possess any higher moral ground to stand upon? None, I would think.

It is only perseverance and hard work that is worth anything. The actions that we take in pursuit of our goals, the overcoming of the limitations that we are all born into, the blind and dogged determination to do what is thought to be beyond us - all these are, far more than any innate and unfair advantage which we often use to justify our superiority over others, the true hallmarks of the worth of any human being.

Friday, September 26, 2008

Time Traveler Verification Experiment Unveiled

Now, I shall unveil the experiment!

All time travelers, please post a comment stating that you are a time traveler under the post titled "Time Traveler Verification Experiment". You should post the comment anytime before this post (the one that you are now reading) comes up. Yes, you need to use a time machine to return a few days back to post the comment.

For the rest of the ordinary non-time traveling folks, here's what I did - I wrote this post 1 week ago, but I set the post to auto-appear only now. Only time travelers can comply with my set of instructions (by virtue of their time travel devices), since ordinary folk would read the instructions too late.

Of course, this is a pretty lousy way of verifying the status of a time traveler. The more evident way is to ask for a set of lottery numbers. Still, it makes some use of the feature of future-posting.

Friday, September 19, 2008

Time Traveler Verification Experiment

All time travelers take note! I have devised and begun an experiment that can verify that you are indeed a time traveler.

In one week's time, we shall see how many true time travelers have come forward. Til then, the details of the experiment will be kept hidden, although if you are a time traveler you can ostensibly jump forward and sneak a peek.

Monday, September 15, 2008

The Disease

One day, he was struck with the disease. This disease had no measurable symptoms or effects, save one - it made those afflicted with it terribly lazy.

The disease affected his work performance, and he was reprimanded for doing much less compared to his colleagues. His boss threatened that if this were to be kept up, he would be fired.

Despite the warning, he still found working unbearable. However, he then came up with a cunning solution to his problem - to spread his disease to everyone in his company. If everyone were to be equally unproductive, then he could keep his job.

His plan succeeded, with great effect. However, the entire company was now at risk, since other companies were able to outproduce them. The solution was obvious - spread the disease!

Eventually, the disease spread across the nation. Seeing that the nation was now lagging behind other competing nations, he decided to adopt the truly final solution - infect everyone on the planet.

Everyone in the world became lazy. His work was done.

But, he had worked too hard to spread the laziness disease, and this exertion had cured him of his infection. Worse, he was now immune to it. In the end, being the sole non-lazy individual on the planet, he was burdened with the task of working to support the world.

Tuesday, September 09, 2008

Puzzle: Black and White

I found some old material on my old blog which I felt was sufficiently forgotten to be novel.

I created the puzzle a few years back, so I actually forgot how to solve it, but thankfully my brain still works, and so I was capable of re-solving it.

Hope this gives your brain some work.

Friday, August 29, 2008

When is a Team Not a Team

Assume you have a group of people. Let us call it a team.

Now, remove one member from the team. It is still a team !

Repeat til you have a one-member team.

I find it most amusing to see an instance of the Sorites paradox in Parliament. I do think that everyone should have a better definition of what a team is.

I recommend the use of fuzzy sets in order to resolve this otherwise ambiguous problem.

Wednesday, August 20, 2008

No, I Don't Care About Sports

Just last week, Singapore won a silver medal for the women's team table tennis event. As this was only Singapore's second Olympic medal (in its history), this victory was much celebrated.

Now, consider another fact. So far in this Olympics, Jamaica has won 2 golds and 3 silvers. One of the gold medals, and quite possibly the most spectacular one, was for the men's 100m won by Usain Bolt, who broke the world record while running with no tail wind and slowing down during the last 15m to celebrate. Another amazing feat from this nation was that Jamaica won all the medals for the women's 100m. Simply remarkable.

Jamaica has a population of 2.8 million people.

One could attribute this disparity to various factors, such as genetics or geographical suitability. However, I am inclined to believe that social factors are by far more influential. To put it simply, Singaporeans do not care for sport.

Now, let me clarify that there is nothing wrong with not caring for sport. As a bookish academic, my personal opinion is that sport is an absolute waste of time and effort. What I feel is wrong, however, is for a nation which assigns so low an importance to sport to win an Olympic medal.

If, as a nation, you don't care about sports, then by the same logic, you should not be concerned with the medal tally. A token example is India. By measures of medals per capita, their performance is abysmal. My Indian friend says he doesn't care, as Indians aren't really concerned with physical perfection.

In my consideration, the Olympic medal was not deserved. Some might venture that it was bought, won by an imported team. I am almost inclined to agree. While it is indeed true that much of their success can be attributed to the training and resources given by Singapore, it is worth asking whether the same success can be achieved if the same training and resources were given to the most capable (native) Singaporeans.

Of course, the most evident answer is that the most (athletically) capable Singaporeans are off studying for some stable and well paying career. If our priorities are as such, it is perfectly acceptable. However, we should then also acknowledge that our priorities are economic and not athletic in nature. We shouldn't be bothered with 0 medals, or even with not sending a sporting delegation. Our source of pride should then lie in the economic domain.

To put things into words simply, we can't both have our cake and eat it. It is schizophrenic to collectively not be concerned with sport and yet, to be concerned enough to seek means to win medals.


PS: To clarify, I have no issues with "Foreign Talent". I do indeed support the idea that people are mobile, and that imported labor and brains is ultimately beneficial for the economy. This is consistent with my ideas as a classical liberal.

What I do say in this article is that if you are a nation with absolutely no interest in sport, it is consistent to not care about medal tallies.

Wednesday, August 13, 2008

Why They Hate Singapore

Last Saturday, I read with some distaste an commentary titled "Why they hate Singapore". After I finished reading the article, I was distinctly reminded of many statements made by a "senior parliamentary figure", who often reminded Singaporeans of the many threats facing Singapore. The same view was echoed by the Government, which always gave the idea of an all pervasive threat looming around the corner, ready to strike at any moment.

I've always felt these threats to be artificial constructs aimed at invoking a siege mentality in the minds of Singaporeans.

There are, of course, many motives for doing so. By making a people believe that they are threatened by some force, this would generally motivate them to work harder. For example, in sports, some managers/coaches may make the team believe that the "system" is against them, hence causing the team to work harder to stave off the unfair system.

Another possibly positive effect of the siege mentality is that the "persecuted" parties would be bonded together by this common persecution. This fosters feelings of common persecution and hence a sense of commonality against the "threat". Applied to the context of national entities, an external threat tends to galvanize a nation's people. The latter effect is most notable in the event of war, where feelings of patriotism are unusually high.

I consider the last point to be most important. Governments can, by the construction of an imagined external foe, effectively manipulate the dispositions of the people. A siege mentality, by creating a hostile "them", also creates a friendly "us". Undoubtedly, the "us" also contains the Government, the effect of which is that a siege mentality leads the people to empathize with the ruling Government. This is a considerably effective strategy to win the emotions of people, and hence the tactic of invoking an enemy, preferably unseen and dangerous, can be commonly seen in many nations in the world.

With these points in mind, perhaps we can see why the pervasive threat is often invoked in Singapore media. In fact, I might even argue that the siege mentality is even more important in Singapore, a nation with little national identity. With little history to construct a viable and universal national consciousness, the fastest way to meld the hearts and minds of Singaporeans might just be to raise a banner against some unknown and external threat.

Although, once you realize that there are no monsters under the bed, the magic stops working.

Friday, August 08, 2008

Monday, August 04, 2008

Spot the Mistakes

Spot the mistakes in the following map.



In spite of the mistakes, I still find the entire piece of mapping work amazing, since apparently they mapped the whole of Singapore within a short period of time.

Wednesday, July 23, 2008

Tenant Mix of Shopping Malls

Yesterday, I went to Beauty World Shopping Center to see my family doctor. The waiting time was considerable, so I walked around the complex.

The major tenants were tuition centers, a large supermarket, reflexology shops and maid agencies. The mix of shops was insightful.

I recalled the tenant mix of Ten Mile Junction, a 'failed' shopping mall, now primarily occupied by tuition centers and a large supermarket. Apparently, such businesses do not really require a considerable flow of passing customers, and are instead able to draw in their own customers. Hence, the low rent of such 'failed' malls is attractive.

If we were to study the tenant mix of modern, bustling shopping malls, there would no doubt be sizable differences. This implies that the business models of such tenants is more dependent on high customer traffic.

It is interesting to be able to learn much from just the directory of tenants.

Tuesday, July 15, 2008

Food Wasting

A person orders a plate of food. He eats some, and discards the rest. Is this action of food wasting ethically wrong?

As queer as it might sound, I don't really believe that anything egregiously wrong has been committed. I would instead ask, what's wrong with it?

We might say that wasting food is wrong as food is precious. In the scenario, some food cannot be used for useful activities, since it is wasted. Yet, on closer analysis, this is flawed. Once the food has been served, the entire bulk of food is deemed useless to all other parties. In other words, whether the person consumes the whole meal or wastes the whole meal does little to affect other parties (assuming that not eating the meal does not cause the person to consume another meal, in which case waste has occurred).

However, we might then argue that the previous argument is flawed, since it assumes that we have no control over the servings of food. To provide an example, if we intentionally order five steaks while knowing that we can only consume two, then we are guilty of the crime of wasting a precious resource. This is a useful argument, but it is generally false. On most occasions, people do not order food knowing that it will be wasted. They might, however, order servings of food which would later turn out to be greater than their capacity to consume it. However, this is not morally wrong, as the intent is not to waste food, and the waste was only the result of a faulty sense of reckoning.

Hence, I conclude that it is generally not wrong to have discard leftovers after meals. Of course, there are many possible counterarguments, of which I can think of at least three, but I unfortunately have little time to address these points here.

Thursday, July 10, 2008

The Man Who Did the Impossible

Standing on the top of a very high hill, the man vowed to do the impossible. He then went home.

As he was going home, he met a Greek philosopher with curled golden locks, and who wore a toga. The philosopher said "Fie Fie", and promptly ran away. The scene was surreal.

The anachronism of an ancient Greek philosopher appearing in modern times, while speaking (apparently) fluent Shakespearean English, jarred the man. Clearly, this was some sort of divine sign, with a deeper meaning to be deciphered.

The man then reflected upon the vow he had made earlier. He had vowed to do the impossible. On hindsight, it was impossible to do the impossible, for if it could be done, it would be possible and not impossible. Also, by definition, it was impossible to do the impossible!

Being clearly frustrated by this, the man decided to assault the writer of the story, whom had written him into a difficult situation with no good resolution possible. Due to damage taken to the head, the writer was unable to complete the sto

Wednesday, July 09, 2008

Good-Enough Random Number Generators from Complex Systems

Given a sufficiently complex system, it might be possible to create a good-enough random number generator.

Of course, the definition of a complex system is lacking. In my usage, a complex system is one where it is extremely difficult to predict the next state of the system, as there are too many variables to consider. Such systems tend to exist in the real world, where there are many chaotic factors.

In particular, I believe that something that is inadvertently created by many users is considerably complex. For example, the number of web users online, or the number of students on campus at any moment, are both figures that are complex and difficult to predict.

One possible way to implement a good-enough random number generator from a complex system is as follows:

Using a number (for example, three) of seed words, google the seed words. Access the first document of the results, and analyze the document. Use the total number of words in the document, modulo by a small base, as the random number.

For repeated number generation, take the fourth, first, and fifth most frequent terms of the document as seed words for the next query, following the same procedure for repeated searches.

While it is possible that the same seed words would appear after some number of searches, the dynamic nature of the web (documents continuously being created and destroyed), the results would vary from search to search. Furthermore, the Google server being used might vary from time to time too.

Such a random number generator would be difficult to analyze and to predict the results of. However, it might be possible to control the results if the adversary were to be able to control the first seed words. For example, a search for a set of hapaxes would lead to a single document result, which could be planted by the adversary. Subsequent results could then be controlled in the same manner.

It would be interesting, though, to analyse the statistical qualities of such a random number generator. If any patterns were discovered, it could be indicative of a sort of pattern in online documents/search engines.

PS: The numbers in the random number generator are actually "nothing up my sleeve" numbers. They are the digits of PI. In base ten, of course.

Tuesday, July 08, 2008

The Very Evil Scientist

The very evil scientist cackled as he put the finishing touches to his vile invention. He then pushed the button.

An ant was crushed by a heavy anvil. It was a sad occasion.

Delighted, the very evil scientist decided to proceed with the next phase of his plan, which was to modify more ants to feel pain.

Friday, July 04, 2008

Organ Trading

There are two weighty arguments against organ trading. They are:
  1. People might be coerced into trading their organs.
  2. Wealth becomes the sole deciding factor of whether someone gets an organ.
I do not believe that the first argument is totally valid. Firstly, the problem lies with coercion, and not with the trade of organs. To clarify, coercion is an external circumstance, and hence it is not indicative of any intrinsic ethical flaw in organ trading.

In other words, stop coercion, and there would be no problems. While my statement might sound foolish, it is not unfounded. People can be coerced into many things- into selling their apartment for pennies, into forced sex, into committing murder or suicide. The key issue here is not to prevent organ trades, but to ensure that coercion is prevented. Admittedly, this is in practice extremely difficult, but it is not something to dismiss as impossible.

The second concern is less obvious, but is of greater validity. To illustrate, consider the case of a patient A, who is of average wealth but due to die in a month if no organs were available. Patient B has a year to live, but has enormous resources. Under a free-market system, if both were to buy organs, and if supply was insufficient, clearly B would get the organ, although he might be considered as being less deserving. Hence, the key problem with organ trading (under a free market framework) is that wealth becomes the key deciding factor in organ allocation, which is ethically unjustified.

I would argue that this is a valid problem, but one which only exists if we were to adopt a free-market approach for the organ trade. Some, such as Mr Wang, have proposed an alternative trading framework for the organ trade. In such a framework, organs can only be sold to a central agency, who (on the list of patients on the buying list) to allocate the organs to, based on its own priority queuing system. Hence, organs would not be prioritized to the wealthy, but rather to whoever has the highest priority. Of course, to prevent abuse, the priority system would have to be transparent and publicly disclosed, and the priority system could possibly include factors such as urgency of transplant, potential usefulness of the organ to the patient, or even desert(as I have previously suggested in an ethics paper).

By breaking the direct link between buyer and seller, the system also effectively eliminates cases of coercion, as one would not be the direct and immediate recipient of the organs sold (barring the grim case of mass coercion, where one coerces many people to sell their organs). Also, as the central agency has direct participation in the trading process, abuses of the system are likely to noticed more quickly.

However, while the proposed trading system does plug many important gaps existing in the free market organ trading system, there are still some practical and ethical items to address. The most obvious would be the authority of the agency. Life is precious, and hence such a central trading agency must be held to the highest of standards, otherwise it would be worse than not having it. On the ethical side, arguments on the exploitation of the poor, or of using the poor as organ repositories, would also merit attention.

In short, the issue needs to be revisited at greater depth.

Thursday, July 03, 2008

The Island of the Lovers of Life

Once during my travels, I came across an island which was little known to civilization. This island was populated by a small tribe of natives, who were all, by some queer coincidence, capable of conversing in English.

The natives were all exceedingly friendly, and from their behavior and actions, I could tell that these people led a life unfettered by the tainted moralities of the allegedly civilized world. They lived with simplicity, communing with the wonders of nature. According to the head tribesman, the tribe lived by the philosophy of "Loving all life, and harming not a single plant, animal or living thing".

Of course, their lifestyle was considerably harsher than that of a modern civilized person, as evidenced by the thinness of the tribe members and the various oddly shaped scars that each member bore on their bodies.

They invited me to a meal, and I gladly accepted. At that point of time, I could not have anticipated the horrors that awaited me.

The first dish was a brown, hard lump of a strange item which I assumed to be some native vegetable. It was malodorous, and I lost all my appetite. It reminded me of some highly fermented dishes I had previously encountered during my travels.

I declined the first dish, and instead drunk the clear, syrupy beverage that each tribe member seemed to be taking in. It was an extremely sweet drink, almost as if it were made entirely of sugar and water. It was difficult to consume, but I downed it nonetheless.

The next dish was slightly more appetizing, consisting of a slab of some meat, which the tribespeople described as being "meat of dead animal". The dish was seasoned only with a light pinch of salt, and lacked all other seasonings. The dish was fine, but the taste could have been greatly improved by the addition of other seasonings. However, at the time, I dismissed it by assuming that such spices did not grow on the island.

The last dish was one where I realized the utter horror that I had been staring at and had not previously recognized. Three tribe members carried out the corpse of an old man, and presented it on the eating spot. The corpse showed signs of being cooked, and in fact clear cuts were made on the corpse to cleanly divide the flesh into neat slices, presumably for easy consumption.

I did not know whether fear or disgust overtook me then, but I vomited on the spot.

As the tribe members began consuming the meat, I froze in fear. Was I to be the next meal? Then, I suddenly made a fearful realization.

The thinness of the tribe members, as well as the strangely shaped scars on their bodies, could only have been due to one grim fact. This tribe practiced cannibalism, and the scars were caused by the periodic removal of flesh for consumption!

I must have fainted then, for when I awoke I was on a vessel out at sea. Some contrivance of fate must have occurred to whisk me out of the unspeakable danger that I had been exposed to.

A people who loved all life! In hindsight, it was clearly a deceptive title conjured to obtain my false confidences, although I sometimes wonder why the tribespeople resorted to such a ruse when brute force would have sufficed. Still, this was a question that I had no intent of finding the answer to firsthand.

Wednesday, July 02, 2008

Seatbelts and Personal Choice

An urban legend tells a story of an anti-seat belt law advocate ironically dying in an automobile accident. Some might find this funny or amusing. I would not.

I believe that there is a legitimate case against making seat belts compulsory. However, my argument is not from grounds of efficacy (which I am ill qualified to argue from), but rather, from grounds of personal liberty.

Indeed, seat belts save lives, and this is difficult to refute. However, this fact has no bearing over the issue of personal liberty. Ultimately, wearing a seat belt should be a choice left to the individual. The individual has to weigh the benefits and costs of wearing a seat belt against the benefits and costs of not wearing a seat belt, according to his own priorities. This final statement is of utmost importance, and is the key to my arguments.

Fundamentally, each person is different, and no two people will see eye to eye over every matter. Similarly, the weights each person assigns to different things will be different.

If someone, based upon his priorities, truly believes that the inconvenience of wearing a seat belt far outweighs the chance of death or disability, then he should not be forcefully compelled to wear a seat belt.

We might shout, "But a life is by far more important than convenience!". Indeed, most people would prefer life over convenience. But then, should the preferences of the majority dictate one's personal matters?

Indeed, the key concept of freedom is that each person is free to run his personal matters according to his personal preferences, no matter how queer and abnormal the preferences seem. We should not seek to make choices for others based on our own non-universal preferences.

In fact, I believe that the last statement is one which is extremely important. One of the major problems with humans is that we tend to believe that we know more than the next person. In our arrogance, we believe our non-universal preferences to be universal and seek to impose it on others. This ought to be corrected. Others should be left to their own devices, even if such devices are clearly idiotic.

Before I end, I would like to clarify a few items. Firstly, the paragraphs above are meant only to introduce the point of personal choice and liberty, and do not represent the entire case regarding seat belts. Secondly, the issue of seat belts is not entirely a personal matter, and does in fact involve other people (although, to a minor degree), hence the arguments from choice cannot be fully applied to the issue. Lastly, I would like to state that I personally do choose to wear seat belts.

The issue of seat belts is of considerable personal interest to me, and I might revisit the issue at a later time to more fully express my views over the matter.

Monday, June 30, 2008

The Problem with Online Shaming

Quite some time ago, I wrote a post on online shaming, where photographs of people behaving uncivilly in public were posted online. I then wrote that online shaming was a flawed tool, and could be symptomatic of an immature society.

After thinking about the issue intermittently for about a year and a half, I believe I am able to elaborate further on my ideas.

My basic assumption was that the photographers of such pictures, aside from taking photographs of uncivil acts and the corresponding culprits, had not done anything to stop the uncivil acts. If this assumption were true, I would believe that the photographers are in no moral position to shame the culprits behind the uncivil acts.

If one indeed feels that a certain behavior is unjustifiable, it is one's duty to stop the behavior. Conversely, if one does not stop a certain behavior, one is either being inconsistent (by not acting in line with his beliefs), or one does indeed believe that an act is justifiable. In the latter case, there is clearly no moral position to post the photographs, since nothing wrong was committed. In the former case, one would be a form of hypocrite if he were to post the photographs, for by not acting to stop the uncivil behavior, he could be said to be knowingly condoning the same uncivil behavior. Hence, in both cases, one cannot post the photographs without also posting his own photograph for abetting the uncivil act.

To a lesser degree, I also feel that even if the photographer was to participate in stopping the uncivil offender, online shaming is still undesirable. As I mentioned previously, such an act is more retributive than restitutive. It also feels a bit sensationalist, although technically this is not a logical argument but an emotive one.

One final consideration I would like to raise is of 'Asian Mind-your-own-business-ism', or non-confrontationalism. While I can certainly appreciate not having anyone poking their nose into my business, it should be noted that selfish and uncivil people should not benefit from this. Perhaps we should all grow some balls and stop the bad behavior on-site, rather than online.

Monday, June 16, 2008

The Road Not Taken

Any system which promotes only one mode of advancement, is a system in which people are either successes or failures.

Any person who believes that there is only one mode of advancement, is submitting to such a duality, and is walking on a tightrope.

I ask, why ? Why should we all trod on the same path, to be judged by the same criteria ?

A flawed understanding of evolution is that it is the survival of the fittest, whereas it is not. While it is indeed true that climbing upwards enables survival, moving sideways, and seeking new niches, is also an equally valid alternative.

Admittedly, taking the path less travelled is difficult. But I am convinced that it is a better path.


Two roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;

Then took the other, as just as fair,
And having perhaps the better claim,
Because it was grassy and wanted wear;
Though as for that the passing there
Had worn them really about the same,

And both that morning equally lay
In leaves no step had trodden black.
Oh, I kept the first for another day!
Yet knowing how way leads on to way,
I doubted if I should ever come back.

I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I—
I took the one less traveled by,
And that has made all the difference.
Robert Frost, The Road Not Taken

Saturday, June 07, 2008

NUS Matriculation Number Checkdigit

Out of interest (or perhaps, boredom), I decided to reverse-engineer the scheme by which the checkdigit of the NUS matriculation number is generated. After spending a couple of hours intensely studying some matriculation numbers, I finally reversed the scheme.

For the benefit of those who have less knowledge, a checkdigit is (usually) a number or letter appended to a longer number. Like a checksum, the checkdigit allows people who know the algorithm to very quickly discover whether the number is valid (since a randomly generated checkdigit is more likely to be wrong than correct).

In the case of the NUS matriculation number, the checkdigit is the final letter of the matriculation number, for example W in the case of the number u012345W.

Armed with some knowledge of hashing (since most checkdigits are calcuated by basic hash functions), expertise with modulus mathematics, and finally a list of matriculation numbers and their checkdigits, I was able to uncover the scheme, which follows.

Assume the numerical digits of the matriculation number are 0,C1,C2,C3,C4,C5. From this, calculate the checksum value by the formula:
((C1,C2,C3,C4,C5)*(12,10,12,11,6))+12) % 13
where % is the modulus operator. Compare the checksum with the following table:

BAEHJLMNRUWXY
0123456789101112

The above algorithm should be accurate for all matriculation numbers beginning with "u0". Due to a lack of matriculation numbers beginning with other headers, I was unable to determine the offset for those numbers.

The methods for determining the NUS matriculation number checkdigit algorithm can be applied to find, among other things, the checkdigits of any NRIC number. By the way, that problem has already been solved (just wiki NRIC).

*P.S.* I have since updated the scheme to account for new matriculation numbers prefixed with A**.

Sunday, May 25, 2008

Battleship Solitaire

Recently, I've been playing a type of puzzle called Battleship Solitaire. Basically, this type of puzzle involves a battleship grid, and numbers along the sides of the grid. Based on these numbers, you are supposed to work out the locations of the ships.

In principle, the game works out to be similar in some areas as Paint By Numbers, and hence some strategies which I discovered earlier were viable for this game too. However, this game is probably (at my present skill level) partially dependent on luck, since some puzzles I played were ill-posed, having 2 possible solutions. Of course, this is almost certainly due to the puzzle generator, which does not check for the uniqueness of the solution.

Some sample shots of a new game and a solved puzzle follow.

A puzzle with 9 starting hints.

A solved puzzle.

The rules of the game (copied from this website), for reference, are :

The computer hides the ships in the grid and a few 'shots' will be fired into the grid to get you started (Hints). The ships will be hidden in the grid with the following rules.
  • The ships will be orientated in either the horizontal or vertical direction only.
  • No two ships will be adjacent in any direction including diagonally
  • There is one battleship (4 squares in length)
  • There are three cruisers (3 squares in length)
  • There are three destroyers (2 squares in length)
  • There are four subs (1 square only)
  • The numbers in the right column indicates the number of grid squares occupied by ships in the horizontal direction for each row.
  • The numbers in the bottom row indicate the number of grid squares occupied by ships in the vertical direction for each column.

Monday, May 19, 2008

Quick Question : Alarm Clocks

Just a quick question :

For most analogue alarm clocks, the time and alarm time are adjusted by dials located on the back of the clock. The question is, why can the time of the clock be adjusted by turning the time dial either clockwise or anticlockwise, while the alarm time dial can only be adjusted anticlockwise ?

Tuesday, April 29, 2008

First Divine Skill Under Heaven

Recently, while I was walking on the street, I met an incredibly skilled pugilist. The pugilist was dressed in rags and had unkempt hair. He was clearly from the Beggar Sect, Bukit Panjang Branch. Perhaps he was even the leader of the preeminent Sect.

The pugilist stared at me, and then spoke, "To that young hero over there, I observe that you have the bone structure of a martial arts genius which is only seen once every 1000 years ! It will be a pity if you do not practice martial arts and uphold justice ! Let me transfer all my skills and internal power to you !!!".

After speaking, he grabbed me, and transferred his internal power to me. After the process was complete, the man laughed loudly, and said, "Now I have transferred all my internal power to you ! Don't underestimate this power, for I myself received all the internal power of my master, who received all the internal power of his master !!! You are now very powerful, powerful enough to defeat 2 pugilists !"

I remarked that 2 was a seemingly low number for the combined internal power of 3 generations of experts. Perhaps they were quite lousy in combat. That would also explain why they were beggars.

The master sighed, shaking his head. "You do not understand, young hero. The power transference skill is not perfect ! As power transference goes against the natural laws of the world, only 50% of the internal power is transfered, and the rest wasted ! Hence, even though power transference is an amazing skill, ultimately the maximum power attainable has an upper ceiling."

"Consider a pugilist of generation n + 1. Assuming that he is an average pugilist, his total power, X(n+1), will be X(n+1) = 1 + r * X(n), where r is the percentage of internal power transferred. For the pugilist of generation n, his power is X(n) = 1 + r * X(n-1).

Hence, the power of the pugilist in generation n + 1 is:
X(n+1) = r * ( 1 + r * X(n -1)) + 1 = (r^2) X(n-1) + r + 1

Continuing the process until the original pugilist, X(0),
X(n+1) = (r^(n+1))*X(0) + (1-r^(n+2))/(1-r)
Assuming that there are many many generations, or n large, and since r less than 1, hence,
X(n+1) = 1 / (1-r)
Since my Sect's energy transference skill transfers power at 50% loss, the power of a pugilist (assuming he trains) is 2 !"

After explaining the situation to me, the pugilist fell over and died. I was slightly saddened, since I had lost a comrade in upholding justice.

Not all was lost, however. I discovered a secret manual hidden in his rags. The manual was titled, "First Divine Skill Under Heaven", which arguably meant that it was either the most powerful skill in the world, or (inclusive or) that it was the most primitive skill in the world.

In order to ensure that everyone is also able to uphold justice, I'm sharing part of the manual here.

Manual for the First Divine Skill Under Heaven



Note : I really think that for power transference skills, there should be an attenuation factor, otherwise everyone would be extremely powerful after a few generations.

Friday, April 25, 2008

Secret Research Project 1: Interesting Facts

Now that the research report has been completed and submitted, I have some time to share some interesting facts about the research.

  1. When people ask what I do for my secret research, I say I download images of apples, bananas, irons, scientific calculators, suitcases, crayons, dustbins, pears, plastic bottles, tissue boxes, forks, spoons, laptops, clocks, pillows and blenders.
  2. I now possess a large collection of images of apples, bananas, irons, scientific calculators, suitcases, crayons, dustbins, pears, plastic bottles, tissue boxes, forks, spoons, laptops, clocks, pillows and blenders. Much time was spent to collect and download these images.
  3. For the preliminary versions of the classifier, the classifier achieved a classification rate of 70%. Coincidentally, the training set consisted of 70% natural images and 30% synthetic images.
  4. For the uninformed, point 3 was a consequence of the classifier labeling everything as a natural image, hence achieving a 70% performance. This approach is excellent. By increasing the set of natural images to 99%, the performance can be boosted to 99% !
  5. Point 4 was a joke.
  6. The trusty Microsoft Paint was used to perform many tasks for the project. These tasks include converting GIF, PNG, and BMP images into JPEG format, and creating diagrams for the final report.
  7. Two computers were used for the project. The project could be run exclusively on either the desktop or the laptop computer, but using two computers greatly increase rate of work.
  8. The increase in rate of work was not due to being able to run multiple simulations simultaneously. Rather, the simulations were mostly done on one computer (the laptop), while the other (the desktop) was used for net research and report writing. Useful work was done on the desktop while the MATLAB program ran on the laptop.
  9. Using two computers was also cool for report writing. All the data and related papers were displayed on the laptop screen, while the desktop ran only Word. Information could be directly read from the laptop and entered into the report without ALT-TABBING and changing windows constantly.
  10. I want a dual monitor setup after learning the advantages of point 9.
  11. I want a dual core system to be able to run my (hypothetical) dual monitor system properly without lagging. This is also to make running simulations less of a pain.
  12. MATLAB should perform some checks on code integrity before running. Many times, MATLAB would return an error after it had run much of the simulation processing. The error was a simple formatting error located at the last few lines of the code.
More information on the image classifier will be released if anyone is interested.

Thursday, April 24, 2008

Secret Research Project 1: Quick Update

I'm just dropping by to release some of the latest results for the graphics classifier.

Classifier

SR

NR

AR

Time Taken

C1

85.44 %

69.86 %

77.65 %

37.4 s

C2

87.67%

72.69 %

80.14 %

38.2 s

C3

86.95 %

74.51 %

80.73 %

38.5 s

C4

86.00 %

76.21 %

81.11 %

38.4 s


Notes:
SR, NR = Recall rates for synthetic and natural images. AR = average recall rate.
C1~C4 are classifiers employing some set of metrics.

I'm going to sleep soon. The only reason I'm awake at this hour is to finish my research report, which is now at 37 pages. I'm still missing the discussion and conclusion chapters, as well as a third of the introduction. Work also has to be done on the formatting of the report.

I'm hoping I can mop up the remaining work by noon tomorrow later, since I still have another secret research report to complete by Friday.

I'll release more information and results on the Synthetic and Natural Image Classifier (that's the official name of the thingy) when I'm extremely free. That would be next Tuesday.

[25/04/08] Errors in the calculations were found and corrected.

Monday, April 14, 2008

Secret Research Project 1: Graphics Classifier

One of the 'secret research projects' I'm working on currently is a graphics classifier. Basically, the aim of the research is to build a classifier capable of differentiating between a graphics image and a realistic image.

To be clearer, a graphics image is an image which is artificial. This type of image is not directly captured from the physical environment. Hence, drawings, paintings, cartoons and clipart are considered to be graphics images.

On the other hand, realistic images are images which are directly captured from the physical environment. In other words, these are photographs of real objects.

A sample of a realistic image and a graphics image is shown below.


Left : Graphics Image
Below: Realistic Image









I'm now using simple metrics to metrify the images. According to intuition, graphics and realistic images will have different metrics, hence enabling me to clasify them. Some metrics that I have adopted, and the assumptions behind them, are:

Saturation Metric
: Graphics, especially computer generated ones, tend to have higher saturation values compared to photographs, which are invariably less saturated (more faded/dull) due to natural effects.

Number of Colors Metric: Graphics tend to be composed of a small palette of colors compared to realistic images, which tend to occupy much of the spectrum.

I've also used a number of other metrics, but I'll share those at a later point of time. In any case, the effectiveness of the existing metrics are reasonable, but not spectacular, achieving only about a 60~70% correct classification rate.

However, by combining the different metrics into a single classifier system (aka boosting), I expect the performance of the system to improve.

More updates on the secret project will come later.

Friday, February 15, 2008

Cursor*10

I found a game with a very unique and interesting gameplay, one which was so fresh that I had never seen before. I was so impressed by the game that I had to introduce it here.
I can't reveal much about the game without spoiling it. All that I can say is that the game requires you to "Cooperate by oneself ?!".

By the way, my (unimpressive) high score is 139. It is probably easy to beat this, but I don't want to click madly again.

Hope everyone enjoys this short game.

Wednesday, February 06, 2008

Test your Induction

The following sequence of three characters obeys a certain secret rule.

2, 4, 6

Your task is to infer the secret rule. To help you to discover the secret rule, you can produce any number of three character sequences for testing. I will then reply whether the produced sequence(s) obey the secret rule. (Pls try to propose sequences only in the tagboard; I will update the tested sequences in this post.)

As you can propose any number of character sequences for testing, you should only attempt to report the secret rule when you are absolutely sure that you have the correct rule in mind. To keep the game suspenseful, post rules only in the comments.

Thursday, January 31, 2008

Why are the Month Lengths Irregular?

I consider the lengths of the months to be irregular. I came to this conclusion after I asked myself the question, "How would I distribute the 365 day calendar into 12 months ?".

My (intuitive) solution was to divide 365 by 12. This leaves 30 days per month, with 5 days left over. A reasonable split would be 7 months of 30 days, and 5 months of 31 days. Regarding the ordering of the months, I considered 2 ways. The first would be to place the 5 odd months at an end of the calendar (either the front or the back). However, after some consideration, I felt that this method, while being easy to remember, seemed unsymmetric, and might leave the halves of the calender unbalanced. My second idea was to alternate the long and short months. The last 3 months would be short.

The resulting calender would be : 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 30, 30.

Evidently, this is quite different from the current form of the calendar. The current calendar has 7 months with 31 days, 5 months with 30 days, and 1 month with 29 days. This is clearly an arbitary arrangement of days. This leads me to the conclusion that the calender was not created and imposed at a single moment in history by a single planner or authority, but rather the result of a series of incremental changes.

Here's how I hypothesise the calendar came about (based on pure speculation alone):



Original creator : Let's make a 365 day calendar with 12 months ! The calendar should be symmetric around the center.
Result : 31, 30, 31, 30, 31, 30, 30, 31, 30, 31, 30, 31

Problems : 366 day calendar.
Solution : Borrow 1 day from some random month.
Result : 31, 29, 31, 30, 31, 30, 30, 31, 30, 31, 30, 31

After some time : Hey let's make this month longer ! For no reason !
Result : 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31

Problems : 366 days again ! You clown !
Solution : Pick on the loser month with 29 days. Easier to recall which month is odd.
Result : Existing calendar.



Of course, the previous speculation was utter nonsense. However, I do believe that the present calendar was slowly morphed from a predecessor calendar slowly. The gradual changes were implemented such that the newer calendars would be minimally different from the earlier calendars. In other words, if they added a day to another month, and needed to remove a day from an existing month, the best candiate would be a month which was already an oddity.

Perhaps that is why February is such a 'loser' month. It's at least 2 whole days shorter than everyone else, and even at it's best it's still shorter by 1 day. It must have been the victim of multiple 'shortenings' !

Tuesday, January 15, 2008

Simplicity

Occam's razor, expressed as "Of two equivalent theories or explanations, all other things being equal, the simpler one is to be preferred", emphasizes simplicity over complexity. Yet, what is simplicity ? I suspect that there can be no answer to the question (or, rather, no simple answer to the question).

Simplicity is a concept that is dependent on the viewer, and different viewers would have differing ideas of the simple. Unfortunately, due to the mental and psychological similarities between most humans, this fact is not immediately obvious. Given two differing items, most people would agree on which is simpler. For example, most people would find the equation "2 X 2 = 4" as a simpler variant of the phrase "Integral of 2 over the bounds of 0 to 2". And yet, for a hypothetical person who was taught calculus before arithmetic, the reverse would be true. Hence, simplicity is really dependent on the viewer.