binaryElementary Comparison

Quick Summary

  • Elementary Comparison (EC) is similar to a Decision Table (DT) with binary values (Truth Table).

  • Use to:

    • Check the effect of each individual condition

    • Get a compact alternative to a Truth Table.

AND / OR operators

Condition combinations may be combined using logical AND or OR.

Example 1: A rule is true if ONE of the conditions is true. This implies OR. (0/1 are easier to distinguish visually and are therefore used instead of Y/N )

| 0 0 | | 0 |

| 0 1 | → | 1 |

| 1 0 | | 1 |

| 0 1 | | 1 | Example 2: A rule is true only if ALL conditions are true. This implies AND. Notice two things:

  • The tables grows exponentially just like a DT: 23= 8 (2 values to the power of 3 conditions)

  • Only ONE compound condition results in the rule being true (last one: | 1 1 1 |= | 1 |)

| 0 0 0 | | 0 | | 0 0 1 | | 0 | | 0 1 0 | | 0 | | 0 1 1 | → | 0 | | 1 0 0 | | 0 | | 1 0 1 | | 0 | | 1 1 0 | | 0 | | 1 1 1 | | 1 |

Example 2 above illustrates that as long as ONE condition is false, the result remains the same. So instead of exhaustive testing (all 8 combinations), we may reduce the number to 4 rules:

  • | 1 1 1 | - the only scenario with a positive outcome

  • | 0 1 1 | , | 1 0 1 |, | 1 1 0 | - where ANY ONE false condition negates the outcome. These tests check the effect of each individual condition.

circle-exclamation

Full DT vs. ET

✅ Full Decision Table (All 8 Combinations)

This covers all possible combinations of 3 binary conditions (2³ = 8 rules).

Rule
Age ≥ 18
Employed?
Credit Score ≥ 700
Decision

1

Y

Y

Y

Approve

2

Y

Y

N 🔴

Reject

3

Y

N 🔴

Y

Reject

4

Y

N

N

Reject

5

N🔴

Y

Y

Reject

6

N

Y

N

Reject

7

N

N

Y

Reject

8

N

N

N

Reject

✂️ Reduced ET Table (Just 4 Rules) We pick Rule 1, which leads to the Approve decision, and Rules with 🔴 - where a single N condition negates the outcome.

Rule
Age ≥ 18
Employed?
Credit Score ≥ 700
Decision

1

Y

Y

Y

Approve

2

Y

Y

N🔴

Reject

3

Y

N🔴

Y

Reject

4

N🔴

Y

Y

Reject

Last updated