-3
$\begingroup$

Suppose that C (or any computer language that is not binary code) language gets implemented in ternary computers. So we write a program in C, and compile the program using a compiler in ternary computers.

How would the complexity of the algorithms inside the programs change?

$\endgroup$

1 Answer 1

4
$\begingroup$

I assume that you mean a computer in which rather than the underlying data being made up of sequences of bits, the data are made up of, let's say, trits. I suspect that there would be no difference in any complexities whatsoever.

A ternary computer using trits can be trivially simulated by a quaternary computer using quats (I'm starting to enjoy these words). One quat carries exactly the same amount of information as two bits. It would therefore be impossible to speed up any operation on bits by more than a factor of 2 by changing them to quats. Constant factors do not change complexity, so no problems would become more or less complex.

If you need a more formal answer, I'd advise more formally defining your new model of computation.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.