# Combination lock how many possible combinations?

#### Frisco

##### macrumors 68020
Original poster
Combination lock found by my son. He wants to play with it and try different combinations.

Four rows of numbers 1 through 6.

I was thinking the possible number of combinations is 4^6=4096. Is that correct?

Is there a way in excel to see all the possible combinations? I want to give him the list and tell him to try 10 different ones a day and see how many days in takes.

Thanks!

#### Frisco

##### macrumors 68020
Original poster
Thanks, but it's not about having a working lock. It's how to determine the actual combinations.

#### chown33

##### Moderator
Staff member
Thanks, but it's not about having a working lock. It's how to determine the actual combinations.
It's counting up in base 6. In short, when a wheel or whatever goes from 6 to 1 (rollover), increment the next higher wheel by 1 (carry out to the next higher digit). Apply the same rule to every wheel, so when the 2nd wheel goes from 6 to 1, increment the 3rd wheel by 1.

If you want to give him a daily task, have him cycle through 36 trials each day. So the two lowest wheels would go through 36 trials, and the 3rd wheel would increment by 2. If the combination is random, there's a 50% chance of hitting it after 18 days. After 36 days, every combination will have been tried.

From my own experience as a kid, if he gets through every combination without it opening, then there was some sloppiness in setting the trial or in testing to see if it will open. Mine was 4 wheels with 10 numbers per wheel, so it took a lot longer to go through them all. After getting halfway through the second full cycle I gave up and filed it open. Not usable, but at that point I didn't care.

mobilehaathi

#### Gutwrench

##### Contributor
6^4 =1296.

1111
1112
...
1116
1121
...
6666
I agree with this. 6^4 or 1296.

#### Frisco

##### macrumors 68020
Original poster
I managed to get a unique list of 1296 possible combinations, but I had to do it the hard way. I just kept randomly creating numbers 1-6 in 4 columns and then using the remove duplicate features and repeating until there were no more duplicates and only 1296 values remained. Excel has a lot of great functions and the "Remove Duplicate" feature was a welcome addition in either Excel 2007 or 2010. I have 2013 now. However one glaring feature function that is still missing is unique values although I know there is an array formula to count unique values.

Thanks for getting me started with the 1296 possible combinations!

Here's the file if you want to add some excitement to your Friday night
https://www.dropbox.com/s/o83k77mqgen0utz/Possible Combinations.xlsx?dl=0

#### triptolemus

##### macrumors 6502
Is there a way in excel to see all the possible combinations? I want to give him the list and tell him to try 10 different ones a day and see how many days in takes.

Thanks!
+1296/10 = 129.6 -- therefore, it will take between 1 and 130 days to accomplish the given task.

What a fabulous waste of time!

Code:
``````Sub listofnumbers()

Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim d As Integer
Dim x As String

For a = 1 To 6
For b = 1 To 6
For c = 1 To 6
For d = 1 To 6

x = Str(a & b & c & d)
ActiveCell.Value = x
ActiveCell.Offset(1, 0).Select

Next d
Next c
Next b
Next a

End Sub``````

#### juanm

##### macrumors 68000
It'll be much faster if you attach the lock to something solid (with a piece of string, or something), so that he can keep his hands wrapped around it, move the dials with his thumbs, and pull, instead of moving the dials, changing his hands so the can pull in opposite directions with his hands, then changing his hands again, moving the discs...

If you want to teach your kid something useful, get him and Arduino starter kit and have him program simple programs.

#### JamesMike

##### macrumors demi-god
If he can not get it open, he might try using a stethoscope while turning the dials, listening for a distinct different sound, writing down that number, precede to the next number.