An information source produces a long sequence of three independent symbols A,B,C with probabilities 16/20, 3/20, and 1/20 respectively; 100 such symbols are produced per second. The information is to be transmitted via a noiseless binary channel which can transmit up to 100 binary digits per second. Design a suitable compact instantaneous code and find the probabilities of the binary digits produced.

I need help with this question. For compact instantaneous code, I used the huffman's encoding. How do i find the probability of binary digits produced? Can someone help me please?

  • $\begingroup$ What have you tried so far? We won't give you the complete answer, but we can help you. What's your Huffman encoding? I suppose something like '0', '10' and '11' ? $\endgroup$
    – Ben
    Aug 31, 2022 at 16:08
  • $\begingroup$ i got 1, 01 and 00 for A,B and C respectively. Firstly i wanted to check if huffman is suitable for compact instantaneous code and for probability of binary digits, i'm brainstorming if it can be assumed similar to rolling a dice multiple times and getting the probability. It might help if you could give an idea how to approach it for second question. $\endgroup$
    – Nothing
    Aug 31, 2022 at 16:15
  • $\begingroup$ Ok, so 80% of time, the number '1' will be generated, 15% of the time the number "01" will be generate and 5% of the time the number "00" will be generated. So for a sequence of 100 symbols, you should generate 105 zeroes and 15 ones, right ? $\endgroup$
    – Ben
    Aug 31, 2022 at 17:23
  • $\begingroup$ since symbol A happens much more often than either B or C, it seems to me that you might want to do run-length encoding for A and when the run ends a two-bit encoding for B and C. $\endgroup$ Aug 31, 2022 at 18:56
  • $\begingroup$ What's the entropy of your process, i.e., what's the best compression you'll ever achieve? How close to it are you with your chosen Huffman encoding? $\endgroup$
    – TimWescott
    Aug 31, 2022 at 23:37


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.