The Most Underrated Algorithm

The Most Underrated Algorithm — Veritasium

Veritasium

AI-assisted summary of The Most Underrated Algorithm — original source. Check the original for full context.

Source published:

Key ideas

  • The Fast Fourier Transform (FFT) was formulated during the Cold War as a mathematical solution to verify compliance with nuclear test ban treaties by distinguishing underground tests from natural seismic activity. (0:00)
  • By exploiting sinusoidal symmetries and recursively dividing sample subsets into even and odd indices, the FFT slashes computational complexity from O(N^2) to O(N log2 N), shrinking a 3-year 1960s calculation into roughly 35 minutes. (14:59)
  • Carl Friedrich Gauss independently invented equivalent harmonic analysis techniques in 1805 while calculating the orbit of the asteroid Juno—160 years before Cooley and Tukey—but left the work unpublished in Latin notes. (18:52)
  • The FFT underpins modern digital infrastructure, including Wi-Fi, 5G, audio streaming, and 2D image compression where up to 99% of near-zero spatial frequency data can be discarded without noticeable visual loss. (22:10)

Detailed notes

## Background Published on YouTube by Veritasium on November 3, 2022, this video explores the ubiquitous Fast Fourier Transform (FFT) and its dramatic historical origins. According to the show notes, the algorithm was developed amidst attempts to verify adherence to nuclear test limits—a mathematical breakthrough that had the potential to alter the trajectory of the Cold War arms race.

## TL;DR The video examines how the urgent geopolitical need to detect covert underground nuclear tests drove the modern rediscovery of the Fast Fourier Transform. While continuous and discrete Fourier analysis allowed scientists to distinguish tectonic earthquakes from subterranean explosions, brute-force calculation required an impossible $O(N^2)$ computational scaling on 1960s hardware. Mathematician John Tukey devised an $O(N \log_2 N)$ divide-and-conquer shortcut during a presidential committee meeting, which was secretly coded by James Cooley under the guise of crystal physics, though it arrived too late to avert decades of underground testing and massive nuclear stockpiling. The presentation also reveals that Carl Friedrich Gauss originally derived the algorithm in 1805 while tracking asteroids, before demonstrating how the FFT powers ubiquitous modern technologies like digital image compression, Wi-Fi, and radar.

## Atmosphere & style The presentation blends tense historical storytelling with clear, pedagogical mathematical intuition. It carries a reflective, slightly somber weight when exploring the humanitarian stakes of nuclear testing and the tragic near-miss of Cold War arms control treaties. Visually lucid breakdowns of complex wave decompositions and algorithmic symmetry balance intimate interviews and historical anecdotes, creating an intellectual journey that feels both revelatory and sobering.

## Bulletin - [00:00](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=0s) The Fast Fourier Transform (FFT) was formulated during the Cold War as a mathematical solution to verify compliance with nuclear test ban treaties by distinguishing underground tests from natural seismic activity. - [14:59](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=899s) By exploiting sinusoidal symmetries and recursively dividing sample subsets into even and odd indices, the FFT slashes computational complexity from O(N^2) to O(N log2 N), shrinking a 3-year 1960s calculation into roughly 35 minutes. - [18:52](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1132s) Carl Friedrich Gauss independently invented equivalent harmonic analysis techniques in 1805 while calculating the orbit of the asteroid Juno—160 years before Cooley and Tukey—but left the work unpublished in Latin notes. - [22:10](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1330s) The FFT underpins modern digital infrastructure, including Wi-Fi, 5G, audio streaming, and 2D image compression where up to 99% of near-zero spatial frequency data can be discarded without noticeable visual loss.

## Key takeaways - [00:00](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=0s) Early Cold War arms control initiatives failed when the Soviet Union rejected the 1946 Baruch Plan, viewing mandatory international oversight of the nuclear fuel cycle as an effort to preserve American atomic hegemony. - [01:55](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=115s) The 1954 Castle Bravo test yielded 15 megatons instead of the projected 6 megatons due to unexpected neutron reactions in lithium-7, triggering widespread radioactive fallout and spurring the global nuclear disarmament movement. - [03:48](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=228s) Negotiations for a comprehensive test ban stalled over underground testing verification: atmospheric tests could be tracked via airborne radionuclides and underwater blasts through oceanic sound channels, but underground detonations left no atmospheric trail. - [03:48](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=228s) Because underground tests were unmonitored and Soviet leaders rejected Western on-site physical inspections, the 1963 Partial Test Ban Treaty banned explosions only in the atmosphere, outer space, and water, leaving underground testing unchecked. - [06:06](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=366s) Differentiating an underground nuclear blast from the ~300 daily natural earthquakes of magnitude 3.0+ requires decomposing seismic waves into distinct frequency components using Fourier analysis. - [10:20](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=620s) Comparative computer tests conducted at CERN proved that American and Soviet seismometers were functionally equivalent, pinpointing the real bottleneck as the immense computing power needed to calculate Fourier transforms. - [13:00](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=780s) The Discrete Fourier Transform evaluates real-world sampled signals across discrete frequency bins, but brute-force calculation requires N^2 complex multiplications, making large global seismic monitoring datasets computationally intractable on 1960s machines. - [14:59](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=899s) During a 1963 PSAC meeting, mathematician John Tukey worked out the core Fast Fourier Transform shortcut, which physicist Richard Garwin then asked IBM programmer James Cooley to code under the cover story of studying helium-3 crystals. - [14:59](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=899s) The Cooley-Tukey algorithm's recursive division of sample points into even and odd sets lowers scaling to O(N log2 N), delivering a ~50,000-fold reduction in calculations for a one-million-point dataset. - [18:52](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1132s) The FFT arrived too late to prevent the expansion of underground testing, which saw roughly 1,500 detonations between 1963 and the mid-1990s as global stockpiles expanded to nearly 70,000 active warheads. - [18:52](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1132s) Gauss originally developed the discrete harmonic analysis method in 1805 to calculate the trajectory of the asteroid Juno, predating Joseph Fourier's 1807 paper, but his findings were buried in posthumously published Latin texts. - [22:10](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1330s) In 2D digital image compression, computing row and column FFTs isolates spatial frequencies, allowing systems to discard up to 99% of near-zero high-frequency data while preserving image fidelity upon inverse transformation. - [22:10](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1330s) The FFT remains a foundational algorithmic pillar of modern computing, vital for 5G cellular systems, Wi-Fi, radar, sonar, differential equations, and global seismic monitoring networks that can track 1-kiloton explosions anywhere on Earth.

## Detailed walkthrough ### [00:00](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=0s) The Most Important Algorithm and the Nuclear Arms Race

The Fast Fourier Transform (FFT) ranks among the most impactful algorithmic developments in history, underpinning nearly every pillar of modern communications and digital infrastructure. Routine digital tasks, from streaming internet video to mobile connectivity across 5G and Wi-Fi networks, rely directly on the algorithm, as do remote sensing technologies such as radar and sonar. Beyond its technological ubiquity, the FFT has a geopolitical heritage intertwined with the Cold War. It was formulated by scientists seeking a mathematical mechanism to verify adherence to nuclear test limits. As the narrator reflects on the potential historical leverage of the mathematics: “And if they had discovered it sooner, it may have put a stop to the nuclear arms race.”

While the escalation between global superpowers is often viewed in hindsight as an inevitable byproduct of the bombings of Hiroshima and Nagasaki, early diplomatic efforts attempted to halt atomic competition before it accelerated. The weapon dropped on Hiroshima produced an explosive yield a thousand times greater than the largest conventional munitions, alarming world leaders and prompting Canada and the United Kingdom to convene post-war talks on international control. Recognizing that their atomic monopoly would be brief, the United States proposed the Baruch Plan in 1946. Under this framework, the U.S. offered to dismantle its nuclear stockpile on the condition that an international authority oversee all global radioactive deposits, from raw mining and isotope enrichment to commercial nuclear power, while prohibiting all other nations from fabricating weapons. The Soviet Union viewed the proposed inspection regime as an instrument designed to preserve American hegemony, rejecting the plan and triggering a multi-decade arms race.

- The Hiroshima detonation generated an explosive energy release roughly 1,000 times larger than the biggest conventional explosive of its era. - The 1946 Baruch Plan required international dominion over all steps of the nuclear fuel cycle, spanning extraction, enrichment, and peaceful civil power generation.

[01:55](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=115s) Thermonuclear Escalation and Castle Bravo's Fallout

Developing higher-yield weapons required regular field trials, which nuclear powers initially conducted in remote geographic zones such as the South Pacific atolls and the Arctic. The United States also established the Nevada Test Site, where recurring above-ground tests created plumes of atmospheric radioactive particulate that drifted east across North America, resulting in American citizens becoming the population most severely irradiated by U.S. testing outside of Japan. The arms race soon expanded beyond fission weapons into thermonuclear bombs, which combined nuclear fission with secondary thermonuclear fusion. These staged devices represented an explosive leap over early atomic bombs comparable to the jump from conventional TNT to fission:

> “Annihilation of any life on earth has being brought within the range of technical possibility.”

The dangers of thermonuclear weapons became visible in March 1954 during the Castle Bravo test at Bikini Atoll. Physicists tested an experimental device code-named "Shrimp," which utilized solid lithium deuteride as thermonuclear fuel. The weapon was projected to produce a yield equivalent to six megatons (six million tons) of TNT. Instead, lithium-7 underwent unanticipated high-energy neutron reactions, driving the yield to fifteen megatons—two and a half times the expected energy. Massive quantities of pulverized coral and irradiated debris climbed into the stratosphere, scattering fallout far outside the designated maritime exclusion zone. Inhabitants of surrounding atolls could not be evacuated until three days after the explosion, by which time many suffered from acute radiation sickness. Roughly eighty miles east, the 23-man crew of the Japanese tuna trawler *Daigo Fukuryū Maru* (Lucky Dragon No. 5) was blanketed by a heavy snowfall of radioactive white ash; the crew developed acute radiation syndrome before reaching port, and the ship's radioman succumbed six months later. A contemporary news reporter noted the grim outcome: “As a result of the extended illness brought about by his exposure to the radiation fallout.”

- The Castle Bravo "Shrimp" device detonated with 15 megatons of force instead of the expected 6 megatons, caused by unplanned neutron capture in lithium-7. - Downwind atoll residents waited 72 hours for emergency evacuation following the Castle Bravo fallout. - All 23 crew members of the *Lucky Dragon No. 5* contracted acute radiation syndrome, leading to the death of radioman Aikichi Kuboyama six months later.

[03:48](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=228s) The Push for a Test Ban and the Verification Dilemma

The humanitarian and ecological fallout from Castle Bravo ignited an international anti-nuclear movement. Activists crafted the modern peace symbol by superimposing the semaphore flag postures for the letters "N" and "D," signifying Nuclear Disarmament. Under sustained public pressure, leaders of the nuclear-armed nations explored a universal cessation of weapons tests, culminating in the 1958 Conference on the Discontinuance of Nuclear Weapon Tests in Geneva. To foster trust during negotiations, the superpowers initiated a voluntary testing moratorium; consequently, 1959 became the sole year during the Cold War era without a single nuclear detonation.

Progress stalled over the technical challenge of independent verification. The superpowers could not resolve how to guarantee mutual compliance without unfettered physical access. Describing the reciprocal paranoia that paralyzed diplomacy, the narrator notes: “The U.S. worried that the Soviets would continue testing covertly and leapfrog them technologically and the Soviets similarly distrusted the U.S..” To investigate technical compliance measures, delegates established the exhaustively titled Conference of Experts to Study the Possibility of Detecting Violations of a Possible Agreement on Suspension of Nuclear Tests.

Monitoring detonations in the atmosphere proved feasible because prevailing winds carried telltale fission isotopes across international borders. Underwater testing was similarly manageable because low-frequency acoustic energy channels cleanly through the oceanic deep sound channel (the SOFAR channel roughly one kilometer below the surface), allowing hydrophone arrays to identify subsea explosions thousands of kilometers away. Deep underground testing, however, effectively insulated radioactive debris from atmospheric dispersion. The Soviet Union rejected Western demands for mandatory on-site physical inspections, denouncing them as cover for Western espionage. Because underground compliance could not be verified remotely, the negotiations foundered, yielding only the Limited Test Ban Treaty of 1963. This treaty banned detonations in the atmosphere, outer space, and underwater, but explicitly permitted underground testing to continue unabated.

```mermaid flowchart TD accTitle: Detection Feasibility by Nuclear Test Medium accDescr: Flowchart categorizing the detection methods and treaty outcomes for atmospheric, underwater, and underground nuclear tests. subgraph TestEnvironments["Testing Environments"] ATM["Atmospheric Tests"] SEA["Underwater Tests"] UND["Underground Tests"] end

subgraph DetectionSensors["Detection Mechanisms"] RAD["Airborne Radionuclide Sampling"] HYD["Hydrophone Sound Tracking"] SEI["Remote Seismic Networks"] end

subgraph 1963Treaty["1963 Test Ban Scope"] BAN["Banned by Partial Treaty"] EXC["Excluded from 1963 Ban"] end

ATM --> RAD --> BAN SEA --> HYD --> BAN UND --> SEI --> EXC ```

[06:06](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=366s) Forensic Seismology and Decomposing Signals

Determined to close the underground testing loophole, American and Soviet geophysicists formed technical study groups to evaluate remote seismic detection. The strategy centered on operating high-sensitivity seismometers positioned outside a monitored nation's borders to register transient shockwaves moving through the Earth's crust and mantle. Forensic seismologists confronted the monumental challenge of differentiating an illicit nuclear detonation from natural tectonic seismicity. The planet generates close to 300 earthquakes daily with a magnitude of 3.0 or higher. Compounding the classification problem, military analysts required accurate yield and burial depth estimates to gauge adversary weapons capabilities, yet subterranean blast dynamics complicate signal interpretation: deeper detonations muffle surface vibrations, causing high-yield blasts to mimic small explosions.

