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

How many rules are possible?

Solution

✅ Correct Option: 2

Badge 2 opens, so every condition in the rule must match circle, green, dashed. Each attribute is either unrestricted or fixed to badge 2's value:

Shape: any or circle; Colour: any or green; Border: any or dashed.

That gives 2×2×2=82\times2\times2=8 candidate rules.

Badge 1 does not open. Badge 1 is also a circle, so a shape condition cannot block it. The rule must contain green or dashed (badge 1 is red and solid).

This removes the 2 rules that have neither: "no condition" and "circle".

Possible rules:

RuleShapeColourBorder
R1anygreenany
R2anyanydashed
R3anygreendashed
R4circlegreenany
R5circleanydashed
R6circlegreendashed

Therefore, 6 rules are possible.

Keyboard Shortcuts

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