Agnostic.com

7 3

X or y = 1 or zero

And(x,y) = xy
Not x = 1 - x
OR(x,y) = 1 - (1 - x) (1 - y)

From
A Programmer's Introduction to Mathematics
by Jeremy Kun

THHA 7 Apr 28
Share

Enjoy being online again!

Welcome to the community of good people who base their values on evidence and appreciate civil discourse - the social network you will enjoy.

Create your free account

7 comments

Feel free to reply to any comment by clicking the "Reply" button.

1

Fuzzy logic turns out to be very convenient for device control -- it is a convenient way of making continuous functions for that purpose. It is also rather easy to motivate. When does gray stop being black and start being white? One can describe medium gray as being 1/2 black and 1/2 white, with darker gray being more black and lighter gray being more white.

1

For fuzzy logic, one makes the variables go between 0 and 1. One also adds the axiom that all operations are monotonic, that they do not reverse direction as their argues increase or decrease. Thus, for increasing args, conjunction and disjunction are always either increasing or constant, and negation is aways either decreasing or constant.

One uses the commutative, associative, identity, annihilator, negation-inversion, involution, and DeMorgan-inversion axioms, but one finds that only some of the other axioms hold. If the distributive axiom holds, that implies the absoprtion axiom, and in turn, the idempotence axiom. Thus, breaking idempotence means breaking absoprtion, and in turn, breaking distributivity.

From idempotence and monotonicity, there is a rather simple proof that the only solution is (and = min) and (or = max). Meaning that all other fuzzy-logic versions of conjunction and disjunction will not be distributive. But at least for a common version of negation, (not x) = 1 - x, minmax fuzzy logic violates non-contradiction and excluded middle.

The alternate minmax fuzzy logic that I've mentioned, (x and y) = max(x+y-1,0) and (x or y) = min(x+y,1) along with (not x) = 1 - x, satisfied non-contradiction and excluded middle, though not distributivitity.

1

Crisp logic, or Boolean algebra, satisfies several axioms. Here goes:

  • Commutativity: x and y = y and x ... x or y = y or x
  • Associativity: (x and y) and z = x and (y and z) ... (x or y) or z = x or (y or z)
  • Distributivity: x and (y or z) = (x and y) or (x and z) ... x or (y and z) = (x or y) and (x or z)
  • Identity: x and 1 = x ... x or 0 = x
  • Annihilator (zero): x and 0 = 0 ... x or 1 = 1
  • Absorption: x and (x or y) = x or (x and y) = x
  • Idempotence: x and x = x or x = x
  • Negation inversion: not 0 = 1 ... not 1 = 0
  • Involution (self-inversion): not (not x) = x
  • DeMorgan inversion: not (x and y) = (not x) or (not y) ... not (x or y) = (not x) and (not y)
  • Non-contradiction and excluded middle: x and (not x) = 0 ... x or (not x) = 1

Notice the remarkable symmetry between conjunction and disjunction, between "and" and "or".

1

That is only one way of expressing these functions. Here are some other ways that work:

AND(x,y) = min(x,y)
OR(x,y) = max(x,y)

AND(x,y) = max(x+y-1,0)
OR(x,y) = min(x+y,1)

In fact, there are an infinite number of such formulas that are possible for doing crisp logic, as it may be called, formulas not only for conjunction, AND, and disjunction, OR, but also for negation, NOT.

Crisp logic? That is traditional mathematical logic, as opposed to fuzzy logic, where the truth variables can have any numerical value between 0 and 1.

0

Boolean algebra!

3

Alternatively, you can avoid the parentheses by using:

OR(x,y) = x - xy + y

That is even better!

0

My brain hurts

It shouldn't, this is really just elementary High school algebra, don't let the AND, OR, and NOT intimidate you.

@THHA I did pass "O" level maths many years ago and in my working life I used arithmetic, geometry and trigonometry, but algebra ? don't think so.

Write Comment
You can include a link to this post in your posts and comments by including the text q:338871
Agnostic does not evaluate or guarantee the accuracy of any content. Read full disclaimer.