Thursday, November 12, 2009

Validate Your NUS Undergraduate Matric Number

Let the six-digit number be denoted d1d2d3d4d5d6
Compute the weighted sum (2 × d2) + (6 × d3) + (2 × d4) + (4 × d5) + d6
(we ignore the digit d1 as undergraduates for this decade would have it as 0 )
Divide the result in step 1 by 13 and obtain its remainder.
Subtract the remainder from 13.
Locate the check-letter using the table below:
Result from step 3 Check-Letter
1 M
2 B
3 N
4 A
5 R
6 E
7 U
8 H
9 W
10 J
11 X
12 L
13 Y

Copied from the following link:
http://www.comp.nus.edu.sg/~cs1101cl/labs_sem1_0405/lab1/part2/matric.html

No comments: