4 ms·
To be able to reversibly encode an N-trit ternary number into an M-bit binary number, the number of possible N-trit numbers must be less or equal to the number
by badmintonbaseba 2y ago
To be able to reversibly encode an N-trit ternary number into an M-bit binary number, the number of possible N-trit numbers must be less or equal to the number of possible M-bit binary numbers. Otherwise there would be two input ternary numbers that would map to the the same binary number (pigeonhole principle). Which means that 3^N <= 2^M.
3^N <= 2^M
log(3^N) <= log(2^M)
N*log(3) <= M*log(2)
log(3)/log(2) <= M/N
where M/N is the bits per ternary digit.