My dear old Mum has managed to lock her self out a few times now, so we've bought a combination lock key safe, so she can keep a key outside.
Here's the problem, the key safe has 10 digits 1-0, the instructions recommend using a 4 digit number.
OK I think that's close to 10,000 combinations, not much chance of cracking that accidentally.
But I read further, and you can only use each number once, hmm cuts the combos down but not too much.
Then I figure out there's no sequence built in, it doesn't matter what order the 4 numbers are pressed, the lock will open.
As far as I can work out this brings the available different combos of 4 digits down to 84!!!!!!!
It looks like using just 2 digits increases this to 165 combos.
Am I right here?
Can anybody do a quick calc of available combos with different amount of digits used?
At the moment I'm thinking of going with 5 because anybody trying to crack it will assume 4 have been used.
It looks like the old classic year 12 combinations and permutations problem.
If my memory is correct, it's a little while ago, to pick 4 digits from 10 with order not important you'd use the formula.
10!/(6! * 4!) = (10*9*8*7)/(4*3*2*1) = 210 combinations.
picking only 2 digits has less combinations, (10*9)/(2*1) = 45
The combinations are:
2 digits - 45
4 digits - 210
5 digits - 252 (which is the max by the way)
6 digits - 210
maths nerd
Thanks guys, don't know how I got 165 for 2, must be getting old and senile!!!!
All I need now is a 5 digit number my Mum can remember!!
^ ah thanks, that makes sense. I wasn't considering the effect of the "in any order" part (which is actually a pretty bloody stupid way to make a combination lock!).