Set function (source code)

= Set function
{title2=$f:\mathcal P(V)\to\mathbb R$}

A <set function> assigns a value to each <set> in a specified family of <sets>. In finite optimization the usual form is $f:\mathcal P(V)\to\mathbb R$, a <real-valued function> on the <power set> of a <ground set> $V$.

For a <finite set> $V$, the rule $f(S)=|S|$ is a <set function> counting selected elements; $f(S)=\sum_{v\in S}w(v)$ instead totals their weights. A <measure> is also a <set function>, but its <domain of a function> is a specified collection of <measurable sets>, and its values can include infinity. The intended family and <codomain> are therefore part of the definition.