"Aoi-senpai, I have a question."
Yuki spread out yesterday's code from Mira in the notebook.
"How short can optimal codes get?"
Aoi showed a thoughtful expression. "Good question. Actually, there are mathematical constraints on code length."
At that moment, Mira arrived at the club room unusually early. She sat quietly and opened her notebook.
"Kraft inequality." Aoi wrote on the board. "Σ 2^(-li) ≤ 1. Where li is the length of each codeword."
"What does this mean?"
"A necessary condition for uniquely decodable codes. Without satisfying this inequality, you can't code."
Yuki attempted calculation. "Checking with yesterday's Huffman code..."
"1 codeword of 1 bit, 1 of 2 bits, 2 of 3 bits. So 2^(-1) + 2^(-2) + 2^(-3) + 2^(-3) = 0.5 + 0.25 + 0.125 + 0.125 = 1.0"
"Exactly 1!"
"Equality means a complete tree structure. Also called prefix-free code."
Riku tilted his head. "Prefix-free?"
"No code is a prefix of another code. That's why it's uniquely decodable."
Mira wrote an example in her notebook. "0, 01, 10 → ambiguous"
"When you see 0, you don't know if it's complete or part of 01," Aoi explained.
"But with 0, 10, 110?"
"Seeing 0 is definite. If 1 comes, wait for the next. 10 is definite, or 11 waits further. No ambiguity."
Yuki understood. "So shortest codes have constraints."
At that moment, Professor S. appeared at the club room.
"Everyone, you're having a good discussion. Kraft inequality determines code possibility."
"Professor," Aoi greeted.
"Codes exceeding theoretical limits don't exist. This is the boundary Shannon showed."
Mira said quietly. "Truth has limits."
Yuki was surprised. Mira spoke, which was rare.
"Truth has limits too?" Professor S. smiled. "Philosophical, Mira."
"Information theory's limits are also physical reality's limits," Aoi continued. "Thinking you can compress information infinitely is an illusion."
"But," Yuki said, "isn't the effort to reach those limits what advances technology?"
Professor S. nodded. "Exactly. Knowing limits clarifies what's possible and impossible."
Mira showed a new note. "Optimal is not always shortest. Sometimes redundancy saves truth."
"Optimal isn't always shortest. Sometimes redundancy protects truth..." Aoi read aloud.
"That's about error correction," Professor S. said. "In communication, we add redundancy intentionally. Perfect compression is vulnerable to noise."
Yuki pondered. "So conveying truth requires balance?"
"Yes. The tradeoff between efficiency and reliability. This is the core of communication theory."
Mira stood and drew a diagram on the whiteboard.
Compression ←―― Optimal point ――→ Redundancy
"The optimal point depends on the situation," Professor S. explained. "In noiseless environments, shortest codes. With noise, add redundancy."
Aoi supplemented. "That's why practical systems combine ZIP compression and error correction."
Yuki was convinced. "Understand theoretical limits, then make realistic choices."
Mira smiled. "You found it."
"Found what?"
"Truth beyond the shortest code. The bridge between theory and practice."
Professor S. said as he left, "Next, think about the Shannon limit."
Four remained in the club room. Mira's mystery gradually unravels.