A decision table is a table of rows and columns, separated into four quadrants, as shown in the table illustration below. The upper left quadrant contains the condition(s); the upper right quadrant contains the condition alternatives. The lower half of the table contains the actions to be taken on the left and the rules for executing the actions on the right. When a decision table is used to determine which action needs to be taken, the logic moves clockwise beginning from the upper left.
Conditions and Actions | Rules |
---|---|
Conditions | Condition Alternatives |
Actions | Action Entries |
Suppose a store wanted to illustrate its policy on noncash customer purchases. The company could do so using a simple decision table as shown below.
Conditions and Actions | Rule 1 | Rule 2 | Rule 3 | Rule 4 |
---|---|---|---|---|
Under $50 | Y | Y | N | N |
Pays by check with two forms of ID | Y | N | Y | N |
Uses credit card | N | Y | N | Y |
Complete the sale after verifying signature. | X | |||
Complete the sale. No signature needed. | X | |||
Call supervisor for approval. | X | |||
Communicate electronically with bank for credit card authorization. | X |
Each of the three conditions (sale under $50, pays by check, and uses credit cards) has only two alternatives. The two alternatives are Y (yes, it is true) or N (no, it is not true). Four actions are possible:
- Complete the sale after verifying the signature.
- Complete the sale. No signature needed.
- Call the supervisor for approval.
- Communicate electronically with the bank for credit card authorization.
The final ingredient that makes the decision table worthwhile is the set of rules for each of the actions. Rules are the combinations of the condition alternatives that precipitate an action. For example, Rule 3 says:
IF N (the total sale is NOT under $50.00) AND IF Y (the customer paid by check and had two forms of ID) AND IF N (the customer did not use a credit card) THEN DO X (call the supervisor for approval). |
The foregoing example featured a problem with four sets of rules and four possible actions, but that is only a coincidence. The next example demonstrates that decision tables often become large and involved.
Developing Decision Tables
To build decision tables, the analyst needs to determine the maximum size of the table; eliminate any impossible situations, inconsistencies, or redundancies; and simplify the table as much as possible. The following steps provide the analyst with a systematic method for developing decision tables:
- Determine the number of conditions that may affect the decision. Combine rows that overlap, such as conditions that are mutually exclusive. The number of conditions becomes the number of rows in the top half of the decision table.
- Determine the number of possible actions that can be taken. That number becomes the number of rows in the lower half of the decision table.
- Determine the number of condition alternatives for each condition. In the simplest form of decision table, there would be two alternatives (Y or N) for each condition. In an extended-entry table, there may be many alternatives for each condition. Make sure that all possible values for the condition are included. For example, if a problem statement calculating a customer discount mentions one range of values for an order total from $100 to $1,000 and another range of greater than $1,000, the analyst should realize that the range from 0 up to $100 should also be added as a condition. This is especially true when there are other conditions that may apply to the 0 up to $100 order total.
- Calculate the maximum number of columns in the decision table by multiplying the number of alternatives for each condition. If there were four conditions and two alternatives (Y or N) for each of the conditions, there would be 16 possibilities as follows:
Condition 1: X 2 alternatives Condition 2: X 2 alternatives Condition 3: X 2 alternatives Condition 4: X 2 alternatives 16 possibilities
- Fill in the condition alternatives. Start with the first condition and divide the number of columns by the number of alternatives for that condition. In the foregoing example, there are 16 columns and two alternatives (Y or N), so 16 divided by 2 is 8. Then choose one of the alternatives, say Y, and write it in the first eight columns. Finish by writing N in the remaining eight columns as follows:
Repeat this step for each condition, using a subset of the table,Condition 1: Y Y Y Y Y Y Y Y N N N N N N N N
and continue the pattern for each condition:Condition 1: Y Y Y Y Y Y Y Y N N N N N N N N Condition 2: Y Y Y Y N N N N Condition 3: Y Y N N Condition 4: Y N
Condition 1: Y Y Y Y Y Y Y Y N N N N N N N N Condition 2: Y Y Y Y N N N N Y Y Y Y N N N N Condition 3: Y Y N N Y Y N N Y Y N N Y Y N N Condition 4: Y N Y N Y N Y N Y N Y N Y N Y N
- Complete the table by inserting an X where rules suggest certain actions.
- Combine rules where it is apparent that an alternative does not make a difference in the outcome. For example,
can be expressed as:Condition 1: Y Y Condition 2: Y N Action 1: X X
The dash [—] signifies that Condition 2 can be either Y or N, and the action will still be taken.Condition 1: Y Condition 2: — Action 1: X
- Check the table for any impossible situations, contradictions, and redundancies. They are discussed in more detail later.
- Rearrange the conditions and actions (or even rules) if it makes the decision table more understandable.