# Re: Algorithm for fuzzy "OR" calculations?

Peter L. Montgomery (pmontgom@cwi.nl)
Mon, 2 Mar 1998 14:08:43 +0100 (MET)

In article <6cqulc\$hc0\$1@nnrp2.dejanews.com> bryce@albatross.co.nz writes:
>Does anyone have an algorithm for calculating a fuzzy 'OR' on x number of
>values, given the formula X OR Y = x+y-xy (as opposed to the more standard
>fuzzy definition of X OR Y = max(x,y).

>As an example, a OR b OR c can be calculated given the idea that <a OR b OR
>c> is like <<a OR b> OR c>, ie:

> "(a + b -ab) + c -(a + b -ab)c"
>or
> "a + b + c -ab -bc -ac +abc"

The value of (a OR b OR c) is 1 whenever at least
one of a, b, c is 1, regardless of the other values.
Look at the expression for 1 - (a OR b OR c), and try
to write it in an algebraicly equivalent way which
obviously vanishes when at least one of these is 1.
Your formula should also make it obvious that the ordering
of the inputs is unimportant: for example
(a OR b) OR c = (b OR c) OR a .
Generalize your formula to work when you have more than three values.

```--
Peter-Lawrence.Montgomery@cwi.nl    San Rafael, California

A mathematician whose age has doubled since he last drove an automobile.
```