Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It would be 24 if all digits are distinct

It actually drops from 10^4=10000 to 4^4=256 combinations



If they aren't distinct, you wouldn't have 4 clean buttons, but just 3 - in which case we also know the repeating digit repeats exactly once and we get 12x3 (36) possible combinations. With two clean buttons, it's 6 (if both repeat) + 4 (if only one repeats) = 10 and if there's 1 that's just one, and a terrible password.


With 2 clean buttons, there are 4x2 ways for only 1 to repeat, giving 14 combinations in total.


I encountered a case of this in college, where there were four clean digits - a tough task to be sure! But fortunately the digits happened to be the same set of digits that comprised the room number. It took two guesses, because there was a twist - the combination was the room number, backwards.


I guess you would be able to count the number of clean keys and thus know both the number of distinct digits and the digits (but not the order nor which digit that's repeated)


The number that is repeated is likely to be dirtier than the numbers that are not so you get that information too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: