Chapter 3Elementary Discrete Mathslides.en.pdf:157-158

Functions: partial, total

Right-unique relations

Def 3.1Partial functionDef 3.2DomainDef 3.2Codomain
Concept

A function is a special kind of relation: fX×Yf \subseteq X \times Y where every
xXx \in X is paired with AT MOST one yYy \in Y (right-unique).

  • Partial function: ff defined on a subset of XX.
  • Total function: ff defined on ALL of XX (for every xXx \in X, exactly one yy).
  • Domain dom(f)\text{dom}(f): the set of inputs where ff is defined.
  • Codomain codom(f)\text{codom}(f): the set YY (the "type" of the output).
  • Range / image f(X)f(X): the actual outputs produced.

In SML: the expression fn x => x + 1 is a function. The expression 1 / 0 is undefined (partial).

Practice — score 100% to advance
Multiple choice
Q1
What is a partial function?
Q2
What's the difference between codomain and range?
Q3
Is f(n)=1/nf(n) = 1/n (on Z\mathbb{Z}) total or partial?
Q4
A function is a relation that is…
Q5
For f:ZZf: \mathbb{Z} \to \mathbb{Z}, f(n)=2nf(n) = 2n, the range is…
Loading…