それぞれが独立に点灯/消灯の操作ができる5個のランプが並んでいる。2個以上のランプが点灯しているパターンは何通りあるか。ここで, 全てが点灯しているパターンは1通り, いずれか1個が点灯しているパターンは5通りと数えるものとする。
平成28年度 春期 ITパスポート試験 問98
This question's explanation and your answers so far.
問 98
Incorrectア
4 has no basis. Counting the cases in which 2 or more of the 5 lamps are lit gives 26, not 4.
Incorrectイ
10 is merely the number of patterns in which exactly 2 lamps are lit (the combination of choosing 2 out of 5 = 10). The question asks for “two or more”, so the cases of 3, 4, and 5 lamps lit must also be added; 10 is insufficient.
- ウ
正解 Each lamp takes one of two states, lit or off, and the 5 lamps are independent, so the total number of patterns is 2 to the 5th power = 32. Among these 32, there is 1 pattern in which no lamp is lit (all off) and 5 patterns in which exactly 1 lamp is lit. What we want is the patterns in which 2 or more lamps are lit, so we simply subtract these two cases from the total. 32 - 1 (all off) - 5 (only 1 lit) = 26. Therefore the correct answer is ウ.
Incorrectエ
32 is the total number of patterns, 2 to the 5th power itself. It also includes the 1 all-off pattern and the 5 patterns in which only 1 lamp is lit; since these have not been subtracted, it is wrong.
- The total number of patterns for n independent two-state elements is 2 to the n-th power (in this problem, 2 to the 5th power = 32).
- When there are many cases that satisfy the condition (such as “two or more”), it is faster to use the complementary-event approach of subtracting the cases that do not satisfy it (0 or 1 lamp lit = 6 in total) from the whole.