A Robot Walk and the Puzzle of Optimal Binary Encoding

How few bits does it take to send directions that occur with unequal frequencies?

チャンネル
3Blue1Brown
公開日
2026年6月10日
動画
1:02
読了時間
1 分
スライド
1
原文
英語
YouTube で開く
スクロールすると動画は右下に小さくなって再生を続けます。字幕は閲覧言語に合わせて切り替わります。
閲覧言語2 言語で読めます
この記事はまだ日本語に翻訳されていないため、英語の原文を表示しています。
要約

30 秒でわかる

3Blue1Brown poses a binary-encoding puzzle about a robot on a distant moon. The challenge is to find the most efficient encoding and prove it optimal, an introduction to Shannon entropy; the short does not provide the solution.

  1. 1Four directions, unequal frequenciesThe robot follows a biased random walk: up one half, down one quarter, and left and right one eighth each.
  2. 2Find an efficient codeEncode the instructions in binary while minimizing bits per instruction.
  3. 3Prove optimalityShow that no other encoding can improve on your answer; the video leaves the proof as a challenge.

ポイント

  1. The robot moves up half the time, down one quarter, and left or right one eighth each.
  2. The first challenge is to encode the instructions in binary using as few bits per instruction as possible.
  3. The second is to prove no other encoding can do better, leading toward Shannon entropy.
全文

チャプターごとに整えた全文を読む

文字起こしのみ
01

A robot on a distant moon

The robot can move in four directions with unequal frequencies.

Imagine I have sent a robot to a far-away moon, and we want to send it movement instructions from Earth. Each instruction is simple: step up, down, left or right.

The instructions make the robot follow a biased random walk. Half its movements are up, one quarter are down, and one eighth each are left and right.

02

The encoding challenge

Find the most efficient binary code and prove that it cannot be beaten.

Unequal probabilities for the four directions
スライド 1 / 1Unequal probabilities for the four directionsThe diagram shows the direction frequencies that the encoding must accommodate.

Here is the two-part puzzle. First, find the most efficient way to encode these instructions in binary, using as few bits per instruction as possible. For challenge mode, prove that your answer really is optimal: no other encoding can do better.

03

The connection to entropy

The puzzle is a first step toward Shannon entropy; the linked full video explains further.

If you can answer that, you have taken a first step toward reinventing Shannon entropy. The full video, the first in a series on the phrase “compression is intelligence,” explains the details. This short poses the question without giving the solution.

同じチャンネルの記事

スライド 20 枚40:44EN
3Blue1Brown· 2026年10月16日Grant Sanderson: There's never been a better time to go into mathGrant Sanderson, Constantin Kogler · 3Blue1BrownStudents fear AI has solved mathematics. Grant Sanderson argues the opposite: even if machines prove theorems better than we do, the institution of math stays valuable—and this is a rare moment when newcomers can reshape it.MathematicsAI for scienceHuman-AI Collaboration+2
スライド 29 枚51:55EN
3Blue1Brown· 2026年9月18日The last IMO problem AI could not solveGrant Sanderson · 3Blue1BrownGrant Sanderson walks through IMO 2025 Problem 6 — a tiling puzzle that frontier models missed — and the visual patience it takes to prove a construction is optimal.MathematicsAI researchReasoning & test-time compute+2
0:55EN
3Blue1Brown· 2026年7月24日The 64 Sugar Cubes Puzzle: Six Equal DistancesA 4×4×4 block has three colors; prove that six same-colored pairs share a distance.MathematicsEducation
スライド2:25EN
3Blue1Brown· 2026年6月12日How Shannon Measured the Entropy of EnglishA guessing game helped Claude Shannon estimate how much information English text contains, and why prediction is central to compression.MathematicsAI History
スライド 4 枚32:19EN
3Blue1Brown· 2026年6月7日Reinventing Entropy: Why Prediction Helps Compress LanguageA robot’s movement code leads from prefix-free encoding to Shannon information and the entropy of language.MathematicsScience Communication
0:48EN
3Blue1Brown· 2026年3月25日The Subset Sum Puzzle: Who Has a Winning Strategy?Choose ten integers from 1 to 100, then look for two different subsets with the same sum.MathematicsEducation