Anagrams, but where you can break apart letters: "Anagraphs"

Anagrams, but where you can break apart letters: "Anagraphs" — suckerpinch

suckerpinch

AI-assisted summary of Anagrams, but where you can break apart letters: "Anagraphs" — original source. Check the original for full context.

Source published:

Key ideas

  • Tom Murphy VII generalizes anagrams into 'anagraphs' by decomposing characters into reusable sub-letter atomic components like stems, dots, hooks, and primitives. (5:14)
  • Words are encoded as multisets of atomic shapes, allowing direct matching and recursive subset searches to identify multi-word transformations like 'YouTube' into 'rocketry' or 'fun alone'. (6:41)
  • The generalized kerning problem under arbitrary rewrite rules is mathematically undecidable, although restricted anagraph models with fixed atomic decompositions remain solvable. (10:01)
  • Decomposition rules with ambiguous alternatives create infinite scrap loops, producing surplus pieces out of thin air unless strictly constrained. (8:52)

Detailed notes

## Background Published on YouTube by suckerpinch on December 18, 2017, this video explores several generalizations of traditional anagrams. The creator demonstrates how breaking apart and rotating physical or typographic letterforms leads to a new computational system called "anagraphs."

## TL;DR Frustrated by the rigid constraints of standard word anagrams, suckerpinch investigates what happens when letters can be physically rotated, sliced, and broken down into their fundamental typographic components. To systematically test this idea, he constructs a custom font engine and develops an algorithm that treats words as multisets of geometric atoms, allowing complex phrases like "YouTube" to be cleanly rewritten into pairs like "fun alone" or "rocketry." Along the way, he navigates the dangers of infinite decomposition loops and the mathematical undecidability of arbitrary rewriting rules, before concluding with animated transitions and pixel-level deconstructions designed primarily for comedic insults.

## Atmosphere & style The presentation is dry, playful, and relentlessly nerdy, moving seamlessly between hands-on tinkering and rigorous theoretical computer science. Suckerpinch's narration blends deadpan observational humor—exemplified by digressions criticizing font-design conventions and rants about the popular misuse of the word "inception"—with genuine computational ambition. Watching it feels like looking over the shoulder of a brilliant, slightly obsessive engineer who is happy to build an entire bespoke font engine just to make a sophisticated wordplay joke.

## Bulletin - [05:14](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=314s) Tom Murphy VII generalizes anagrams into 'anagraphs' by decomposing characters into reusable sub-letter atomic components like stems, dots, hooks, and primitives. - [06:41](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=401s) Words are encoded as multisets of atomic shapes, allowing direct matching and recursive subset searches to identify multi-word transformations like 'YouTube' into 'rocketry' or 'fun alone'. - [10:01](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=601s) The generalized kerning problem under arbitrary rewrite rules is mathematically undecidable, although restricted anagraph models with fixed atomic decompositions remain solvable. - [08:52](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=532s) Decomposition rules with ambiguous alternatives create infinite scrap loops, producing surplus pieces out of thin air unless strictly constrained.

## Key takeaways - [00:02](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=2s) Traditional anagrams are constrained by discrete letter identities, but physical letters naturally invite rotations and flips such as M to W or p to d. - [00:02](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=2s) Destructive letter modifications require strict conservation of plastic fragments, where scraps cut from one letter must be repurposed elsewhere. - [02:06](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=126s) Standard typographic font design starting with 'Hamburgevons' biases typography toward 'H fonts' rather than representative statistical distributions. - [02:06](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=126s) Lowercase characters decompose into recurring geometric atoms, including ticks, dots, hooks, and un-decomposable primitives like c, e, o, r, and s. - [05:14](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=314s) A custom vector font engine was required to keep decomposed atomic fragments proportionally consistent across arbitrary glyph compositions. - [05:14](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=314s) The term 'anagraph' combines 'anagram' with the acronym RAF (Rotate And Pluck Fragments) to distinguish sub-letter permutations from stereoscopic anaglyphs. - [06:41](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=401s) Anagraph resolution functions via canonical multiset signatures, allowing recursive dictionary search for valid single- and multi-word subsets. - [06:41](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=401s) Popular usage of 'inception' to describe recursion or nesting is a misnomer, as the word and film refer specifically to seeding or originating an idea. - [08:52](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=532s) Ambiguous rewrite rules introduce cyclical non-determinism, enabling infinite generation of surplus component scraps. - [10:01](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=601s) The generalized kerning transformation problem is formally undecidable, leading Murphy to separate the rigorous 51-minute mathematical proof into a companion video. - [10:01](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=601s) Enforcing a unique atomic decomposition per glyph preserves decidability and keeps practical computational search tractable. - [10:51](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=651s) Collision-avoidance trajectory pathfinding for moving glyph fragments was bypassed to avoid prohibitive animation engineering overhead. - [10:51](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=651s) Deconstructing characters further into raw pixel grids maximizes the anagram search space, simplifying the generation of arbitrary phrases and comedic insults.

## Detailed walkthrough ### [00:02](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=2s) Physical Letter Limits, Rotations, and Cutting Plastic

Anagrams are fundamentally about rearranging the letters of a word to form new words, but practicing anagrams with physical plastic letters quickly reveals the limitations of simple permutations. In the real world, you naturally want to manipulate letters more freely—specifically by rotating or flipping them upside down. For instance, the letters in "béchamel" can be rearranged into "chewable" by flipping an `M` upside down to produce a `W`. Among English capital letters, `M` and `W` represent the only viable flip pair. Shifting to lowercase letters provides a few more rotational pairs: flipping turns a `p` into a `d`, an `n` into a `u`, and a `b` into a `q`.

Beyond mere rotation, physical letterforms invite destructive modification. An uppercase `E` closely resembles an `F`, differing only by its bottom horizontal stroke. By physically slicing off that lower plastic bar—analogous to cutting the horn off a unicorn to yield a horse—you produce an `F`. However, strict anagramming rules forbid simply throwing away leftover scraps. A leftover plastic fragment must be repurposed, such as transforming an `F` into an `A` or an `O` into a `Q`. Because English contains very few words featuring both `E` and `Q`, finding valid matches under this exact rule is rare, though one solution resolves nicely: modifying "hogwash" into "come on for hoodoo gods."

- Rotating pairs in capital letters: `M` $\leftrightarrow$ `W`. - Rotating pairs in lowercase letters: `p` $\leftrightarrow$ `d`, `n` $\leftrightarrow$ `u`, and `b` $\leftrightarrow$ `q`. - “Unless you tolerate rotting walls when making anagrams, you should allow rotating letters.”

---

[02:06](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=126s) Typographic Deconstruction and the "Hamburgevons" Rant

To systematically exploit letter shapes, lowercase letters are much more fertile ground than uppercase letters because their constituent forms share many recurring sub-elements. In traditional type design, typographers start designing a typeface using the sample word "Hamburgevons" (or "Hamburgefonts") under the rationale that these characters encompass nearly all fundamental design motifs needed across the entire alphabet. suckerpinch strongly objects to this standard pedagogical tool, arguing that starting with `H` inherently forces the design of the entire font to become an "H font" rather than allowing varied exploration.

suckerpinch points out how suspicious the test phrase is: it embeds the word "hamburger" alongside "font," which reflects the exact obsession of typographers rather than a neutral, statistically balanced letter set like *Wheel of Fortune*'s `R-S-T-L-N-E`. Instead, suckerpinch suggests substituting "tofu" for "font" to create "tofuburger," since the letter shapes match closely anyway.

