Download presentation
Presentation is loading. Please wait.
1
Decision Tables SEEM 3430 Tutorial LI Jing
2
Overview A diagram of all the logic and possible outcomes associated with a particular process Conditions Condition Alternatives Actions Conditions Condition Alternatives Actions Action Entries 2019/2/28
3
Overview Conditions and Condition alternatives Actions
Represent the specific rule when making a decision Actions Represent all possible courses of action associated with a given set of conditions 2019/2/28
4
Why decision table? 2019/2/28
5
Why decision table? Model complicated programming logic.
Make it easy to see that all possible combinations of conditions have been considered. 2019/2/28
6
Developing decision tables
You need to determine the maximum size of the table, eliminate any impossible situations, inconsistencies, or redundancies, and simplify the table as much as possible. 2019/2/28
7
Step 1 Determine the number of conditions that may affect the decision. Combine rows that overlap, for example, conditions that are mutually exclusive. The number of conditions becomes the number of rows in the top half of the decision table. Conditions Condition Alternatives Actions Action Entries 2019/2/28
8
Mutually exclusive conditions
Gender Male and Female Education High school, Bachelor, Master and Doctor etc. Mutually exclusive conditions should be combined to be one condition with multiple alternatives 2019/2/28
9
Step 2 Determine the number of possible actions that can be taken.
This becomes the number of rows in the lower half of the decision table. Conditions Condition Alternatives Actions Action Entries 2019/2/28
10
Step 3 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. Conditions Condition Alternatives Actions Action Entries 2019/2/28
11
Step 4 Calculate the maximum number of columns in the decision table by multiplying the number of alternatives for each condition. If there are four conditions and two alternatives for each of them, there will be 2 4 =16 possibilities Conditions Condition Alternatives Actions Action Entries 2019/2/28
12
Step 5 Fill in the condition alternatives. Start with the first condition and divide the number of columns by the number of alternatives for that condition. 2019/2/28
13
Step 6~9 6. Complete the table by inserting an X where rules suggest certain actions. 7. Combine rules where it is apparent that an alternative does not make a difference in the outcome 8. Check the table for any impossible situations, contradictions, redundancies. 9. Rearrange the conditions and actions (or even rules) to make the decision table more understandable. 2019/2/28
14
An example A store wishes to program a decision on non- cash receipts for goods into their intelligent tills. 2019/2/28
15
Conditions 1. Transaction under £50
2. Pays by cheque with cheque card (guarantee £50) 3. Pays by credit card 2019/2/28
16
Possible actions 1. Ring up sale 2. Check credit card from local database 3. Call a supervisor 4. Automatic check of credit card company database 2019/2/28
17
Initial the decision table
Some of the condition rules are invalid (Marked as red and blue) Customer cannot pay by cheque AND pay by credit card or not pay by either method 2019/2/28
18
Delete invalid condition rules
2019/2/28
19
Indicate the actions 2019/2/28
20
Check for completeness
What if the customer has not shopped there before? Reconstructing the table! 2019/2/28
21
Adding a new condition to the existing table
The action list remain the same, clean the action entries The number of condition rules increases by a multiple of 2 (number of alternatives for the new condition). 2019/2/28
22
Indicate the actions Under £50 Y N Pays by cheque Pays by credit card
Unknown customer Ring up sale X Check from local database Call Supervisor X Check credit card database 2019/2/28
23
Delete mutually exclusive conditions
Under £50 Y N Pays by cheque Pays by credit card - Unknown customer Ring up sale X Check from local database Call Supervisor X Check credit card database The dash in the Pays by credit card row indicates that it does not matter about the condition rule since if a customer pays by cheque they will not pay by credit card and vice versa ( mutually exclusive ). 2019/2/28
24
Combine possible situations according to actions
Under £50 Y N Pays by cheque Pays by credit card - Unknown customer Ring up sale X Check from local database Call Supervisor X Check credit card database Y N Y - Y Y N N Y - N Y + = + = 2019/2/28
25
Remove the redundant Under £50 - Y N Pays by cheque
Pays by credit card Unknown customer Ring up sale X Check from local database Call Supervisor X Check credit card database 2019/2/28
26
Combine identical actions
Under £50 - Y N Pays by cheque Pays by credit card Unknown customer Ring up sale X Check from local database Call Supervisor Check credit card database - Y N Y Y N Y N Y Can not merge !!! + = + + 2019/2/28
27
Wrong final version This final version is from Reference 2, which is wrong!!! This wrong final version can not deal with condition ‘YYY’ and ‘YNY’ 2019/2/28
28
Final Version Under £50 - Y N Pays by cheque Unknown customer
Ring up sale X Check from local database Call Supervisor Check credit card database Attention: This final version is different with reference 2 2019/2/28
29
Exercise When a burglar alarm sounds, if it is in one of students’ houses where alarm sounds every week, ignore it. Otherwise have a look outside and if the house looks not broken into and there is nobody moving inside it, ignore the alarm. Otherwise call police. (Answer: next slide) 2019/2/28
30
Solution for the exercise
Possible answer for the exercise 2019/2/28
31
Exercise A marketing company wishes to construct a decision table to decide how to treat clients according to three characteristics: Gender, City Dweller, and age group: A (under 30), B (between 30 and 60), C (over 60). The company has four products (W, X, Y and Z) to test market. Product W will appeal to female city dwellers. Product X will appeal to young females. Product Y will appeal to Male middle aged shoppers who do not live in cities. Product Z will appeal to all but older females. 2019/2/28
32
Solution-step 1 Identify conditions and their alternative values.
There are 3 conditions: gender, city dweller, and age group. Put these into table as 3 rows in upper left side. Gender’s alternative values are: F and M. City dweller’s alternative values are: Y and N Age group’s alternative values are: A, B, and C 2019/2/28
33
Solution-step 2 Compute maximum number of rules.
Determine the product of number of alternative values for each condition: 2 x 2 x 3 = 12. Fill table on upper right side with one column for each unique combination of these alternative values. Label each column using increasing numbers 1-12 corresponding to the 12 rules. 2019/2/28
34
Solution-step 3-4 Identify possible actions
Market product W, X, Y, or Z. Put these into table as 4 rows in lower left side. Define each of the actions to take given each rule. 2019/2/28
35
Solution-step 5 Simplify the table.
Determine if there are rules (columns) that represent impossible situations. If so, remove those columns. There are no impossible situations in this example. Determine if there are rules (columns) that have the same actions. If so, determine if these are rules that are identical except for one condition and for that one condition, all possible values of this condition are present in the rules in these columns. 2019/2/28
36
Final Table 1 2 3 4 5 6 7 8 9 10 Gender F M City Y N Age A - B C W X Z
2019/2/28
37
References http://en.wikipedia.org/wiki/Decision_table
ml answer-decision-tables.pdf 05/supplements/DecisionTables.htm 2019/2/28
38
Q&A Thanks! 2019/2/28
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.