Assessment function (formal languages)
In the theory of formal languages , a branch of theoretical computer science , an evaluation function maps the characters of an alphabet to natural numbers . The additive continuation to all words above the alphabet then becomes an evaluation of the words above the alphabet.
definition
Let it be an alphabet and a character evaluation. (Here 0 is also a natural number.) The associated word evaluation or evaluation function is :
Examples
- The length of the words provides an evaluation function.
- The constant null function provides an evaluation function; d. That is, if all characters receive the value 0, then the mapping continued in this way is an evaluation function.
- Be an -element alphabet. Then be defined by: . Obviously, the continuation of this figure again provides an assessment.
motivation
The context-sensitive languages are characterized by monotonous grammars . These are those that have the property that the left side of a rule is never longer than the right side. This property can be generalized with the help of evaluation functions.
Further applications can be found with the two-cellar machines .