Letter decomposition breaks down common typographic forms into interchangeable geometric components: - A lowercase `b` splits into an `l` (vertical stem) and an `o` (counter/bowl). Recombining an `l` and an `o` yields not just `b`, but also `d`, `p`, and `q`. - The letter `l` can be bisected into two vertical pieces, each equivalent to the vertical bar of an `i` (a stroke height). - The dot (tittle) of an `i` functions as an independent component that is also shared with `j`. - A hooked tail completes a `j`, a motif that also recurs in letters like `f`. - Complex glyphs like the stacked two-story `g` can be swapped for a simpler single-story schoolbook `g`, which decomposes neatly into a `j` hook, a stem, and a `c` shape. - Certain letters resist breakdown and remain primitive: `c`, `e`, `o`, `r`, and `s`. While one might attempt to build an `s` out of curved `c` fragments, it scales poorly and ends up disproportionately large.

```mermaid flowchart TD accTitle: Typographic Letter Decomposition accDescr: Diagram illustrating how letters decompose into reusable atomic shapes like ticks, hooks, dots, and primitives.

subgraph Primitives["Atomic Pieces"] DOT["dot (·)"] TICK["tick (vertical bar / stem)"] HOOK["hook (curved tail)"] C_SHAPE["primitive: c"] O_SHAPE["primitive: o"] end

subgraph Assembly["Composed Letters"] I["i = dot + tick"] L["l = tick + tick"] J["j = dot + tick + hook"] B["b / d / p / q = l + o"] G["schoolbook g = c + tick + hook"] end

DOT --> I TICK --> I TICK --> L DOT --> J TICK --> J HOOK --> J L --> B O_SHAPE --> B C_SHAPE --> G TICK --> G HOOK --> G ```

- Final atom inventory: primitive glyphs `c`, `e`, `o`, `r`, `s`, and component fragments `dot`, `tick`, and `hook`. - “I actually think that the letter that you start drawing first has such a big impact on the design of the font, which I guess the whole point of this, that you shouldn't always start with the letter H, otherwise you're only gonna get H fonts.”

---

[05:14](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=314s) Custom Font Engine, Kerning Pairs, and Coining "Anagraph"

Because off-the-shelf fonts do not guarantee that reassembled components maintain consistent proportions across different glyphs (for example, constructing a `y` out of standard pieces might leave it awkwardly tall), suckerpinch built a dedicated, computational font editor. In this custom tool, letterforms are designed directly out of atomic shapes ("atoms"). Altering an underlying atom immediately updates every letter in the font where that atom appears.

A major development hurdle was kerning: the system initially lacked spacing correction, resulting in visually jarring text. Fixing it required dedicating an entire afternoon to writing spacing logic and manually fine-tuning kerning distances across all $26^2 = 676$ letter pairs.

With the glyph metrics established in memory, a new terminology was needed. Standard "anagram" only implies reordering whole characters, while "anaglyph" already designates stereoscopic 3D images with red/cyan filters. To describe this new system, suckerpinch coined the portmanteau **Anagraph**: combining **anag** (from anagram) and **raf** (an acronym for *Rotate And Pluck Fragments*).

- Anagraph breakdown example for the word **YouTube**: - $1 \times \text{c}$ - $1 \times \text{e}$ - $1 \times \text{o}$ - $3 \times \text{r}$ - $8 \times \text{ticks}$ - $1 \times \text{hook}$ - “Generalized kerning is more interesting computationally than you might think.”

---

[06:41](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=401s) Generating Anagraphs, Multi-Word Subsets, and the Inception Digression

The anagraph generation algorithm treats words as multisets of atomic shapes. By decomposing a target word into its atoms, sorting those atoms, and encoding them into counts, each word receives a canonical signature. Any other word sharing that exact count vector is an anagraph; for example, the atomic signature of **YouTube** identically matches that of **rocketry**.

To solve for multi-word phrases, the generator checks whether the atomic signature of a dictionary word forms a strict subset of the target pool. Subtracting the constituent atoms of the word **fun** ($2 \times \text{r}$, $5 \times \text{ticks}$, $1 \times \text{hook}$) from **YouTube** leaves behind the exact set of atoms required to form the word **alone**, proving that "fun alone" is a valid multi-word anagraph of "YouTube." The engine searches through every subset match recursively until the atom pool is empty.

This mention of recursion triggers an impassioned rant about the persistent misuse of the word *inception* in popular culture. Christopher Nolan’s film *Inception* portrays nested dreams, which led mainstream internet culture to use "inception" as a synonym for recursion, nesting, or induction. suckerpinch points out that this is an outright misuse of ordinary English: *inception* means creation or beginning. Within the plot of the film, characters infiltrate dreams specifically to plant an idea into a subject’s subconscious so they believe they originated it themselves—that act of seeding an idea is the inception, not the nesting of dreams.

- “Inception, the word inception, does not mean recursion or nesting or induction... it's a normal English word, it means creation or beginning, and in the movie it's used in exactly the normal sense of that word and it's not subtle or subtext at all.”

---

[08:52](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=532s) Non-Deterministic Decomposition and the Infinite Scrap Loophole

A core assumption of the generation algorithm is that every letter possesses a single, unique atomic decomposition. If an alphabet allows multiple ambiguous decomposition rules, the algorithm breaks, and formal language paradoxes arise. For example, consider a set of rules where: 1. A `b` can be split into $l + o$. 2. A `b` can alternatively be split into $l + c$. 3. An `o` can be split into $c + c$.

Under these rewrite rules, an infinite resource leak appears:

$$\text{b} \xrightarrow{\text{Rule 1}} \text{l} + \text{o} \xrightarrow{\text{Rule 3}} \text{l} + \text{c} + \text{c} \xrightarrow{\text{Rule 2}} \text{b} + \text{c}$$

By taking a `b`, expanding it into `l` and `o`, unpacking `o` into two `c` pieces, and recombining one `c` with the `l` to reform `b`, you return to the starting state while leaving behind an extra, newly created `c`. Repeating this loop produces an infinite quantity of surplus letters out of thin air. Consequently, allowing ambiguous or cyclic decomposition rules without strict constraints makes the puzzle computationally unfeasible or non-terminating.

- “I could just keep doing that to create an infinite number of leftover C's, so I have to be careful about what rules I actually allow if I want this problem to be easily solvable.”

[10:01](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=601s) The Kerning Problem and Undecidability

Tom Murphy VII (suckerpinch) introduces what he calls the "kerning problem" in the context of letter manipulation and anagrams. He reveals that this problem is mathematically undecidable: given arbitrary replacement or merging rules, no general computer algorithm can ever determine whether one word can be transformed into another word. Recognizing how surprising this theoretical result is, he originally intended to explain the full proof in this video. However, his self-described "editorial board" vetoed the idea on the grounds that it was far too boring for a brisk, ten-minute video. Instead, he spun off the full technical breakdown into a separate 51-minute video that functions as a blend of a rigorous computer science lecture and a sleep aid for anyone who wants to dive deep into the formal details.

In that extended video, he also proves that the "anagraphing" problem itself actually remains solvable, even when dealing with rewrite rules that produce potentially infinite cycles. For his practical implementation here, the challenge is simplified because every letter was constructed explicitly from discrete geometric "atoms." Because each letter has a single, unique atomic decomposition, checking and matching pieces becomes straightforward.

