   SEARCH HOME Math Central Quandaries & Queries  Question from Michael, a parent: I have a 5 digit key pad lock on my truck. I want to print out all of the combinations to try. pad one=0 pad two =1 pad three=2 pad four=3 pad five =4. can you help me find and print all combinations? Michael,

Is this an array of five rows of buttons with five buttons in each row? If so is 00000 a valid combination or do the digits have to be different?

Harley

Michael wrote back

five buttons, so if I labeled them
key 1=0
key 2=1
key 3=2
key 4=3
key 5=4

so combinations would start like this 00000 next 00001...>>>>>>>>>.....44443 last 44444.

Thanks Mike

Mike,

You have done all the work yourself. The combinations are

00001
00002
00003
00004
00010
00011
00012
00013
00014
00020
.
.
.
44443
44444

The list is just like the old style odometer in a car with only the digits 0, 1, 2, 3 and 4.

There are five possible digits in each position so the number of possible combinations is

5 5 5 5 5 = 55 = 3125.

Harley

Harley-

Thanks for the help, I was thinking along the lines of a number system in a different base, like base 5 and not base ten.

what need though is to print out the combinations, say using an excel equation, or the like.

Mike,

You are correct the possible combinations are the integers from 0000(base5) to 4444(base5).

I am not an expert in Excel but I don't see how to print them using Excel.

Harley     Math Central is supported by the University of Regina and The Pacific Institute for the Mathematical Sciences.