4文字のパスワードに関して,0~9の数字だけを使用した場合に比べ,0~9の数字の他に a~f の英小文字6文字も使用できるようにした場合は,組合せの数はおよそ何倍になるか。
平成24年度 秋期 ITパスポート試験 問78
This question's explanation and your answers so far.
問 78
Incorrectア
1.6 is 16 ÷ 10, that is, merely the ratio “per single character”. Since the password has 4 characters, this ratio applies across all 4 characters, giving 1.6 to the 4th power = 6.5536 times. This is the mistake of taking the ratio for one character as the ratio for the whole password.
- イ
正解 The number of password combinations equals “the number of character types usable in one position” raised to the power of “the number of characters”. With only the digits 0-9, each position has 10 types, so 4 characters give 10 to the 4th power = 10,000 combinations. Adding the 6 letters a-f makes 10 + 6 = 16 types per position, so 4 characters give 16 to the 4th power = 65,536 combinations. The ratio is 65,536 ÷ 10,000 = 6.5536, which is about 6.6 times. Therefore the correct answer is イ. Note also that 16 ÷ 10 = 1.6 is the ratio for a single character, and since it applies across all 4 characters, thinking of it as 1.6 to the 4th power = 6.5536 gives the same result.
Incorrectウ
8.7 is close to 8.67, which comes from dividing the combination 16C4 = 1,820 (choosing 4 out of 16 types) by the combination 10C4 = 210 (choosing 4 out of 10 types). However, a password may use the same character repeatedly and the order of the characters is also distinguished, so the count is not nCr but “the number of types raised to the power of the number of characters”. This is the mistake of applying the mathematical combination nCr.
Incorrectエ
16.0 is simply the number of usable character types itself, 10 + 6 = 16, and is not a ratio. The ratio must be found by dividing the increased total of 65,536 by the original total of 10,000, which gives 6.5536 times. This is the mistake of confusing the number of character types with the ratio.
- For a password of r characters using n kinds of characters, the number of combinations is n to the power of r (a way of counting that allows repetition and distinguishes order). The ratio obtained when the usable characters are increased is (the new number of types ÷ the original number of types) raised to the power of the number of characters.
- When the character types are increased from 10 to 16, a 4-character password goes from 10,000 to 65,536 combinations, about 6.6 times. The more character types are used, the stronger the password becomes against brute-force attacks - this is the basic idea behind password strength.