- Arbitrary rewriting rules make the general kerning problem computationally undecidable, meaning no algorithm exists that can decide word transformation in all cases. - The technical explanation was offloaded to a 51-minute companion video serving as a computer science lecture/sleep aid. - In contrast to general rewrite systems, anagraphing remains decidable even under rules permitting infinite derivations. - Because suckerpinch built each letter from explicitly defined atoms, each letter has a fixed, unique decomposition that avoids computational complexity in his project.

As suckerpinch puts it: “That problem is actually unsolvable in the sense that with arbitrary rules there's no computer program that could tell whether one word can be kerned into another word using those rules.”

[10:51](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=651s) Animating Transitions and Pixel-Level Anagraphs

Once valid pairs of anagraphs are found, the pieces must be animated to move from the source word into the target word. suckerpinch notes that he could have easily spent an entire additional day fine-tuning collision avoidance algorithms to prevent the moving letter fragments from overlapping, describing it jokingly as a kind of "self-driving characters problem." Ultimately, he decided against burning endless time on collision pathfinding because the simpler animation already looked acceptable and he didn't want to "die of old age while working on this video."

Reflecting on the practical applications of anagraphs, he observes that the ultimate purpose of this technology is almost exclusively comedic slander: rearranging names or words into insults. Finding insulting anagrams becomes vastly easier if letters are broken down into something even more fundamental than vector shapes—namely, raw pixels. To illustrate this concept, he ends the video with animations breaking down words down to pixel grids to spell out insults, including roasting the letter "S" as a "garbage letter" before morphing into playful closing sequences accompanied by music.

- Polishing the transitions to prevent overlapping letter fragments was skipped to avoid an endless rabbit hole of character collision avoidance. - Suckerpinch identifies the primary utility of letter-splitting technology: rearranging names into unflattering insults. - Decomposing characters into individual pixels drastically expands the search space, allowing nearly any source word to morph into harsh phrases.

As suckerpinch humorously observes: “By the way I realized the main use of this technology is to malign things by rearranging their names into something unflattering and it's a lot easier to find unflattering things if we break down letters into something even more primitive than these shapes like say pixels.”

## Notable quotes > [06:41](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=401s) Inception, the word inception, does not mean recursion or nesting or induction... it's a normal English word, it means creation or beginning, and in the movie it's used in exactly the normal sense of that word and it's not subtle or subtext at all. — suckerpinch

## Mentioned suckerpinch, Tom Murphy VII, YouTube, Christopher Nolan, Inception, Wheel of Fortune

## Video description In this video I explore several generalizations of anagrams.

Addendum containing more technical explanations: https://youtu.be/8_npHZbe3qM

