Decision Table&Tree
-
Upload
mahmoud-abudaqqa -
Category
Documents
-
view
225 -
download
0
Transcript of Decision Table&Tree
-
7/31/2019 Decision Table&Tree
1/15
Decision Tables
A Decision table is a table of rows and columns, separated
into four quadrants and is designed to illustrate complex
decision rules
Condition Stub upper left quadrant
Rules Stub upper right quadrant
Action Stub bottom left quadrant
Entries Stub - bottom right quadrant
Doneb
y:mahmoudabudagga
-
7/31/2019 Decision Table&Tree
2/15
Decision Table Layout Standard format used for presenting decision tables.
Doneb
y:mahmoudabudagga
DecisionStub
RulesStub
ActionStub
EntriesStub
-
7/31/2019 Decision Table&Tree
3/15
Decision Table Example
Doneb
y:mahmoudabudagga
1 2 3 4
Like Boss? Y Y N N
20% Pay Raise? Y N Y N
Stay Another Year X X
Quit after 2 Months X
Quit next Week X
-
7/31/2019 Decision Table&Tree
4/15
Developing Decision Tables Process requires the determination of the number ofconditions (inputs) that affect the decision.
The set of possible actions (outputs) must likewise be
determined
The number of rules is computed
Each rule must specify one or more actions
Doneb
y:mahmoudabudagga
-
7/31/2019 Decision Table&Tree
5/15
Number of Rules
Each condition generally has two possible
alternatives (outcomes): Yes or No
In more advanced tables, multiple outcomes for eachcondition are permitted
The total number of rules is equal to
2 no. of conditions
Thus, if there are four conditions, therewill be
sixteen possible rulesDoneb
y:mahmoudabudagga
-
7/31/2019 Decision Table&Tree
6/15
Building the Table
For each rule, select the appropriate action and indicatewith an X
Identify rules that produce the same actions and attempt tocombine those rules; for example:
Condition 1 Y Y Condition 1 Y
Condition 2 Y N Condition 2 -
Action 1 X X Action 1 X
Doneb
y:mahmoudabudagga
-
7/31/2019 Decision Table&Tree
7/15
Cleaning Things Up
Check the table for any impossible situations,
contradictions, and redundancies and eliminate such rules
Rewrite the decision table with the most reduced set of
rules; rearranging the rule order is permissible if it improvesuser understanding
Doneb
y:mahmoudabudagga
-
7/31/2019 Decision Table&Tree
8/15
Doneb
y:mahmoudabudagga
Decision Table example: combine
and reduce
Conditions and Actions 1 2 3 4 5 6 7 8
Order from Fall Catalog Y Y Y Y N N N N
Order from Christmas Catalog Y Y N N Y Y N N
Order from Special Catalog Y N Y N Y N Y NMail Christmas Catalog X X X X
Mail Special Catalog X X
Mail Both Catalogs X X
The four gray columns canbe combined into a singlerule. Note that four each,there was NO order placedfrom the Special Catalog.
In addition, Rules 1&5 andRules 3&7 can be combined.Each pair produces the same
action and each pair shares twocommon conditions.
-
7/31/2019 Decision Table&Tree
9/15
Decision Table example ~ Final
Version
Doneb
y:mahmoudabudagga
Conditions and Actions 1 2 3
Order from Fall Catalog -- -- --Order from Christmas Catalog Y -- N
Order from Special Catalog Y N Y
Mail Christmas Catalog X
Mail Special Catalog XMail Both Catalogs X
Eliminates the need to check for every possible case.
-
7/31/2019 Decision Table&Tree
10/15
Decision Table example:checking for completeness and accuracy
Doneby:mahmoudabudagga
Conditions and Actions 1 2 3 4
Salary > $50,000 per year Y Y N N
Salary < $2,000 per month Y N Y NAward Double Bonus X
Award Regular Bonus X
Award no Bonus X
Although the Y-N Combinations suggest a rule, in thiscase, it is impossible for conditions 1 & 2 to exist
simultaneously. They are in complete contradictionwith each other. In the final version of the table,
Rule 1 will disappear and Rules -4 will become Rules 1-3.
-
7/31/2019 Decision Table&Tree
11/15
Decision Tables and
Membership Tables
Doneby:mahmoudabudagga
X X XX X
X X X
Action 1Action 2
Action 3
Y Y Y Y N N NN
Y Y N N Y Y NN
Y N Y N Y N YN
Condition 1
Condition 2
Condition 3
Rules
1 2 3 4 5 6 7 8
Conditions and
Actions
NNNN
NYYN
NYNY
YYYY
ABABBA
OperationsSets
-
7/31/2019 Decision Table&Tree
12/15
Importance of Decision Tables
Aids in the analysis of structured decisions
Ensures completeness
Checks for possible errors (impossible situations,
contradictions, and redundancies, etc.) Reduces the amount of condition testing that must be done
Doneby:mahmoudabudagga
-
7/31/2019 Decision Table&Tree
13/15
Decision Trees
Decision trees are useful when multiple branching occurs in a
structured decision process, although they can be quite
effective when only two decision paths are called for.
They are helpful when necessary to maintain a certain order
for a series of decisions.
Doneby:mahmoudabudagga
-
7/31/2019 Decision Table&Tree
14/15
Drawing Decision Trees
Drawn horizontally
Root of tree is to the
left side
Square Nodesindicate actions
Circle Nodes
represent possible
conditions
Circle is analogous to
the condition part of
an IF statement
Square is analogousto the consequent of
an IF statement (the
THEN part)
IF Circle THEN
SquareDoneby:mahmoudabudagga
-
7/31/2019 Decision Table&Tree
15/15
Decision Tree Example
Doneby:mahmoudabudagga
1
2
3
4Ring up sale
5Look up card in book
6
Call supervisor for approval
7 Call bank for approval
denotes end
of action