📝 Pastry identifier space (10 MCQs)
📖 From Data Communication and Networks • 29. Peer to Peer Paradigm • 10 questions available
What is Pastry identifier space?
Pastry identifier space assigns each node and object a unique 128-bit ID arranged in a base-2^b numerical space, where routing decisions are made by matching progressively longer prefixes of the destination ID to guide messages efficiently.
📝 All Pastry identifier space MCQs
Q1. In lossless compression, if a file is compressed using run‑length encoding and then decompressed, what can be inferred about the original data?
📖 Explanation: Because run‑length encoding and its inverse are exact inverses, the decompression restores every symbol exactly as it appeared before compression, guaranteeing that the reconstructed file matches the original byte‑for‑byte without any loss of information.
Q2. When comparing run‑length coding (RLE) and Huffman coding for a data stream that contains long sequences of the same symbol, which statement is most accurate?
📖 Explanation: RLE replaces each contiguous run of identical symbols with a count and the symbol itself, which is highly efficient when runs are long. Huffman coding builds a variable‑length prefix tree based on symbol frequencies and does not exploit run length directly, so RLE often compresses such data more effectively.
Q3. Given a set of symbols with known probabilities, which coding technique guarantees the minimum possible average code length?
📖 Explanation: Huffman coding constructs an optimal prefix code for a known probability distribution, ensuring that no other prefix code can achieve a lower average length. While arithmetic coding can approach the entropy even more closely, Huffman coding is provably optimal among all prefix‑free codes, making it the guaranteed minimum for that class.
Q4. A lossy image compression algorithm discards high‑frequency components during quantization. What is the most likely visual effect on the reconstructed image?
📖 Explanation: High‑frequency components correspond to rapid changes in intensity, such as edges and textures. Removing them smooths these variations, causing the image to appear less sharp and causing fine details to disappear, even though the file size is reduced.
Q5. Statement: 'Applying a lossless compression step after a lossy compression always reduces the final file size.' Which assessment is correct?
📖 Explanation: Lossless compression can further shrink data only if there remains redundancy after the lossy stage. Some lossy outputs are already near entropy‑limited, leaving little or no compressible pattern, so the additional lossless step may produce negligible gain or even a slight increase due to overhead.
Q6. To compress a data stream that alternates between long runs of identical symbols and highly varied symbols, which order of applying RLE and Huffman coding generally yields the greatest overall compression?
📖 Explanation: RLE first collapses long runs into count‑symbol pairs, creating a new symbol sequence with many repeated count symbols. Huffman coding can then efficiently encode this reduced alphabet, capturing any remaining statistical redundancy. Reversing the order would miss the opportunity to compress the runs themselves.
Q7. If arithmetic coding produces an average code length of bits per symbol for a source whose entropy is bits per symbol, what can be inferred about the coding efficiency?
📖 Explanation: Coding efficiency is defined as the ratio of source entropy to average code length. Here, , or about 93.75 %, indicating the arithmetic coder is close to optimal but not perfectly efficient, as some overhead remains.
Q8. For a text file containing many repeated substrings, which compression method typically achieves better size reduction?
📖 Explanation: Dictionary‑based methods like LZW build a table of previously seen substrings, allowing repeated patterns to be replaced by short references. This exploits the redundancy of repeated substrings more directly than run‑length or fixed‑length schemes, often resulting in superior compression for textual data.
Q9. In a distributed hash table that uses a 160‑bit identifier space, what is the probability that two randomly chosen node identifiers differ by at most ?
📖 Explanation: The total number of possible identifiers is . The set of identifiers within distance from a given point contains values. The probability that a second random identifier falls in that range is the ratio .
Q10. What does the abbreviation RLE stand for in the context of lossless compression?
📖 Explanation: RLE is the common shorthand for Run‑length Encoding, a simple lossless compression technique that replaces consecutive repetitions of the same symbol with a count and the symbol itself.