composition

views updated

composition
1. (relative product) A method of combining functions in a serial manner. The composition of two functions f : X → Y and g : Y → Z

is the function h : X → Z

with the property that h(x) = g(f(x))

This is usually written as g ◦ f. The process of performing composition is an operation between functions of suitable kinds. It is associative, and identity functions fulfill the role of units.

If R denotes the set of real numbers and f : R→R, f(x) = sin(x) g : R→R, g(x) = x2 + 3

then f ◦ g is the function h: h : R→R, h(x) = sin(x2 + 3)

The idea of composition of functions can be extended to functions of several variables.

2. A subdivision of a positive integer n into parts a1, a2,… ak in which the ordering is significant and in which n = a1 + a2 + … + ak

where each ai is a positive integer. It is thus similar to a partition (see covering) but in a partition the ordering is not significant. In general the number of compositions of n is 2n–1.

3. A particular form of association between entities found in object-oriented approaches. The association is used to indicate a hierarchy of objects such that objects lower in the hierarchy are part of objects higher in the hierarchy. Thus the hierarchy indicates a component structure.

More From encyclopedia.com