A safe has a code lock that unlocks if you input the correct four digits, in any order. The lock has a keypad with the digits 0, 1, 2, ..., 9. For example, suppose the unlock code is 1000. The safe will open for any order you input the digits: 1000, 0100, 0010, 0001. Or consider the unlock code 1234. The safe will open for any permutations of the same numbers(1234, 1324, 1432....etc.) How many DIFFERENT unlock codes are there? [Two unlock codes are equivalent if they contain the same digits - like 1000, 0010 - and they are different if they do not use the same digits, such as 5000 or 1234]. Thanks for help.

Guest Jul 4, 2017

#2**+1 **

In an ORDERED code lock, there are 10 possible choices for each of the four spots in the code, making for a total of 10^4=10,000 possible codes.

In this UNORDERED code lock, we have to avoid double counting since codes like 1000 and 0100 are equivalent unlock codes as they are the same digits in a different order.

So, one way to count unique unlock codes is to count by the number of unique digits in the unlock code.

Will make a table for various scenarios:

Unique digit(s) ways to choose digit(s) possible patterns # diff. codes

1 10C1=10 1:aaaa 10

2 10C2=45 3:aaab,abbb,aabb 45*3=135

3 10C3=120 3:abca,abcb,abcc 120*3=360

4 10C4=210 1:abcd 210

Now, will just sum up the number of different codes ____

**715**

And that is my take on it!!.

Guest Jul 4, 2017

edited by
Guest
Jul 4, 2017

#3**0 **

**OH NO!! NOT again!!**

**You have got to be kidding!!** It’s very obvious the answer is less than 1000/4! (< 41)

I’m developing an extreme allergy to . . . . to . . . .**BLARNEY!!**

Guest Jul 4, 2017

#4**0 **

JB, if you are going to imitate me in your troll posts at least target posts with wrong answers. Mr BB gave the right answer. Least wise it exactly matches the answer by Presh Talwalkar here:

https://mindyourdecisions.com/blog/2017/06/25/can-you-solve-the-code-lock-puzzle-sunday-puzzle/

He’s gotten very good at plagiarism; he rewords it some, now

Anyway, just take some Benadryl for your allergy.

GingerAle
Jul 4, 2017

#6**0 **

Ginger ale! welcome back! long time no see :(.

But why arent you showing your face? we all know you have a user, you can use it too, see:

**use**r.

staggering!

Guest Jul 4, 2017

#7**0 **

What? I was on an hour ago. Didn’t you see my brilliant post?

Logging on is a pain in my chimp rump --I mean my delicate heinie. The security certificates corrupt and I have to reinstall them. They are probably corrupted from all the allergy-causing blarney that passes through them.

GingerAle
Jul 4, 2017