Response to the following problem:
Generate a binary sequence of length L with P(0) = 0.8, and use the arithmetic coding algorithm to encode it. Plot the difference of the rate in bits/symbol and the entropy as a function of L. Comment on the effect of L on the rate.
Make sure you use enough details to support your answer.