Skip to content

平成27年度 春期 ITパスポート試験 問98

This question's explanation and your answers so far.

問98
頻出度★★☆

F社では,新製品を開発するに当たり,100人のモニタを募集して市場調査を行った。モニタには,性能,価格,デザインの三つの項目について,それぞれを重視するかどうかを“はい”又は“いいえ”のいずれかで答えてもらった。 モニタから得られた回答は,図1のレコード形式で回答ファイルに登録した。 レコードの項目“性能”,“価格”,“デザイン”には,それぞれ,質問に対する回答が“はい”の場合には1が,“いいえ”の場合には0が記録されている。 回答ファイルの中から,条件に合致するレコード数を表示するために,次の命令が使用できる。 件数表示(条件) ここで,条件には,and,or及び[ ]を組み合わせた複合条件を指定できる。条件の評価は[ ]の中が優先して評価される。また,[ ]の中にさらに[ ]を記述することもできる。 条件を変えて,命令を実行した結果を表1に示す。 表1 命令を実行した結果

条件件数表示命令の実行結果
性能=155
価格=160
デザイン=145
[性能=1]and[価格=1]30
[価格=1]and[デザイン=1]25

性能,価格,デザインを重視する人の集合を,それぞれ,集合“性能”,集合“価格”,集合“デザイン”として,図2のベン図で表す。次の命令の条件に合致するベン図中の領域はどれか。 件数表示([[性能=1] or [価格=1]] and [デザイン=1])

出典 平成27年度 春期 ITパスポート試験 問98
解説

問 98

  • Incorrectア

    A, B, E is the region of “people who value performance or price but do not value design”, that is, [[Performance=1] or [Price=1]] and [Design=0]. It collects only the parts outside the Design circle, which is the opposite of [Design=1] in the condition, so it is wrong.

  • Incorrectイ

    A is a region not contained in the Design circle (valuing performance only), so it does not satisfy [Design=1]. In addition, D, which is the region valuing all three, is missing, and D also satisfies the condition with Performance=1 and Design=1, so this set has both an extra item and a missing item.

  • Incorrectウ

    B, D is the overlapping part of the Performance circle and the Price circle, that is, the region [Performance=1] and [Price=1]. However, the condition in the question joins performance and price with or (either one is enough), not with and. Furthermore, B is outside the Design circle, so it does not satisfy [Design=1] either.

  • エ

    正解 In the Venn diagram of Figure 2, the regions occupied by each set are as follows: the set “Performance” (the upper circle) = A, B, C, D; the set “Price” (the lower-left circle) = B, D, E, F; the set “Design” (the lower-right circle) = C, D, F, G. The condition of the command is [[Performance=1] or [Price=1]] and [Design=1], so we evaluate it starting from the inner or. First, “Performance=1 or Price=1” is the union of the Performance circle and the Price circle, which is A, B, C, D, E, F. Next, this is joined with “Design=1” by and (intersection), so out of the region obtained above only the parts that are also inside the Design circle remain, giving C, D, F. In meaning, this is the region of “people who value design and also value at least one of performance or price”, where C = valuing performance and design, F = valuing price and design, and D = valuing all three. Therefore the correct answer is エ (C, D, F).

ここがポイント
  • In a Venn diagram, and (logical conjunction) corresponds to the overlap of regions (intersection), and or (logical disjunction) corresponds to the combined range of regions (union). For a conditional expression, find the regions in order starting from the innermost parentheses.
  • Organize the regions formed by the three circles according to “which sets they belong to”. Here, Performance={A,B,C,D}, Price={B,D,E,F}, Design={C,D,F,G}, and the central D belongs to all three sets, so be careful not to miss counting it even under an and condition.
用語

Your answers