1
$\begingroup$

Let us use 0 and 1 for the binary parallel.

You have 256 characters you need to reference, imagining a 256 character alphabet. You can only use a string to reference them that contains 0 and 1. The string can be any length, and your reference can have multiple levels of compression (as long as they would work for any combination of those 256 characters).

Is it possible to efficiently reference this 256 character alphabet this way?

$\endgroup$
3
  • 1
    $\begingroup$ This is not number theory, I'm afraid. I'm re-tagging. I'm not sure this is even on-topic; there is always math.stackexchange.com if this gets closed here. $\endgroup$
    – David Roberts
    Commented Jan 13, 2020 at 6:40
  • $\begingroup$ Thanks for the retag, I was super not certain of which category to put this in. $\endgroup$ Commented Jan 13, 2020 at 7:01
  • 2
    $\begingroup$ Your question is imprecise: what do you mean by "efficient"? However I feel there could be a good question with a clean answer behind the current formulation. If you want to ensure frequent characters are assigned a short string (e.g. for compression purposes), an important keyword is entropy. It gives a lower bound on the average length you can achieve. E.g. if the characters all have the same frequency, you cannot do better than encode them all with 8 bits. $\endgroup$ Commented Jan 13, 2020 at 8:30

1 Answer 1

1
$\begingroup$

Look at Huffman coding, arithmetic coding, or Lempel-Ziv(-Welch) coding depending on what you want to assume about the source.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .