Wednesday, January 07, 2009

CORS : Iterated Prisoner's Dilemma

As I placed and won my CORS module bid, using an insane showhand bid of 6000+ points, for probably the last time in my undergraduate times, it suddenly dawned upon me that CORS bidding was a game of iterated prisoner's dilemma.

There are many 'strategies' for CORS bidding, but probably the strategy with the most effect is to deny all opponents of additional information, i.e., to not submit any bids during the open bidding phase. Conversely, by submitting an accurate bid (a bid that is valued according to your evaluation of the worth of the module), your bid provides information to potential competitors.

Of course, if everyone is selfish and does not contribute accurate bids, then the open phase is defeated, and everyone's utility is hampered.

Expressing the above in a game table,
Now, since the results of bidding are only known after the bidding has concluded, and that students have other semesters left, this provides some kind of force against concealing your bid. The rationale is that if everyone finds out that they have been exploited due to revealing their bids, then they too could retaliate by not revealing their bids the next time round. Hence, everyone loses, and overall utility is reduced. Everyone realizes that their utility is best optimized by maintaining the status quo.

The situation, however, is disturbed by people who have no fear of retaliation, i.e. final year students. Hence, they tend to do funny things to the system, i.e. random bids, showhand bids, or just hogging multiple candidate modules before dropping them.

Problem is, if the system is indeed an iterated prisoner's dilemma, then knowing that final year students would do X in their final year, one intuitively realizes that during their 3rd year, the force of the contract is nonexistent, since "good" behavior in year 3 does not influence others to behave well in their final years. Extend this argument, and one realizes that the system is unstable.

Sunday, January 04, 2009

The Sand Reader

There was once a small town set in the countryside. Though life in those times was simple, this did not mean everything ran smoothly and without a problem. There were of course the kinds of hiccups that happened once every while, or even the rare and extraordinary disasters that could affect many in the town. The town was fortunate, though, for within the town resided an enigmatic person who read the sands.

Any person who was plagued by problems of any nature, whether minor or major, could approach the sand reader to have his problem addressed. The sand reader would first listen to the person's problem, and then pour out some sand from a special flask into a large pan. Then, the sand reader would manipulate the sand within the pan with his hands, and interpret the resulting patterns formed. By 'reading' the sand, any problem could be resolved.

The advice of the sand reader was always accurate and true. The townsfolk were in awe of the sand reader's ability, and some even wanted to know how to read the sands. The more foolish would head to the beaches and attempt to interpret the sand there. The more daring would sneak into the sand reader's home while he was asleep or out and attempt to read his sand. Neither approach would result in anything concrete.

There was one young man who was interested in learning the skill of sand reading. For each day of the year he would consult the sand reader with a problem, whether real or imagined, and closely observe how the sand reader moved and read the sands. Immediately after the consultation, he would run home and record his observations into his book. Once in a while he would repeat a question that he had asked during his previous visits, or a question that another person had asked previously. Everything was recorded in his book.

After about a year of visits, the young man realized something odd. Sometimes, the sand patterns were similar, but the readings were absolutely different. On other occasions, the readings were alike, yet the sand patterns were totally dissimilar. Puzzled, the young man approached the sand reader for an explanation. The sand reader surmised that the young man wanted to learn the skill of sand reading, and the young man verified this. After some thinking, the sand reader decided to reveal one of the secrets to his skill, and instructed the young man to collect one grain of sand from a beach daily. Furthermore, only sand collected in such a way could be used to perform readings.

Excited by the revealed secret, each day, the man collected one grain of sand from a nearby beach, while continuing his usual consultation with the sand reader. After three years, the young man had collected a sizable amount of sand, but it was nowhere near the amount needed to read sand in a pan. The young man decided to approach the sand reader for advice.

"I have only collected this amount of sand after three years. How long do you think I need to amass sufficient sand to do a reading? Is there a better or faster method?"

The sand reader merely asked the young man to produce his own estimate.

"I judge, based on the relative amounts of sand, that I would need at least 10 more years to collect enough sand to do a reading."

The sand reader smiled, and told the young man to carefully scrutinize the sands, and to arrive at a better estimate.

Puzzled, the young man stared at the sand reader's sand, and at his own sand. After a while, he realized that while each grain of his own sand was roughly of the same coarseness and color, the sand reader's sand was of many different sizes and colors. The young man spent some more time in careful study, before breaking out in a laugh.

"I understand now! My initial estimate was wrong - if I were to collect sand daily from the nearby beach, I would never be able to collect enough sand to perform a reading!"

The sand reader nodded, and asked if the young man still wanted to walk the path of sand reading.

The young man said yes, and received the blessing of the sand reader. The very next day, the young man left the town on a long and great journey, a trip to collect the sands of knowledge and experience that can only be found in the world beyond the beaches of the town.

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?