How many k-ary functions are there for n-valued logic? And what are the formal language implications?

287 Views Asked by At

I believe the answer is n^n^k for any values n and k, where k=the number of arguments and n=the number of possible values that may be taken on. I just want to verify this, since I haven't been able to find this printed anywhere.

My follow up question is if the following is true: If the above equation is true, the basic rules of arithmetic (a total of four, counting addition, subtraction, multiplication, and division) are simply 4 out of the 10^10^2 possible functions. I get that there are algorithmic methods used in computer science to accomplish the basic arithmetic functions, but the assumption I usually gather from the text is that this is not the full truth of what arithmetic is (obviously, there are accuracy limitations of computer arithmetic, but leaving that aside...). However, just the opposite, truth tables seem to be the truest definition of a function, so the algorithmic methods are not messy or just 'half the picture' -- they are the true definitions themselves.

I don't want to sidetrack this post, but it would seem to follow from the above points that numbers are literally strings of characters. They are not merely represented by characters but have some 'true' concept in abstract; they are defined by nothing but the characters themselves. And if the previous paragraph was true, all of the functions we apply to numbers (arithmetic operators) are merely many-valued logical connectives on these individual characters, not the string of characters that we usually look at as 'a number'. We just have simple rules for when there is more than one character to work with (using things like carry values and lining up digits correctly).

1

There are 1 best solutions below

1
On

Yes $n^{n^k}$ is right. There are $n^k$ possible different inputs to a $k$-argument function, and each of those can give one of $n$ different outputs.

However, this:

My follow up question is this: If the above equation is true, the basic rules of arithmetic (a total of four, counting addition, subtraction, multiplication, and division) are simply 4 out of the $10^{10^2}$ possible functions.

is not right. First, such a single function can only tell how to (say) add single-digit numbers. If you have numbers with multiple digits, then you need to combine several applications of a single-digit adding functions, and how to combine them is as much part of how base-ten addition works as the underlying single-digit addition.

Second, a function that spits out a single digit can't even represent most single-digit addtions. If $f$ is addition, then what should $f(7,8)$ be? $15$, you say? But that is not one of the ten possible outcomes that gave you $10^{10^2}$. So you need something like separate functions for the first and second digit of the sum, and possibly something extra do deal with carries, and (as before) a description for how to plug it all together for multi-digit numbers. That can be written down, of course, but specifying base-10 addition of arbitrary integers is not as simple as writing down a 10-by-10 addition table.

And this:

it would seem to follow from the above points that numbers are literally strings of characters.

doesn't match how most mathematicians view things at all. True enough, there are mathematicians who take a position not far removed from that (in order to support a practical ultrafinitist viewpoint, perhaps), but even they need to be a bit more sophisticated than that and deal with the fact that we can represent numbers in other bases than base ten. We're pretty sure they behave identically in all bases, so they must be the same numbers no matter which base we represent them in. And then it begins to look very arbitrary and arrogant to declare that the base-ten representations are "what numbers really are" and the other representations are just stand-in for the true base-ten identity.

That's for integers. If we move to the real numbers, the idea that numbers are their decimal representations becomes even harder to maintain. Now it's not just quaint and arbitrary, but directly misleading: The idea that a number is its decimal representation lead people to believe falsehoods such as $0.999... \ne 1$ with great tenacity.