[Source](https://www.youtube.com/watch?v=qTBAW-Eh0tM)

中文简报

拆解字母重组的变位词:“变字词”(Anagraphs) 因对传统单词变位词的严格限制感到不满,suckerpinch 探索了当字母能够被物理旋转、切割并分解为基础字形部件时会发生什么。为了系统性测试这一构想,他构建了一个定制字体引擎并开发了一种算法,将单词视为几何基元的重组多重集,从而使“YouTube”这样复杂的词汇能够被利落地改写为“fun alone”或“rocketry”等短语。在此过程中,他避开了无限分解循环的隐患以及任意重写规则在数学上的不可判定性,并最终展示了主要用于滑稽吐槽的动态过渡与像素级解构效果。 Tom Murphy VII 将变位词(anagrams)推广为“变字词”(anagraphs),方法是将字符拆解为可重复利用的亚字母原子组件,如主笔、点、钩和基元图形。 (5:14) 单词被编码为几何原子的多重集,从而可通过直接匹配和递归子集搜索,找出将“YouTube”转换为“rocketry”或“fun alone”等多词变换。 (6:41) 任意重写规则下的广义字距调整问题在数学上是不可判定的,但具有固定原子分解规则的受限变字词模型仍然可解。 (10:01) 具有歧义替代项的分解规则会引发无限碎屑循环,除非加以严格约束,否则会凭空产生多余的碎片。 (8:52)

Reading summary

Tom Murphy VII (suckerpinch) introduces "anagraphs," an algorithmic extension of anagrams that permits rotating, cutting, and deconstructing letters into reusable typographic fragments. By treating letterforms as multisets of atomic geometric shapes, the project bridges font design, combinatorial search, and formal language theory. Deconstructing Letterforms into Reusable Typographic Atoms (0:02) Traditional anagrams restrict players to whole-character permutations, but manipulating physical plastic letters suggests broader transformations, such as rotating uppercase M into W, or swapping lowercase pairs like p and d, n and u, or b and q. Physical forms also permit destructive edits, such as trimming the bottom stroke of an uppercase E to produce an F. Under strict anagram conservation rules, severed scraps cannot be discarded and must be incorporated elsewhere, enabling rare solutions like transforming "hogwash" into "come on for hoodoo gods." Lowercase letters offer far more structural overlap than capitals. Rejecting the classic type design test word "Hamburgevons" on the grounds that starting with H biases the entire font's style, Murphy decomposes characters into shared geometric sub-elements. The system isolates a minimal atom inventory: primitive indivisible letters (c, e, o, r, and s) alongside modular parts including vertical ticks, dots (tittles), and curved hooks. This allows compound letters to be assembled systematically, such as composing b, d, p, and q from a stem and a bowl, or building a single-story g from a c-shape, stem, and hook. Custom Font Engine and Multiset Generation (5:14) Because off-the-shelf fonts lack proportional consistency when disassembled, Murphy built a custom font editor where altering an underlying atom automatically updates every letter incorporating that component. To ensure legible output, he spent an afternoon manually adjusting kerning metrics across all 26² (676) letter pairs. He coined the term "Anagraph" by merging "anagram" with "RAF" (an acronym for Rotate And Pluck Fragments), deliberately avoiding "anaglyph" due to its established meaning in stereoscopic imaging. Computationally, words are modeled as multisets of atomic fragments. By sorting and counting a word's atoms into a canonical vector, the engine identifies exact structural matches; for example, the word "YouTube" (comprising 1 c, 1 e, 1 o, 3 r's, 8 ticks, and 1 hook) possesses the exact atomic signature of "rocketry." Multi-word anagraphs are identified recursively by testing whether a dictionary word's atomic profile forms a strict subset of the source word, such as subtracting "fun" from "YouTube" to leave the exact fragments required to spell "alone." Rewrite Paradoxes and Computational Undecidability (8:52) A critical requirement for the search algorithm is deterministic letter decomposition. Allowing ambiguous rewrite rules can trigger an infinite scrap loophole: if b can decompose into l + o or l + c, and o can split into c + c, a system can expand b into l + o, unpack o into two c's, and recombine l + c back into b. This cyclic loop returns to the initial letter while generating an extra c out of thin air, causing the generation search to fail to terminate. At a theoretical level, Murphy identifies what he calls the general "kerning problem"—determining whether one word can be transformed into another under arbitrary replacement or merging rules—as mathematically undecidable. While Murphy relegated the full undecidability proof to a separate 51-minute companion lecture, he notes that anagraphing itself remains decidable even under rules permitting infinite derivations. For his practical implementation, assigning each letter an explicit, unique decomposition into vector atoms avoids non-deterministic computational complexity. Transition Animation and Pixel-Level Anagraphs (10:51) Visualizing anagraph transformations requires animating the physical migration of components between words. Murphy opted for basic visual transitions, bypassing complex collision-avoidance pathfinding algorithms to prevent moving pieces from overlapping in order to keep project scope manageable. Murphy observes that the primary practical use of anagraph technology is comedic slander—rearranging names or terms into unflattering insults. To maximize search flexibility, the breakdown rules can be pushed beyond typographic vector atoms down to individual pixel grids. Slicing glyphs into raw pixels drastically expands the combinatorial space, making it trivial to morph virtually any source text into custom insults. By replacing whole characters with defined typographic atoms, anagraphs expand traditional anagramming into an exact geometric multiset problem. While arbitrary rewrite grammars introduce undecidability and infinite loops, enforcing rigid, unique atomic decompositions keeps multi-word searching computable while opening new avenues for algorithmic humor.

精炼阅读摘要

创作者 suckerpinch(Tom Murphy VII)提出了名为“Anagraph”的全新字谜概念,通过将英文字母拆解为旋转的几何“原子”碎片来突破传统易位构词法的限制,并探讨了该重构体系在计算理论中的可判定性边界与实际动画应用。 从实体字母裁剪到拆解字体设计 (0:02) 传统的字位变换(Anagram)仅限于在单词内部重新排列完整字母,但在操作实体塑料字母时,人们自然会尝试将其旋转或翻转。在大写英文字母中,仅有 M 与 W 构成有效的上下翻转对,而在小写字母中,p 与 d、n 与 u、b 与 q 亦可相互转换。如果进一步引入物理切割,例如削去大写 E 的底横得到 F,根据严格字谜规则,裁下的碎片不可丢弃,必须重新利用到其他字母中(例如将 F 补成 A,或将 O 改为 Q)。由于同时包含 E 与 Q 的英文词汇极其稀少,此类严格匹配非常罕见,但仍存在将“hogwash”调整为“come on for hoodoo gods”的解法。 为了系统化利用字形特征,小写字母展现出比大写字母更丰富的构件通用性。传统字体排印学常以包含常见设计基序的“Hamburgevons”作为样词,但 suckerpinch 对此提出质疑,认为从 H 开始绘制会导致整套字体被绑架为“H 风格”,反而建议使用字母特征相近的“tofuburger”。在此基础上,小写字母可被解构为几何构件:b、d、p、q 均可由竖笔杆 l 与字圈 o 组合而成;l 可平分为两个竖笔段(相当于 i 的主笔高);i 与 j 共享顶部的圆点;j 的弯钩尾巴亦出现在 f 中;复杂的双层 g 则可替换为由弯钩、笔杆与 c 组成的单层 g。最终,整套字母表被提炼为一组不可再分的原始字形(c、e、o、r、s)以及基础片段构件(点、垂直短横、弯钩)。 自定义字体引擎与多词匹配生成 (5:14) 现成字体无法保证重组构件在不同字形间保持协调的比例,例如直接拼合可能导致 y 异常过高。为此,suckerpinch 构建了专属的计算字体编辑器,直接基于上述“原子”设计字形;一旦修改底层原子,所有引用该原子的字母都会联动更新。此外,为解决初版字间距失衡的问题,开发者花费了整个下午编写排版间距逻辑,手动微调全部 26²(共 676 个)字母对的字距调整(Kerning)。以此为基础,suckerpinch 将这一结合了“旋转与提取碎片”(Rotate And Pluck Fragments)构词法正式命名为“Anagraph”(由 anagram 与 raf 组合而成)。 在生成算法中,每个单词都被转化为其原子构件的多重集并按计数进行规范化编码。例如,单词“YouTube”解构为 1 个 c、1 个 e、1 个 o、3 个 r、8 个竖笔段和 1 个弯钩,其原子签名与“rocketry”完全一致。为了搜索多词组合短语,引擎会递归检查词典中的单词原子是否为目标多重集的严格子集;例如从“YouTube”中扣除“fun”(包含 2 个 r、5 个竖笔段、1 个弯钩)后,剩余构件恰好拼出“alone”,从而验证“fun alone”是“YouTube”的有效多词 Anagraph。在阐述递归搜索时,suckerpinch 特别指出流行文化对电影《盗梦空间》(Inception)存在词义误用:Inception 在日常英语中意为“开端或创造”,片中指植入想法的行为,而非大众常误指的递归、嵌套或数学归纳。 重写规则的无限循环与计算不可判定性 (8:52) 该生成算法能够平稳运行的核心前提,在于每个字母仅拥有唯一确定的原子分解。如果允许存在模棱两可的多重重写规则,系统便会陷入形式语言悖论。例如,若规定 b 可拆分为 l + o,同时 b 又可拆分为 l + c,而 o 可拆分为两个 c,系统就会出现资源漏洞:将 b 拆分为 l 和 o 后展开为 l + c + c,再将其中一个 c 与 l 重新拼成 b,最终在复原初始字母的同时凭空凭空多出一个 c。持续循环该过程将无中生有地产出无限数量的碎片,使求解算法面临非停机或计算不可行的问题。 在更广泛的理论层面,suckerpinch 指出字母操作中的广义“字距/排列问题”(Kerning Problem)在数学上属于不可判定问题:面对任意的替换与合并规则,不存在通用的计算机算法能够判定某个词是否可以通过规则变换为另一个词。由于该证明过于抽象,suckerpinch 将长达 51 分钟的形式化计算机科学证明独立发布为补充视频。在该长视频中,他证明了即使重写规则允许潜在的无限派生循环,特定约束下的 Anagraph 问题本身依然保持可判定;而在当前的项目实践中,由于每个字母均由显式定义的几何原子构成且具有唯一分解路径,从而彻底规避了不可判定的复杂性陷阱。 路径动画避让与像素级拆解延伸 (10:51) 在匹配出合法的 Anagraph 单词对后,系统需要通过补间动画将碎片从原词平移至目标词。为了避免碎片移动过程中的重叠碰撞,理论上需要实现复杂的碰撞规避寻路算法,suckerpinch 将其戏称为“字符自动驾驶问题”;但为了避免耗费无止境的开发时间,最终项目沿用了未做避让的较简易动画路径。在思考该技术的实际应用时,作者认为打碎字母重组的核心用途几乎完全是制作喜剧性的贬损调侃——通过重新排列人名来生成侮辱性短语。如果将字母进一步粉碎至比矢量几何形状更细微的层级(例如离散的像素点网格),搜索空间将被极大扩展,几乎能将任何词语随意变换为各种嘲讽语段,视频也最终以将字母 S 戏谑为“垃圾字母”的像素打碎重组演示收尾。 该项目表明,在严格守恒前提下对字母进行次级几何拆解,能大幅拓展传统字谜的构成空间;然而,形式化规则的放宽会迅速引发生成边界的无限膨胀与算法不可判定性。当前工程实现通过锁定唯一原子分解保证了可计算性,但更通用的动态避让与无约束重写仍属于高复杂度的理论与工程难题。

Detailed notes — zh

## Background 该视频由 suckerpinch(Tom Murphy VII)于 2017 年 12 月 18 日发布在 YouTube 平台。视频简介表明,作者在其中探索了传统字谜(Anagram)的数种推广与泛化形式,并附带了深入讲解技术证明的独立补充视频链接。 ## TL;DR 作者突破了传统字谜仅能重排完整字母的物理局限,构想出一种允许翻转、裁剪及肢解字母笔画的新型文字重组形式——“变位图”(Anagraph)。为此,他将小写英文字母解构为点、短竖、弯钩等几何“原子”零件,自制了专属字体编辑器并手工配置了全部字距。随后,他编写出基于原子特征码匹配与深度优先递归搜索的生成算法,同时指出了规则非单射时导致无限物质循环的计算理论隐患,最终渲染出笔画动态重组的视觉过渡动画并进行了幽默的像素级恶搞。 ## Atmosphere & style 全片充斥着典型的极客幽默与强烈的个人化吐槽风格,作者在严谨的计算理论推演与荒谬的技术过度工程之间反复横跳。叙事节奏轻快且充满即兴发泄感,从严厉批判字体设计传统和《盗梦空间》术语误用,再到坦言放弃过度优化动画以防“老死在视频制作中”,观感既像一场硬核高智商的计算机科学秀,又像是一段令人捧腹的个人独白实验。 ## Bulletin - [06:06](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=366s) suckerpinch 将传统字谜(Anagram)泛化为“Anagraph”(变位图),允许对字母进行物理级的旋转、翻转及笔画拆解拼接以组成新词汇。 - [02:06](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=126s) 通过建立小写字母的“原子零件库”(包含 c、e、o、r、s 等原文字母及 dot、tick、hook 等零件),单词可被转化为唯一的原子频次特征码进行递归匹配搜索。 - [08:39](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=519s) 字母拆解必须受到严苛约束并满足唯一分解定理,否则系统会陷入可无限凭空产生多余零件的非单射重写闭环。 - [10:01](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=601s) 在任意字符调整规则下,单词重排判定问题在理论上完全不可解,但显式预设的几何原子分解模型成功规避了该计算泥潭。 ## Key takeaways - [00:02](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=2s) 传统字谜局限于单纯重排,而在实体积木或小写字体中,字母存在旋转互换(如 p/d、n/u、b/q)与物理剪切重组(如 E 剪去一横成 F,碎屑拼成 A 或 Q)的广阔空间。 - [02:06](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=126s) 字体设计中常用的假想词“Hamburgefonts”存在先入为主的局限性,作者主张更彻底地将小写字母解构为微观几何零件。 - [02:06](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=126s) 作者将字体提炼为基础原文字母(c, e, o, r, s)与微观结构零件(dot, tick, hook),并以此重构衍生出其余复杂字符。 - [02:06](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=126s) 跨字符复用零件导致比例控制极其困难,修改单个原子零件容易引发全局字符变形的连锁反应。 - [05:14](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=314s) 为实现严谨的参数化生成,作者自制了字体编辑器,并耗费一整个下午手工标注了全部 26 平方(676 种)字母对的字距调整(Kerning)。 - [06:06](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=366s) 新概念“Anagraph”(变位图)结合了 Anagram 与 RAF(旋转并摘取碎片)缩写,通过统计单词包含的原子特征码实现同构与多词递归搜索。 - [06:06](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=366s) 针对大众文化将电影《盗梦空间》(Inception)误解为“递归”的现象,作者严肃澄清 Inception 本义仅为“开端/植入想法”,与数学或程序中的递归无关。 - [08:39](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=519s) 若允许不唯一的字母拆解路径(如 b 同时可拆为 l+o 与 l+c,且 o 可拆为 c+c),系统将形成无限物质循环,导致判定问题不可解。 - [10:01](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=601s) 计算理论表明,在通用或任意字符重写规则下的字距判定问题属于不可解问题,但本项目采用唯一原子显式分解得以保持计算可解性。 - [10:50](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=650s) 作者放弃了过度优化笔画碰撞平滑动画的“自动驾驶字符问题”,并以将字母进一步粉碎为像素级的恶搞重排演示收尾。 ## Detailed walkthrough ### [00:02](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=2s) 从传统字谜到“物理变形”:字母翻转与剪切 字谜(Anagram)的本质是重新排列字母来组成新词,但作者 suckerpinch 指出,一旦离开计算机中纯粹的概念世界,在现实中使用实体字母积木时,仅仅重排就会让人感到受限。现实中玩家总会忍不住想要“翻转”字母。例如在把“béchamel”重构成“chewable”时,大写的 M 就被翻转成了 W。然而在英语大写字母中,M 和 W 几乎是唯一一对仅靠翻转就能完美互换的字母。 回到可以随意操控小写字母的数字世界后,操作空间变得更大:通过旋转与轻微调整,小写字母 p 可以翻转为 d,n 可以变成 u,而 b 和 q 也能互相通用。作者直言:“Look, unless you tolerate rotting walls when making anagrams, you should allow rotating letters.” 但他紧接着提出了更大胆的设想:除了旋转,能不能直接“肢解”字母?以字母 E 为例,它看起来就像多了一横的 F。若直接用剪刀切掉那一横,就像切掉独角兽的角一样,立刻就能得到一匹“马”——也就是大写字母 F。 实体操作中剪下来的塑料碎片无法丢弃,但这块边角料能将 F 拼成 A,或把 O 拼成 Q。虽然现实中同时含有 F 和 Q 的词极少,作者还是找到了一个完美的冷门词汇对:将无意义的乱码词拆装重组,把碎屑利用到底。 - 大写字母中仅有 M 与 W 能靠上下翻转直接互换。 - 小写字母中旋转/翻转可实现的互换对包括:`p ↔ d`、`n ↔ u`、`b ↔ q`。 - 实体拆解实验:剪去大写 E 的底横即可得到 F,切下来的多余短横可用于将 F 拼成 A,或为 O 加上尾巴拼成 Q。 --- ### [02:06](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=126s) 字体设计的吐槽与字母零件的原子化拆解 字母拆解在小写字母上拥有更丰富的形态相似性。在传统字体设计(Typeface design)中,设计师通常习惯从“Hamburgefonts”(或 Hamburgevons)这个包含代表性笔画的假想词开始绘制。作者在此忍不住严厉吐槽:他认为率先绘制哪个字母会对整体设计风格产生过强的先入为主影响,永远从 H 开始只会做出“H 风格”的字体,而且把极度棘手、极度令人反感的字母 s 留到后面简直是折磨。 更让作者生疑的是,这套起始词汇里不仅包含了显眼的“burger”(汉堡),还硬塞进了排版师天天挂在嘴边的词根“font”。鉴于先前已经证明字母组合的共通性,他戏称不如改成“tofu burger”。 吐槽归吐槽,回到正题后,作者开始系统性地将小写字母拆解为基础零部件(Atoms)。例如:从 b 上抠出一个圆圈 o,剩下的就是竖线 l;而 l 和 o 的组合不仅能组成 b,还能组装成 d、q 和 p。进一步地,竖线 l 可以纵向折半拆成两个具有 i 身高的短竖(称为 tick),而 i 上面的点(dot)则是一个独立零件,它同样出现在 j 中;若补上一个弯钩(hook),就能拼出完整的 j,这一弯钩还能复用到 f 上。 经过反复权衡与筛选,作者将一套字体精炼成了极少数的基础零件库: | 分类 | 包含元素 | 说明与用途 | |:--- |:--- |:--- | | **基础原文字母 (Primitives)** | c, e, o, r, s | 无法再自然拆分的基底形态;虽然 s 理论上想用两个 c 拼合,但尺寸容易失真,故保留为基础字 | | **微观结构零件 (Pieces / Atoms)** | dot (点), tick (短竖), hook (弯钩) | 用于组合衍生出大部分其他字母,例如 tick 构成竖画或斜线,hook 构成 f/j 的弯钩 | ```mermaid flowchart TD accTitle: 字母拆解装配关系图 accDescr: 展示基础零件如何通过组合衍生出复杂小写字母 subgraph Atoms["原子零件与基础形态"] direction TB Dot["dot (点)"] Tick["tick (短竖)"] Hook["hook (弯钩)"] C["基础形态 c"] O["基础形态 o"] end subgraph Derived["组合衍生出的字母"] direction TB L["竖画 l (2 x tick)"] J["字母 j (dot + tick + hook)"] B_P_D_Q["字母组 b / d / p / q (l + o)"] ChildG["简写儿童体 g (c + hook)"] end Tick --> L L --> B_P_D_Q O --> B_P_D_Q Dot --> J Tick --> J Hook --> J C --> ChildG Hook --> ChildG ``` - 放弃双层印刷体 g(stacked G),改用更接近小学的简写儿童体 g(由 c 加上一个没有点的 j 弯钩组合而成)。 - 字母 k 可被精准解构为 4 个 tick 零件组合。 - 零件共用的最大工程难点在于跨字符比例控制:一旦某个零件用于组装 y 显得太长,修改该零件就会引发连锁反应,破坏所有引用它的其他字符。 --- ### [05:14](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=314s) 自制字体编辑器与字距调整的泥潭 为了在计算上达到绝对精确,作者没有使用现成的字体制作软件,而是自己编写了一套专用的字体编辑器。在系统的一套模式下,他专门设计被称为“原子”(Atoms)的基础几何笔画;在另一模式下,系统通过拼装这些原子生成完整的 26 个英文字母。这种参数化设计带来了一个直观的效果:只要在原子编辑界面中微调破坏某个零件,使用该原子的所有字符都会同步扭曲变形。 然而,字体设计是一项重度迭代的工作。当把这些字母拼成单词测试视觉效果时,作者立刻陷入了痛苦:“Font making is a very iterative process so you got to test out how the words look as you're going and then you get really mad because you didn't build kerning support so there goes another afternoon of your life as you write all that code and then manually set the distance for 26 squared pairs of letters.” 为了让字形排版达到勉强能看的程度,他又耗费了一整个下午,手工针对 $26^2 = 676$ 种字母排列组合逐一设定字距调整参数(Kerning)。这也为后续计算程序在内存中顺利读取并处理这些字符构型奠定了基础。 --- ### [06:06](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=366s) 变位图发生器:递归多词拆解与对《盗梦空间》的声讨 既然这里的字母可以翻转、拆分与拼接,传统的“Anagram”(字谜)一词已不再准确。作者曾考虑过使用希腊语词根构成的“Anaglyph”(立体图),但该词已被 3D 红蓝眼镜占用;最终他发明了新词 **“Anagraph”(变位图)**——取自 Anagram(变位)的前缀,结合 RAF(Rotate And pluck Fragments,旋转并摘取碎片)的缩写,其核心生成程序即为 Anagraph 发生器。 该算法的运作逻辑并不复杂: 1. **原子统计与特征码**:由于每个单词都能被分解为一组原子零件,程序遍历单词中的所有字母并统计各原子的数量。以“YouTube”为例,它正好包含 1 个 c、1 个 e、1 个 o、3 个 r、8 个 tick 以及 1 个 hook。将这些原子按固定顺序排序并标明频次,就得到了该词唯一的数字指纹特征码。 2. **同构映射**:若词典中另一个单词的原子统计特征码与原词完全一致,两者即构成单个单词层面的 Anagraph(例如“rocketry”)。 3. **子集搜索与递归穷举**:若要生成多词 Anagraph,程序会在词典中寻找那些原子组成是当前指纹子集的候选词。例如单词“fun”包含 2 个 r、5 个 tick 和 1 个 hook;从“YouTube”的库存中扣除这些零件后,剩余的碎片恰好能拼出“alone”。程序并不只停留在双词层面,而是采用深度优先的递归搜索,直到库存中的原子被彻底消耗殆尽,从而产出如“fun alone”这样完整的变位图短语。 ```mermaid flowchart LR accTitle: Anagraph 递归分解流水线 accDescr: 展现从输入单词到提取原子特征码并递归扣除子集词汇的完整算法流程 A["输入词汇<br>(如 YouTube)"] --> B["解析字母并拆解为原子"] B --> C["生成唯一原子频次特征码<br>(1c, 1e, 1o, 3r, 8tick, 1hook)"] C --> D{"是否有完全匹配词?"} D -- 是 --> E["单词 Anagraph<br>(如 rocketry)"] D -- 否/递归分支 --> F["寻找原子子集匹配词<br>(如 fun)"] F --> G["扣减已消耗原子,产生残余特征码"] G --> H{"残余是否为0?"} H -- 否 --> F H -- 是 --> I["多词 Anagraph<br>(如 fun alone)"] ``` 在谈到算法的递归操作时,作者思路突然跳跃,因流行文化对计算机术语的滥用而再度抓狂。他特地严正澄清了电影《盗梦空间》(Inception): “We need to talk about the movie Inception. It's a fine film, it does contain dreams within dreams and the phrase 'we have to go deeper', but inception, the word inception does not mean recursion or nesting or induction. It has nothing to do with those things. It's a normal English word, it means creation or beginning, and in the movie it's used in exactly the normal sense of that word.” 他强调,电影里深入梦境是为了向潜意识植入一个刚诞生的想法,这才是 Inception 的本义,大众不应将其与数学/计算机中的“递归”或“嵌套”混为一谈。 --- ### [08:39](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=519s) 唯一分解假设的破灭与无限物质循环陷阱 在平复情绪后,作者指出了前面算法模型中潜藏的一个严重数学隐患。算法能够优雅运行的前提是:每个字母的原子分解必须满足**唯一分解定理**(Unique Decomposition)。然而在实际构词规则中,同一种字母完全可以有多条拆解路径: 1. 规则一:字母 b 可以拆分成竖线加圆圈(`b → l + o`)。 2. 规则二:字母 b 可以拆分成竖线加半弧(`b → l + c`)。 3. 规则三:圆圈 o 可以在某些字形中直接视为由两个半弧拼接而成(`o → c + c`)。 一旦系统同时接纳这三条规则,整个问题就陷入了毁灭性的逻辑闭环。如果拿出一个字母 b,首先依据规则一将其拆成 `l + o`;随后依据规则三将 o 拆成两个 `c`(此时持有 `l + c + c`);接着依据规则二,把其中一个 `c` 拼回 `l` 上,重新还原出了字母 `b`。整个循环走完,作者不仅复原了最初的输入字母 b,手里还平白无故多出来一个零件 `c`。 “And I could just keep doing that to create an infinite number of leftover c's so I have to be careful about what rules I actually allow if I want this problem to be easily solvable.” 这意味着在非单射的重写系统中,字母拼装算法会彻底退化为具有无限生产能力的重写文法,导致判定问题在计算上变得极度复杂甚至不可解。因此在后续的生成实验中,必须极其严苛地约束拆解规则的合法边界。 ### [10:01](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=601s) 字距调整问题与理论不可解性 在探讨重组词(anagrams)的泛化过程中,suckerpinch 提出了一个被称为“字距调整问题”(the kerning problem)的衍生难题。他指出,在任意重写规则(arbitrary rules)的前提下,这个问题在理论上是完全不可解的(unsolvable)。换言之,不存在任何计算机程序能够判定在给定规则下,一个单词是否可以通过字符重排与调整变形为另一个单词。这一结论颇为出人意料。作者原本打算在这期视频中详细推导并解释其背后的计算理论证明,但他打趣道:“我背后的‘编辑委员会’(editorial board)认为对于这个 10 分钟的视频来说太无聊了”,因此他单独录制了一个长达 51 分钟的补充视频。那个视频被他戏称为“计算机科学讲座兼助眠音频”,专门为感兴趣的观众彻底剖析所有技术细节,并证明为什么在允许无限可能性的规则下,图素重组(anagraphing)问题实际上依然是可解的。 对于本项目中的具体实现,由于每个字母都是通过预先定义的形状“原子”(atoms)显式构建的,每个字母都拥有唯一的分解方式,因此在这个具体场景下避开了上述通用算法不可解的泥潭。 - suckerpinch 总结其计算复杂性时断言:“在任意规则下,没有任何计算机程序能够判定一个单词是否能通过这些规则调整为另一个单词”(“that problem is actually unsolvable in the sense that with arbitrary rules there's no computer program that could tell whether one word can be current into another word using those rules”)。 - 深入的技术探讨被移至另一期长达 51 分钟的独立视频中,该视频详细解释了可判定性与证明细节。 ```mermaid flowchart TD accTitle: Anagraphing Computability Distinction accDescr: 比较通用规则下的字距重排问题与固定原子分解的图素重组问题的可解性 subgraph Generic["通用任意规则 (Arbitrary Rules)"] G1["任意字符调整/字距规则"] --> G2["图灵机判定问题"] G2 --> G3["不可解 (Unsolvable)"] end subgraph Explicit["显式原子方案 (Explicit Atoms)"] E1["字母由预设几何原子拼成"] --> E2["唯一几何分解"] E2 --> E3["计算可解且易于求解"] end ``` ### [10:50](https://www.youtube.com/watch?v=qTBAW-Eh0tM&t=650s) 动画生成、技术妥协与像素级重排恶搞 在找到成对的重组词(anagraphs)之后,接下来需要编写代码渲染二者之间笔画平滑变换的过渡动画。suckerpinch 坦言,这需要做不少微调工作,他完全可以再耗费整整一天的时间去深度优化动画算法,解决笔画在屏幕上移动时相互穿模、碰撞的问题,他开玩笑地将其称为“自动驾驶字符问题”(self-driving characters problem)。但他最终放弃了这种过度追求完美的设计,认为目前的平滑过渡视觉效果已经足够优秀,直言“我可不想在制作这个视频的过程中老死”(“I didn't want to die of old age while working on this video”)。 在对整个技术的用途进行反思时,suckerpinch 幽默地指出,这项技术最核心的现实用途无非是去“中伤”某些事物——也就是把它们的名字重新拼凑成极其难听、有损形象的词语。而如果想要更容易拼凑出具有侮辱性的内容,最好的办法就是把字母拆解成比当前几何形状更加基础的微小图素,比如直接拆成“像素”(pixels)。随后,视频以一系列像素重排动画作为收尾:他将“the letter s”嘲弄性地重排成“garbage”(垃圾字母),又在背景音乐中将带有恶搞意味的文本与图形元素逐个击碎并重组。 ## Mentioned suckerpinch, YouTube, Inception, Hamburgevons, Anagraph ## Video description In this video I explore several generalizations of anagrams. Addendum containing more technical explanations: https://youtu.be/8_npHZbe3qM [Source](https://www.youtube.com/watch?v=qTBAW-Eh0tM)

Source quotes

[6:41] suckerpinch: Inception, the word inception, does not mean recursion or nesting or induction... it's a normal English word, it means creation or beginning, and in the movie it's used in exactly the normal sense of that word and it's not subtle or subtext at all.

Original transcript

[0:02] [Music] [0:08] unless you weren't a swank omage then [0:11] you know what anagrams are rearranging [0:14] the letters to spell other words but if [0:16] you try anta gramming in the real world [0:17] that is leaving the computer world of [0:20] fantasy letters and using real-life [0:22] letters then you become dissatisfied [0:23] with nearly rearranging and you want to [0:26] do things like flip letters so speaking [0:29] of Joe jams you could rearrange the [0:32] letters of béchamel to create chewable [0:35] and this again flips that M and the W [0:37] and actually in English it seems that [0:40] the M and W are the only good pair of [0:42] letters you can get by flipping at least [0:44] four capital letters and so back to [0:46] computer world where I have at an [0:47] exhaustible supply of lowercase letters [0:49] we see that by flipping and fiddling I [0:52] can turn a P into a D and an N becomes a [0:56] you and speaking of tofu fonts we're [0:59] going to talk a little bit about custom [1:00] fonts for this in a bit and B and Q are [1:04] interchangeable and these are the only [1:05] three pairs so look unless you tolerate [1:08] rotting walls when making integrins you [1:11] should allow rotating letters but is [1:14] there more we can do for example in [1:16] IRA's emboli F except that it has this [1:19] extra a little bit here so let's make an [1:22] F by cutting that off it's just plastic [1:25] and like cutting the horn off a unicorn [1:29] now we have a horse or capital F now [1:34] when actually Anna gramming I have this [1:35] leftover piece and I can't just throw [1:37] that away it's not very useful except to [1:40] make an F into an A or an O into a Q now [1:44] cutting up E's and Q's isn't that useful [1:46] because there aren't a lot of words with [1:48] both F's and Q's in them but I can think [1:52] of one and hogwash t' becomes finally [1:57] solving this mystery come on [2:00] for hoodoo gods this is of course not to [2:04] the limit so let's go back to computers [2:06] and lowercase letters [2:07] I like lowercase letters for this [2:08] because there's a lot more similarity in [2:10] the letter shapes in [2:12] in letter form design its traditional to [2:14] begin designing your font by drawing [2:16] this word or sort of word Hamburg [2:19] offensive with the idea that these first [2:22] few letters contain a lot of the [2:24] elements that will be used throughout [2:25] the font this is one of the reasons I [2:27] don't like this I actually think that [2:29] the letter that you start drawing first [2:31] has such a big impact on the design of [2:34] the phone which I guess the whole point [2:35] of this that you shouldn't always start [2:37] with with the letter H otherwise you're [2:39] only gonna get H fonts still it does [2:41] make a certain amount of sense to start [2:42] with the easy letters and these repeated [2:44] elements and save the tricky ones and [2:47] the fun ones like G and s which is the [2:49] worst letter sorry I'm still mad about [2:52] this this is obviously made up there is [2:55] no way that this is like the best order [2:57] of letters like some statistical thing [2:59] like rst lne because first of all you've [3:02] got the word hamburger right there which [3:04] is super suspicious but then way worse [3:06] you have font which has got to be like [3:09] this is made up by typography there's [3:10] got to be like one of the top words on [3:12] their minds all the time we've already [3:14] learned that we can use tofu instead of [3:16] font it's like the same letter shape so [3:18] let's make this tofu burger okay [3:22] rant over back to the matter at hand we [3:24] want to know what letters we can break [3:26] down or break apart in order to create [3:28] other letters an easy one is B which we [3:31] can carve an oo off of leaving us with [3:33] an L and if you take an L and an O you [3:36] can also make a D or a Q or a P so now [3:42] instead of just rotating which turns a D [3:43] into a P all four of those are [3:45] interchangeable plus we've got L and O [3:47] in the mix the letter L is pretty basic [3:49] but it's useful to split that into two [3:51] pieces each of which is the height of [3:52] the letter I which shape appears as a [3:55] component of lots of other letters we'll [3:56] also need to consider the dot on the eye [3:58] to be its own letter piece which also [4:00] appears in a J to finish the J we just [4:03] need this hook piece here which also [4:05] appears in letters such as f and of [4:08] course we continue like this for all of [4:09] the letters some letters don't have any [4:12] breakdown like see here is primitive and [4:15] S which I've decried before you might [4:20] think you could make it out of C's and [4:21] you kind of can but it ends up being way [4:23] too big so we'll also consider that one [4:25] primitive [4:26] of other letters like this fancy stacked [4:29] G you can kind of make out of other [4:31] letters or you could consider them [4:32] primitive but a better approach is to [4:34] just use a simpler grade school shape [4:37] here this child's G is made from some of [4:39] the same parts as a J - the dot but plus [4:42] a C so this does depend on the font that [4:44] you're using but I was able to get it [4:46] down to the following set of letter [4:48] pieces the primitive letters c-e-o R and [4:52] s and then these letter pieces that [4:54] we've seen dot tick and hook I know it [4:58] looks like you could break these down [4:59] further like that E but it's definitely [5:01] harder than it looks [5:02] the main problem being that in order to [5:04] use a letter piece in one place and [5:06] another simultaneously it needs to be [5:08] just the right size and shape like the Y [5:10] looks too tall when I assemble it from [5:12] these drawings it's quite a fun exercise [5:14] if you like making fonts or doodling I [5:17] really like fun so I made my own font [5:20] editor which allows me to be very exact [5:21] about this and computational in one mode [5:24] I designed the basic letter shapes or [5:26] what I call atoms that are used to make [5:28] up all the letters then I assemble the [5:30] letters themselves K is made up of four [5:33] tick shapes I can go back and change an [5:36] atom here ruining it and then see how [5:38] that's reflected in all the letters in [5:40] which it's used and font making is a [5:42] very iterative process so you got to [5:44] test out how the words look as you're [5:46] going and then you get really mad [5:48] because you didn't build kerning support [5:50] so there goes another afternoon of your [5:53] life as you write all that code and then [5:55] manually set the distance for 26 squared [5:58] pairs of letters and now at least it's [6:01] tolerable generalized kerning is more [6:03] interesting computationally than you [6:05] might think I'm gonna come back to that [6:06] anyway now that this is all inside the [6:09] computer's brain Ram we can start making [6:12] some anagrams is no longer right to call [6:14] these anagrams that word is already [6:16] taken [6:17] I considered anaglyph which is like a [6:19] Greek word that frequently is used to [6:21] mean letter but that is used for this [6:23] kind of 3d glasses no idea why so i [6:26] decided an anna graph from an AG which [6:29] means anagram and raf which is rotate [6:34] and pluck fragments so this program will [6:37] be an and [6:38] F generator and let's talk about how [6:41] that works it's not really that [6:42] complicated every word has a unique [6:44] decomposition into the atoms that make [6:46] it up we just take the letters and then [6:48] the atoms that constitute those and [6:50] basically count them for YouTube here I [6:52] have one each of CEO three ours eight [6:56] ticks and one hook if I sort those in [6:59] some order and then use counts instead [7:01] of repeating letters I get a unique code [7:02] for each word and I can perform this [7:04] process for all words and get their code [7:06] if another word has the exact same code [7:08] then it's an anagram like for example [7:09] here rocketry I can also make multiple [7:12] word Anna graphs by finding a single [7:14] word that's a subset of the code I'm [7:16] working with here the word fun has two [7:19] R's five tics and one hook just subtract [7:23] those from the counts of the word [7:24] YouTube and I'm left with some other [7:26] code and then I can continue from there [7:28] here I find that the word alone has [7:30] exactly those left over characters so [7:32] fun alone is another Anna Graf and I [7:35] don't just try fun I try all of the [7:37] words that form a subset of those atoms [7:38] and I don't just stop at two words of [7:41] course at every stage I try all of the [7:42] words that have a subset if I completely [7:45] use up the letters then that's an [7:46] anagram if I don't use them all I [7:48] continue and try again recursively ah I [7:50] just made myself mad again thinking [7:53] about recursion in a pop culture context [7:55] by complaining I know I'm giving some [7:57] people the ultimate trol weapon against [7:59] me but I can't resist we need to talk [8:01] about the movie Inception it's a fine [8:04] film it does contain dreams within [8:06] dreams and the threes we have to go [8:09] deeper but inception the word inception [8:11] does not mean recursion or nesting or [8:14] induction it has nothing to do with [8:15] those things it's a normal English word [8:17] it means creation or beginning and in [8:21] the movie it's used in exactly the [8:23] normal sense of that word and it's not [8:25] subtle or subtext at all they go inside [8:27] people's dreams in the movie to make [8:29] them think that they've come up with [8:30] ideas that's the inception and it's like [8:34] the whole point of the movie ah anyway [8:37] let's look at those Anna graphs by the [8:39] way I'm kind of curious to know if this [8:40] font looked fishy to you at the [8:42] beginning of the video it's the same one [8:44] I've been using the whole time and I [8:45] think some of the letters look a little [8:46] funny due to the way they're constructed [8:49] and speaking of fun alone one more [8:52] technical [8:52] here remember when I said that we would [8:54] break down a word into the unique [8:56] decomposition well this only works if a [8:58] letter breaks down only one way but [9:01] previously in this video I told you that [9:02] B could be broken down into L oh and I [9:06] also showed you breaking down into L see [9:08] I think both of these make sense and [9:10] it's a reasonable variant of the problem [9:12] I could also have the rule that says o [9:14] can be made up of two CS and depending [9:17] on the font that might be possible and [9:18] now we have ourselves a real pickle [9:20] first of all the algorithm I described [9:22] before doesn't work but far worse this [9:25] problem is now at risk of not being [9:27] possible at all so what if I take this B [9:29] and I split it into L oh using this [9:32] first rule up here [9:33] then using Rule three I can split that [9:36] into CC and then using Rule two I could [9:39] take one of those C's and put it back [9:40] onto the L to create a B but now I'm [9:43] back where I started except I have a [9:45] left over C and I could just keep doing [9:47] that to create an infinite number of [9:49] left over C's so I have to be careful [9:51] about what rules I actually allow if I [9:53] want this problem to be easily solvable [9:55] in fact consider a related problem where [9:57] I'm allowed to rewrite letters like this [9:59] but I can't rearrange them as in [10:01] anagrams I call this the kerning problem [10:04] that problem is actually unsolvable in [10:07] the sense that with arbitrary rules [10:08] there's no computer program that could [10:10] tell whether one word can be current [10:12] into another word using those rules [10:14] that's kind of surprising and so I was [10:16] going to explain in this video why that [10:18] is but my editorial board decided that [10:21] that was too boring for this 10 minute [10:24] video so there's another video and it's [10:27] 51 minutes long and it's like a computer [10:29] science lecture / sleep aid but if [10:32] you're interested in this stuff check it [10:33] out explain all the details I also show [10:35] why the anna graphing problem is in fact [10:38] solvable even if you have rules like [10:40] this one that allow for infinite seas [10:42] but anyway since I built each letter out [10:44] of atoms explicitly each does have a [10:47] unique decomposition which makes this [10:48] problem easy in this case now once you [10:51] have a pair of Anna graphs you have to [10:53] do a little bit of work to animate [10:54] between them and I could have easily [10:56] wasted a whole additional day optimizing [11:00] this so that you know letter pieces [11:01] didn't collide with one another as they [11:04] moved around [11:05] sort of self-driving characters problem [11:10] but it looks fine and I didn't want to [11:12] die of old age while working on this [11:13] video by the way I realized the main use [11:16] of this technology is to malign things [11:19] by rearranging their names into [11:21] something unflattering and it's a lot [11:23] easier to find unflattering things if we [11:25] break down letters into something even [11:28] more primitive than these shapes like [11:29] say pixels so let's wrap with a couple [11:33] of those like the letter s garbage [11:37] letter this guy again oh wait a second [11:48] [Music] [11:59] [Music]