Skip to content

平成25年度 秋期 ITパスポート試験 問54

This question's explanation and your answers so far.

問54
頻出度★★☆

“男性のうち, 20歳未満の人と65歳以上の人” に関する情報を検索するための検索式として, 適切なものはどれか。

出典 平成25年度 秋期 ITパスポート試験 問54
解説

問 54

  • Incorrectア

    Male AND (under 20 years old AND 65 years old and over) means a person who is male, and is under 20 years old, and at the same time is 65 years old and over. However, under 20 and 65 and over are age ranges that do not overlap, so joining them with AND leaves not a single person who satisfies the conditions simultaneously, and the search result is always empty. This is the typical mistake of replacing the Japanese word “and” directly with the AND operator.

  • イ

    正解 The correct answer is イ. When you build a search expression, rewrite the condition stated in words as an operation on sets. AND (logical conjunction) narrows the result down to only those items that satisfy both conditions at the same time, while OR (logical disjunction) gathers every item that satisfies at least one of the conditions. Break down the phrase “males, and among them the people under 20 years old and the people 65 years old and over” in the question. First, “among males” means limiting the search to the set of males, which is a narrowing-down, so the gender condition is joined with AND. Next, “the people under 20 years old and the people 65 years old and over” means that you want to take both age groups — under 20 and 65 and over — as targets, and a person qualifies by belonging to either one, so these are joined with OR. Because the two age conditions must first be evaluated together as one unit, they are enclosed in parentheses, and that whole unit is joined to Male with AND. This gives the expression Male AND (under 20 years old OR 65 years old and over), which matches イ. The set retrieved by this expression is the combination of males under 20 and males 65 and over, exactly as the question intends.

  • Incorrectウ

    In Male OR (under 20 years old AND 65 years old and over), the part inside the parentheses is, as explained above, a condition that no one satisfies, so the expression is effectively the same as searching for Male alone. As a result, all males are extracted regardless of age, including males who are 20 or over and under 65, so it does not satisfy the condition in the question. The filtering by age has no effect, so this choice is wrong.

  • Incorrectエ

    Male OR (under 20 years old OR 65 years old and over) joins every condition with OR, so a person is extracted if they meet just one of them: being male, being under 20 years old, or being 65 years old and over. As a result, in addition to all males, women under 20 and women 65 and over are also included, and the narrowing-down expressed by “among males” is lost. The gender condition must be joined with AND, so this choice is wrong.

ここがポイント
  • The basics of logical operations in a search expression: AND (logical conjunction) narrows the result to only those items that satisfy several conditions at once, so the target set becomes smaller, while OR (logical disjunction) gathers items that satisfy any one of the conditions, so the target set becomes larger. In Japanese, “among ...” and “... and (both)” correspond to AND, while “... or” and “either of ...” correspond to OR.
  • The Japanese word “to” (and) can mean AND or OR depending on context. When the conditions placed side by side are mutually exclusive (non-overlapping), as in “the people under 20 years old and the people 65 years old and over”, the intent is to collect both groups together, so it means OR. You can check your answer with this test: if you join mutually exclusive conditions with AND, the result becomes an empty set. It is also important to enclose the OR part in parentheses so that the order of the operations is made explicit.
用語

Your answers