Partial Function

From GM-RKB
Jump to: navigation, search

A Partial Function is a Function that is not defined for all Elements in its Input Set.



References

2014

  • (Wikipedia, 2014) ⇒ http://en.wikipedia.org/wiki/partial_function#Total_function Retrieved:2014-4-21.
    • In mathematics, a partial function from X to Y (written as f: X ↛ Y) is a function f: X' → Y, where X' is a subset of X. It generalizes the concept of a function f: X → Y by not forcing f to map every element of X to an element of Y (only some subset X' of X). If X' = X, then f is called a total function and is equivalent to a function. Partial functions are often used when the exact domain, X' , is not known (e.g. many functions in computability theory).

      Specifically, we will say that for any x ∈ X, either:

      • f(x) = y ∈ Y (it is defined as a single element in Y) or
      • f(x) is undefined.
    • For example we can consider the square root function restricted to the integers  :[math]g\colon \mathbb{Z} \to \mathbb{Z}[/math]  :[math]g(n) = \sqrt{n}.[/math]

      Thus g(n) is only defined for n that are perfect squares (i.e. 0, 1, 4, 9, 16, ...). So, g(25) = 5, but g(26) is undefined.