What Is a Decision Table?
A decision table, also called a judgment table, is a table-like graphical tool, which is suitable for describing situations where there are many judgment conditions, each condition is combined with each other, and there are multiple decision schemes. A way to describe complex logic accurately and concisely, and associate multiple conditions with actions to be performed after these conditions are met. But unlike the control statements in traditional programming languages, decision tables can clearly show multiple independent conditions and multiple actions directly linked.
- A method of describing decision problems in the form of a table. This table is also called a decision matrix. The so-called decision table refers to a table that describes and expresses decision rules and knowledge information in the form of rows and columns. If the consequences of a decision problem are represented by the cost of a loss, this table is also called a loss matrix.
- The general representation of a decision table is as follows.
Action \ status | ||||||
---|---|---|---|---|---|---|
- In the decision table,
- The above decision table can be more generalized. On the one hand, the natural state of the decision result may be infinite, with certain compatibility or not directly observable, etc .; on the other hand, the decision consequences may have more general information meaning. For example: it is measured by a utility function, and the occurrence of consequences is not merely described in a probabilistic way, it has a more general nature of uncertainty and so on. The specific use can be flexibly used according to the actual situation. [1]
- The decision table is generally divided into 4 parts, see the figure below. Each condition corresponds to a variable, relationship, or prediction, and "candidate conditions" are all their possible values; actions refer to the process or operation to be performed; action entry refers to whether or according to the set of candidate conditions corresponding to the entry
- A Limited-entry Decision Table is the simplest form. Candidate conditions are
- The decision table can list all possible situations and clearly indicate the corresponding processing methods. Users do not need to consider the logical relationships to see what kind of actions correspond to what situations at a glance. Nested logical statements are much stronger. And a flat listing of all possible situations can also avoid omissions in the programming language because of the logical layering of layers, especially if the else part of the if-then-else structure is optional.
- Because of the important position of logic control in programming, the decision table becomes a very important tool when designing logic control.