a, b, c, d, e, f の6文字すべてを任意の順で一列に並べたとき, a と b が両端になる場合は, 何通りか。
平成22年度 秋期 ITパスポート試験 問82
This question's explanation and your answers so far.
問 82
Incorrectア
24 counts only the 4! = 24 arrangements of the 4 middle seats and forgets to multiply by the 2 ways of swapping a and b at the two ends. The problem only specifies that a and b go at the ends; it does not say which one is at the left end, so you must always multiply by 2. The answer would be 24 only if left and right were fixed as well, for example a at the left end and b at the right end, which is not the condition of this problem.
Incorrectイ
30 is 6P2 = 6×5 = 30, that is, the number of ways to choose, in order, 2 letters out of the 6 to place at the two ends. In this problem the letters at the ends are specified from the start as a and b, so the very act of choosing from the 6 letters is wrong. It is also insufficient because it takes no account at all of the 4! = 24 arrangements of the 4 middle seats.
- ウ
正解 The correct answer is ウ (48 arrangements). In counting problems, the standard approach is to first fix the elements whose positions are specified. The two ends (leftmost and rightmost) are already determined to hold a and b, so there are 2 ways to place them: leftmost a with rightmost b, or leftmost b with rightmost a. Next, the remaining 4 seats in the middle are filled with the remaining letters c, d, e, f, which can be arranged in 4! = 4×3×2×1 = 24 ways. The choice at the ends and the arrangement in the middle are independent, so by the multiplication rule the total is 2 × 24 = 48 arrangements. As a check, among all 6! = 720 permutations the probability that a and b are at the two ends is (2/6)×(1/5) = 1/15, so 720 × 1/15 = 48 arrangements, which matches.
Incorrectエ
360 is 6P4 = 6×5×4×3 = 360, the number of ways to fill the 4 middle seats when all 6 letters are treated as candidates. This is the mistake of forgetting to remove a and b, already used at the ends, from the candidates for the middle; correctly, only the remaining 4 letters are arranged, giving 4! = 24. Note also that 360 is exactly half of the 720 total permutations, and it is the value you get if you count a different condition, namely that a is to the left of b, rather than a and b being at the two ends, so be careful not to misread the condition.
- The basic approach to counting problems is to first fix the elements whose position or role is specified, then count the rest as a permutation and multiply the results. This problem is a typical example of the multiplication rule: 2 ways at the ends × 4! = 24 ways in the middle = 48 arrangements.
- A permutation nPr is a count in which each element already used is removed from the pool of candidates as you go. Once a and b are used at the two ends, only 4 letters remain as candidates for the middle; counting with all 6 letters to get 6P4 = 360 is a wrong answer that allows the same letter to be used twice.