```mermaid flowchart LR accTitle: Forensic Seismic Signal Processing Pipeline accDescr: Pipeline showing how raw seismometer traces are transformed into frequency spectra to classify events and calculate explosive yield. subgraph Capture["Seismic Capture"] VIB["Crustal Vibrations"] --> REC["Seismometer Trace"] end subgraph Transformation["Spectral Decomposition"] REC --> PROD["Multiply by Sine/Cosine"] PROD --> INT["Integrate Net Area"] INT --> SPEC["Frequency Spectrum & Phase"] end subgraph Discrimination["Event Diagnostics"] SPEC --> ID{"Earthquake vs. Bomb"} ID --> YIELD["Yield & Depth Calculation"] end ```

Raw seismogram traces resemble chaotic squiggles that cannot be diagnosed by simple visual inspection. Because the underlying physical mechanisms—a shear tectonic fault slip versus a sudden symmetric explosive expansion—impart contrasting frequency balances to the propagating waves, researchers needed to extract the precise frequency spectrum through a Fourier transform. This mathematical operation decomposes complex time-domain waveforms into constituent sine and cosine waves, each possessing a defined amplitude, frequency, and phase:

> “If you wanna know how much of a particular sine wave is in a signal, just multiply the signal by the sine wave at each point and then add up the area under the curve.”

When an input signal is multiplied by a trial sine wave of an unmatched frequency, the resulting product oscillates symmetrically between positive and negative values, integrating over time to zero net area. Only when the test sinusoid aligns with a frequency component actually present within the signal does the product remain positive, generating a non-zero area proportional to that frequency's amplitude. Because pure sine waves integrate to zero when paired with identical-frequency cosine waves that are ninety degrees out of phase, calculations must evaluate both sine and cosine components to capture phase offsets, or condense the operation using Euler’s formula:

$$e^{i\theta} = \cos\theta + i\sin\theta$$

By multiplying the signal by a complex exponential, the real portion yields the cosine amplitude while the imaginary portion captures the sine amplitude.

- The Earth experiences roughly 300 earthquakes of magnitude 3.0 or greater every 24 hours. - Multiplying out-of-phase or mismatched trial frequencies yields alternating cancellations that average to a net area of zero. - Complex exponentials streamline the calculation of both amplitude and phase shifts in a single mathematical pass.

[10:20](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=620s) The Geneva Seismometer Debate and the Computational Bottleneck

During bilateral technical exchanges at the Geneva summit, the American delegation featured two prominent figures: theoretical physicist Richard Garwin and statistician John Tukey. A technical dispute arose between the delegations regarding whose seismometers possessed greater instrumental precision for monitoring ground motion. Seeking an objective resolution, Garwin took the performance specifications for both sensor designs and ran comparative simulations on a computer at CERN. When he presented the findings the following morning, both delegations conceded that physical hardware differences were essentially negligible.

The realization shifted the focus of the verification effort. The limiting constraint preventing remote identification of underground nuclear explosions was not the physical sensitivity of seismometers, but the processing power required to convert analogue seismic waveforms into digital frequency spectra:

> “The real obstacle to detecting underground explosions wasn't the accuracy of the seismometers, it was the vast amounts of computation required to Fourier transform the seismometer signals.”

Standard Fourier transformation of continuous telemetry required enormous quantities of individual multiplications and additions. For the volumes of continuous seismic data produced worldwide, the calculations overwhelmed the processing capabilities of 1960s computing systems.

[11:00](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=660s) From Continuous Waves to the Discrete Fourier Transform

While theoretical signals can be conceived as infinite, smooth, continuous waves yielding an infinite, continuous frequency spectrum, real-world signals are entirely different. Real data is finite and composed of individual samples or discrete data points. Even when a seismometer trace appears completely continuous and smooth, it does not record ground movement with infinite precision; there is an unavoidable, fundamental graininess to the measurement. Because the available information is discrete and finite, scientists cannot use an idealized Fourier transform and must instead turn to the Discrete Fourier Transform (DFT).

```mermaid flowchart TD accTitle: Continuous versus Discrete Fourier Transform accDescr: Diagram contrasting an idealized continuous signal with a finite sampled signal and its resulting discrete frequency bins.

subgraph Continuous["Continuous Domain"] A["Continuous Wave Signal"] --> B["Continuous Fourier Transform"] B --> C["Infinite Frequency Spectrum"] end

subgraph Discrete["Discrete Domain"] D["Finite Sampled Points (N samples)"] --> E["Discrete Fourier Transform (DFT)"] E --> F["N Discrete Frequency Bins"] end ```

A defining characteristic of the DFT is that the resulting frequency spectrum is likewise discrete and finite, structured into a set of frequency "bins." The spacing and total duration of the samples directly determine the nature of these bins:

- **Sample spacing and maximum frequency:** The wider the gap between samples, the lower the maximum frequency that can be captured, because coarse intervals fail to resolve rapid oscillations. - **Signal duration and resolution:** The shorter the duration of the recording, the harder it becomes to separate nearby frequencies, resulting in wider frequency bins and reduced resolution. - **Fundamental bin:** The lowest measurable non-zero frequency has a period equal to the entire duration of the signal. - **Harmonic bins:** All higher frequency bins are exact integer multiples of that fundamental frequency, fitting two, three, four, or more full periods into the duration of the recording. - **Total bin count:** The total number of frequency bins matches the number of samples ($N$). For example, an eight-sample recording generates eight discrete bins spanning from zero up to seven times the fundamental frequency.

---

[13:00](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=780s) Calculating a DFT and the $O(N^2)$ Bottleneck

To illustrate the mechanics of the standard DFT, consider an eight-sample signal. The transform yields eight distinct bins. The first bin represents a frequency of 0 Hz, which acts as a check for any DC offset—evaluating whether the signal is systematically shifted above or below the x-axis. This is calculated by multiplying each point by 1 and summing them; in this symmetric example, they add up to zero. The second bin evaluates 1 Hz, which fits exactly one full period into the window. Each sample is multiplied by a 1 Hz sine wave and a 1 Hz cosine wave, and the results are summed separately (yielding zero for sine and four for cosine). Repeating this test through 2 Hz, 3 Hz, and so on up to 7 Hz produces the complete spectrum.

While mathematically straightforward, this approach scales terribly on computers. Transforming $N$ data points requires multiplying every point across $N$ different sinusoidal basis waves, demanding $N^2$ complex multiplications.

```mermaid flowchart LR accTitle: Computational Scaling Comparison accDescr: Comparison of computational requirements for standard DFT versus the Fast Fourier Transform across small and large sample sizes.

subgraph Small["8 Samples"] D1["Standard DFT: 64 operations"] F1["FFT: 24 operations"] end

subgraph Large["1,000,000 Samples"] D2["Standard DFT: 1,000,000,000,000 operations (3+ years in 1960s)"] F2["FFT: ~20,000,000 operations (35 minutes in 1960s)"] end ```

For eight data points, 64 calculations is trivial. But for a data set of one million samples, $N^2$ reaches one trillion complex multiplications:

- On 1960s computing hardware, evaluating one trillion calculations for a single transform would require more than three continuous years of run time. - While a single seismic waveform rarely required one million samples, monitoring global compliance required processing tens of events every day from hundreds of independent seismograph stations worldwide. - The brute-force computation created an impossible operational logjam, giving researchers an urgent incentive to discover a shortcut.

---

[14:59](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=899s) A Doodling Mathematician and the Fast Fourier Transform

The critical breakthrough arrived in 1963 during a meeting of the President's Science Advisory Committee (PSAC), attended by President John F. Kennedy along with physicist Richard Garwin and mathematician John Tukey. Despite high-stakes agenda items like the Apollo space program and civil defense nuclear fallout shelters, the proceedings dragged on. Garwin noticed Tukey spent the entire session doodling on his notepad. When the session adjourned, Garwin asked Tukey what he had been sketching and was stunned to discover that Tukey had worked out a radical mathematical shortcut for discrete Fourier transforms. Tukey's method cut down calculations so dramatically that a problem requiring over three years on 1960s computers could run in just 35 minutes.

The resulting method became known as the Fast Fourier Transform (FFT). Instead of performing all $N \times N$ calculations blindly, the algorithm exploits the inherent periodicity and symmetry of sinusoids:

```mermaid flowchart TD accTitle: Fast Fourier Transform Divide and Conquer Strategy accDescr: Flowchart demonstrating how N samples are recursively split into even and odd indices to reduce operations down to N log2 N.

A["All N Samples"] --> B["Split: Even Index Points"] A --> C["Split: Odd Index Points"]

B --> D["Compute lower half frequencies"] C --> E["Compute lower half frequencies"]

D --> F["Exploit Sine/Cosine Symmetries and Twiddle Factors"] E --> F

F --> G["Derive upper half frequencies via reuse"] G --> H["Repeat recursively down to single points: Total O(N log2 N)"] ```

- **Symmetry and overlap:** In the eight-sample scenario, rather than computing 64 distinct products, the waves overlap predictably. At the midpoint sample, all four odd frequencies share identical values, and all four even frequencies also share identical values, collapsing eight multiplications into two. - **First division by two:** Splitting an $N$-point series into even-indexed and odd-indexed samples reveals that, at the sample points, the values of the sine waves for the lower half of frequencies match or are the exact negative of those in the upper half. Thus, solving the lower half yields the upper half almost for free through basic complex multiplication, cutting the workload by half. - **Recursive reduction to $O(N \log_2 N)$:** Applying this split recursively—dividing into even and odd subsets over and over down to isolated individual points—systematically reduces the computational scaling from $O(N^2)$ to $O(N \log_2 N)$. - **Realized computational savings:** For 8 samples, operations drop from 64 down to 24. For 1,000 samples, the algorithm is roughly 100 times faster; for 1,000,000 samples, it requires 50,000 times fewer calculations.

---

[18:52](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1132s) Cold War Secrecy, Missed Treaties, and Gauss's Lost Discovery

Following Tukey's insight, Richard Garwin approached IBM mathematician James Cooley to program the algorithm on modern computers. Garwin kept the actual national security application strictly hidden; rather than disclosing that the code was intended to pinpoint Soviet underground nuclear detonations, “He said it was to work out the spins in a crystal of helium-3.” Cooley and Tukey subsequently co-authored and published their foundational paper on the algorithm in 1965, sparking an immediate revolution across computer science and digital signal processing.

Tragically, the discovery came slightly too late to salvage negotiations for a Comprehensive Nuclear-Test-Ban Treaty. By 1965, the United Kingdom, France, and China had joined the United States and the Soviet Union in the nuclear club. Because the 1963 Partial Test Ban Treaty banned explosions in the atmosphere, outer space, and underwater but permitted underground testing, governments concluded that failing to test underground would leave them militarily vulnerable:

- **Accelerated testing:** Between 1963 and the mid-1990s, approximately 1,500 nuclear devices were detonated underground—an average cadence of roughly one nuclear detonation every single week for 30 straight years. - **Arsenal expansion:** Global nuclear stockpiles surged to an all-time peak in the mid-1980s of roughly 70,000 active warheads. - **Staggering economic cost:** Inflation-adjusted Cold War nuclear expenditures totaled approximately $10 trillion each for both the United States and the Soviet Union.

When asked whether an earlier deployment of the FFT could have verified low-yield tests and secured a comprehensive ban before the buildup escalated, Dr. Garwin reflected on the near miss:

> “Well, it's a good story.” > > “It would've helped and it might have turned the tide.”

Yet the algorithm had in fact been discovered long before—and simply forgotten. In 1805, Carl Friedrich Gauss was calculating the orbital trajectories of the newly discovered asteroids Ceres, Pallas, and Juno. To determine Juno's path, Gauss invented harmonic analysis methods equivalent to both the Discrete Fourier Transform and Cooley and Tukey's Fast Fourier Transform. His work predated Joseph Fourier's own 1807 paper by two years and Cooley and Tukey's work by 160 years. However, Gauss discarded the method for a different approach and left the work unpublished during his lifetime. The notes only surfaced posthumously in Volume 3 of his collected works, where they lay buried and ignored, transcribed in non-standard mathematical notation and written in 19th-century Latin.

Today, the combination of modern seismological networks, modern computing power, and the FFT enables monitoring agencies to detect seismic events down to magnitude 3.0—equivalent to an explosive yield of merely one kiloton—virtually anywhere across the globe, while the FFT itself serves as the algorithmic engine behind all modern audio, video, and data compression.

[22:10](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1330s) Image Compression and the Ubiquity of the FFT

The Fast Fourier Transform serves as the foundation for modern image compression techniques. When compressing an image, one takes the pixel brightness values across each row and computes a Fast Fourier Transform. This operation uncovers the specific spatial frequencies present within the brightness variations of those rows. In a visual representation of this transformed data, brightness indicates the magnitude of each frequency component, while color denotes the phase—illustrating how much that frequency is shifted horizontally to the left or to the right. A second FFT is then run down the columns of pixels. The order of operations is completely interchangeable; whether rows or columns are processed first, the end requirement is a two-dimensional FFT of the original image.

```mermaid flowchart TD accTitle: Two-Dimensional FFT Image Compression Pipeline accDescr: Diagram illustrating the steps of taking an original image, computing row and column FFTs, discarding near-zero high-frequency components, and inverting back to view the image.

subgraph Transform["2D Frequency Decomposition"] A["Original Image Pixels"] --> B["Row-wise 1D FFT"] B --> C["Column-wise 1D FFT"] end

subgraph Compression["Data Reduction"] C --> D["2D FFT Matrix"] D --> E["Discard Small High Frequencies<br/>(Up to ~99% of data)"] end

subgraph Reconstruction["Image Retrieval"] E --> F["Compressed File on Disk"] F --> G["Inverse 2D FFT"] G --> H["Reconstructed Image"] end ```

