Grade 9 Computer Science — How strong a password is
Work out how many different passwords a rule allows, and use that count to say which of two rules is harder to guess your way through.
Name: ________________________
1.A door keypad takes a code of exactly 4 characters, and each character is one of its 5 buttons. How many different codes are there for somebody to get through?
2.Put these rules in order of how many different passwords each one allows, fewest first.
- 5 characters from 4
- 3 characters from 9
- 3 characters from 6
- 2 characters from 25
3.One website's rule allows passwords 6 characters long, with 10 characters allowed in each position. Another website's rule allows passwords 4 characters long, with 30 characters allowed in each position. Which rule allows more passwords?
- a) The rule with 4 characters and 30 choices
- b) There is not enough here to tell
- c) The rule with 6 characters and 10 choices
- d) The two rules allow exactly the same number
4.A rule allows 3 characters taken from a set of 20, and a guessing machine gets through 1000 passwords a second. How many seconds does the machine need before it has tried the lot?
5.Sort each of these rules by how many different passwords it allows.
Groups: Fewer than 1000 · More than 1000
- 3 characters, each one of 11
- 2 characters, each one of 30
- 4 characters, each one of 7
- 3 characters, each one of 9
- 2 characters, each one of 45
- 2 characters, each one of 12
6.Each of these rules allows some number of different passwords. Match each rule to that number.
- 2 characters from 15
- 3 characters from 5
- 2 characters from 21
- 4 characters from 4
- 3 characters from 12
- 256
- 441
- 125
- 225
- 1728
7.A student has 9 accounts and has used the same password on all but 3 of them. One of the websites is attacked and that password is taken. How many of the nine accounts can the attacker now open?
8.A badge code is exactly 2 characters long, and each character is one of the 5 shapes printed on the badge. How many different badge codes does that rule allow?
Answer key — Grade 9 Computer Science — How strong a password is
- 1. 625
- 2. 1. 3 characters from 6 2. 2 characters from 25 3. 3 characters from 9 4. 5 characters from 4
- 3. c) The rule with 6 characters and 10 choices
- 4. 8
- 5. 2 characters, each one of 12 → Fewer than 1000; 3 characters, each one of 9 → Fewer than 1000; 2 characters, each one of 30 → Fewer than 1000; 3 characters, each one of 11 → More than 1000; 4 characters, each one of 7 → More than 1000; 2 characters, each one of 45 → More than 1000
- 6. 2 characters from 15 → 225; 3 characters from 5 → 125; 2 characters from 21 → 441; 4 characters from 4 → 256; 3 characters from 12 → 1728
- 7. 6
- 8. 25