7/24/2019 4.Decision Tables
1/23
Decision Tables
March 13, 2014
Decision Tables
http://find/http://goback/7/24/2019 4.Decision Tables
2/23
Possible solution to the last exercise
Decision Tables
http://find/http://goback/7/24/2019 4.Decision Tables
3/23
Decision Tables and Decision Trees
Precise and compact way to model complicated logic
Decision Tables
http://find/7/24/2019 4.Decision Tables
4/23
Decision Tables and Decision Trees
Precise and compact way to model complicated logic
Specifies a system as
Decision Tables
http://find/7/24/2019 4.Decision Tables
5/23
Decision Tables and Decision Trees
Precise and compact way to model complicated logic
Specifies a system as a set of possible conditions,
Decision Tables
http://find/7/24/2019 4.Decision Tables
6/23
Decision Tables and Decision Trees
Precise and compact way to model complicated logic
Specifies a system as a set of possible conditions, rules for reacting to stimuli when those conditions are met, and
Decision Tables
http://find/7/24/2019 4.Decision Tables
7/23
7/24/2019 4.Decision Tables
8/23
Decision Tables and Decision Trees
Precise and compact way to model complicated logic
Specifies a system as a set of possible conditions, rules for reacting to stimuli when those conditions are met, and specific actions to be taken as a result.
Makes user requirements omissions and/or contradictionsexplicit so that the SE can go back to the client and ask specificquestions regarding whatto do whenthese conditions arise.
Decision Tables
http://find/7/24/2019 4.Decision Tables
9/23
Structure
Rows in the table are of two types: condition rows and actionrows.
Decision Tables
http://find/7/24/2019 4.Decision Tables
10/23
Structure
Rows in the table are of two types: condition rows and actionrows.
A column represents a combination of condition outcomes andthe corresponding actions to take.
Decision Tables
http://find/7/24/2019 4.Decision Tables
11/23
Structure
Rows in the table are of two types: condition rows and actionrows.
A column represents a combination of condition outcomes andthe corresponding actions to take.
also referred to as a rule
Decision Tables
http://find/7/24/2019 4.Decision Tables
12/23
Structure
Rows in the table are of two types: condition rows and actionrows.
A column represents a combination of condition outcomes andthe corresponding actions to take.
also referred to as a rule A complete decision table specifies one rule for each combination ofthe condition outcomes.
Decision Tables
http://find/7/24/2019 4.Decision Tables
13/23
Structure
Rows in the table are of two types: condition rows and actionrows.
A column represents a combination of condition outcomes andthe corresponding actions to take.
also referred to as a rule A complete decision table specifies one rule for each combination ofthe condition outcomes. A decision table contains redundancy if there exists two columnsthat are equivalent.
Decision Tables
http://find/7/24/2019 4.Decision Tables
14/23
Structure
Rows in the table are of two types: condition rows and actionrows.
A column represents a combination of condition outcomes andthe corresponding actions to take.
also referred to as a rule
A complete decision table specifies one rule for each combination ofthe condition outcomes. A decision table contains redundancy if there exists two columnsthat are equivalent.
A decision table is ambiguous or contradictory if, for the samecombination of condition outcomes, the specified actions are different.
Decision Tables
http://find/7/24/2019 4.Decision Tables
15/23
Structure
Rows in the table are of two types: condition rows and actionrows.
A column represents a combination of condition outcomes andthe corresponding actions to take.
also referred to as a rule
A complete decision table specifies one rule for each combination ofthe condition outcomes. A decision table contains redundancy if there exists two columnsthat are equivalent.
A decision table is ambiguous or contradictory if, for the samecombination of condition outcomes, the specified actions are different. A decision table is correct if it has neither redundancies norcontradictions.
Decision Tables
http://find/7/24/2019 4.Decision Tables
16/23
Example
A technical support company writes a decision table to diagnose
printer problems based on the symptoms described to them over thephone by the client.
Decision Tables
http://find/7/24/2019 4.Decision Tables
17/23
Example
A technical support company writes a decision table to diagnose
printer problems based on the symptoms described to them over thephone by the client.
Decision Tables
http://find/7/24/2019 4.Decision Tables
18/23
Methodology1. Identify conditions and values.
Find the data attribute each condition tests and all of theattributes values.
2. Identify possible actions. Determine each action to be taken for each decision or policy.
3. Compute the maximum number of rules.
4. Enter all possible rules. Fill in the values of the condition data attributes in eachnumbered rule column
5. Define actions for each rule. For each rule, mark the appropriate actions with an X in thedecision table.
6. Verify the policy. Review completed decision table with end-users.
7. Simplify the table. Eliminate and/or consolidate rules to reduce the number ofcolumns.
Decision Tables
http://find/7/24/2019 4.Decision Tables
19/23
ExampleThe structure English or pseudocode specification of the processtake speeding decision is:
Decision Tables
http://find/7/24/2019 4.Decision Tables
20/23
ExampleThe structure English or pseudocode specification of the processtake speeding decision is:
Decision Tables
http://find/7/24/2019 4.Decision Tables
21/23
Decision Tree
A tree in which a non-leaf node includes a condition to evaluate.
Decision Tables
http://find/7/24/2019 4.Decision Tables
22/23
Decision Tree
A tree in which a non-leaf node includes a condition to evaluate.
The edges of a non-leaf node represent the outcomes of decisionsmade at that node.
Decision Tables
http://find/7/24/2019 4.Decision Tables
23/23
Decision Tree
A tree in which a non-leaf node includes a condition to evaluate.
The edges of a non-leaf node represent the outcomes of decisionsmade at that node.
A decision tree is a binary tree if all outcomes are binary,meaning that their outcome is either true or false.
Decision Tables
http://find/