Hacker News new | past | comments | ask | show | jobs | submit login

Yeah that makes sense of course. Should have specified "special function", was aiming at "algebraic" or "polynomial" I guess.

Then the answer seems to be no, right?

Edit: The abs() function seems to be enough, awesome:

https://math.stackexchange.com/a/1641271




The abs function works because it is equal to the maximum of x and -x.

The logical "and" and logical "or" functions are precisely particular cases of the minimum and maximum functions.

The so-called "exclusive or" function is simultaneously a particular case of addition and of subtraction, i.e. addition modulo 2 and subtraction modulo 2 are the same function. Therefore applying the 4 functions minimum, maximum, addition and subtraction to 1-bit numbers produces only 3 functions, AND, OR and XOR.

It makes no sense to search other functions for expressing logical "and" and logical "or" except for minimum and maximum, because this is what they are. The search could only find alternative more complicated ways to express minimum and maximum.

The minimum and maximum functions also work in logic systems with more than 2 values of truth. Also in hardware, analog circuits for minimum and maximum are one of the 2 ways of implementing the logical "and" and "or" functions, the other way being with series and parallel connections.

The main mistake of George Boole was his unsuccessful attempt to find an equivalence between logical "and" and "or" and integer multiplication and addition, because he was not habituated to use minimum and maximum, so he did not see the correct relationships.

The functions maximum and minimum are arithmetic functions as important as addition and subtraction. The only reason for which they have not been counted among the basic arithmetic functions is because when computed by a human they required much less effort than even addition, so there was no need for a long training of how to do computations with them, like for the more complex arithmetic functions.

Most modern instruction-set architectures now include maximum and minimum instructions, together with the addition and subtraction instructions.


That makes sense, thank you for your great reply.

As someone without much mathematical ropes, this might also be related to non-integer algebra and the distinction of "smooth" (edit: or differentiable) and discontinuous functions, no?

> The functions maximum and minimum are arithmetic functions as important as addition and subtraction. The only reason for which they have not been counted among the basic arithmetic functions is because when computed by a human they required much less effort than even addition


As I have mentioned, in the logic systems with 3 or more discrete values of truth (e.g. false, unknown and true, or false, unlikely, unknown, likely and true) and also in the logic systems with a continuous range of truth values (e.g. those based on probabilities), to the base logic functions AND, OR and NOT, correspond the base logic functions minimum, maximum and inversion a.k.a. reflection functions (the last may be e.g. integer negation when the truth values are symmetric around zero, or it may be e.g. 1-x when the truth values are between 0 and 1).

A set with minimum and maximum operations has a special algebraic structure named distributive lattice, which is a structure as useful and frequently encountered as structures like the algebraic groups and rings that characterize addition-like and multiplication-like operations.


It's interesting that maximum/minimum for disjunction/conjunction doesn't apply for probabilities, except when the probabilities "overlap as much as possible" (when at least one implies the other).

And when the probabilities overlap as little as possible, then the formulas are:

P(a or b) = min(1, P(A)+P(B))

P(a and b) = max(0, P(a)+P(b)-1)

I guess there is some lesson about logic and truth here, but I can't quite see it...


I really enjoyed reading this comment, thanks. I love the reason why min/max aren’t thought of as basic arithmetic building blocks (they’re too easy), it makes so much sense now you put it that way.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: