1 / 16

Decision Tables - a brief overview

Decision Tables - a brief overview. Dr. Rogelio Dávila Pérez ITESM, Campus Guadalajara. Index. Definition Structure Steps to build a decision table Example Solution to the example Exercises. Decision Tables.

Télécharger la présentation

Decision Tables - a brief overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Decision Tables - a brief overview Dr. Rogelio Dávila Pérez ITESM, Campus Guadalajara

  2. Index • Definition • Structure • Steps to build a decision table • Example • Solution to the example • Exercises

  3. Decision Tables In the 50's General Electric, the Sutherland Corporation, and the United States Air Force worked on a complex file maintenance project, using flowcharts and traditional narratives, they spend six labor-years of effort but failed to define the problem. It was not until 1958, when four analysts using decision tables, successfully defined the problem in less than four weeks1. _____________________________________ 1Taken from “A History of Decision Tables” located at http://www.catalyst.com/products/logicgem/overview.html

  4. Definition Tables represent an easy way for humans to read, understand and execute complex procedures, particular policies, etc. A decision table is a useful tool that allows us: • To present decision procedures in a clear tabular form. • To understand complex logic expressed in traditional narrative form. • To check for inconsistencies verifying that every possibility was considered in the solution.

  5. Structure A decision table is typically divided in four areas: The conditions are decisions that depending on their values, define different states of affairs in the problem. Actions (effects, results, etc.) are operations or values that will be determined by particular circumstances.

  6. All possible combinations Conditions Actions Actions per combination (each column represents a different state of affairs)

  7. Steps to create a decision table • List all the conditions which determine which action to take. • Calculate the space of combinations. • Fill all combinations in the table. • Analyze column by column to determine which actions are appropriate for each combination. • Reduce the table by eliminating redundant columns.

  8. Example • Policy for charging charter flight costumers for certain in-flight services:2 If the flight is more than half-full and costs more than $350 per seat, we serve free cocktails unless it is a domestic flight. We charge for cocktails on all domestic flights; that is, for all the ones where we serve cocktails. (Cocktails are only served on flights that are more than half-full.) _____________________________________ 2Example taken form: Structured Analysis and System Specification, Tom de Marco, Yourdon inc., New York, 1979.

  9. List all the conditions that determine which action to take.

  10. Calculate the space of combinations

  11. Calculate the space of combinations1 • Number of Values to the power of the number of conditions with these values • If all conditions are simply Y/N values:2number of conditions • If 1 condition with 3 values and 3 with 2:31 * 23 = 24 • Or, use the values per condition and multiply each value down the column, e.g. 3*2*2*2=24 _____________________________________ 1Taken from Mariel de Wilde’s Decision Table Training Session

  12. Calculate the space of combinations Conditions in the example are 3 and all are two-valued ones, hence we have: All combinations are 23 = 8

  13. Fill all combinations in the table.

  14. Analyze column by column to determine which actions are appropriate for each combination

  15. Exercises • Subsidy policy for the cub scout pack3: The subsidy to the cub scout pack is based on number of scouts, rank, and length of membership. The subsidy for each scout is $25 for first-year members, $35 for second-year members, and $50 for scouts who have been members longer than two years. In addition to this base, each scout gets an extra subsidy of $10 if he has attained the rank of Wolf, $15 if he has attained the rank of Bear, and $20 if he has attained the rank of Lion – unless he does it in his first year, in which case he receives $70. _____________________________________ 3Example taken form: Structured Analysis and System Specification, Tom de Marco, Yourdon inc., New York, 1979.

  16. Exercises • Specify the following policy using a decision table: 1 A mailing is to be sent out to customers. The content of the mailing is about the current level of discounting and potential levels of discounting. The content is different for different types of customers. Customer Types A, B and C get a normal letter except Customer Type C, who get a special letter. Any customer with 2 or more current lines or with a credit rating of ‘X’ get a special paragraph added with an offer to subscribe to another level of discounting. _____________________________________ 1Taken from Mariel de Wilde’s Decision Table Training Session

More Related