In nearly every real-world photograph, the overwhelming majority of values in the transformed matrix end up extremely close to zero. Although taking the logarithm of these values makes them easier to inspect visually, examining the raw values reveals that the high-frequency components—especially those situated toward the outer edges—are miniscule. This makes it possible to discard up to 99% of the transformed data without significant perceptual loss. When an inverse transform is applied to the remaining data, the rendered picture remains an impressively faithful representation of the original. Consequently, computers routinely store images encoded as two-dimensional transforms and run an inverse FFT whenever the image needs to be viewed.

The impact of the algorithm extends across virtually all modern technology: - **Broad Applications**: Essential for solving differential equations, operating radar and sonar systems, analyzing crystal structures, and transmitting data over Wi-Fi and 5G networks. - **Universal Signal Processing**: The backbone of digital audio, image, and communications workflows. - As the presenter highlights regarding its extraordinary stature, “mathematician Gilbert Strang called the FFT the most important numerical algorithm of our lifetime.” - Had Carl Friedrich Gauss's earlier discovery of the technique been recognized and broadly adopted in his own era, it could have reshaped technological progress even earlier.

[24:11](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1451s) 80,000 Hours and Maximizing Career Impact

Gauss could not have foreseen how profoundly his mathematical insight would influence the modern world, just as most people rarely reflect on the massive cumulative footprint of their working lives. Over a typical career span—working 40 hours a week, 50 weeks a year, across 40 years—a person spends roughly 80,000 hours on the job. That immense block of time represents the single largest opportunity an individual has to effect positive change in the world.

Standard career guidance from university centers or aptitude batteries tends to be limited; it focuses on personal interests and matching preferences, offering few options beyond traditional callings like teaching or medicine if someone expresses a desire to solve global challenges. Reflecting on this dilemma, the presenter shares his own experience after finishing college: “When I finished college, I knew I liked filmmaking, teaching and science and that I wanted to have a big positive impact but YouTube didn't exist yet and so I honestly had no idea what I was gonna do.” He expresses deep gratitude for landing in a role where he can merge his passions with tangible public benefit, emphasizing that unconventional, impactful paths are out there for others as well.

The video’s sponsor, 80,000 Hours, is a nonprofit organization dedicated to helping individuals identify and pursue careers that address pressing global problems: - **Research Foundation**: Conducted more than a decade of research alongside Oxford University academics to formulate specific, actionable, and evidence-based career advice that moves beyond shallow platitudes like "follow your passion." - **Free Tools & Resources**: Offers an ongoing podcast, research-backed career guides, a newsletter, and an updated job board featuring hundreds of high-impact positions. - **Access**: Everything the nonprofit produces remains permanently free; signing up at `80000hours.org/veritasium` provides immediate digital delivery of their comprehensive career guide.

## Notable quotes > [10:20](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=620s) The real obstacle to detecting underground explosions wasn't the accuracy of the seismometers, it was the vast amounts of computation required to Fourier transform the seismometer signals.

> [06:06](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=366s) If you wanna know how much of a particular sine wave is in a signal, just multiply the signal by the sine wave at each point and then add up the area under the curve.

## Mentioned Fast Fourier Transform, Discrete Fourier Transform, Baruch Plan, Castle Bravo, Daigo Fukuryū Maru, Aikichi Kuboyama, Limited Test Ban Treaty, Comprehensive Nuclear-Test-Ban Treaty, Richard Garwin, John Tukey, James Cooley, Carl Friedrich Gauss, Joseph Fourier, Gilbert Strang, Steve Brunton, Cliff Thurber, Paul Richards, Steven Gibbons, Grant Sanderson, 80,000 Hours, CERN, IBM, President's Science Advisory Committee, John F. Kennedy

## Video description The Fast Fourier Transform is used everywhere but it has a fascinating origin story that could have ended the nuclear arms race. This video is sponsored by 80,000 Hours. Head to http://80000hours.org/veritasium to sign up for their newsletter and get sent a free copy of their in-depth career guide.

A huge thank you to Dr. Richard Garwin for taking the time to speak with us. Thanks to Dr. Steve Brunton of the University of Washington for his help with understanding the Fast Fourier Transform.

Thanks to Dr. Cliff Thurber of the University of Wisconsin-Madison, Dr. Paul Richards of Columbia University, and Dr. Steven Gibbons of the Norwegian Geotechnical Institute for their expertise.

Thanks to Grant Sanderson of 3Blue1Brown for his helpful feedback on the script. His great video on the Fourier Transform is here - https://youtu.be/spUNpyF58BY

▀▀▀ References:

Kristensen, H.M., Korda, M. (2022). Status of World Nuclear Forces. Federation of American Scientists (FAS). https://ve42.co/Stockpile2022

Barth, K. H. (1998). Science and politics in early nuclear test ban negotiations. Physics Today, 51(3), 34-39. - https://ve42.co/Barth1998

Schmalberger, T. (1991). In pursuit of a nuclear test ban treaty - https://ve42.co/Schmalberger1991

Bowers, D., & Selby, N. D. (2009). Forensic seismology and the comprehensive nuclear-test-ban treaty. Annual Review of Earth and Planetary Sciences, 37, 209-236 - https://ve42.co/Bowers2009

Incorporated Research Institutions for Seismology (IRIS). (2022). How Often Do Earthquakes Occur? https://ve42.co/IRIS2022

Kimball, D. (2022). The Nuclear Testing Tally. Arms Control Association. https://ve42.co/TestTally2022

Kværna, T., & Ringdal, F. (2013). Detection capability of the seismic network of the International Monitoring System for the Comprehensive Nuclear Test Ban Treaty. Bulletin of the Seismological Society of America, 103(2A), 759-772 - https://ve42.co/Kvrna2013

Sykes, L. R., & Evernden, J. F. (1982). The verification of a comprehensive nuclear test ban. Scientific American, 247(4), 47-55 - https://ve42.co/Sykes1982

Peterson, J., & Hutt, C. R. (2014). World-wide standardized seismograph network: a data users guide (p. 82). US Department of the Interior, US Geological Survey. - https://ve42.co/Peterson2014

Richards, P. G., & Kim, W. Y. (2009). Monitoring for nuclear explosions. Scientific American, 300(3), 70-77 - https://ve42.co/Richards2009

Jacobsen, L. L., Fedorova, I., & Lajus, J. (2021). The seismograph as a diplomatic object: The Soviet–American exchange of instruments, 1958–1964. Centaurus, 63(2), 277-295 - https://ve42.co/Jacobsen2021

Schwartz S. I. (1998). The Hidden Costs Of Our Nuclear Arsenal: Overview Of Project Findings. The Brookings Institution - https://ve42.co/Schwartz1998

Ricón, J.L. (2016). The Soviet Union: Military Spending. Nintil - https://ve42.co/Nintil2016

Heideman, M. T., Johnson, D. H., & Burrus, C. S. (1985). Gauss and the history of the fast Fourier transform. Archive for history of exact sciences, 265-277 - https://ve42.co/Heideman1985

Ford, D. (2004). Richard Garwin - Session IV. American Institute of Physics (AIP). - https://ve42.co/Ford2004

Aaserud, F. (1986). Richard Garwin - Session I. American Institute of Physics (AIP). - https://ve42.co/Aaserud1986

Goldstein, A. (1997). James W. Cooley, an oral history. IEEE History Center, Piscataway, NJ, USA - https://ve42.co/Goldstein1997

Cooley, J., Garwin, R., Rader, C., Bogert, B., & Stockham, T. (1969). The 1968 Arden House workshop on fast Fourier transform processing. IEEE Transactions on Audio and Electroacoustics, 17(2), 66-76 - https://ve42.co/Cooley1969

▀▀▀ Special thanks to Patreon supporters: Louis Lebbos, Elliot MIller, RayJ Johnson, Brian Busbee, Jerome Barakos M.D., Amadeo Bee, TTST, Balkrishna Heroor, Chris LaClair, John H. Austin, Jr., OnlineBookClub.org, Matthew Gonzalez, Eric Sexton, John Kiehl, Diffbot, Gnare, Dave Kircher, Burt Humburg, Blake Byers, Dumky, Evgeny Skvortsov, Meekay, Bill Linder, Paul Peijzel, Josh Hibschman, Mac Malkawi, Mike Schneider, John Bauer, jim buckmaster, Juan Benet, Sunil Nagaraj, Richard Sundvall, Lee Redden, Stephen Wilcox, Marinus Kuivenhoven, Michael Krugman, Cy 'kkm' K'Nelson, Sam Lutfi, Ron Neal

▀▀▀ Written by Derek Muller & Felicity Nelson Filmed by Derek Muller & Raquel Nuno Animation by Ivy Tello, Jakub Misiek, Alex Drakoulis, and Fabio Albertelli Edited by Albert Leung & Derek Muller Research Assistant: Katie Barnshaw Additional video/photos supplied by Pond5 and Getty Images Music from Epidemic Sound Produced by Derek Muller, Petr Lebedev, and Emily Zhang

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

中文简报

最被低估的算法 该视频探讨了探测隐秘地下核试验的迫切地缘政治需求,如何推动了现代对快速傅里叶变换(FFT)的重新发现。虽然连续与离散傅里叶分析使科学家能够区分构造地震与地下爆炸,但在20世纪60年代的硬件条件下,暴力计算需要无法实现的 $O(N^2)$ 计算复杂度。数学家约翰·图基(John Tukey)在一次总统委员会会议期间构思出了一种 $O(N \log_2 N)$ 的分治法捷径,该算法随后由詹姆斯·库利(James Cooley)以晶体物理学研究为掩护秘密编写代码,但它的出现为时已晚,未能阻止长达数十年的地下核试验和大规模核武库扩建。视频还透露,卡尔·弗里德里希·高斯(Carl Friedrich Gauss)早在1805年追踪小行星时就推导出了该算法,随后展示了FFT如何为数字图像压缩、Wi-Fi和雷达等无处不在的现代技术提供支持。 快速傅里叶变换(FFT)在冷战期间被提出,作为一种通过区分地下核试验与自然地震活动来核查核禁试条约执行情况的数学解决方案。 (0:00) 通过利用正弦对称性并将样本子集递归划分为偶数与奇数索引,FFT将计算复杂度从 O(N^2) 大幅削减至 O(N log2 N),将20世纪60年代耗时3年的计算缩短至大约35分钟。 (14:59) 卡尔·弗里德里希·高斯早在1805年计算婚神星(Juno)轨道时就独立发明了等效的调和分析技术——比库利和图基早了160年——但他仅将其记录在未发表的拉丁文笔记中。 (18:52) FFT支撑着Wi-Fi、5G、音频流媒体和二维图像压缩等现代数字基础设施;在二维图像压缩中,高达99%接近于零的空间频率数据可以在没有明显视觉损失的情况下被舍弃。 (22:10)

Reading summary

The Fast Fourier Transform (FFT) ranks among history's most critical algorithms, having been developed in the 1960s to solve the Cold War bottleneck of remote nuclear test verification. While it arrived too late to prevent decades of underground nuclear escalation, the mathematical shortcut revolutionized digital signal processing and underpins modern communications and media compression. The Nuclear Verification Impasse and Computational Bottleneck (6:06) Following catastrophic radioactive fallout from tests like the 15-megaton Castle Bravo detonation in 1954, global powers sought a universal test ban, achieving a temporary moratorium in 1959. However, negotiations stalled over verification. Atmospheric and underwater detonations could be verified remotely via airborne radionuclide sampling and ocean hydrophones, but subterranean testing insulated debris from dispersion. Because the Soviet Union rejected mandatory on-site inspections as potential espionage, the 1963 Limited Test Ban Treaty banned detonations in the atmosphere, space, and underwater while explicitly leaving underground testing unrestrained. Closing this loophole required forensic seismology to differentiate underground nuclear blasts from the roughly 300 natural earthquakes of magnitude 3.0 or greater occurring daily. Extracting frequency spectra to identify asymmetric explosive expansion required Fourier transformations of continuous seismometer records. In Geneva, theoretical physicist Richard Garwin demonstrated via computer simulations at CERN that sensor hardware was not the limitation; the true barrier was the insurmountable computing power required to execute discrete Fourier transforms across massive volumes of seismic data. Breaking the O(N^2) Complexity Logjam (14:59) Evaluating a standard Discrete Fourier Transform (DFT) across real-world, finite data points scales at $O(N^2)$ complex multiplications. For a signal window of one million data points, a standard DFT demanded one trillion operations—a workload requiring more than three continuous years of execution on 1960s computing hardware. Processing tens of daily events across hundreds of global stations made brute-force evaluation computationally impossible. The solution emerged in 1963 during a President's Science Advisory Committee meeting, where mathematician John Tukey doodled a method exploiting the periodicity and symmetry of sinusoidal basis waves. By recursively partitioning an $N$-point series into even- and odd-indexed sub-problems, the values of the lower frequency harmonics could be mirrored or reused to resolve the upper harmonics. This divide-and-conquer strategy collapsed computational scaling from $O(N^2)$ to $O(N \log_2 N)$. For one million points, operations dropped from one trillion to approximately twenty million, shrinking processing time on 1960s hardware from three years to 35 minutes. Geopolitical Missed Timing and Gauss's Lost Precedent (18:52) Garwin covertly recruited IBM mathematician James Cooley to program the algorithm under the pretense of analyzing helium-3 crystal spins, publishing the formal method in 1965. However, this arrived after the 1963 treaty had already institutionalized underground testing. Over the next three decades, roughly 1,500 underground devices were detonated—an average of one per week—while global stockpiles reached 70,000 warheads and expenditures approached $10 trillion each for the United States and the Soviet Union. Garwin later noted that earlier availability of the algorithm might have turned the tide toward a comprehensive ban. Furthermore, the mathematical foundation had been discovered 160 years earlier. In 1805, Carl Friedrich Gauss invented equivalent harmonic analysis techniques to calculate the orbital trajectories of the asteroids Ceres, Pallas, and Juno. Gauss abandoned the method, leaving it unpublished until it appeared posthumously in Volume 3 of his collected works, where it remained overlooked due to non-standard notation and its Latin text. Modern Ubiquity in Compression and Infrastructure (22:10) Beyond enabling contemporary nuclear monitoring networks to detect seismic events down to magnitude 3.0 (roughly a one-kiloton yield) anywhere on Earth, the FFT serves as the foundation for modern digital media. In two-dimensional image compression, row- and column-wise FFTs expose spatial frequencies. Because high-frequency variations in real-world photographs possess near-zero magnitudes, systems can safely discard up to 99% of transformed spectral data without significant visual degradation, reconstructing the image on demand using an inverse transform. Mathematician Gilbert Strang described the FFT as "the most important numerical algorithm of our lifetime." The algorithm provides the underlying infrastructure for 5G, Wi-Fi networks, radar, sonar, crystal structure analysis, and the numerical solutions of differential equations across science and engineering. The FFT illustrates how theoretical mathematics can fundamentally alter geopolitical outcomes and technology. While its mid-1960s emergence came too late to halt the Cold War's underground nuclear expansion, its recursive efficiency ultimately solved the verification challenge and became a universal pillar of global digital architecture.

