Unit -3 Part-2
Unit -3 Part-2
9.6
9.6
Constructing a Decision Table
• PART 1. FRAME THE PROBLEM.
– Identify the conditions (decision criteria). These are
the factors that will influence the decision.
• E.g., We want to know the total cost of a student’s
tuition. What factors are important?
– Identify the range of values for each condition or
criteria.
• E.g. What are they for each factor identified
above?
– Identify all possible actions that can occur.
• E.g. What types of calculations would be
necessary?
Constructing a Decision Table
• PART 2. CREATE THE TABLE.
– Create a table with 4 quadrants.
• Put the conditions in the upper left quadrant. One
row per condition.
• Put the actions in the lower left quadrant. One row
per action.
– List all possible rules.
• Alternate values for first condition. Repeat for all
values of second condition. Keep repeating this
process for all conditions.
• Put the rules in the upper right quadrant.
– Enter actions for each rule
• In the lower right quadrant, determine what, if any,
appropriate actions should be taken for each rule.
– Reduce table as necessary.
Example
• Calculate the total cost of your tuition this
quarter.
– What do you need to know?
• Level. (Undergrad or graduate)
• School. (CTI, Law, etc.)
• Status. (Full or part time)
• Number of hours
– Actions?
• Actions?
– Consider CTI only (to make the problem smaller):
• U/G
– Part Time (1 to 11 hrs.): $335.00/per hour
– Full Time (12 to 18 hrs.): $17,820.00
– * Credit hours over 18 are charged at the part-time rate
• Graduate:
– Part time (1 to 7 hrs.): $520.00/per hour
– Full time (>= 8 hrs.): $520.00/per hour
• Create a decision table for this problem. In my
solution I was able to reduce the number of rules
from 16 to 4.
Boolean Algebra
x× y = y × x
(2) x + (y + z) = (x + y) + z (associative axioms)
x × (y × z) = (x × y) × z
(3) x × (y + z) = (x × y) + (x × z)
x + (y × z) = (x + y) × (x + z) (distributive axioms)
(4) x + 0 = x x × 1 = x (identity axioms)
(5) x + x' = 1 x × x' = 0 (inverse axioms)
12
Laws of Boolean Algebra
• In addition to the laws given by the axioms of
Boolean Algebra, we can show the following laws
13
Exercise
Simplify the Boolean expression
(x' × y) + (x × y)
Solution: (x' × y) + (x × y)
= (y × x') + (y × x) (commutative)
= y × (x' + x) (distributive)
= y × (x + x') (commutative)
=y×1 (inverse)
=y (identity)
Thus (x' × y) + (x × y) = y 14
Boolean Notation
• This means that in effect we’ll be employing
Boolean Algebra notation.
• The truth tables can be rewritten as
15
Notational Short-cuts
We will employ short-cuts in notation:
16
Notational Short-cuts
Similarly, write the product of 3 terms as xyz
17
Reducing Boolean
Expressions
• Is this the smallest possible implementation
of this expression? No!
20
Karnaugh maps
• Easy to convert between truth table, K-map,
and SOP.
23
Rules for K-Maps
Rules to consider