














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Exam; Professor: Pompei; Class: Prog+Problem Solving III; Subject: Computer Engr & Computer Sci; University: California State University - Long Beach; Term: Unknown 1989;
Typology: Exams
1 / 22
This page cannot be seen from the preview
Don't miss anything!















c) Assigning variable-length codes. i) Variable-length codes are assigned to values depending on how frequently the values occur. ii) Values that occur often (e.g. commonly used characters such as e and t) are given shorter codes, so they take up less space. iii) Huffman codes are an example of variable-length codes (fig. 6.2). a) The Huffman code determines the probabilities of each value occurring in the data set, and builds a binary search tree in which the search path for each value represents the code for that value. b) More frequently occurring values are given shorter search paths in the tree. c) This tree is then turned into a table, much like a Morse code table, that can be used to encode and decode the data.