精炼阅读摘要

快速傅里叶变换(FFT)被数学家Gilbert Strang称为当代最重要的数值算法,它在冷战时期的诞生源于美苏核军备竞赛中对地下核试验进行远程地震监测的迫切技术需求。 核试验监测瓶颈与条约漏洞 (0:00) 冷战初期,核武器技术的飞速演进加剧了全球危机。1945年广岛原子弹的爆炸威力约为当时最大常规炸药的1000倍,1946年美国提出由国际机构接管全部核材料的巴鲁克计划,但遭到苏联拒绝。1954年美国在比基尼环礁进行代号“Shrimp”的Castle Bravo热核试验,因锂-7发生未预料到的高能中子反应,爆炸当量达到1500万吨TNT,是预估600万吨的2.5倍。大量放射性尘埃导致下风向环礁居民罹难,日本“第五福龙丸”号渔船的23名船员罹患急性放射病,无线电操作员半年后死亡。全球反核呼声促成了1958年日内瓦会谈及1959年冷战期间唯一的零核爆年,但核查机制的争端导致谈判陷入僵局。当时大气层核试验可借由空气中放射性同位素流动监测,水下核爆可通过深海一公里处的SOFAR声道水下听音器识别,唯独地下核爆由于放射性物质被封闭在地底而难以核实。因苏联拒绝被视为具有间谍风险的强制现场核查,1963年达成的《部分禁止核试验条约》仅禁止了大气层、外层空间和水下测试,地下核试验被合法保留,刺激了更深层次的军备竞赛。 法医地震学与O(N^2)计算困境 (6:06) 为了闭合地下核试验的监测漏洞,科学家试图依靠国境外的远程高灵敏度地震仪阵列记录地壳与地幔的瞬态震波。全球每天平均发生近300起3.0级以上的天然地震,加上地下深层爆炸会削弱地表震动使大当量核试验与小型爆炸类似,区分地质断层剪切滑动与爆炸膨胀成为难题。法医地震学需要借助傅里叶变换,将复杂的时域信号分解为不同频率的正弦波与余弦波,或者借助欧拉公式将信号与复指数相乘,以精确提取频谱特征和相位偏移。在日内瓦技术交流中,物理学家Richard Garwin利用欧洲核子研究组织(CERN)的计算机进行模拟,证实美苏双方地震仪的物理精度差距微不足道。监测真正的核心阻碍在于将连续模拟地震波转化为离散频谱所需的计算量,对于离散采样得到的N个数据点,离散傅里叶变换(DFT)需要执行N平方次复数乘法。对于1960年代的计算机而言,处理单次100万个样本的变换需要连续运行3年以上,而全球每天有数百个监测站传回大量事件,暴力计算根本无法支持常态化监测。 FFT的算法跃迁与历史错位 (14:59) 1963年,在约翰·肯尼迪总统出席的总统科学顾问委员会会议期间,统计学家John Tukey在草稿纸上推演出了打破计算瓶颈的算法捷径。该方法通过充分利用正弦与余弦波的内在周期性与对称性,将N个采样点递归划分为奇数和偶数索引子集,使计算复杂度从O(N^2)急剧下降至O(N log2 N)。在8个样本的情况下,计算量从64次减少至24次;而在100万个样本下,计算量缩减约5万倍,运算耗时从3年缩短至35分钟。随后物理学家Garwin隐瞒了用于监测苏联核试验的国家安全背景,以计算氦-3晶体自旋为由委托IBM数学家James Cooley编写程序,两人于1965年联合发表论文。然而这项突破未能赶上1963年条约谈判,导致在1963年至1990年代中期的30年间,全球地下核试验总计约1500次,平均每周发生一次,活跃核弹头数量在1980年代中期达到约7万枚峰值,美苏两国的通胀调整后核支出各达约10万亿美元。Garwin后来评价,若更早投入应用,该算法或许能扭转谈判局势。事实上,卡尔·弗里德里希·高斯早在1805年计算智神星、谷神星与婚神星轨道时便独立发明了等价算法,甚至早于约瑟夫·傅里叶1807年的论文,但高斯未公开发表这一手稿,使其长年掩埋于未受重视的19世纪拉丁文文集中。 现代技术底座与数据压缩机制 (22:10) 时至今日,由现代计算架构与高密度地震网络支撑的FFT技术,已使全球监测机构能够检测低至3.0级(爆炸当量仅相当于1000吨TNT)的任何地下震动。除国家安全防线外,FFT更演变为现代数字基础设施的运算基石,广泛应用于微分方程求解、雷达、声呐、晶体结构分析以及Wi-Fi与5G网络的数据传输。在图像压缩领域,计算机首先沿着图像各行像素的亮度变化计算一维FFT,接着在各列计算第二次变换,生成二维频域矩阵。现实照片经过该转换后,绝大多数高频成分的数值极度接近于零;计算机系统可以直接剔除高达99%的高频数据,仅储存关键低频信息,在解码时通过逆向快速傅里叶变换(Inverse FFT)还原图像,且人眼几乎难以察觉画质损失。这种高效的信息提炼机制,构建了整个数字视音频流媒体与现代通信的技术底座。 快速傅里叶变换的发现展现了一项原本为天文学和核军备核查而演进的纯数学技巧,如何深刻塑造现代地缘政治与数字生活。尽管高斯的提前发现因历史偶然被长期埋没,未能提早终结冷战时期的核试验竞赛,但它如今已作为不可或缺的底层算法,驱动着全球通信系统与数据压缩的平稳运转。

Detailed notes — zh

