   SEARCH HOME Math Central Quandaries & Queries  Question from Mike, a parent: Sorry if you have answered this before but I don't understand the explanations I have seen. How many possible combinations are in a 5 digit code (like a Zip Code). Is there an equation that can be used for this type of question? All the best and thank you, mike Hi Mike,

I am going to assume there are no restrictions on the 5 digits, in particular 00070 and 00000 are allowed.

First let's look at

How many possible combinations are in a 1 digit code

The answer is 10. They are 0, 1, 2, 3, 4, 5, 6 ,7 ,8 and 9

How many possible combinations are in a 2 digit code

Each of the 1 digit codes can be transformed into a 2 digit code by appending a second digit. For example 0 can be transformed into a 2 digit code in 10 ways. they are 00, 01, 02, 03, 04, 05, 06, 07, 08 and 09. Likewise 1 can be transformed into a 2 digit code in 10 ways. Similarly for all ten 1 digit codes and hence there are 10 × 10 = 102 = 100 possible 2 digit codes.

How many possible combinations are in a 3 digit code

Each of the one-hundred 2 digit codes can be transformed into a 3 digit code by appending a third digit. I hope it is clear now that there are 10 × 10 × 10 = 103 = 1000 possible 3 digit codes. Likewise there are 104 possible 4 digit codes are 105 = 100,000 possible 5 digit codes.

In Canada where I live our postal codes have a different structure. They are letter, digit, letter (space) digit, letter, digit. For example the postal code of post office in the town of Fort Qu'Appelle Saskatchewan is S0G 1S0. With this structure there are 26 choices for the first character, 10 choices for the second character, 26 choices for the third character and so on. In total there are 26 × 10 × 26 × 10 × 26 × 10 = 17,576,000 possible Canadian postal codes if there are no restrictions on what letters and digits can be used.

I hope this helps,
Penny     Math Central is supported by the University of Regina and The Pacific Institute for the Mathematical Sciences.