discriminator function

Let A be a non-empty set. The ternary discriminator on A is the ternary operation t on A such that

t(a,b,c):={aif ab,cotherwise.

In other words, t is a function that determines whether or not a pair of elements in A are the same, hence the name discriminator.

It is easy to see that, by setting two of the three variables the same, t becomes a constant function: t(a,b,a)=a, t(a,a,b)=b, and t(a,b,b)=a.

More generally, the quaternary discriminator or the switching function on A is the quaternary operationMathworldPlanetmath q on A such that

q(a,b,c,d):={dif ab,cotherwise.

However, this generalizationPlanetmathPlanetmath is really an equivalentMathworldPlanetmathPlanetmathPlanetmathPlanetmath concept in the sense that one can derive one type of discriminator from another: given q above, set t(a,b,c)=q(a,b,c,a). Conversely, given t above, set q(a,b,c,d)=t(t(a,b,c),t(a,b,d),d).

Remark. The following ternary functions t1,t2:A3A could also serve as discriminator functions:

t1(a,b,c):={bif ab,cotherwise.    t2(a,b,c):={cif ab,aotherwise.

But they are really no different from the ternary discriminator t:

t1(a,b,c)=t(b,a,c) and t(a,b,c)=t1(b,a,c),
t2(a,b,c)=t(c,t(a,b,c),a) and t(a,b,c)=t2(a,t2(a,b,c),c).


  • 1 G. Grätzer: Universal AlgebraMathworldPlanetmathPlanetmath, 2nd Edition, Springer, New York (1978).
  • 2 S. Burris, H.P. Sankappanavar: A Course in Universal Algebra, Springer, New York (1981).
Title discriminator function
Canonical name DiscriminatorFunction
Date of creation 2013-03-22 18:20:58
Last modified on 2013-03-22 18:20:58
Owner CWoo (3771)
Last modified by CWoo (3771)
Numerical id 6
Author CWoo (3771)
Entry type Definition
Classification msc 08A40
Synonym switching function
Defines ternary discriminator
Defines quaternary discriminator