## Background 该视频由科普频道 Veritasium 于 2022 年 11 月 3 日发布在 YouTube 平台上。视频简介指出,快速傅里叶变换(FFT)如今在工程与通信领域无处不在,但其背后却隐藏着一段本有可能终结冷战核军备竞赛的惊人起源故事,本期内容还获得了 80,000 Hours 的赞助支持。 ## TL;DR 视频讲述了快速傅里叶变换(FFT)的发展历程及其与冷战地缘政治的交织。为了监测苏联的地下核试验并推动全面禁核条约,科学家们急需从海量地震波数据中分离信号,但传统离散傅里叶变换(DFT)高达 O(N²) 的计算瓶颈让当时的计算机难以负荷。1963年,约翰·图基与理查德·加文在会议涂鸦中推导出了利用对称性将复杂度降至 O(N log N) 的全新算法,后由詹姆斯·库利编程实现;令人遗憾的是,该算法的诞生未能赶在条约签署前阻止地下核竞赛的爆发。最后视频揭示,早在160年前高斯就已推导出这一算法,并深入科普了该算法在现代图像压缩、Wi-Fi及5G等领域的基石作用。 ## Atmosphere & style 全片洋溢着深沉的历史厚重感与严谨的科学探索精神,在悬疑的历史叙事与直观精巧的数学可视化之间切换自如。主讲人以引人入胜的语调娓娓道来,既有对核军备竞赛旷日持久、耗费巨资的扼腕叹息,也有对高斯手稿跨越两个世纪被遗忘的戏剧性震撼。整场观看体验兼具硬核理工知识的解惑快感与对人类科技命运无常的深刻沉思。 ## Bulletin - [00:00](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=0s) 快速傅里叶变换(FFT)的现代发现起源于冷战时期监测地下核试验的需求,其将运算复杂度从传统 DFT 的 O(N²) 大幅削减至 O(N log₂ N)。 - [18:52](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1132s) 1963年美苏签署《部分禁止核试验条约》时因缺乏快速信号滤波能力无法核查地下爆破,导致条约放行地下试验,促使冷战后期又进行了约1,500次地下核试验并使全球核弹头达7万枚峰值。 - [20:37](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1237s) 科学史研究表明卡尔·弗里德里希·高斯早在1805年计算婚神星轨道时就已独立创立了快速傅里叶变换,比库利与图基早了整整160年,但该手稿长期沉睡于未被理解的拉丁文笔记中。 - [22:10](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1330s) 现代图像与视频压缩广泛依赖二维快速傅里叶变换,通过舍弃频域中高达99%的低能量高频成分,即可在极低带宽下实现高质量的视觉还原。 ## Key takeaways - [00:00](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=0s) 二战结束后美国曾提出“巴鲁克计划”,愿在国际监管下拆除全部核武器,但遭苏联拒绝,随后核试验的巨大破坏力引发了全球反核裁军运动。 - [01:55](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=115s) 1954年“虾”热核试验由于未预料到锂-7的反应,实际爆炸当量达1500万吨(预估的2.5倍),造成严重辐射惨剧,直接推动了1958年日内瓦停试谈判。 - [04:36](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=276s) 大气层与水下核试验容易通过同位素和水听器检测,但地下核试验的辐射被封锁,仅能依靠境外地震仪捕捉微弱地表震动来进行甄别。 - [06:07](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=367s) 区分天然地震与地下核爆的关键信息隐藏在地震波的频域结构中,必须通过傅里叶变换将复杂波形分解为不同频率的正弦与余弦分量。 - [11:00](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=660s) 现实采集的地震波属于有限离散信号,应用标准离散傅里叶变换(DFT)时面临 O(N²) 的计算瓶颈,1960年代的硬件处理百万采样点需耗时三年以上。 - [14:59](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=899s) 1963年总统科学顾问委员会会议期间,数学家约翰·图基利用正余弦波的对称性与周期性草拟出分治二分算法,成功突破了 DFT 的算力壁垒。 - [18:52](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1132s) 理查德·加文以研究氦-3量子自旋为由委托詹姆斯·库利编写代码,两人于1965年联合发表 FFT 算法,将百万数据点的处理时间从数年缩短至35分钟。 - [18:52](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1132s) 若 FFT 在1960年代初更早问世,美苏双方本可能建立起对全面禁止核试验的核查信心,进而避免长达数十年、消耗数十万亿美元的地下核军备竞赛。 - [20:37](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1237s) 高斯在1805年推导小行星轨道摄动时就已掌握了离散傅里叶变换及 FFT 算法,但因手稿采用晦涩的拉丁文与特殊记号,这一突破在生前未被学术界认知。 - [22:10](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1330s) 在二维图像压缩中,通过行与列分别执行 FFT 可将能量高度集中于低频区,舍弃99%的高频数据后仍能通过逆变换清晰重建图像。 - [23:36](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1416s) FFT 构成了现代数字通信与计算科学的核心基石,被吉尔伯特·斯特朗誉为有生之年最重要的数值算法,全面赋能了雷达、声呐、MRI、5G 及 Wi-Fi 技术。 ## Detailed walkthrough ### [00:00](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=0s) 改变世界的算法与核军备竞赛的交织 快速傅里叶变换(FFT)被誉为有史以来最重要的算法之一。从雷达、声纳到5G和WiFi,基本上任何涉及信号处理的地方,都有FFT的影子。甚至在此时此刻,你能够流畅地观看视频,也离不开这项技术的支持。然而,这项如今无处不在的算法,其发现过程却与冷战时期科学家们试图监测秘密核武器试验的努力紧密相连。主讲人指出:“如果他们能早点发现它,或许就能阻止核军备竞赛。” 在历史的惯性思维中,人们往往认为核军备竞赛是不可避免的——一旦美国在广岛和长崎投下原子弹,其他大国必然会紧随其后研制核武。但事实并非完全如此。当时所有人都清楚核武器改变了战争规则:广岛原子弹释放的能量是当时最大常规炸药的一千倍。战争结束时,加拿大和英国要求召开会议商讨核武器的未来。出乎意料的是,美国对此持开放态度。美国意识到自己不可能长期独占核技术,因此提出了“巴鲁克计划”(Baruch Plan),表示如果其他国家承诺绝不制造核武器,美国愿意拆除其所有核武。该计划提议由一个国际机构控制地球上所有的放射性物质,从开采、提炼到和平利用(如核能发电)。然而,苏联拒绝了这一提议,认为这只是美国维持核霸权的阴谋。全球核军备竞赛由此拉开帷幕。 - **巴鲁克计划**:美国提议由国际机构控制全球放射性物质,若他国不研发核武,美国将销毁自身核库,但遭苏联拒绝。 - **能量级差**:广岛原子弹的威力比当时最大的常规炸药高出1000倍。 --- ### [01:55](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=115s) 热核试验的灾难与公众的觉醒 为了开发新型核武器,美苏两国进行了广泛的测试,测试地点大多选在北极或南太平洋群岛等偏远地区。美国还在内华达州建立了核试验场,其放射性产物随风飘散至全国,导致除日本外,受美国核武器伤害最深的其实是美国人自己。很快,美国从裂变武器升级到了威力更强的热核武器(氢弹),将裂变与聚变结合,释放出比第一代原子弹还要大一千倍的能量。正如当时的历史影像中所警告的那样:“地球上任何生命的消灭已被带入技术可能性的范围。” 1954年,美国在南太平洋的比基尼环礁(Bikini Atoll)测试了一款代号为“虾”(Shrimp)的新型热核装置,该装置使用氘化锂作为燃料。设计人员预计其爆炸当量相当于600万吨TNT,但他们错了。由于未预料到锂-7的反应,实际释放的能量达到了预估的2.5倍(1500万吨)。这导致了远超计划的大量放射性物质飘散。邻近环礁的居民在三天后才被疏散,此时他们已患上严重的辐射病。更惨的是,在试验区东部,一艘名为“福龙丸五号”的日本渔船上的23名船员被笼罩在放射性白灰中,当晚便出现了急性辐射综合征,其中一名船员在六个月后因并发症去世。 这些惨剧引发了全球公众对核试验的强烈抗议。现代和平标志(反核战标志)正是诞生于20世纪50年代,它由旗语中的“N”和“D”结合而成,代表“核裁军”(Nuclear Disarmament)。多国领导人呼吁全面禁止核试验。1958年,美、苏、英等国在日内瓦召开了名字十分直白的“停止核武器试验会议”。为了展示诚意,各方在谈判期间暂停了所有试验,这也使得1959年成为冷战漫长岁月中唯一一个没有引爆任何核武器的年份。 - **“虾”核试验**:1954年比基尼环礁试验,因锂-7意外反应,实际威力达1500万吨TNT,为预估的2.5倍。 - **和平标志起源**:由字母 N(Nuclear)和 D(Disarmament)的旗语信号组合而成。 - **1959年停试**:由于日内瓦谈判,1959年成为冷战期间唯一没有进行核试验的年份。 --- ### [04:36](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=276s) 地下核试验的检测困境与政治博弈 尽管谈判意愿强烈,但建立全面禁止核试验条约面临着一个巨大的信任难题:如何确保对方不暗中违约?美国担心苏联会秘密进行试验并在技术上实现反超,苏联同样不信任美国。为此,他们甚至召开了一个名字长得令人发指的会议——“研究检测可能达成的暂停核试验协议违约行为可行性的专家会议”。 在检测技术方面,不同环境的核试验难度截然不同: - **大气层试验**:非常容易检测,其产生的放射性同位素会随大气扩散,在数千公里外就能被收集到。 - **水下试验**:会产生独特的声波,在水下一公里左右的深度传播效率极高,可以被水听器(Hydrophones)轻松捕获。 - **地下试验**:极其难以从远处检测。因为爆炸产生的辐射绝大部分被封锁在地下,而苏联又拒绝任何现场合规检查,认为这是间谍行为。 正因如此,当1963年各国最终签署核禁试条约时,它只是一份《部分禁止核试验条约》。主讲人解释道:“它禁止了在水下、大气层和太空中进行测试,这些地方的合规性是可以验证的,但它没有禁止地下测试,原因很简单,因为验证合规性几乎是不可能的。” --- ### [06:07](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=367s) 地震仪信号与傅里叶变换的引入 为了打破地下检测的僵局,科学家们一直在寻找可靠的方法。日内瓦会议后,美苏科学家组成了一个工作组,提出利用部署在目标国境外的地震仪来捕捉地下爆炸引起的微弱地面震动。然而,核心难题在于:如何将核试验与地震区分开来? 地球上每天会发生接近300次3级或以上的地震。此外,监测对手的试验不仅是为了抓包,也是为了刺探情报——了解对方能制造多大威力的炸弹。然而,地震仪记录到的信号不仅取决于爆炸的当量,还取决于炸弹埋藏的深度。对于相同的当量,埋得越深,震动信号看起来就越小。科学家们知道,所有的关键信息(是地震还是炸弹、威力多大、埋得多深)都隐藏在地震仪记录下的波形中。主讲人指出:“他们知道所有这些信息都包含在地震仪信号中,但不能仅仅通过观察那些波形曲线来直接读取。”他们需要知道信号中包含哪些不同的频率成分,这意味着他们必须对信号进行傅里叶变换。 --- ### [07:25](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=445s) 傅里叶变换的数学原理:暴力拆解信号 傅里叶变换的本质是将一个复杂的信号分解为一系列纯正弦波,每个正弦波都有自己的振幅和频率。主讲人感叹道:“这看起来有点像魔术,因为一组正弦波的和可以看起来任意复杂,而且一点也不像它的组成部分。” 为了通俗地解释其工作原理,视频采用了一种“暴力计算”的视角: 1. **乘积与积分**:如果你想知道信号中是否包含某个特定频率的正弦波,只需将原始信号与该频率的正弦波在每个点上相乘,然后计算曲线下的面积(积分)。 2. **无相关性消除**:如果测试的正弦波与信号无关,两者的乘积在正负区间会随机分布,正负面积相互抵消,总和为零。这说明该频率不存在于信号中。 3. **相关性叠加**:只有当测试波的频率与信号中的某个分量完全匹配时,两者的乘积才会始终为正(同正同负相乘均为正),从而在积分后得到一个非零的面积。这个面积的大小直接反映了该频率分量在信号中的相对振幅。 然而,实际操作中还有一个细节:如果信号是一个余弦波,即使乘以相同频率的正弦波,积分结果也为零。因此,对于每个频率,我们必须分别乘以正弦波和余弦波,计算出各自的振幅。两者的比例决定了信号的相位(即波形向左或向右偏移了多少)。在数学上,我们可以利用欧拉公式(Euler's formula)将这两步合并,只需将信号乘以一个复指数项,其结果的实部即为余弦振幅,虚部即为正弦振幅。 ```mermaid flowchart TD accTitle: 傅里叶变换暴力计算流程 accDescr: 展示如何通过将信号与测试波相乘并积分来提取频率分量的过程 A["原始输入信号"] --> B["选择测试频率的正/余弦波 (或复指数)"] B --> C["将信号与测试波逐点相乘"] C --> D["计算曲线下的总面积 (积分)"] D --> E{"面积是否为零?"} E -->|"是 (无相关性)"| F["该频率不存在于信号中"] E -->|"否 (有相关性)"| G["提取该频率的振幅与相位"] G --> H["绘制频率谱 (Frequency Spectrum)"] ``` --- ### [10:20](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=620s) 日内瓦会议的争论与计算瓶颈 在日内瓦会议的美国代表团中,有物理学家理查德·加温(Richard Garwin)和数学家约翰·图基(John Tukey)。当时,美苏双方代表团就“哪国的地震仪更优越”展开了激烈的辩论。为了解决争端,加温在欧洲核子研究组织(CERN)的计算机上对两国的地震仪响应进行了模拟。第二天,模拟结果表明两国的设备在精度上其实大同小异。 这次模拟让科学家们看清了真正的症结所在。主讲人总结道:“检测地下爆炸的真正障碍不是地震仪的精度,而是对地震仪信号进行傅里叶变换所需的大量计算。”面对地震仪产生的海量连续波形数据,当时的计算机根本无法在合理的时间内完成如此庞大的傅里叶变换计算,这成为了阻碍核监测技术发展的最大技术瓶颈。 ### [11:00](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=660s) 真实世界的信号与离散傅里叶变换的计算瓶颈 在此之前,人们往往习惯将信号想象成无限延伸且连续不断的波形,对其进行连续傅里叶变换后,便能得到一条连续且无限的频谱。然而现实生活中的物理信号并非如此。无论是地震检波器记录的地表震颤还是其他传感器收集的数据,由于测量精度和数字化采样的物理限制,真实信号本质上都是由有限个离散采样点构成的离散数据。面对这种不连续的有限序列,理想化的连续傅里叶变换便无能为力,必须使用离散傅里叶变换(Discrete Fourier Transform, DFT)。在 DFT 的框架下,得到的频域输出同样是离散且有限的,就像把连续的频率划分到了有限个“频率桶”(frequency bins)中。 这些频率桶的数量和分辨率完全取决于时域信号的采样点总数以及采样时间间隔。如果采样间隔过大,根据奈奎斯特采样定理,系统就无法捕捉到快速的高频振荡,从而拉低了所能测量的最高上限频率;如果信号的总持续时间过短,分辨两条相邻相近频率的能力就会大幅下降,导致频率分辨率变差,每个频率桶的宽度被迫变宽。在 DFT 中,所能有效测量的最低非零基频,其周期恰好等于整个信号的持续时间,而更高频率的频桶则是该基频的整数倍。因此,频桶的总数与采样点数量严格相等。以一个仅包含 8 个采样点的极简信号为例:它的变换结果包含从 0 赫兹基频一直到 7 倍基频的 8 个频率桶。0 赫兹频桶相当于直流分量(DC offset),用来衡量整个信号是否偏离时间轴;后续各频桶则分别用对应频率的正弦波和余弦波与每个数据点相乘并累加求和。 尽管离散傅里叶变换在数学逻辑上无懈可击,但当面对大规模真实数据时,它在工程实现上却遭遇了巨大的计算灾难。为了完成一次完整的离散傅里叶变换,算法必须将 $N$ 个数据点与 $N$ 个不同频率的基波逐一相乘,总计算量高达 $N^2$ 次复数乘法。对于 8 个采样点而言,64 次乘法轻松可行;但如果是一段包含 100 万个采样点的地震波波形,计算量就会暴增至 1 万亿次。按照 20 世纪 60 年代计算机的运算速度,仅仅为了解析这单次波形,计算机就需要日夜不停地连续运算超过三年。在冷战时期,全球成百上千个监测站每天都会记录下数十起地震或疑似核爆事件,庞大的数据量使得直接应用基础 DFT 在时间上完全不具备可行性。科学家们急需找到一种颠覆性的快速计算方法。 - **离散频桶特性**:频桶数量与采样点数 $N$ 严格一致,最低非零频率周期等于信号总时长,高频桶均为基频整数倍。 - **复杂度瓶颈**:标准 DFT 的复杂度为 $O(N^2)$。处理 100 万个数据点需要 $10^{12}$ 次复数计算,在 1960 年代的硬件条件下耗时需 3 年以上。 ```mermaid flowchart TD accTitle: Discrete Fourier Transform Complexity Flow accDescr: Diagram showing how continuous signals are sampled into discrete points and lead to N-squared computational bottleneck in Discrete Fourier Transform. subgraph Sampling["时域采样阶段"] A["连续物理振动信号"] --> B["离散时间采样序列 (N个样本点)"] end subgraph DFT_Core["离散傅里叶变换 (DFT)"] B --> C["基波投影分析"] C --> D["0 Hz 直流分量 (DC offset)"] C --> E["基频及其整数倍频 (正弦与余弦累加)"] end subgraph Bottleneck["计算量瓶颈"] E --> F["N 个点 × N 个正余弦波"] F --> G["N² 次复数乘法计算"] G --> H["100万样本耗时逾3年 (1960年代算力)"] end ``` ### [14:59](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=899s) 会议上的无聊涂鸦与快速傅里叶变换的诞生 这一计算僵局的突破发生在 1963 年美国总统科学顾问委员会(PSAC)的一次高层会议上。当时的会议阵容极具分量,不仅美国总统约翰·F·肯尼迪亲临现场,物理学家理查德·加文(Richard Garwin)以及知名数学家兼统计学家约翰·图基(John Tukey)也一同参会。虽然会议讨论的都是诸如阿波罗登月计划、民防核避难所等关乎国家战略的重大议题,但繁琐冗长的官僚流程显然让科学家们感到索然无味。加文注意到,图基在整个会议期间几乎一直在草稿纸上百无聊赖地写写画画。然而,图基笔下描摹的根本不是漫无目的的涂鸦,而是在草拟一套用于加速离散傅里叶变换的全新数学算法。 会议结束后,心生好奇的加文凑上前询问图基刚才究竟算出了什么。当图基向他展示推导过程时,加文被彻底震惊了:图基发现了一种利用正弦与余弦函数周期性大幅缩减计算量的方法。原先在传统 DFT 下需要耗费 1960 年代超级计算机三年多时间的百万级采样运算,借助这套新算法,仅仅需要 35 分钟即可彻底完成。这项后来被全世界统称为“快速傅里叶变换”(Fast Fourier Transform, FFT)的技术,其核心在于发掘正余弦波在离散采样点上的固有几何对称性与数值重叠。 在 8 点采样的实例中,传统算法需要 $8 \times 8 = 64$ 次复数乘法。但正余弦函数的周期重叠现象极为显著:例如在正中间的数据点上,所有 4 个奇数倍频率的正弦波取值完全一致,所有 4 个偶数倍频率的正弦波取值也彼此相同。这意味着原本对该点要做的 8 次独立乘法,瞬间被简化成了 2 次。整套数据中充斥着这种重复性结构,使得原本的 64 次计算骤降至 24 次。算法更精妙的操作在于将整个序列按奇偶索引拆分成两半:前半部分频率计算完成后,后半部分高频区在对应采样点上的波形数值要么与前半部分完全相等,要么互为相反数(或仅差一个复数旋转因子)。通过不断递归地将奇偶子序列二分下去,直至分解为单点数据,原本按采样规模平方递增($N^2$)的计算量,被一举压缩到了按 $N \log_2 N$ 的比例增长。 - **计算量对比示例**: - 8 个采样点:传统计算需 64 次,FFT 优化后仅需 24 次。 - 1,000 个采样点:计算量直接缩减至传统方式的约 $\frac{1}{100}$。 - 1,000,000 个采样点:计算量直接缩减至传统方式的约 $\frac{1}{50,000}$。 - **核心算法机制**:利用正余弦波的对称性与周期性,采用“分治法”(Divide and Conquer)反复进行奇偶拆分,极大复用中间计算结果。 ### [18:52](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1132s) 错失的历史机遇:冷战核军备竞赛的地下蔓延 洞察到 FFT 潜力的理查德·加文迅速采取了行动,他私下联系了 IBM 公司的年轻研究员詹姆斯·库利(James Cooley),委托他编写能够在计算机上高效运行该算法的代码程序。由于冷战期间的极度保密制度,加文没有向库利吐露算法的真实意图是用来从纷繁复杂的地震波中识别苏联地下核试验,而是向他撒了一个天衣无缝的技术谎言,声称这项计算是为了测算氦-3(helium-3)晶体内的自旋量子态。1965 年,库利与图基联合发表了那篇里程碑式的学术论文,FFT 迅速引发了全球工程学和计算机科学的革命。但对于国际核军控外交而言,这记神来之笔来得太晚了。 在 1963 年美英苏签署《部分禁止核试验条约》(PTBT)之前,科学家们因为缺乏足够的远程地震波快速滤波和分析能力,无法向政客打保票能够百分之百鉴别地下核爆与天然地震,导致更彻底的《全面禁止核试验条约》(CTBT)谈判功亏一篑。更令人痛惜的是,条约仅仅禁止了大气层、水下和外太空核试验,却由于核查信心的不足给地下核试验大开绿灯。当时的各大国抱持着一种病态的军备逻辑:既然只准在地下进行试验,为了确保本国核武库的技术迭代不落后于对手,就必须以更高的频率疯狂进行地下爆破。 从 1963 年起直至冷战末期,人类在地下引爆了大约 1,500 枚核武器,相当于整整 30 年间平均每周就有一枚核弹在地底深处炸裂。无节制的地下试验直接助长了核弹头数量的几何级爆炸,至 20 世纪 80 年代中期冷战巅峰时,全球核弹头储备高达 70,000 枚之巨。若经通货膨胀调整,美苏两国在整个 20 世纪为核武库投入的财政开支分别达到了令人咋舌的 10 万亿美元。加文在接受采访时坦承,如果在 20 世纪 60 年代初科学家们就能拥有高效的远程地下核试验识别自信,历史或许会走向截然不同的和平轨道。加文直率地评价道:“Well, it's a good story. It would've helped and it might have turned the tide.”(“嗯,这是个精彩的故事。它本可以帮上忙,而且本可能扭转历史的走向。”) - **地下核试验规模**:1963 年之后进行了约 1,500 次地下核爆,平均每周引爆 1 枚。 - **核武库与军费峰值**:1980 年代中期全球核弹头保有量达到 70,000 枚;美苏各自在核武器上的累计耗资各达约 10 万亿美元。 ### [20:37](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1237s) 高斯的跨世纪密码与现代数字文明 历史的戏剧性在于,这个本该拯救世界免于核军备竞赛深渊的关键算法,早在 160 年前就已经被人类最伟大的数学家所掌握。早在 1805 年,德国数学家卡尔·弗里德里希·高斯(Carl Friedrich Gauss)在研究刚刚被天文学界发现的谷神星(Ceres)、智神星(Pallas)和婚神星(Juno)三颗小行星时,为了计算婚神星的轨道摄动,便独立创立了一种全新的调和分析方法。他在工作笔记上随手写下了这一构想,但随后他又采用了其他数学解法,并未意识到这套推导的划时代意义,因而从未单独公开发表过该成果。 现代科学史研究清晰地表明,高斯早在约瑟夫·傅里叶(Joseph Fourier)于 1807 年正式发表傅里叶级数之前,就已经推导出了离散傅里叶变换的完整逻辑;同时,他还比库利与图基早整整一个半世纪创造出了完全相同的快速傅里叶变换算法。高斯的这一伟大突破之所以沉睡了上百年,是因为该手稿直到他去世后才被收录于《高斯全集》第三卷中;雪上加霜的是,手稿通篇使用了生僻非标准的数学符号,并用一种晦涩难懂的 19 世纪拉丁目语法写成,使得当时及后世的数学界长期未能理解其真正的内涵。 如今,借助现代全球地震台网、高性能计算硬件与成熟的快速傅里叶变换技术,人类已经有能力在全球几乎任何角落精准检测出相当于 1 千吨 TNT 炸药爆炸所产生的 3 级微弱地震信号。而在地质监测之外,自 1965 年库利和图基的论文面世以来,FFT 的应用范围呈现出爆炸式扩张。从电信基站的信号解调到医学磁共振成像(MRI),再到音频与图像视频的各类数据压缩标准,现代数字媒体能够实时且低延迟地传输播放,其底层最关键的计算基石正是这套跨越了两个世纪的快速傅里叶变换算法。 ### [22:10](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1330s) 快速傅里叶变换与二维图像压缩 快速傅里叶变换(FFT)的一大标志性应用是图像压缩。整个处理流程的核心在于将像素的亮度信息转换到频域:首先获取图像中每一行像素的亮度值,对其分别执行快速傅里叶变换,借此解析出每一行亮度变化中所包含的频率成分。在此可视化呈现中,亮度对应各个频率成分的幅值大小,而颜色则反映相位信息(即该频率分量相对于原点向左或向右偏移的程度)。紧接着,再对图像的每一列像素执行相同的 FFT。无论是先处理行还是先处理列,最终目的都是得到原始图像的二维快速傅里叶变换(2D FFT)。 在绝大多数真实世界的图像中,经过二维傅里叶变换后,频域矩阵中的绝大多数数值其实都极度接近于零。为了让观众肉眼看清这些数值分布,视频展示时特别对变换值取了对数(log);但如果恢复原始数值,就会发现绝大部分能量都集中在低频区域,靠近边缘的高频区域数值极小。这意味着算法可以大胆舍弃变换结果中高达 99% 的高频信息,而在执行逆傅里叶变换还原图像时,依然能获得与原图视觉效果高度贴近的画面。因此,计算机在存储与传输图像时,大多利用这种二维变换形式压缩数据,待用户查看时再通过逆变换实时解码还原。 ```mermaid flowchart TD accTitle: 二维快速傅里叶变换图像压缩流程 accDescr: 展示图像从空间像素矩阵经过行与列的FFT变换、频域稀疏化裁剪,最终通过逆变换重构图像的完整数据链路。 subgraph SpatialDomain["空间域处理"] A["原始像素亮度矩阵"] --> B["逐行执行 1D FFT"] end subgraph FrequencyDomain["频域压缩与重构"] B --> C["逐列执行 1D FFT<br>(生成 2D FFT 频域图)"] C --> D["舍弃约 99% 近零高频系数<br>(仅保留关键低频特征)"] D --> E["执行 2D 逆快速傅里叶变换 (IFFT)"] E --> F["还原出高质量视觉图像"] end ``` - 图像行与列的处理次序具有可交换性,无论先做行变换还是先做列变换,数学上完全等价。 - 图像频域边缘对应剧烈的像素变化(高频),现实世界画面平滑过渡居多,因此高频能量通常极低。 - 逆变换(Inverse FFT)运算速度极快,使得设备能够以极低的算力开销即时解压并渲染图像。 --- ### [23:36](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1416s) FFT 的广泛影响与高斯被遗忘的发现 除了图像与多媒体处理,快速傅里叶变换的应用触角延伸到了现代工程与科学的每一个角落。从求解微分方程、驱动雷达(Radar)与声呐(Sonar)探测,到解析晶体微观结构、支撑现代无线通信的核心标准(如 Wi-Fi 和 5G 中的正交频分复用 OFDM 技术),甚至几乎所有类型的数字信号处理,底层都无法脱离 FFT 这一引擎。正如著名数学家吉尔伯特·斯特朗(Gilbert Strang)所作出的极高评价:“the most important numerical algorithm of our lifetime.” 然而,历史给全人类开了一个意味深长的玩笑。卡尔·弗里德里希·高斯(Carl Friedrich Gauss)早在两个多世纪前计算小行星轨道时就发明了该算法,但这一突破性成果长期深埋于手稿之中,并未引起当时学术界的重视。如果这一算法在高斯发现后便得到广泛传播与实践采纳,整个世界在科学计算、工业革命乃至现代技术发展上的演进节奏,本可能会以更迅猛、更剧烈的方式被彻底重塑。 --- ### [24:11](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=1451s) 职业生涯的 80,000 小时与长期影响力 高斯在两百年前推导算法时,绝无可能预见到它会在数字时代爆发出如此巨大的能量;而现实生活中,大多数普通人也常常忽视自己一生的工作所能产生的累积影响力。以常规的职业生涯计算:每周工作约 40 个小时,每年工作约 50 周,按工作 40 年计算,总计约等于 80,000 小时。这意味着一个人的职业生涯,几乎是他改变世界、创造社会价值的最大单一契机。“So what do you wanna do with all that time?” 本期视频的赞助机构“80,000 Hours”(八万小时)正是得名于此。它是一家致力于帮助人们寻找既能带来个人成就感、又能对世界产生积极深远影响的非营利组织,且不销售任何商业产品。传统的职业发展中心或性格倾向测试,往往局限于依据个人偏好推荐职位,或者在提及“行善”时仅能给出当医生或做教师等极少数固有选项。讲述者结合自身经历回忆道,当他大学毕业时,虽然清楚自己热爱电影制作、教学与科学,并渴望对社会产生重大正面影响,但当时 YouTube 根本尚未诞生,他一度深感迷茫,完全不知道前路在何方。 - 80,000 Hours 与牛津大学的学术专家合作开展了超过 10 年的深度研究,致力于探索兼具高成就感与高社会价值的职业路径。 - 该机构提供基于实证研究的职业选择指南、长期更新的播客以及每周通讯,并设立了专门筛选高影响力岗位的招聘看板。 - 其所倡导的核心理念是摒弃“追随你的激情”(Follow your passion)这类缺乏实操性的陈词滥调,转而提供有实证支持、具体详实且具备可行性的职业规划建议。 - 机构提供的所有线上资源均永久免费,订阅其电子通讯的用户可直接免费获赠其实体/电子版深度职业规划指南。 ## Notable quotes > [10:20](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=620s) 检测地下爆炸的真正障碍不是地震仪的精度,而是对地震仪信号进行傅里叶变换所需的大量计算。 — 主讲人 > [07:25](https://www.youtube.com/watch?v=nmgFG7PUHfo&t=445s) 一组正弦波的和可以看起来任意复杂,而且一点也不像它的组成部分。 — 主讲人 ## Mentioned 快速傅里叶变换 (FFT), 离散傅里叶变换 (DFT), 理查德·加温 (Richard Garwin), 约翰·图基 (John Tukey), 詹姆斯·库利 (James Cooley), 卡尔·弗里德里希·高斯 (Carl Friedrich Gauss), 约瑟夫·傅里叶 (Joseph Fourier), 吉尔伯特·斯特朗 (Gilbert Strang), 约翰·F·肯尼迪 (John F. Kennedy), 巴鲁克计划 (Baruch Plan), 部分禁止核试验条约 (PTBT), 全面禁止核试验条约 (CTBT), 欧洲核子研究组织 (CERN), IBM, 80,000 Hours, YouTube ## Video description The Fast Fourier Transform is used everywhere but it has a fascinating origin story that could have ended the nuclear arms race. This video is sponsored by 80,000 Hours. Head to http://80000hours.org/veritasium to sign up for their newsletter and get sent a free copy of their in-depth career guide. A huge thank you to Dr. Richard Garwin for taking the time to speak with us. Thanks to Dr. Steve Brunton of the University of Washington for his help with understanding the Fast Fourier Transform. Thanks to Dr. Cliff Thurber of the University of Wisconsin-Madison, Dr. Paul Richards of Columbia University, and Dr. Steven Gibbons of the Norwegian Geotechnical Institute for their expertise. Thanks to Grant Sanderson of 3Blue1Brown for his helpful feedback on the script. His great video on the Fourier Transform is here - https://youtu.be/spUNpyF58BY ▀▀▀ References: Kristensen, H.M., Korda, M. (2022). Status of World Nuclear Forces. Federation of American Scientists (FAS). https://ve42.co/Stockpile2022 Barth, K. H. (1998). Science and politics in early nuclear test ban negotiations. Physics Today, 51(3), 34-39. - https://ve42.co/Barth1998 Schmalberger, T. (1991). In pursuit of a nuclear test ban treaty - https://ve42.co/Schmalberger1991 Bowers, D., & Selby, N. D. (2009). Forensic seismology and the comprehensive nuclear-test-ban treaty. Annual Review of Earth and Planetary Sciences, 37, 209-236 - https://ve42.co/Bowers2009 Incorporated Research Institutions for Seismology (IRIS). (2022). How Often Do Earthquakes Occur? https://ve42.co/IRIS2022 Kimball, D. (2022). The Nuclear Testing Tally. Arms Control Association. https://ve42.co/TestTally2022 Kværna, T., & Ringdal, F. (2013). Detection capability of the seismic network of the International Monitoring System for the Comprehensive Nuclear Test Ban Treaty. Bulletin of the Seismological Society of America, 103(2A), 759-772 - https://ve42.co/Kvrna2013 Sykes, L. R., & Evernden, J. F. (1982). The verification of a comprehensive nuclear test ban. Scientific American, 247(4), 47-55 - https://ve42.co/Sykes1982 Peterson, J., & Hutt, C. R. (2014). World-wide standardized seismograph network: a data users guide (p. 82). US Department of the Interior, US Geological Survey. - https://ve42.co/Peterson2014 Richards, P. G., & Kim, W. Y. (2009). Monitoring for nuclear explosions. Scientific American, 300(3), 70-77 - https://ve42.co/Richards2009 Jacobsen, L. L., Fedorova, I., & Lajus, J. (2021). The seismograph as a diplomatic object: The Soviet–American exchange of instruments, 1958–1964. Centaurus, 63(2), 277-295 - https://ve42.co/Jacobsen2021 Schwartz S. I. (1998). The Hidden Costs Of Our Nuclear Arsenal: Overview Of Project Findings. The Brookings Institution - https://ve42.co/Schwartz1998 Ricón, J.L. (2016). The Soviet Union: Military Spending. Nintil - https://ve42.co/Nintil2016 Heideman, M. T., Johnson, D. H., & Burrus, C. S. (1985). Gauss and the history of the fast Fourier transform. Archive for history of exact sciences, 265-277 - https://ve42.co/Heideman1985 Ford, D. (2004). Richard Garwin - Session IV. American Institute of Physics (AIP). - https://ve42.co/Ford2004 Aaserud, F. (1986). Richard Garwin - Session I. American Institute of Physics (AIP). - https://ve42.co/Aaserud1986 Goldstein, A. (1997). James W. Cooley, an oral history. IEEE History Center, Piscataway, NJ, USA - https://ve42.co/Goldstein1997 Cooley, J., Garwin, R., Rader, C., Bogert, B., & Stockham, T. (1969). The 1968 Arden House workshop on fast Fourier transform processing. IEEE Transactions on Audio and Electroacoustics, 17(2), 66-76 - https://ve42.co/Cooley1969 ▀▀▀ Special thanks to Patreon supporters: Louis Lebbos, Elliot MIller, RayJ Johnson, Brian Busbee, Jerome Barakos M.D., Amadeo Bee, TTST, Balkrishna Heroor, Chris LaClair, John H. Austin, Jr., OnlineBookClub.org, Matthew Gonzalez, Eric Sexton, John Kiehl, Diffbot, Gnare, Dave Kircher, Burt Humburg, Blake Byers, Dumky, Evgeny Skvortsov, Meekay, Bill Linder, Paul Peijzel, Josh Hibschman, Mac Malkawi, Mike Schneider, John Bauer, jim buckmaster, Juan Benet, Sunil Nagaraj, Richard Sundvall, Lee Redden, Stephen Wilcox, Marinus Kuivenhoven, Michael Krugman, Cy 'kkm' K'Nelson, Sam Lutfi, Ron Neal ▀▀▀ Written by Derek Muller & Felicity Nelson Filmed by Derek Muller & Raquel Nuno Animation by Ivy Tello, Jakub Misiek, Alex Drakoulis, and Fabio Albertelli Edited by Albert Leung & Derek Muller Research Assistant: Katie Barnshaw Additional video/photos supplied by Pond5 and Getty Images Music from Epidemic Sound Produced by Derek Muller, Petr Lebedev, and Emily Zhang [Source](https://www.youtube.com/watch?v=nmgFG7PUHfo)

