Wednesday, 14 August 2013

Permutations and Combinations

Click on the link below for the tutorial:

https://docs.google.com/file/d/0B9veYrYAicH_QV9RUXRVTjRJQWs/edit?usp=sharing



In Malaysia, registration numbers are generally made up of a maximum of 3 letters on the left and a maximum of 4 digits on the right, as shown in the diagram above.

The first letter indicates the state in which the motor vehicle is registered. The list below shows the first letters and their corresponding states:

A: Perak
B: Selangor
C: Pahang
D: Kelantan
J:  Johor
K: Kedah
L: Labuan
M: Melaka
N: Negeri Sembilan
P: Penang
Q: Sarawak
R: Perlis
S: Sabah
T: Terengganu
W: Kuala Lumpur (KL)

Note that "H" is for taxis and "Z" is for the military.

"H" means "taxi", while "B" means "Selangor", so it's a taxi registered in Selangor

The letters (except for I, O and Z) and numbers are issued in a sequence (from A to Y and from 1 to 9999). Let's take KL as an example. 

- The 1st phase starts from W 1 and ends with W 9999

- The 2nd phase starts from WA 1. Then it's on to WA 9999, WB 1 to WB 9999 and so on until WY 9999.

- The 3rd phase starts from WAA 1 and ends with WYY 9999.

The same case applies to the other states. Using permutations, the 1st phase allows for a maximum of 9999 vehicles, the 2nd phase 23 x 9999 = 229 977 vehicles and the 3rd phase 23 x 23 x 9999 = 5 289 471 vehicles. So, in total, there can be a maximum of 5 529 447 vehicles for each state.

You might think that's a lot, considering that the population of Malaysia is still less than 30 million. However, guess what? KL will reach the end of the 3rd phase before the end of 2013! What happens next?

No wonder KL's about to enter phase 4 of the registration number series!

Answer: KL enters the 4th phase, which will start from W 1 A. Then it will go on until W 9999 A, W 1 B,... W 9999 Y, WA 1 A,... WY 9999 Y, WAA 1 A,... and end with WYY 9999 Y. This phase will allow for 127 177 281 (which is roughly the population of Japan) extra vehicles.

An example of Kuching's 3rd phase registration number 

In Sabah and Sarawak, the system is slightly different. For both states, the 2nd letter indicates the division/ district in which the car is registered. For examples, QA indicates (Sarawak - Kuching), QM (Sarawak - Miri) and SA (Sabah - West Coast, which includes Kota Kinabalu).

So, taking Kuching as an example, its 1st phase starts with QA 1 and ends with QA 9999. The 2nd phase starts with QAA 1 and ends with QAY 9999.

In 2011, Kuching reached the end of the 2nd phase and its 3rd phase, unlike KL, started with QAA 1 A and will end with QAY 9999 Y. So, the maximum number of vehicles in Kuching division will be 5 529 447.

The 1st and 3rd phases for Sabah are the same as that for Sarawak, but not the 2nd phase.. Taking the West Coast for instance, the 2nd phase begins with SA 1 A and ends with SA 9999 Y (instead of starting with SAA 1 and terminating with SAY 9999).

So far, only Kuching and Sabah's West Coast have entered the 3rd phase. Miri, Sibu and Tawau are coming close, though.

The first 2 characters of Chinese license plates form the "area code". For example, 陕A is for Xi'an city while 苏E is for Suzhou city

The picture above shows some license plates in China, where the Chinese character indicates the state/ province and the letter after it the district or city in which the vehicle is registered. These two characters form the "area code", and there are 5 more "places" after it. A few decades ago, all 5 places used to be filled with numbers only (from 00000 to 99999), giving each district a maximum of only 10 000 vehicles.

However, as urban populations increased, this became insufficient. So now, the first 3 places can each be either a letter (except I and O) or a number. The remaining places will consist of numbers only. This system thus allows for a maximum of 34 x 34 x 34 x 10 x 10 = 3 930 400 vehicles per district.

Even then, it's still not enough for mega-cities like Beijing, Shanghai and Tianjin. In view of that, while most districts in China have only one area code each, Beijing has 9, Shanghai 7 and Tianjin 12! Using simple maths, the maximum possible registration numbers in the 3 cities are 35 373 600, 27 512 800 and 47 164 800 respectively! In comparison, the most populated city in China (Shanghai) has just over 20 million people.

In China, registration numbers are not issued according to any sequence. Instead, they are randomly generated by computers.

References:
1. http://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Malaysia (retrieved 10/08/13)
2. http://en.wikipedia.org/wiki/Vehicle_registration_plates_of_the_People's_Republic_of_China (retrieved 10/08/13)
3. http://en.wikipedia.org/wiki/List_of_cities_in_China_by_urban_population (retrieved 12/08/13)
4. Zuhrin Azam Ahmad (2013) "KL Car Number Plates to Bear 'W1A'", The Star, 24 May [Online].. Available at http://www.thestar.com.my/News/Nation/2013/05/24/KL-car-number-plates-to-bear-W1A-Ministry-announces-new-vehicle-registration-series.aspx (accessed 10/08/13)

Thursday, 8 August 2013

Trigonometric Functions

Click on the link below for the tutorial:

https://docs.google.com/file/d/0B9veYrYAicH_ZnNfLVZsZlJIMms/edit?usp=sharing

Note: You may need to download this file in order to view the embedded Power Point slides.