Sunday, March 31, 2013

Space Weapons

It has been suggested that militaristic civilizations will not develop spaceflight; the reason being that any aggressive civilization will sooner destroy itself. I think this is rather true. To be more specific, any civilization with the capacity for interstellar travel, if even the lowest grade of travel that takes centuries, will have acquired simple means of destroying themselves. Interstellar travel implies the capacity to accelerate and propel large masses to high velocities, possibly near-relativistic speeds. In other words, any space-faring vessel is necessarily a weapon.

In that vein, I wonder if a simple means to create a weapon of mass destruction is to simply launch a tungsten probe into space, let it acquire velocity through gravity-assists, and redirect it at a planetary target. If the probe is sufficiently hardened to survive reentry, then this is essentially an artificial meteor impact.

It would be a fitting weapon for any bond villain, and probably cheaper and easier to build and acquire than a nuclear weapon.

Sunday, March 24, 2013

NUS Matriculation Number Checkdigit 2

Previously, I described how to calculate the checkdigit of the NUS matriculation number. Unfortunately, the numbering scheme for the matriculation number has changed since the turn of the decade, which means the old calculation method no longer applies.

I have studied the new matriculation numbers (which are prefixed with A) and have managed to reverse engineer the new checkdigit scheme.

Assume the numerical digits of the matriculation number are C1,C2,C3,C4,C5, C6. Take the sum of the digits C1 to C6, and find the modulus (remainder) of this sum when divided by 13.

Compare the remainder with the following table to obtain the checkdigit.


Reverse-engineering the checkdigit scheme was easier this time round, for two reasons. First, the ordering of the checkdigits followed that of the earlier scheme, albeit reversed. Second, and more importantly, the checkdigit scheme was of a lower complexity, being a simple sum of the component digits. This I found puzzling, because it actually fails to preserve an important property that was present in the previous scheme.

A checkdigit serves only one purpose: it is a quick way to determine if a given registration number is correctly entered. Taking the remainder of a sum of the component digits allows us to detect if one digit has been wrongly typed; if one digit is mistyped, the checkdigit would be different. Also, if several digits have been mistyped, the error is still detectable, though there is a small chance that the sum of errors just happens to be a multiple of 13 and hence undetectable.

The weakness of taking the modulus of the sum is that it does not allow transposed digits to be detected. For example, if any or all the digits in a registration number were scrambled around, this would be undetectable as the sum of digits would remain the same. A more robust checkdigit scheme accounts for this by weighting each digit position with a different weight, thus allowing for most digit transpositions to be detected.

Transpositions are fairly common when typing strings of numbers, so it is fairly unacceptable for the checkdigit scheme to fail to account for this.

Friday, March 08, 2013

Practice makes Perfect

Practice makes perfect, so they say. In general, that's true; at the very least, it's difficult to become worse with repeated practice.

I work hard, and train everyday. My skill of choice? Lying. 

Now, the problem is that you can't simply lie alone. Lying to a wall, or to an inanimate object, isn't lying- that's called neurosis. You need someone else to lie to. 

Practice makes perfect; so my lies became better and harder to detect. The downer? Practice makes perfect; everyone got better at seeing through my lies.

All in all, I think I lost more through practice than if I had just slept everyday.