Question: Consider the postings list h 4 , 10 , 11 , 12 , 15 , 62 , 63 , 265 , 268 , 270 ,
Consider the postings list h4,10,11,12,15,62,63,265,268,270,400i with a corresponding list of gaps h4,6,1,1,3,47,1,202,3,2,130i. Assume that the length of the postings list is stored separately, so the system knows when a postings list is complete. Using variable byte encoding: (i) What is the largest gap you can encode in 1 byte? (ii) What is the largest gap you can encode in 2 bytes? (iii) How many bytes will the above postings list require under this encoding? (Count only space for encoding the sequence of numbers.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
