## You are here

Homediscriminator function

## Primary tabs

# 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):=\left\{\begin{array}[]{ll}a&\textrm{if }a\neq b,\\ c&\textrm{otherwise.}\end{array}\right.$ |

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 operation $q$ on $A$ such that

$q(a,b,c,d):=\left\{\begin{array}[]{ll}d&\textrm{if }a\neq b,\\ c&\textrm{otherwise.}\end{array}\right.$ |

However, this generalization is really an equivalent 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 $t_{1},t_{2}:A^{3}\to A$ could also serve as discriminator functions:

$t_{1}(a,b,c):=\left\{\begin{array}[]{ll}b&\textrm{if }a\neq b,\\ c&\textrm{otherwise.}\end{array}\right.t_{2}(a,b,c):=\left\{\begin{array}[]{ll% }c&\textrm{if }a\neq b,\\ a&\textrm{otherwise.}\end{array}\right.$ |

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

$t_{1}(a,b,c)=t(b,a,c)\quad\mbox{ and }\quad t(a,b,c)=t_{1}(b,a,c),$ |

$t_{2}(a,b,c)=t(c,t(a,b,c),a)\quad\mbox{ and }\quad t(a,b,c)=t_{2}(a,t_{2}(a,b,% c),c).$ |

# References

- 1 G. Grätzer: Universal Algebra, 2nd Edition, Springer, New York (1978).
- 2 S. Burris, H.P. Sankappanavar: A Course in Universal Algebra, Springer, New York (1981).

## Mathematics Subject Classification

08A40*no label found*

- Forums
- Planetary Bugs
- HS/Secondary
- University/Tertiary
- Graduate/Advanced
- Industry/Practice
- Research Topics
- LaTeX help
- Math Comptetitions
- Math History
- Math Humor
- PlanetMath Comments
- PlanetMath System Updates and News
- PlanetMath help
- PlanetMath.ORG
- Strategic Communications Development
- The Math Pub
- Testing messages (ignore)

- Other useful stuff
- Corrections