chap binary trees when searching for an arbitrary valueit is only good for finding the maximum value howeverif we already know the index for an object within the heapit is simple matter to update its priority (including changing its position to maintain the heap propertyor remove it the remove method takes as input the position of the node to be removed from the heap typical implementation for priority queues requiring updating of priorities will need to use an auxiliary data structure that supports efficient search for objects (such as bstrecords in the auxiliary data structure will store the object' heap indexso that the object can be deleted from the heap and reinserted with its new priority (see project sections and present applications for priority queue with priority updating huffman coding trees the space/time tradeoff principle from section suggests that one can often gain an improvement in space requirements in exchange for penalty in running time there are many situations where this is desirable tradeoff typical example is storing files on disk if the files are not actively usedthe owner might wish to compress them to save space laterthey can be uncompressed for usewhich costs some timebut only once we often represent set of items in computer program by assigning unique code to each item for examplethe standard ascii coding scheme assigns unique eight-bit value to each character it takes certain minimum number of bits to provide unique codes for each character for exampleit takes dlog or seven bits to provide the unique codes needed to represent the symbols of the ascii character set the requirement for dlog ne bits to represent unique code values assumes that all codes will be the same lengthas are ascii codes this is called fixed-length coding scheme if all characters were used equally oftenthen fixed-length coding scheme is the most space efficient method howeveryou are probably aware that not all characters are used equally often figure shows the relative frequencies of the letters of the alphabet from this table we can see that the letter 'eappears about times more often than the letter ' in normal asciithe words "deedand "muckrequire the same amount of space (four bytesit would seem that words such as "deed,which are composed of relatively common lettersshould be storable in less space than words such as "muck,which are composed of relatively uncommon letters the ascii standard is eight bitsnot seveneven though there are only characters represented the eighth bit is used either to check for transmission errorsor to support extended ascii codes with an additional characters