Partial function

from Wikipedia, the free encyclopedia

A partial function of the set by the set is a right unambiguous relation , that is, a relation in which each element of the set is assigned at most one element of the set . The concept of partial function is widespread in theoretical computer science , especially in computability theory .

The concept of partial function is a generalization of the concept of function . A function from to is understood to be a left-total , right-unambiguous relation, i.e. a relation in which each element of exactly one element of is assigned. Every function from to is in particular a partial function from to , namely a (left-) total partial function, but not vice versa. In this respect, the term partial function can be misleading. To express that a partial function is actually a function in the strict sense, one sometimes says that it is a total function . The difference between partial functions and (total) functions is: For partial functions holds true , for (total) functions holds true .

The domain of definition of the partial function is the set of all those elements from which an element from is assigned. A partial function is a function if and only if holds.

A partial function from to can be modeled as a function in two ways:

  1. as a function or
  2. as a function
The value ("undefined") must not be in .

Spellings

For “ is a partial function from to ” one writes: or , alternatively also , or . Not recommended are a. the notations as well as , because the former is defined as a (total) function and the latter is easy to be confused with, which means, however, that no (total) function is from to . However, like the former, this is generally not the case.

The spelling “ is undefined” or even “ ” is problematic because the expression is then not allowed. It is clearer to say " is undefined at the point " or as a formula " ".

Examples

  • The partial function is undefined at this point because division by is not permitted in the real numbers. One can educate
or

Applications

If an algorithm accepts inputs from the set and delivers outputs from the set , then it computes a partial function of after . The domain of this function is the set of all elements for which the algorithm returns a value. In order to deliver a value, it has to come to an end ( terminate ) with its calculation .

Individual evidence

  1. Technical University of Braunschweig Partial and total functions (PDF; 112 kB).
  2. a b Thomas Holder: partial map classifier , on: nLab, July 3, 2015