Limits of Text Compression
- 44Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
Why is standard ASCII described as inefficient for text compression in the content?
Why is standard ASCII described as inefficient for text compression in the content?
44 questions
- 1
Why is standard ASCII described as inefficient for text compression in the content?
- A
It represents each character using fewer bits than its probability would justify
- B
It stores only the most common characters and omits the less common ones
- C
It assigns a different number of bits to every character, making the text difficult to decode
- D
It assigns eight bits to every character, even when some characters occur much more often than others
Correct answer
DIt assigns eight bits to every character, even when some characters occur much more often than others
Explanation
The content describes ASCII as using eight bits per character regardless of how frequently a character occurs. A variable-length encoding can use fewer bits on average by assigning shorter codes to common characters.
- A
- 2
What probability distribution governs the robot's movement instructions?
- A
Up has probability 21, down 41, and left and right each 81
- B
Up has probability 81, down 41, and left and right each have probability 21
- C
Up and down each have probability 41, while left and right each have probability 41
- D
Up has probability 21, left 41, and down and right each have probability 81
Correct answer
AUp has probability 21, down 41, and left and right each 81
Explanation
The example specifies that half the instructions are up, one fourth are down, and one eighth each are left and right. The instructions are also assumed to be independent.
- A
- 3
What is the main benefit of encoding each of the robot's four instructions with two bits?
- A
The most common instruction uses fewer bits, while every rare instruction uses the same number of bits
- B
The resulting stream is guaranteed to contain independent, equally likely bits
- C
The encoding reduces the average number of bits per instruction below one
- D
Every instruction can be decoded from a fixed-size chunk, though the differing frequencies are not exploited
Correct answer
DEvery instruction can be decoded from a fixed-size chunk, though the differing frequencies are not exploited
Explanation
With two bits per instruction, the receiver simply divides the stream into pairs. This straightforward fixed-length method does not take advantage of the unequal instruction probabilities.
- A
- 4
Which set of code words takes advantage of the robot instructions' unequal probabilities while remaining prefix-free?
- A
Up: 1; down: 11; left: 110; right: 111
- B
Up: 0; down: 01; left: 011; right: 111
- C
Up: 0; down: 10; left: 110; right: 111
- D
Up: 00; down: 01; left: 10; right: 110
Correct answer
CUp: 0; down: 10; left: 110; right: 111
Explanation
The proposed code assigns the shortest code, 0, to the most frequent instruction, up, and longer codes to less frequent instructions. No code word is a prefix of another.
- A
- 5
What is the average code length for the robot's prefix-free encoding 0,10,110,111, given the stated instruction probabilities?
- A
3 bits per instruction
- B
1.75 bits per instruction
- C
2 bits per instruction
- D
2.25 bits per instruction
Correct answer
B1.75 bits per instruction
Explanation
The average is 21(1)+41(2)+81(3)+81(3)=1.75 bits per instruction.
- A
- 6
How can the robot unambiguously decode a prefix-free stream of variable-length code words?
- A
It reads the entire stream and assigns each bit to the most frequent instruction
- B
It reads bits until the sequence it has received forms a complete code word, then starts decoding anew
- C
It divides the stream into chunks whose size is determined by the rarest instruction
- D
It uses the number of preceding instructions to decide where each code word ends
Correct answer
BIt reads bits until the sequence it has received forms a complete code word, then starts decoding anew
Explanation
Because no complete code word is the prefix of another, the receiver can stop as soon as it reaches a code word. It can then begin reading the next instruction.
- A
- 7
What condition prevents a code word from being mistaken for the beginning of a longer code word?
- A
All code words have the same length
- B
The most probable symbol receives the longest code word
- C
Each code word contains equal numbers of zeros and ones
- D
No code word is a prefix of any other code word
Correct answer
DNo code word is a prefix of any other code word
Explanation
In a prefix-free code, no code word is a prefix of another. This makes it possible to identify the end of each code word as soon as it is read.
- A
- 8
Why would assigning the code word 100 to a fifth robot instruction cause ambiguity?
- A
The new code word would make the instruction probabilities add up to more than one
- B
After receiving 10, the robot could not know whether it had completed down or was beginning the new instruction
- C
The first bit would be incompatible with every existing instruction
- D
The code word would have the same length as the code words for left and right
Correct answer
BAfter receiving 10, the robot could not know whether it had completed down or was beginning the new instruction
Explanation
The existing code word 10 represents down, and 10 is also the prefix of 100. On receiving 10, the robot would not know whether to stop or wait for another bit.
- A
- 9
In the binary-string diagram, what does assigning a code word such as 0 consume in a prefix-free code?
- A
Every string of a fixed length, regardless of its initial bits
- B
Only the single point representing 0, leaving all longer strings beginning with 0 available
- C
The region containing all strings that end with 0, which is half of the possible-string space
- D
The region containing all strings that begin with 0, which is half of the possible-string space
Correct answer
DThe region containing all strings that begin with 0, which is half of the possible-string space
Explanation
Every string beginning with 0 has 0 as a prefix, so those strings cannot be assigned to other code words. In the diagram, that region is half of the total space.
- A
- 10
How is the information content of an event with probability p defined in bits?
- A
log2p
- B
−log2p
- C
plog2p
- D
2−p
Correct answer
B−log2p
Explanation
The information content, or self-information, of an event is −log2p. Equivalently, it can be written as log2(1/p).
- A
- 11
Which event has more information content according to the definition −log2p?
- A
Either event, because information content is independent of probability
- B
An event with a lower probability
- C
The event whose probability is closest to one half, regardless of the other probability
- D
An event with a higher probability
Correct answer
BAn event with a lower probability
Explanation
As an event's probability decreases, −log2p increases. Unexpected or unlikely events therefore carry more information than highly expected events.
- A
- 12
What is the information content of an event that is certain to occur?
- A
It depends on how many other possible events there are
- B
0 bits
- C
An infinite number of bits
- D
1 bit
Correct answer
B0 bits
Explanation
For a certain event, p=1, so its information is −log2(1)=0 bits. No uncertainty is resolved by learning that it occurred.
- A
- 13
Why can the information content of a letter be a fractional number of bits even though actual bits are discrete?
- A
Fractional bits occur only when a code violates the prefix-free condition
- B
The probability of a letter is rounded to the nearest whole number before encoding
- C
Information is an abstract quantity computed from probability, while an actual code for a complete message uses whole bits
- D
A fractional information value means the letter is transmitted without being encoded
Correct answer
CInformation is an abstract quantity computed from probability, while an actual code for a complete message uses whole bits
Explanation
The value −log2p need not be an integer. It measures information at a continuous level of abstraction; an actual encoding of a complete message ultimately uses a whole number of bits.
- A
- 14
How does the content characterize information as a limit on compression when perfect compression is not possible?
- A
It gives the exact integer code length for every individual event
- B
It gives a lower bound on the average number of bits needed to encode messages
- C
It guarantees that every message can be compressed to fewer than one bit
- D
It specifies the maximum number of symbols that can appear in a message
Correct answer
BIt gives a lower bound on the average number of bits needed to encode messages
Explanation
Information content provides a lower bound on achievable compression when averaged over possible messages. A particular message's information value need not be an attainable integer code length.
- A
- 15
If the probability of a complete message is the product of the conditional probabilities of its successive symbols, what happens to its information when taking the negative logarithm?
- A
The message information becomes the product of the symbols' conditional information values
- B
The message information becomes the sum of the symbols' conditional information values
- C
The message information becomes the largest individual symbol information value
- D
The message information becomes the average probability of its symbols
Correct answer
BThe message information becomes the sum of the symbols' conditional information values
Explanation
The chain rule expresses a message probability as a product of successive conditional probabilities. Since logarithms turn products into sums, the message's negative log probability is the sum of the successive information values.
- A
- 16
Why does the robot's proposed compressed bitstream behave like random noise?
- A
The receiver chooses each bit after observing the preceding instruction
- B
Each next bit is an independent, equally likely 0 or 1 under the stated instruction distribution and code
- C
Each instruction receives a code word of the same length, making all bits dependent
- D
The code uses more zeros than ones, so the bits cancel out over time
Correct answer
BEach next bit is an independent, equally likely 0 or 1 under the stated instruction distribution and code
Explanation
Under the stated distribution and code, the first bit is equally likely to be 0 or 1; conditional on reaching later bits, each is also an independent fair choice. Thus the encoded stream is indistinguishable from independent fair bits.
- A
- 17
If all bit strings of length n are equally likely, what is the probability of any one of those strings?
- A
n−2
- B
n1
- C
2n
- D
2−n
Correct answer
D2−n
Explanation
There are 2n possible strings of length n. If they are equally likely, each has probability 2n1=2−n.
- A
- 18
What principle explains why shortening the code for one of a set of equally likely messages cannot improve the overall average code length?
- A
The shorter code claims more of the code space, forcing other messages into less efficient, longer codes
- B
The shorter code makes every other message more probable
- C
The shorter code eliminates the need to distinguish between the other messages
- D
The shorter code causes the messages to become statistically dependent
Correct answer
AThe shorter code claims more of the code space, forcing other messages into less efficient, longer codes
Explanation
A shorter code occupies more of the available prefix-free code space. For equally likely messages, saving space for one message forces other messages to use more space and longer codes, so equal-length codes are optimal.
- A
- 19
In the binary-string diagram, what does moving a message's code to a shorter string generally mean for the code space?
- A
It uses a larger region, leaving less space for other messages' codes
- B
It leaves the amount of available code space unchanged
- C
It uses a smaller region, making all other codes shorter as well
- D
It makes the message's probability equal to that of every other message
Correct answer
AIt uses a larger region, leaving less space for other messages' codes
Explanation
A shorter string is a prefix of more possible strings, so a prefix-free code must reserve a larger region for it. Other messages may then need longer codes to remain distinguishable.
- A
- 20
What does entropy measure for a symbol source whose symbols follow a given probability distribution?
- A
The average information content per symbol
- B
The total number of distinct strings in a message
- C
The probability that a message contains no repeated symbols
- D
The information content of the single most probable symbol
Correct answer
AThe average information content per symbol
Explanation
Entropy is the average of the symbols' information values under the distribution. It is calculated as H=−∑ipilog2pi.
- A
- 21
Which expression gives the entropy of a discrete distribution with symbol probabilities pi?
- A
∑ilog2pi
- B
−∑ipilog2pi
- C
−log2(∑ipi)
- D
∑ipi2
Correct answer
B−∑ipilog2pi
Explanation
Entropy is the probability-weighted average of information content: H=∑ipi(−log2pi)=−∑ipilog2pi.
- A
- 22
For the robot instruction distribution, what is the entropy and corresponding ideal average code length per instruction?
- A
1 bit per instruction
- B
3 bits per instruction
- C
2 bits per instruction
- D
1.75 bits per instruction
Correct answer
D1.75 bits per instruction
Explanation
The entropy is 21(1)+41(2)+81(3)+81(3)=1.75 bits per instruction. The proposed code attains this average for the distribution.
- A
- 23
How does entropy generally change when a fixed set of possible outcomes becomes more evenly probable?
- A
It remains fixed because the number of outcomes has not changed
- B
It decreases because each outcome carries less information
- C
It increases because the outcome is less predictable on average
- D
It becomes zero because all outcomes are equally probable
Correct answer
CIt increases because the outcome is less predictable on average
Explanation
A more even distribution creates greater uncertainty about which outcome will occur. Since less predictable outcomes carry more information on average, entropy increases.
- A
- 24
What happens to entropy when one outcome becomes overwhelmingly more probable than the others?
- A
Entropy becomes undefined because the probabilities are unequal
- B
Entropy increases because the rare outcomes carry more information
- C
Entropy stays maximal because the rare outcomes remain possible
- D
Entropy decreases because the outcome is highly predictable
Correct answer
DEntropy decreases because the outcome is highly predictable
Explanation
When one event dominates, the average outcome becomes predictable. The dominant event carries little information, resulting in lower entropy.
- A
- 25
For a uniform distribution, what is the effect of distributing probability across more possible symbols?
- A
Entropy becomes zero because no symbol is more likely than another
- B
Entropy decreases because each symbol receives a smaller probability
- C
Entropy remains unchanged because the probabilities still sum to one
- D
Entropy increases because each symbol is less predictable and the average information is higher
Correct answer
DEntropy increases because each symbol is less predictable and the average information is higher
Explanation
With a uniform distribution over more symbols, identifying the symbol requires more information. The total entropy is therefore higher.
- A
- 26
What does Shannon's noiseless coding theorem say about compression for a source with a fixed symbol distribution?
- A
A source can always be compressed to fewer bits than its entropy
- B
Every encoding must use exactly the entropy number of bits for each symbol
- C
No encoding can beat the entropy limit, and encodings can get arbitrarily close to it
- D
Only fixed-length codes can approach the entropy limit
Correct answer
CNo encoding can beat the entropy limit, and encodings can get arbitrarily close to it
Explanation
The theorem states that entropy is a lower bound on achievable compression and that it is possible to approach that bound arbitrarily closely. It does not require each individual symbol to use exactly its information value in whole bits.
- A
- 27
Why is entropy rate needed when analyzing a source such as natural language?
- A
An entropy rate measures the number of different alphabets in a language
- B
Entropy applies only to sources that produce a single message
- C
The probabilities of successive symbols depend on context and need not follow one identical distribution
- D
Natural language contains no symbols with measurable probabilities
Correct answer
CThe probabilities of successive symbols depend on context and need not follow one identical distribution
Explanation
For language, the probability of the next symbol depends on preceding context. Entropy rate generalizes the average-information question to such dependent sequences and averages over possible messages.
- A
- 28
What estimate did Shannon give for English when a human predictor had at least 100 preceding letters of context?
- A
About one bit per character
- B
About 100 bits per character
- C
About eight bits per character
- D
About one bit per word
Correct answer
AAbout one bit per character
Explanation
The content reports Shannon's estimate of approximately one bit per character when predictors had at least 100 preceding letters of context.
- A
- 29
What key assumption distinguishes the robot instruction example from natural language?
- A
The robot's instructions are always predictable, while language is always random
- B
The robot's instructions have no probabilities, while language symbols have fixed probabilities
- C
The robot's instructions are independent and follow the same distribution, while language symbols depend strongly on context
- D
The robot uses an alphabet of letters, while language uses only binary symbols
Correct answer
CThe robot's instructions are independent and follow the same distribution, while language symbols depend strongly on context
Explanation
The robot example assumes each instruction is sampled independently from the same distribution. In language, each next character's probability depends heavily on the preceding context.
- A
- 30
Why might probabilities produced by a language model not be identical to the true probabilities underlying natural language?
- A
The true probabilities of language are known exactly from any single sentence
- B
A model's estimated distribution is not automatically the same as the actual distribution of language
- C
A language model can assign probabilities only to characters that are equally common
- D
Model probabilities ignore all preceding context by definition
Correct answer
BA model's estimated distribution is not automatically the same as the actual distribution of language
Explanation
The content cautions that probabilities supplied by a model may differ from actual language probabilities. This distinction matters when estimating language's true compressibility.
- A
- 31
How can an n-gram approach estimate what character tends to follow a short context such as “th”?
- A
Choose the next character by compressing the context into a fixed two-bit code
- B
Use only the character that begins each book as the estimate
- C
Assign every possible following character the same probability without consulting text
- D
Count what characters follow that context in a collection of text and use the observed frequencies
Correct answer
DCount what characters follow that context in a collection of text and use the observed frequencies
Explanation
An n-gram approach scans text for a context such as “th” and records the characters that follow it. Those observed frequencies serve as estimates of the next-character probabilities.
- A
- 32
What is a major limitation of estimating longer-context probabilities using raw counts from a finite collection of books?
- A
Longer contexts always occur more often than shorter contexts
- B
The method assumes all characters in a book are independent
- C
Many possible longer strings may never occur in the collection, leaving no observed continuations for them
- D
Raw counts cannot be used to estimate the probability of any character
Correct answer
CMany possible longer strings may never occur in the collection, leaving no observed continuations for them
Explanation
As contexts become longer, many possible strings will be absent from the books being examined. Raw counts then provide no direct observation of what follows those unseen contexts.
- A
- 33
Why are long contexts especially relevant to estimating language's compressibility?
- A
Longer contexts remove the need to estimate symbol probabilities
- B
Longer contexts can make the next symbol more predictable, creating greater opportunity for compression
- C
Longer contexts make all possible messages equally likely
- D
Longer contexts guarantee that every next symbol has probability one
Correct answer
BLonger contexts can make the next symbol more predictable, creating greater opportunity for compression
Explanation
A long preceding context can provide strong clues about what comes next. Greater predictability means lower average information and greater potential compression.
- A
- 34
In Shannon's guessing experiment with Betty, what did a dash represent in the transcript?
- A
A letter that did not occur in the original text
- B
A letter Betty guessed incorrectly and Shannon chose not to record
- C
A letter Betty guessed correctly, which could be omitted because the context prompted her to supply it
- D
A space inserted to separate one word from the next
Correct answer
CA letter Betty guessed correctly, which could be omitted because the context prompted her to supply it
Explanation
Shannon recorded the correct letter when Betty guessed wrong, but replaced a correct guess with a dash. The reduced transcript relied on her ability to predict the omitted letters from context.
- A
- 35
What was the reasoning behind Shannon's reduced transcript in the guessing experiment?
- A
A suitable predictor could use the recorded corrections and context to reconstruct the omitted, predictable letters
- B
Any reader could reconstruct the original text from the dashes alone
- C
The omitted letters were unnecessary because they had zero probability
- D
The transcript was shorter because Shannon changed the original wording
Correct answer
AA suitable predictor could use the recorded corrections and context to reconstruct the omitted, predictable letters
Explanation
The idea was that a replica predictor, prompted by the reduced text, could reproduce the original by supplying the letters that context made predictable. This illustrated how predictability can enable compression.
- A
- 36
Why was Betty's guessing game a qualitative illustration rather than a definitive measurement of language information?
- A
The experiment involved only binary symbols rather than letters
- B
A person might not make the same guesses consistently, and the game did not directly measure probabilities
- C
The transcript contained more letters than the original text
- D
The method counted every possible sentence in English exactly
Correct answer
BA person might not make the same guesses consistently, and the game did not directly measure probabilities
Explanation
A person may guess differently when asked again, so the reduced transcript would not reliably prompt an exact replica in practice. The method illustrated predictability but was not yet a precise measurement of information.
- A
- 37
How did Shannon's later experiment improve on recording only whether a human guess was right or wrong?
- A
He recorded how many guesses were needed to find the correct next letter and related that to an implicit probability
- B
He asked predictors to guess whole books without seeing any context
- C
He measured only the total length of each completed paragraph
- D
He replaced human predictors with counts from one short book
Correct answer
AHe recorded how many guesses were needed to find the correct next letter and related that to an implicit probability
Explanation
In the later experiment, Shannon recorded the number of guesses required to reach the correct next letter and used a separate method to associate that count with an implicit probability.
- A
- 38
What role did human interviewees play in Shannon's study of language?
- A
They supplied a complete written table of every possible English sentence
- B
They converted each character directly into a fixed-length binary code
- C
They acted as black-box language models whose predictions revealed expectations based on context
- D
They served only to verify the spelling of words in a text corpus
Correct answer
CThey acted as black-box language models whose predictions revealed expectations based on context
Explanation
Shannon treated interviewees' brains as sophisticated but difficult-to-describe models that could predict characters from context. Their guesses helped probe the underlying structure of language.
- A
- 39
Why is an exact formula for the entropy of natural language difficult to obtain from a text corpus alone?
- A
A corpus contains no information about which symbols occur
- B
Every possible character sequence must be equally likely
- C
The entropy formula cannot be applied to sequences of characters
- D
The relevant probabilities depend on context, including contexts that may not appear in the corpus
Correct answer
DThe relevant probabilities depend on context, including contexts that may not appear in the corpus
Explanation
A corpus can provide observed statistics, but language probabilities depend on context, including long contexts that may be absent from the sample. Estimating entropy therefore requires a model of how language is produced and understood.
- A
- 40
How is large-language-model pre-training commonly described in the content?
- A
As fixed-length character encoding trained using squared error
- B
As image reconstruction trained using entropy rate
- C
As random bit generation trained without a loss function
- D
As next-token prediction trained using cross-entropy loss
Correct answer
DAs next-token prediction trained using cross-entropy loss
Explanation
The content says that the pre-training portion of large language model training is usually described as next-token prediction, using cross-entropy loss.
- A
- 41
What conceptual connection does information theory establish between prediction and compression?
- A
They are mathematically equivalent perspectives, so improving prediction can be viewed as improving compression
- B
They are unrelated processes because prediction concerns meaning and compression concerns storage
- C
Compression always destroys the information needed for prediction
- D
Prediction is possible only after a message has been fully compressed
Correct answer
AThey are mathematically equivalent perspectives, so improving prediction can be viewed as improving compression
Explanation
The content presents prediction and compression as two sides of the same coin. A model that assigns high probability to the next token can support an efficient encoding of that token.
- A
- 42
What is one way to reinterpret a language model's next-token pre-training objective using the prediction-compression connection?
- A
As learning to assign every token the same-length code
- B
As learning to create an efficient compressor for text
- C
As learning to maximize the number of bits in each message
- D
As learning to remove all contextual information from text
Correct answer
BAs learning to create an efficient compressor for text
Explanation
Because prediction and compression are mathematically connected, next-token training can be reframed as learning a model that enables efficient text compression.
- A
- 43
Why does the claim “compression is intelligence” require caution?
- A
Intelligence is difficult to define rigorously, even though compression theory is strongly relevant to AI
- B
Intelligence can be measured exactly by the length of any single message
- C
The claim proves that every compressor understands the meaning of its data
- D
Compression has no mathematical relationship to prediction or learning
Correct answer
AIntelligence is difficult to define rigorously, even though compression theory is strongly relevant to AI
Explanation
The content treats “compression is intelligence” as thought-provoking but difficult to assess because intelligence is ill-defined. A safer claim is that the mathematical theory of compression is highly relevant to artificial intelligence.
- A
- 44
What is the central reason cross-entropy is relevant to modern language-model training, according to the content?
- A
It guarantees that every token has an equal probability in the training text
- B
It converts every predicted token into a fixed eight-bit code
- C
It comes from information theory and is used as the loss for next-token prediction
- D
It measures only the number of distinct words in a training corpus
Correct answer
CIt comes from information theory and is used as the loss for next-token prediction
Explanation
Cross-entropy has roots in information theory and is commonly used as the loss in next-token prediction during language-model pre-training. The content highlights this connection between information theory and modern machine learning.
- A

Ask anything
We've read this whole study set, so questions about it get the best answers.