Short Story ⟡ Informatics

The Mysterious Cup at Information Theory Cafe

The group discovers how their conversations follow Markov chain patterns and explores the limits of conversational memory.

  • #Markov chains
  • #state transitions
  • #transition probabilities
  • #memoryless property

"This cafe has a weird way of deciding the menu."

Riku showed his tablet with a troubled face. There was only a section called "Today's Recommendation" with no displayed choices.

"If you tap recommendation, it shows a different recommendation."

Yuki tapped it. "Matcha Latte" appeared. Another tap showed "Cafe Latte." Another tap returned to "Matcha Latte."

"Not random," Aoi observed.

"But I can't figure out the pattern either," Yuki tilted their head.

Aoi took out a notebook. "This might be a Markov chain."

"Markov...?"

"A type of state transition. Looking only at the current state, the next state is determined probabilistically."

Riku showed interest. "The past doesn't matter?"

"Right. Called the Markov property, or memoryless property. Only the immediately previous state matters."

Yuki started taking notes. "So this cafe's menu is..."

"'Matcha Latte' and 'Cafe Latte' are two states. From each, there's a set probability of transitioning to either one."

Aoi drew a diagram on the whiteboard.

Matcha Latte → Matcha Latte (0.3)
Matcha Latte → Cafe Latte (0.7)
Cafe Latte → Matcha Latte (0.6)
Cafe Latte → Cafe Latte (0.4)

"This is the transition probability matrix. It shows the probability of going to the next state from each state."

Riku tried it out. "Starting from Matcha Latte, if I tap 10 times, about 7 times it changes to Cafe Latte?"

"For one transition, yes. But long-term, it converges to a stationary distribution."

"Stationary distribution?" Yuki asked.

"After enough time, the probability of being in each state becomes constant. In this example, Matcha Latte is about 46 percent, Cafe Latte about 54 percent."

"How do you calculate that?"

Aoi wrote an equation. "The distribution π that satisfies πP = π. That's the stationary distribution."

Riku laughed. "So no matter what you start with, you end up with the same probabilities?"

"If the Markov chain is irreducible and aperiodic, yes."

"Irreducible?"

"You can reach any state from any other state. In this cafe example, you can transition both ways, so it's irreducible."

Yuki suddenly thought of something. "Is conversation also a Markov chain?"

Aoi was impressed. "Good intuition. Actually, in natural language processing, Markov models are used. The next word depends on the previous few words."

"But human conversation is more complex, right?" Riku pointed out.

"Yes. That's why higher-order Markov models or more complex models are needed. But the basic principle is the same."

Yuki operated the tablet. "Oh, finally Black Coffee appeared!"

"There was a third state," Aoi laughed. "The transition probability was low, so it took a while to reach."

Riku said with a serious expression, "Then is life also a Markov chain? From the current state, we transition probabilistically to the next state."

"Philosophical," Yuki said.

"But humans have free will. It's not determined only by probability," Aoi supplemented.

"What if we add free will to a Markov chain?"

"It becomes a controllable Markov process. Also called a Markov decision process."

The three decided on their orders. Yuki chose Matcha Latte, Riku chose Cafe Latte, Aoi chose Black Coffee.

"Our choices might be part of a Markov chain too," Yuki smiled.

"Or maybe we're rewriting the transition probability matrix," Aoi answered.

The cafe's tablet quietly waits for the next recommendation. Wandering silently through state space.