Source quotes

[10:20] 主讲人: 检测地下爆炸的真正障碍不是地震仪的精度,而是对地震仪信号进行傅里叶变换所需的大量计算。 [7:25] 主讲人: 一组正弦波的和可以看起来任意复杂,而且一点也不像它的组成部分。

Source quotes

[10:20] The real obstacle to detecting underground explosions wasn't the accuracy of the seismometers, it was the vast amounts of computation required to Fourier transform the seismometer signals. [6:06] If you wanna know how much of a particular sine wave is in a signal, just multiply the signal by the sine wave at each point and then add up the area under the curve.

Original transcript

[0:00] This is a video about the most important algorithm of all time, [0:04] the Fast Fourier Transform or FFT. [0:07] I mean, you use it all the time [0:09] including right now to watch this video [0:11] and it's used in radar and sonar, 5G and WiFi. [0:15] Basically, anytime a signal is processed, [0:17] there's a good chance that a Fast Fourier Transform [0:20] is involved. [0:21] But on top of all this, the FFT was discovered by scientists [0:25] trying to detect covert nuclear weapons tests. [0:28] And if they had discovered it sooner, [0:30] it may have put a stop to the nuclear arms race. [0:36] You know I always assumed that the nuclear arms race [0:39] was inevitable, that once the U.S. dropped atomic bombs [0:41] on Hiroshima and Nagasaki, [0:43] it was just unavoidable that all the other major powers [0:45] would develop nukes. [0:47] But maybe it wasn't because it was clear to everyone [0:51] that nuclear weapons were game changing. [0:54] The bomb dropped on Hiroshima released a thousand times [0:56] more energy than the biggest conventional explosive [0:59] so other countries were rightfully concerned. [1:03] At the end of the war, Canada and the U.K. [1:05] requested a meeting to discuss what would be done [1:08] about nuclear weapons. [1:09] And contrary to what I expected, [1:12] the U.S. was actually open to these discussions. [1:15] They realized that they wouldn't be the only nation [1:18] with nukes for long. [1:19] So they offered to decommission all their nuclear weapons [1:22] if other nations would pledge never to make them. [1:28] This was known as the Baruch plan [1:31] and it proposed that an international body would control [1:34] all radioactive materials on earth, [1:36] from mining to refining to using these materials [1:39] for peaceful purposes as a nuclear power generation. [1:43] But the Soviets rejected the proposal. [1:45] They saw it as just another ploy to maintain [1:48] American nuclear dominance [1:49] and so the global nuclear arms race began. [1:55] To develop new nuclear weapons required extensive testing [1:59] and most of it was done in remote places like the Arctic [2:02] or the South Pacific Islands. [2:04] The U.S. also created a nuclear testing site in Nevada, [2:07] the radioactive products of which blew across the country [2:10] so that outside of Japan, the people most adversely affected [2:14] by American nuclear weapons were Americans themselves. [2:18] The U.S. soon graduated from fission weapons [2:21] to thermonuclear bombs which combined fission and fusion [2:24] to release even more energy. [2:28] They were as big leap from the first atomic bombs [2:31] as those devices were from conventional explosives, [2:34] a thousand times again more powerful. [2:37] - Annihilation of any life on earth has being brought [2:41] within the range of technical possibility. [2:48] - [Narrator] In 1954 at Bikini Atoll in the South Pacific, [2:51] the U.S. tested a new thermonuclear design [2:54] that used lithium deuteride as a fuel [2:56] and they expected the device code named Shrimp [2:58] to release the energy equivalent of six million tons of TNT [3:03] but they were wrong. [3:04] (bomb blasts) [3:09] It released two and a half times that [3:11] due to unanticipated reactions with lithium-7. [3:15] And as a result, more radioactive material was created [3:18] and it rained down over a much larger area than planned. [3:22] Residents of neighboring atolls were only evacuated [3:24] three days later suffering from radiation sickness. [3:28] And further east, the 23 crew of a Japanese fishing boat [3:31] were caught in a flurry of radioactive white ash. [3:34] And by that evening, [3:35] they were suffering from acute radiation syndrome. [3:39] One of the crew died from ensuing complications [3:41] six months later. [3:42] - [Reporter] As a result of the extended illness [3:44] brought about by his exposure to the radiation fallout. [3:48] - These events triggered public outcry [3:51] against nuclear testing. [3:52] The modern peace sign was designed in the 1950s [3:55] by combining the semaphore letters for N and D [3:59] standing for nuclear disarmament. [4:01] A number of world leaders called for a comprehensive [4:04] test ban, no more testing of nuclear weapons by any state [4:09] and this call was actually taken seriously [4:11] by the world's nuclear powers. [4:13] They entered into negotiations at meetings [4:15] with very literal names like [4:17] the Conference on the Discontinuance of Nuclear Weapon Tests [4:20] held in Geneva in 1958. [4:24] And to show just how serious they were, [4:26] they even stopped all testing during the negotiations [4:29] which is why 1959 is the only year in a long stretch [4:33] when no nuclear weapons were detonated. [4:36] But there was a big problem with negotiating [4:39] a comprehensive test ban which is how do you know [4:42] that the other side will hold up their end of the bargain? [4:46] The U.S. worried that the Soviets would continue [4:48] testing covertly and leapfrog them technologically [4:51] and the Soviets similarly distrusted the U.S.. [4:55] So to address these concerns, [4:56] they convened the Conference of Experts to Study [4:59] the Possibility of Detecting Violations [5:02] of a Possible Agreement on Suspension of Nuclear Tests. [5:06] Seriously, that was the name, I am not making this up. [5:13] Now detecting atmospheric tests was fairly straightforward. [5:16] The radioactive isotopes they produced disperse [5:19] in the atmosphere and can be detected [5:21] thousands of kilometers away. [5:23] Underwater tests produce distinctive sounds [5:26] that travel efficiently around a kilometer below the surface [5:29] of the ocean and these can be picked up by hydrophones. [5:33] But underground tests are much harder to detect from afar [5:37] because their radiation is mostly contained [5:40] and the Soviets refused to allow onsite compliance visits [5:43] which they regarded as espionage. [5:46] And this is ultimately why when a test ban treaty was signed [5:49] in 1963, it was only a partial ban. [5:53] It banned testing underwater, [5:55] in the atmosphere and in space, [5:57] places where compliance could be verified, [5:59] but it didn't ban testing underground for the simple reason [6:03] that it was almost impossible to verify compliance. [6:06] But scientists had been trying to find a way [6:08] to reliably detect underground detonations. [6:11] Following the Geneva meeting, American and Soviet scientists [6:14] formed a working group to discuss the issue [6:17] and their idea was to use seismometers located [6:20] outside the countries where nukes were being tested [6:22] to detect the faint ground vibrations caused by explosions. [6:27] The problem was how do you distinguish a nuclear test [6:30] from an earthquake? [6:32] Every day around the world, [6:33] there are close to 300 earthquakes [6:35] with a magnitude of three or greater. [6:39] In addition, part of the purpose of detecting [6:41] your adversaries tests is to spy on them, [6:44] to know how big of an explosion they can make. [6:47] But the seismometer signal depends not only on the yield [6:50] of the device but also on how deep it was buried. [6:54] For a given yield, deeper explosions appear smaller. [6:58] So scientists wanted a method to reliably determine [7:01] whether a given signal was a bomb or an earthquake [7:04] and if it was a bomb, how big it was [7:06] and how deep it was buried. [7:09] They knew that all this information was contained [7:11] in the seismometer signal but it couldn't just be read off [7:15] by looking at the squiggles. [7:16] They needed to know how much of different frequencies [7:19] were present which meant they needed to take [7:22] a Fourier transform. [7:25] A Fourier transform is a way of decomposing a signal [7:28] into pure sine waves, each with its own amplitude [7:32] and frequency that add to make it up. [7:35] This seems a bit like magic since the sum [7:38] of a set of sine waves can look arbitrarily complicated [7:40] and nothing like its component parts. [7:44] There are some elegant ways to understand [7:46] how Fourier transforms work, [7:47] shout out to the awesome video by 3Blue1Brown. [7:50] But I wanna take more of a brute force approach. [7:53] If you wanna know how much of a particular sine wave [7:56] is in a signal, just multiply the signal by the sine wave [8:00] at each point and then add up the area under the curve. [8:05] As a simple example, say our signal is just a sine wave [8:08] with a certain frequency but pretend we don't know that [8:11] and we're trying to figure out [8:12] which sine waves add to make it up. [8:15] Well, if you multiply this signal by a sine wave [8:17] of an arbitrary frequency, the two waves are uncorrelated. [8:22] You're just as likely to find places where they have [8:23] the same sign, both positive or both negative [8:26] as where they have opposite signs and therefore [8:29] when you multiply them together, the area above the x-axis [8:32] is equal to the area below the x-axis. [8:35] So these areas add up to zero which means [8:38] that frequency sine wave is not a part of your signal [8:42] and this will be true for almost all frequencies [8:45] you could try assuming you're looking over [8:46] a long enough timeframe. [8:48] The only exception is if the frequency of the sine wave [8:51] exactly matches that of the signal, [8:55] now these waves are correlated [8:57] so their product is always positive and so is the area [9:01] under the curve that indicates [9:02] that this sine wave is part of our signal. [9:06] And this trick works even if the signal is composed [9:08] of a bunch of different frequencies. [9:10] If the sine waves frequency is one of the components [9:13] of the signal it will correlate with the signal [9:15] producing a non-zero area. [9:17] And the size of this area tells you the relative amplitude [9:20] of that frequency sine wave in the signal. [9:24] Repeat this process for all frequencies of sine waves [9:27] and you get the frequency spectrum. [9:29] Essentially which frequencies are present [9:31] and in what proportions. [9:35] Now so far I've only talked about sine waves [9:38] but if the signal is a cosine wave, [9:40] then even if you multiply it by a sine wave [9:42] of the exact same frequency, [9:44] the area under the curve will be zero. [9:47] So for each frequency, [9:48] we actually need to multiply by a sine wave [9:51] and a cosine wave and find the amplitudes for each. [9:55] The ratio of these amplitudes indicates the phase [9:58] of the signal that is how much it's shifted [10:01] to the left or to the right. [10:03] You can calculate these sine and cosine amplitudes [10:05] separately or you can use Euler's formula [10:09] so you only need to multiply your signal [10:11] by one exponential term. [10:13] Then the real part of the sum is the cosine amplitude [10:16] and the imaginary part is the sine amplitude. [10:20] In the American delegation at the Geneva meeting, [10:22] there was a physicist, Richard Garwin [10:24] and a mathematician John Tukey. [10:27] They got into a debate with the Soviet delegation [10:29] over which nation's seismometers were superior. [10:32] So Garwin simulated the responses of both countries' devices [10:36] on a computer at CERN. [10:39] The next day, everyone agreed there wasn't much difference. [10:43] The real obstacle to detecting underground explosions [10:46] wasn't the accuracy of the seismometers, [10:49] it was the vast amounts of computation required [10:51] to Fourier transform the seismometer signals. [10:56] Here's an example seismometer signal [10:58] and its Fourier transform. [11:00] Thus far I've been thinking about signals [11:02] as infinite continuous waves [11:04] and when you take their Fourier transform, [11:06] you get an infinite continuous frequency spectrum. [11:09] But real world signals are not like that. [11:12] They are finite and made up of individual samples [11:14] or data points. [11:16] Even though a seismometer signal looks smooth [11:19] and continuous, it doesn't record ground motion [11:22] with infinite precision. [11:24] There is some fundamental graininess to the data [11:27] so what you have is discreet finite data. [11:30] So you can't use the idealized Fourier transform. [11:34] Instead, you have to perform something [11:37] called a Discreet Fourier Transform. [11:40] And one of the distinguishing features [11:42] of a Discreet Fourier Transform [11:43] is that the frequency spectrum is also discreet and finite. [11:48] You can think of the frequencies [11:49] as falling into a finite number of bins. [11:53] And what determines the number and size of these bins [11:56] is the number of samples in the signal [11:58] and how closely spaced they are. [12:00] For example, the more spaced out the samples are, [12:03] the lower the maximum frequency you can measure. [12:06] Because the samples aren't close enough together [12:08] to capture high frequency oscillations, [12:12] the shorter the duration of the signal, [12:14] the harder it is to tell similar frequencies apart. [12:17] So this lowers the frequency resolution. [12:20] The shorter the signal, the wider each frequency bin is. [12:25] The lowest non-zero frequency you can effectively measure [12:28] is one whose period is equal to the duration of the signal. [12:32] And the higher frequency bins are just integer multiples [12:35] of this frequency. [12:36] So they fit two, three, four, and so on periods [12:40] in the duration of the signal. [12:42] The total number of frequency bins is equal [12:46] to the number of samples in the signal. [12:48] So if the signal is made up of eight samples, [12:51] then the transform has eight frequency bins [12:53] going from zero up to seven times the fundamental frequency. [12:58] So let's do an example. [13:00] Say we have a signal made up of eight samples. [13:03] Well, then the discrete Fourier transform [13:05] will have eight frequency bins. [13:08] The first bin corresponds to a frequency of zero. [13:11] Essentially this measures if the signal [13:13] is systematically shifted off the x-axis. [13:17] You can think of it as measuring the DC offset. [13:20] You multiply each data point by one [13:23] and add them all together, in this case, they add to zero. [13:28] The second frequency bin corresponds to the frequency [13:31] that fits one period in the duration of the signal. [13:34] So in this case that corresponds to one hertz. [13:37] You multiply each point by a sine wave of this frequency [13:41] and a cosine wave of this frequency [13:44] and separately add them up. [13:46] For sine, they add to zero. [13:48] For cosine, they add to four [13:51] and then repeat the process for two hertz, three hertz, [13:54] and so on, up to seven hertz. [13:57] And you have the discreet Fourier transform [14:00] of this really simple signal. [14:02] Now this process works fine in principle [14:05] and you could use it to calculate [14:07] all discrete Fourier transforms. [14:09] But the problem is it requires way too many calculations. [14:14] To complete one discrete Fourier transform [14:16] requires multiplying N data points [14:18] by N different frequency waves. [14:21] So N squared complex multiplications. [14:24] Now this is doable for eight samples [14:27] but if you had say a million samples, [14:30] that would require a million squared [14:32] or one trillion calculations. [14:37] At the speed of 1960s computers, [14:39] that would take over three years to complete, [14:42] all for a single transform. [14:44] Now a million samples is admittedly more than you would need [14:47] for a single seismic event but to analyze tens of events [14:50] per day from hundreds of seismometers, [14:53] it would just be far too time consuming [14:55] and that's what gave scientists the impetus [14:57] to look for a better way. [14:59] And the breakthrough came in 1963 at a meeting [15:02] of the President's Science Advisory Committee. [15:04] President John F. Kennedy was there, [15:06] as were Garwin and Tukey, [15:08] the physicist and mathematician from the Geneva meeting. [15:11] Although they were discussing issues of national importance [15:14] like the Apollo program and nuclear fallout shelters, [15:17] the meeting was apparently pretty boring. [15:19] Garwin observed Tukey doodling throughout [15:23] but what he was actually doing [15:25] was working on discreet Fourier transforms. [15:28] At the end of the meeting, Garwin asked Tukey [15:30] what he had worked out and he was shocked to learn [15:33] that Tukey knew a way to compute discreet Fourier transforms [15:36] with many fewer computations. [15:39] It would mean that the calculation that would've taken [15:40] over three years could be done in just 35 minutes. [15:45] This has aptly become known as the Fast Fourier Transform. [15:49] So here is how it works. [15:53] Consider the example from before with eight samples. [15:56] Each of those data points must be multiplied [15:58] by the eight different frequency waves. [16:00] Here I'm only showing cosines for simplicity. [16:04] So you would expect this to require eight times eight [16:06] or 64 complex multiplication. [16:10] But due to the periodic nature of sinusoids, [16:13] these waves of different frequencies [16:15] overlap in a predictable way. [16:17] For example, at the middle data point, [16:20] all of the four odd frequencies have the same value [16:23] and all of the four even frequencies [16:25] have the same value as well. [16:27] So instead of doing eight multiplication, [16:29] you only need to do two. [16:32] And this sort of duplication occurs [16:33] at the other data points as well. [16:35] So instead of performing 64 calculations, you need only 24. [16:41] Now that might seem like a small improvement [16:44] but it's the difference between a calculation [16:46] that scales as N, the number of samples squared [16:49] versus one that scales as Nlog base two of N [16:52] which means the bigger the data set, [16:54] the greater the savings. [16:56] A signal with a thousand samples would require [16:59] 100 times fewer calculations and a million samples [17:03] would require 50,000 times fewer calculations. [17:08] But how do you know which calculations are redundant? [17:12] Well, take your samples and split them [17:15] into even and odd index points. [17:18] You still need to multiply [17:20] each of these by the eight different frequency waves. [17:23] But now let's look only at the even points and compare [17:26] the first four frequencies to the second four frequencies. [17:31] And what you find is that in each case [17:33] at the location of the samples, [17:35] the values of the two sine waves are the same. [17:39] A similar pattern can be observed for the odd index points [17:43] except the values of one sine wave are the negative [17:46] of the other. [17:47] More generally, they're related by a complex number. [17:51] But what this means is that you don't have to do [17:54] all the multiplication for the second half [17:57] of the frequencies. [17:58] Once you've calculated the odd and even sums [18:01] for the lower half the frequencies, [18:03] you can reuse these values to find the upper half. [18:08] So you've effectively cut the number of calculations [18:10] required in half but that's only a factor of two, [18:15] how do you get down to Nlog base two of N? [18:18] Well, you repeat the same trick, [18:20] split the samples again into even an odd points [18:24] and then again repeatedly [18:26] until you're down to single data points. [18:30] At each split, you can exploit the symmetries [18:32] of sinusoidal functions to cut the number of calculations [18:35] in half. [18:37] And that is how the Fast Fourier Transform reduces [18:40] N squared calculations down to NlogN. [18:44] And it's why today whenever anyone takes [18:45] a Fourier transform, it's almost always done [18:48] as a Fast Fourier Transform. [18:52] Garwin approached an IBM researcher, James Cooley [18:54] to program a computer to run the FFT algorithm [18:58] but he didn't tell him the reason was to detect [19:00] underground Soviet nuclear tests. [19:02] He said it was to work out the spins [19:04] in a crystal of helium-3. [19:06] Cooley and Tukey published the algorithm [19:08] in a seminal 1965 paper and its use immediately took off [19:13] but it was too late to secure [19:16] a comprehensive nuclear test ban. [19:19] By that time, the U.K., France and China [19:21] had joined the Soviet Union and the U.S. as nuclear powers. [19:27] And the partial test ban treaty, [19:28] far from deescalating the nuclear arms race [19:31] just sent it underground. [19:33] The thinking was if you were only allowed [19:35] to test underground, then you better be testing extensively [19:39] so as not to fall behind all the other nuclear states. [19:42] So from 1963, 1,500 nuclear weapons were detonated. [19:47] That's roughly one a week for 30 years. [19:50] This testing facilitated the construction [19:52] of an absurd number of nukes. [19:55] At the peak in the mid 1980s, [19:57] 70,000 nuclear warheads were in existence. [20:01] Total expenditure on nukes in the 20th century [20:03] is estimated at around $10 trillion each for the U.S. [20:08] and the Soviet Union adjusting for inflation. [20:11] If only scientists had been confident in their ability [20:14] to remotely detect underground tests in the early 1960s, [20:17] then a comprehensive test ban could have been reached, [20:20] stopping the nuclear arms race before it really got going. [20:24] To check how realistic this is, [20:26] I asked Richard Garwin himself. [20:29] - Well, it's a good story. [20:32] - It is a good story. [20:33] - It would've helped and it might have turned the tide. [20:37] - But that would've required an earlier discovery [20:40] of the Fast Fourier Transform and as luck would have it, [20:43] it was discovered earlier but then forgotten. [20:48] All the way back in 1805, Mathematician Carl Friedrich Gauss [20:51] was studying the newly discovered asteroids [20:53] of Pallas, Ceres and Juno. [20:56] To determine the orbit of Juno, [20:57] Gauss devised a novel approach to harmonic analysis [21:00] and he jotted it down in his notes [21:02] but later used a different method [21:04] and he never thought to publish that first insight. [21:07] Today we can see that Gauss had figured out [21:10] the discreet Fourier Transform before Joseph Fourier himself [21:13] published it in 1807. [21:15] And he had developed the same Fast Fourier Transform [21:18] algorithm as Cooley and Tukey a century and a half earlier. [21:23] The reason his breakthrough was not widely adopted [21:25] was because it only appeared after his death in volume three [21:29] of his collected works and it was written with non-standard [21:32] notation in a 19th century version of Latin. [21:36] What do you think would've happened if Gauss had realized [21:39] the significance of his discovery and had published it [21:41] in a way that others could understand? [21:44] With our modern network of seismometers [21:46] and computing and the Fast Fourier Transform, [21:48] today, we have the ability to detect magnitude three events [21:51] which correspond to a one kilo ton or so explosion, [21:55] basically anywhere on earth. [21:58] Following Cooley and Tukey's paper, the use of FFTs exploded [22:02] and they are the basis for most compression algorithms [22:05] like the ones that allow you to watch [22:06] and listen to this video. [22:09] Here's how the Fast Fourier Transform [22:10] allows you to compress an image. [22:13] You take the pixel brightness values for each row [22:16] of an image and perform a Fast Fourier transform. [22:20] So essentially, you're figuring out what frequencies [22:23] are present in the brightness values [22:26] of the rows of an image. [22:27] Here, brightness represents the magnitude [22:30] of each frequency component and the color [22:32] represents the phase, how shifted that frequency is [22:35] to the left or the right. [22:37] And then you perform another FFT for the columns of pixels. [22:42] It doesn't matter if you do the rows or columns first, [22:45] which you need is a two dimensional FFT [22:48] of the original image. [22:50] For almost all real world images, [22:53] you find that a lot of the values in the transform [22:56] are close to zero. [22:58] I've taken the log of the transform values [23:00] so you can see them but if I don't, then it's clear [23:03] most of the values, especially toward the edges [23:05] are very small and these correspond to high frequencies. [23:10] And what this means is that you can throw out [23:12] a lot of the information in the transformed image [23:15] say 99% of it. [23:17] But when you invert that result, you still get a fairly good [23:21] representation of the original image. [23:24] So on your computer, most of the images will be saved [23:27] in this form as a two dimensional Fast Fourier Transform [23:30] and then when you wanna look at the picture again, [23:32] the computer simply inverts the transform. [23:36] There are so many applications for FFTs [23:38] from solving differential equations to radar and sonar, [23:42] studying crystal structures, WiFi and 5G. [23:45] Basically all kinds of signal processing use FFTs [23:49] and that's why mathematician Gilbert Strang called the FFT [23:52] the most important numerical algorithm of our lifetime. [23:56] If only it had become more widely adopted [23:59] after Gauss discovered it, [24:00] the FFT may have even more dramatically [24:03] transformed our world. [24:11] Now I don't think Gauss could ever have imagined [24:13] how important the FFT would be, [24:15] just as most people don't think about the cumulative impact [24:18] of their life's work. [24:19] You know in an average career, you work 40 hours a week, [24:23] 50 weeks a year for 40 years [24:25] and that works out to 80,000 hours. [24:28] It means that your career might be your biggest opportunity [24:32] to make a difference in the world. [24:33] So what do you wanna do with all that time? [24:36] Now the name of this video sponsor is 80,000 Hours [24:40] referencing the amount of impact you can have, [24:42] the amount of hours you spend at work, [24:44] and they are not selling anything. [24:46] 80,000 Hours is a nonprofit that helps people [24:48] find fulfilling careers that make a positive impact. [24:52] The typical advice from career centers or aptitude tests [24:55] really just focuses on finding a job [24:56] that fits your personal preferences. [24:58] But what if you care more about doing good? [25:01] Well, they won't really know what to tell you [25:03] besides a few well known professions [25:04] like being a doctor or a teacher. [25:06] When I finished college, I knew I liked filmmaking, teaching [25:10] and science and that I wanted to have a big positive impact [25:13] but YouTube didn't exist yet and so I honestly had no idea [25:17] what I was gonna do. [25:18] Now I feel really fortunate to be able to do something [25:21] every day that I both enjoy [25:23] and which makes a positive impact on the world. [25:25] So believe me, there are a lot of things out there [25:28] that you can do and 80,000 Hours offers tons of resources [25:31] to help you find those things. [25:33] From research backed guides on how to pick a career [25:35] that tackles pressing issues [25:37] to a regular newsletter and podcast. [25:39] They even have a curated job board that's kept up to date [25:42] with hundreds of jobs they think will make an impact. [25:45] They have done over 10 years of research alongside academics [25:48] at Oxford University on how to find a career that is both [25:51] fulfilling and which makes a positive difference. [25:54] So their recommendations are accurate, specific, [25:56] and actionable. [25:57] If you care about what the evidence says [25:59] about having an impactful career and you want real advice [26:02] that goes beyond empty cliches like follow your passion, [26:05] then check out 80,000 Hours. [26:07] Everything they provide from their podcast [26:09] to their job board is free forever. [26:12] If you join the newsletter right now, [26:13] you'll also get a free copy of their in-depth career guide [26:16] sent right to your inbox. [26:17] So to get started on a career that tackles [26:19] the world's most pressing problems, [26:21] sign up now at 80000hours.org/veritasium. [26:25] I will put that link down in the description. [26:27] So I wanna thank 80,000 Hours [26:29] for sponsoring this part of the video [26:30] and I wanna thank you for watching.