You are on page 1of 15

Decision Trees and Decision Tables

Submitted By:
Khushboo Rathi
Gurjeet Kaur
Structure Analysis
Structure analysis is a development method for
analysis of an existing system. It is a set of techniques
that allow the analyst to design the proposed system.
The main purpose of structured analysis is to
completely understand the current system.
Tools Of Structure Analysis
Data Flow Diagrams
Data Dictionary
Structured English
Decision Tables Process Specification

Decision Trees
Process Specification
The process specification defines what must be done in
order to transform inputs into outputs.
The methods available for documenting and analyzing
the logic of structured decisions include structured
English, decision tables, and decision trees.
To record detailed information about data processes,
process specification techniques are used.
These techniques specify the precise nature of decision
and specify the exact sequence of actions to be taken in
a particular process.
Techniques
The Process Specification techniques are:

Decision Tables

Decision Trees

Structure English
Decision Tables
Decision tables provide a way to examine, describe, and
document decisions using a table
Convenient to use in a program where a large number of
logical alternatives exist (i.e. assume that a process being
specified equates roughly to a program in the system). The
basic format of the decision table consists of four quadrants:

Condition stub Condition entry

Action stub Action entry


Decision Tables
Condition Stub: specifies values of the data we wish to test for

Condition Entry: specifies what the above values may be

Action Stub - specifies the actions that may be taken

Action Entry - shows the action or actions that will be performed


for each rule (in the condition entry). The columns are marked
with an 'X' opposite the action(s) to be taken
Scenario
A person should never go to work if it is raining in December. If
he does go to work, he should take an umbrella when it is raining
and an overcoat when it is windy. Unless it is windy he must
always take his hat when going to work. If it is windy in December
he should switch on his central heating. From this description we
can isolate six actions:

 Stay at home
 Go to work
 Take umbrella
 Take overcoat
 Take hat
 Switch on central heating
Example – Decision Table
Condition 1 2 3 4 5 6 7 8

Is it raining? Y Y Y Y N N N N
Is it December? Y Y N N Y Y N N
Is it windy? Y N Y N Y N Y N

Action
Stay at home X X X
X X X X X
Go to work X X
Take umbrella X
Take overcoat X
Take hat X
Switch on heating X X
Decision Trees
When a decision table is not too complex, it may be
presented graphically as a decision tree to help our
understanding of the logic.

Like decision tables, decision trees show how conditions


are related to actions.

However, the tree format shows how conditions are


combined to lead to a particular action. This is the only
advantage trees have over the more compact tables.
Decision Trees cont.
Decision trees:

 Usually drawn from un-optimised, limited entry decision tables.

 Often used in preference to decision tables where there are not too
many decision points and each action applies to only one case.

 A decision tree is written (and read) from left to right.

 It will have a list of actions recorded at the extreme right.


Decision Trees cont.
Work by recursively partitioning the data
based on input field values

Data partitions are called branches

Initial branch (root) split into subsets (child


branches) based on value of input field

Subsets can be further divided until process is


complete – terminal branches or leaves
Condition 2
-Action
(positive)
Condition 1
(positive) Condition 2 -Action
Title (negative)

Condition 1 Condition 2 -Action


(negative) (positive)
Condition 2 -Action
(negative)
Example – Decision Tree
Thank You

You might also like