Skip to main contentSkip to solution

A security door opens for some badges and not for others. Every badge has three attributes, with permitted values as given below:

AttributePermitted values
Shapecircle or square or triangle
Colourred or blue or green
Bordersolid or dashed

The door's rule has the following characteristics:

  • The rule carries at most one condition per attribute.
  • A condition names a single permitted value for that attribute.
  • An attribute carrying no condition is unrestricted.
  • The door opens only for those badges that satisfy every condition in the rule.

For example, one possible rule is "green and solid", which would open for every green badge with a solid border, of any shape. Another possible rule is "triangle", which would open for every triangular badge, irrespective of its colour and border.

Two badges have been tested with the present rule. The attributes of the badges and the corresponding results are given below.

Badge No.AttributesResult
1circle, red, soliddoes not open
2circle, green, dashedopens

Suppose a third badge with attributes - circle, green, solid - is now tested, and the door opens. How many rules remain possible now?

Solution

✅ Correct Option: 2

The 6 possible rules (from the two tests) are:

RuleShapeColourBorder
R1anygreenany
R2anyanydashed
R3anygreendashed
R4circlegreenany
R5circleanydashed
R6circlegreendashed

The new badge is solid, so any rule containing dashed would keep it shut. Remove R2, R3, R5 and R6.

RuleOpens for circle, green, solid?
R1 (green)Yes
R4 (circle, green)Yes

Therefore, 2 rules remain possible.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question