SEARCH HOME
 Math Central Quandaries & Queries
 Question from Maria: Hi - My husband gave me a new Samsung Galaxy mobile for out anniversaire gift. He set me a challenge which I have to solve before I can use the Phone. He has set the pin code with numbers 4, 7 and 0 and created a four digit code with the said numbers. Is there a way I can somehow list all possible combinations and try them all? Thanks!

Hi Maria,

It's not clear to me if the code has to contain each of the digits 0, 4 and 7 or if the code is made up of zeros, fours and sevens. For example is 0040 a valid code? I am going to assume it is and also that order is important so that 0400 and 0040 are different. With these conditions there are 81 possible codes and these code contain all the codes possible if order is not important and each code must contain 0, 4, and 7.

I don't know if you are old enough to remember the old style odometers on automobiles. They are displays of a sequence of digits that tell you how may kilometers the vehicle has tavelled. There is a web site, Odometer number counter that displays such counters, including some that have 4 digits like your code.

Each cylinder in the odometer has the ten digits, 0 to 9, but I want an odometer that only contains the digits 0, 4 and 7. Thinking of the code in numerical order they are

0000
0004
0007

and when the rightmost digit rolls over to 0 the digit, second from the right increases one place to 4 so the odometer continues

0000
0004
0007
0040
0044
0047
0070
0074
0077
0400

and so on.

Try there 81 possible codes.