Tertiary Arithmetics: Is it Possible?

  • Context: Graduate 
  • Thread starter Thread starter Uke
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
Uke
Messages
3
Reaction score
0
Is there any arithmetic operation with three operands (or arguments), such that it cannot be calculated by a sequence of common binary and unary operations? This is not a homework problem or anything like that, I am just curious.
 
Mathematics news on Phys.org
What precisely do you mean by 'arithmetic' here? Anyways, if you're simply talking about functions, then the answer is no, because you can encode a pair of numbers into a single number, and build your ternary function from the two binary functions:

1. Encode the first two numbers into a single number
2. Take the output of (1) and the third number, unpack (1) and compute the ternary function


An example of how to do the encoding would be to alternate taking digits from your two numbers. For example,

encode(12345, 678) = 1020364758

Incidentally, the word is 'ternary'