Which operation sequence is information-theoretically more efficient and effective?
Nvidia technical mcq question, verified with a worked answer. Free to practise - no sign-up.
Which operation sequence is information-theoretically more efficient and effective?
Show answer & explanation
Compression relies on identifying and removing redundancy (patterns) in data. Encryption is designed to produce ciphertext that appears as random noise (maximum entropy), which removes these patterns and makes subsequent compression mathematically impossible.
Step-by-step Derivation:
Step 1: Analyze Compression. Compression algorithms (like Huffman or LZ77) work by reducing the redundancy of a data stream. They require the data to have a non-uniform distribution of symbols to achieve a reduction in size.
Step 2: Analyze Encryption. A strong encryption algorithm (like AES) aims for 'ciphertext indistinguishability'. This means the output should be computationally indistinguishable from a random bitstring. In information theory, a random bitstring has maximum entropy.
Step 3: Evaluate Sequence A (Compress $\rightarrow$ Encrypt). The compressor removes redundancy from the plaintext. The resulting smaller file is then encrypted. The security of the encryption is maintained, and the storage/bandwidth benefit of compression is preserved.
Step 4: Evaluate Sequence B (Encrypt $\rightarrow$ Compress). The encryption process transforms the plaintext into a high-entropy sequence. Because the data now lacks detectable patterns or redundancy, the compression algorithm cannot find any sequences to shorten. The output size will be approximately equal to (or even slightly larger than) the input size.
Step 5: Conclusion. Sequence A is the only effective method for reducing data size while maintaining security.