TAILIEUCHUNG - HandBooks Professional Java-C-Scrip-SQL part 135

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 135', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | ---- ------------------- ----- -------- ------ Suboptimal Huffman code table Figure Huffman Fixed-length Letter Frequency Code Code ------ ------- ----------- A 3 4 0 0 B 1 4 1 1 ------ ------- ----------- Using Huffman coding there is no way to assign theoretically optimal codes to characters with such a frequency Since the shortest possible Huffman code is one bit the best we can do is to assign a one-bit code to each character although this does not reflect the difference in their frequencies. In fact Huffman coding can never provide any compression at all with a two-character alphabet. However such a situation is handled very well indeed by arithmetic compression. To see how we will start by asking a fundamental question what is a bit Half a Bit Is Better than One A bit is the amount of information required to specify an alternative that has a frequency of 50 two bits can specify alternatives that have a frequency of 25 and so forth. For example the toss of a coin can result in either heads or tails each of which can be optimally represented by a one-bit code similarly if a chance event has four equally likely outcomes we can express each possible result most economically with two bits. On the other hand as we have seen in our discussion of Huffman codes we can have a number of alternatives that are not equally likely in that case we assign longer codes for those alternatives that are less likely. However the shortest possible code in Huffman coding is one bit which is assigned to an outcome with a frequency of one-half. The general formula for the optimal length of a code specifying a particular outcome with frequency f is log2 1f . In our previous examples an outcome with a frequency of .5 should have a code length of log2 1 1 2 or 1 bit. Similarly if an outcome has a frequency of .25 it should have a code length of log2 1 1 4 or two bits. But what if one of the possible outcomes has a frequency greater than one-half Logically we

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.