News for hackers. Stuff that matters.
Re:Shannon’s Source Coding Theorem (Foundations of Informati... by contravariant on Sunday June 18, 2023 @03:09PM (#36383315)
You don't need variable length you just need to send the data in bigger blocks. Count all 6^5n ways to throw 5 dice n times, order them lexicographically and send the index in 5nlog(6) bits, rounding up.

Your inefficiency is just the rounding error, which quickly becomes trivial. In theory some block sizes should even coincidentally be close to a whole number of bits.

There are no comments on this comment yet.