This question's explanation and your answers so far.
問94
頻出度★★★
S 社の T 営業所では,ID カードによる入室管理システムを導入することになった。T 営業所の施設の種類と管理対象者の区分(以下,対象区分という)を表のように分類し,入室許可の有無の区分(以下,許可区分という)の設定を行う。ここで,表は施設に対して入室を許可する対象区分を“○”,入室を許可しない対象区分を“×”で示す。
表 許可区分の設定
This is the value you get if you count only the 4 lines of Format 2 and forget the Format 1 line (Policy | DENY) that must always be placed on the first line. The question explicitly says including the line that describes Format 1, so 1 must be added to the 4 lines of Format 2; 4 is one line short.
○イ
正解When the Policy permission category is set to DENY, rule (3) means that every combination of a facility and a person category that matches none of the Format 2 lines is treated as DENY (entry not permitted). Therefore, in Format 2 you only need to write the ○ (entry permitted) combinations as ACCEPT, and you do not need a single line for the × combinations. Furthermore, rule (4) lets you join person categories that have the same permission category for the same facility into one line with commas, so one line per facility is enough.
- Meeting room | ACCEPT | Sales staff, Technical staff
- Office 1 | ACCEPT | Sales staff
- Office 2 | ACCEPT | Technical staff
- Reception room | ACCEPT | Visitor, Sales staff, Technical staff
Lines for different facilities cannot be merged, so Format 2 needs at least 4 lines. Adding the Format 1 line on the first line (Policy | DENY) gives 4 + 1 = 5 lines. Therefore the “5” of イ is correct. Note that in this question all 4 lines are ACCEPT and their facilities are all different, so the evaluation order of rule (5) does not affect the result.
×Incorrectウ
This is the number of lines when, in addition to the required 1 line of Format 1 and the 4 ACCEPT lines, one extra line is written for a × combination that does not need to be written at all (1 + 4 + 1 = 6). Because the DENY policy is automatically applied as the default, not a single line is needed for the × combinations, and the minimum is 5 lines.
×Incorrectエ
This is the same as the number of ○ marks in the table (2 for the Meeting room + 1 for Office 1 + 1 for Office 2 + 3 for the Reception room = 7). It corresponds to the number of Format 2 lines when the comma merging of rule (4) is not used and each ○ combination is written on its own separate line. With merging, Format 2 needs only 4 lines, and this 7 does not even include the Format 1 line, so it cannot be the answer for the minimum number of lines.
ここがポイント
The policy (Format 1) is the default permission category applied to combinations that match none of the explicitly written lines. Setting the policy to DENY gives a whitelist approach, in which you only need to write out the combinations that permit entry (ACCEPT); conversely, setting the policy to ACCEPT gives a blacklist approach, in which you write out only the × combinations.
When asked for the minimum number of lines, compress the line count by making the fullest use of the merging in rule (4) (joining, with commas, the person categories that have the same permission category for the same facility), and on top of that do not forget to count the Format 1 line on the first line. Note that lines for different facilities cannot be merged.