← All challenges

Compressing Decision Tables

September 2020

decision-tablesoptimization

Using common sense, people can often compress a larger decision table into a smaller one that produces identical results — an 18-rule table might collapse to just 6 rules once the redundant conditions are spotted. But once a table has more attributes (columns), doing this compression by hand becomes difficult or impossible, even allowing for some margin of error — you generally need a tool.

This challenge asks you to compress the following multi-hit decision table (18 rules, including the default). Each row applies to a “Type,” tests either an upper or lower bound on an “Adjustment” value and a “Loss” value, and classifies the case as TOP or BOTTOM:

TypeAdjustmentLossClassified As
(no match)NONE
31> 200< -150TOP
31< 200≥ -189BOTTOM
32> 500< -1000TOP
32< 500≥ -99BOTTOM
33> 500< -1000TOP
33< 500≥ -100BOTTOM
34> 500< -1000TOP
34< 500≥ -100BOTTOM
35> 500< -800TOP
35< 500≥ -100BOTTOM
36> 500< -800TOP
36< 500≥ -100BOTTOM
37> 500< -2000TOP
37< 500≥ 0BOTTOM

Try to compress this table into fewer rules while preserving exactly the same classification behavior for every possible input.

Send your solutions to DecisionManagementCommunity@gmail.com, or open a pull request to add yours here.

Solutions