1

I've lost my PIN that encrypts the hard drive of my laptop ! What I can recall narrows the permutations down to a number that would be worth a brute force attempt I think. It got me thinking, how does one calculate the permutations given the following:

  • It's a 6-digit PIN (length of 6)
  • I only used the numbers 1, 2 & 3
  • each one appears at least once
  • no digit appears 4 times or more
  • no sequence of 3 of the same digit?
chrisjleu
  • 119
  • It says each appears at least once, not only once. Meaning I used 1, 2 & 3 at least once. 112211 is not valid for instance because it does not contain 3 – chrisjleu Oct 31 '15 at 16:25
  • 2
    Please also share your efforts on solving this problem – Shailesh Oct 31 '15 at 16:25
  • how does one calculate the permutations given the following if you're only interested in generating such sequences (not solving math problem using pen and paper), it's easy to make a program which generates all 3^6 sequences and drops out "bad" ones. To solve this on paper you probably have to exploit the inclusion-exclusion principle. – Matt Oct 31 '15 at 16:38
  • I'd happily do that if I could access my laptop! I'm no mathematician so I will have to look that up but yes essentially I want to try all combinations if the number isn't too large. I really just wanted to get a feel for what the number was. – chrisjleu Oct 31 '15 at 16:47
  • Several hundreds. 300-500, I guess. – Matt Oct 31 '15 at 16:52

0 Answers0