惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
T
Threat Research - Cisco Blogs
GbyAI
GbyAI
Y
Y Combinator Blog
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
S
SegmentFault 最新的问题
IT之家
IT之家
Recent Announcements
Recent Announcements
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
阮一峰的网络日志
阮一峰的网络日志
T
The Blog of Author Tim Ferriss
Martin Fowler
Martin Fowler
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
WordPress大学
WordPress大学
博客园 - Franky
L
LangChain Blog
人人都是产品经理
人人都是产品经理
小众软件
小众软件
博客园 - 叶小钗
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
云风的 BLOG
云风的 BLOG
Vercel News
Vercel News
雷峰网
雷峰网
腾讯CDC
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Help Net Security
Help Net Security
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News and Events Feed by Topic
V2EX - 技术
V2EX - 技术
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Schneier on Security
Schneier on Security
博客园 - 聂微东
A
Arctic Wolf
H
Heimdal Security Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Recent Commits to openclaw:main
Recent Commits to openclaw:main
T
The Exploit Database - CXSecurity.com
C
Cyber Attacks, Cyber Crime and Cyber Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Google DeepMind News
Google DeepMind News

Hacker News

Introducing Claude Opus 4.7 Qwen Studio The Future of Everything is Lies, I Guess: Where Do We Go From Here? GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Moving a large-scale metrics pipeline from StatsD to OpenTelemetry / Prometheus GitHub - Nightmare-Eclipse/RedSun: The Red Sun vulnerability repository GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - macOS26/Agent: Any AI, replaces Claude Code, Cursor, OpenClaw. Over 18 LLM providers (Claude, OpenAI, Gemini, Ollama, Zai, HF, Qwen) wired into a native Mac app that writes code, builds Xcode projects, bumps versions, manages git, automates Safari, use AppleScript, JS or Accessibility, extend Agent! w/ MCP Servers, run tasks from your iPhone via Messages. YouTube now lets you turn off Shorts I Made a Terminal Pager Burgers | マクドナルド公式 Commands — HackerNews CLI documentation ChatGPT for Excel PiCore - Raspberry Pi Port of Tiny Core Linux Live Nation illegally monopolized ticketing market, jury finds Google Broke Its Promise to Me. Now ICE Has My Data. Founding Engineer at Adaptional | Y Combinator CRISPR takes important step toward silencing Down syndrome’s extra chromosome GitHub - saffron-health/libretto: The AI toolkit for building reliable browser automations US v. Heppner (S.D.N.Y. 2026) no attorney-client privilege for AI chats [pdf] Unexpected €54k billing spike in 13 hours: Firebase browser key without API restrictions used for Gemini requests Retrofitting JIT Compilers into C Interpreters IPv6 – Google The Accursèd Alphabetical Clock Cybersecurity Looks Like Proof of Work Now Fragments: April 14 Cal.com Goes Closed Source: Why AI Security Is Forcing Our Decision | Cal.com - Scheduling Software for Online Bookings Laravel raised money and now injects ads directly into your agent When moving fast, talking is the first thing to break Too much Discussion of the XOR swap trick – Heather Cafe Introduction to Spherical Harmonics for Graphics Programmers The Grand Line Building a Z-Machine in the worst possible language High-Level Rust: Getting 80% of the Benefits with 20% of the Pain GitHub - duguyue100/midnight-captain: Inspired by Midnight Commander, tailored to my taste. How to build a `git diff` driver · Jamie Tanna | Software Engineer Center for Responsible, Decentralized Intelligence at Berkeley The Local Universe’s Expansion Rate Is Clearer Than Ever, but Still Doesn’t Add Up - A new synthesis of astronomical measurements confirms a persistent mismatch that could point to physics beyond current models The air throughout our homes is infused with microplastics. But there are things you can do to breathe less of them The disturbing white paper Red Hat is trying to erase from the internet – OSnews The Future of Everything is Lies, I Guess: Annoyances ‘Abhorrent’: the inside story of the Polymarket gamblers betting millions on war Productive procrastination — Max van IJsselmuiden maps, territory and LMs 447 Terabytes per Square Centimetre at Zero Retention Energy: Non-Volatile Memory at the Atomic Scale on Fluorographane Show HN: Pardonned.com – A searchable database of US Pardons 20 Years on AWS and Never Not My Job The Seasons are Wrong Artemis II crew splashes down near San Diego after historic moon mission We gave an AI a 3 year retail lease in SF and asked it to make a profit | Andon Labs How a dancer with ALS used brainwaves to perform live On filing the corners off my MacBooks Installing every* Firefox extension OpenClaw’s memory is unreliable, and you don’t know when it will break Steve Blank Nowhere Is Safe Chimpanzees in Uganda locked in vicious 'civil war', say researchers watgo - a WebAssembly Toolkit for Go linux/Documentation/process/coding-assistants.rst at master · torvalds/linux GitHub - callumlocke/json-formatter: Makes JSON easy to read. Founding Product Engineer at Bild AI | Y Combinator A compelling title that is cryptic enough to get you to take action on it GitHub - Keychron/Keychron-Keyboards-Hardware-Design: Industrial design files for Keychron keyboards and mice. 100+ models with CAD assets in STEP, DXF, DWG, and PDF. Source-available, with commercial use allowed for original compatible accessories within the license terms. [ANNOUNCE] WireGuardNT v0.11 and WireGuard for Windows v0.6 Released 1D-Chess Helium Is Hard to Replace Cooperative Vectors Introduction | Evolve Keeping a Postgres queue healthy — PlanetScale Our response to the Axios developer tool compromise Do Americans read print books, e-books or audiobooks more? The Zettelkasten Method in Obsidian: A Practical Setup Guide Artemis II Is Competency Porn and We Are Starving For It WeakC4 Flight Viz — Cockpit View A Mexican surveillance giant you’ve never heard of is now watching the U.S. border Surelock: Deadlock-Free Mutexes for Rust RISC-V 101 – what is it and what does it mean for Canonical? | Ubuntu The Problem That Built an Industry How Much Linear Memory Access Is Enough? | Solidean Investigating Split Locks on x86-64 Simplest hash functions Sybilproof reputation mechanisms (2005) [pdf] What is a property? How Complex is my Code? Static code analysis in Kotlin — tools overview Toffoli gates are all you need PGLite evangelism dcmake: a new CMake debugger UI Clojure on Fennel part one: Persistent Data Structures Fragments: April 2 Python Release Python install manager 26.1 The Life and Death of the Book Review - Liberties Introducing Database Traffic Control — PlanetScale Bitcoin miners are losing $19,000 on every BTC produced as difficulty drops 7.8% God sleeps in the minerals Building slogbox Apple Silicon and Virtual Machines: Beating the 2 VM Limit Who was “Not Even Wrong” first? Pokemon Evolution Vs Darwinian Evolution The APL Programming Language Source Code
Seven Perfect Shuffles Randomize a Deck of Cards. But How Many Sloppy Ones? | Quanta Magazine
John Pavlus · 2026-06-17 · via Hacker News

In 1992, mathematicians famously proved that seven “riffle shuffles” — the kind where a player splits a deck of cards into two piles, then uses their thumbs to interleave them back together in a zipperlike motion — are enough to mix up the deck.

When Dave Bayer and Persi Diaconis came up with this proof, they also revealed something surprising about what happens along the way: At first, the cards stay relatively orderly. But with that seventh shuffle, the deck suddenly tips into a highly unstructured state. This kind of behavior, called a cutoff phenomenon, is of interest beyond cards, and many dynamical systems — including “spin glasses” in condensed matter physics — are believed to exhibit it.

Unfortunately, Bayer and Diaconis’ proof — referred to by some as a mathematical miracle — only works if you adhere to some rigid constraints about how to cut and shuffle the deck. If you shuffle more like a middle schooler than a magician, the result doesn’t hold.

Now three mathematicians have finally extended the finding to less precise shuffles. Mark Sellke, a Harvard University statistician currently on leave to work at OpenAI, along with Jialu Shi and Jiamin Wang (graduate students at the University of Cambridge and Princeton University, respectively), proved that a cutoff phenomenon exists for riffle shuffling even when you don’t cut the deck into two nice, even piles.

Diaconis was effusive about the update to his work. “It’s a fresh idea, and it’s remarkable that something like that would work as effectively as it does,” he said. “It’s a brilliant piece of mathematics.”

Mixing Cold Spots

To call the humble riffle shuffle “complicated” sells it absurdly short. The number of possible arrangements for an ordinary deck of cards is 52 factorial — that is, 52 × 51 × 50 × … × 3 × 2 × 1, or (roughly speaking) an 8 followed by 67 zeros, close to the estimated number of atoms in our galaxy. Another way to put the figure into context: Every time you shuffle a deck of cards, you produce a configuration that has almost certainly never existed before, and never will again.

But mathematical interest in card shuffling goes beyond its combinatorial complexity. Back in 1981, Diaconis and Mehrdad Shahshahani discovered cutoff phenomena in the context of card shuffling — after which mathematicians started to uncover them all over the place.

Man wearing a hat and plaid shirt.

Persi Diaconis ran away from home when he was 14 years old to work with a magician. He returned to school 10 years later and became a professional mathematician. Card tricks continue to play a role in his research.

Caroline Gates

Cutoffs are similar to phase transitions in physics, such as the sudden crystallization of liquid water into solid ice at zero degrees Celsius. But cutoffs occur in the specific mathematical context of “Markov chains,” mathematical models that probabilistically describe how a system (like a deck of cards) moves between different configurations.

Cutoff phenomena, as their name suggests, happen in much the same way as Ernest Hemingway famously described going bankrupt: gradually, then suddenly. And while cutoffs are ubiquitous — they’re expected to occur in “most large, complex systems,” according to Sellke — it’s also hard to prove general theorems about them. “For most problems where one thinks there is a cutoff,” said Laurent Saloff-Coste, a mathematician at Cornell University who has collaborated with Diaconis, “one doesn’t know how to prove it.”

That’s why the “seven shuffles are enough” theorem was such a big deal. Bayer and Diaconis — who as a teenager ran away from home to apprentice with a magician specializing in card tricks, before becoming a renowned mathematician — didn’t just prove the existence of a precise cutoff in a real-world system. They provided a single formula for where that cutoff should be, and that formula worked for decks of any size.

Yet terms and conditions also apply. One: The riffle shuffle has to follow a realistic but strict model where cards are randomly interleaved from the left or right pile one by one. (Each card gets dropped from either the left or the right pile with a probability that’s proportional to the number of cards remaining in that pile. This means that the cards don’t simply alternate between left and right, which would result in a predictable structure; instead, the order might go “left, right, right, left, right, left, left.”)

Two: The deck has to be cut more or less in half before shuffling.

“All of our analysis depends on those details,” Diaconis said.

In 1999, Steven Lalley, a mathematician at the University of Chicago, attempted to loosen those constraints by seeking a cutoff proof for riffle shuffles that didn’t start with roughly evenly cut decks. “It seemed natural to me to ask — there are some people who tend to cut the deck a little higher or a little lower,” he said.

These less evenly cut decks have sets of cards that tend to stay in the same relative order even after multiple shuffles. While the rest of the deck looks well mixed, these particular sets of cards — which Lalley called “cold spots” — still retain information about their original locations in the deck.

Imagine, for instance, that you label your cards 1 through 52. After multiple shuffles, cards 16 and 17 will no longer appear right next to each other in the deck, but 16 might still tend to appear before 17 more often than it would in a random deck. If many pairs within a section of the original deck — say, cards 15 through 25 — show similar biases, then that set of cards forms a cold spot.

Lalley hoped to prove that when those cold spots disappeared, so would the last traces of order in the deck — giving him a way to show the existence of a cutoff.

But he couldn’t prove it.

Tracking Labels

Two decades later, in 2019, the son of Lalley’s collaborator Thomas Sellke — Mark, then a graduate student at Stanford University — found himself in one of Diaconis’ classes, where he learned about the original seven-shuffles result. “He mentioned offhandedly that if you don’t cut the deck in half, then nothing [about the proof] works anymore,” Mark Sellke recalled. “I was like, ‘This is it? … Come on, we must be able to do this.’”

By 2021, Mark Sellke had pinpointed the cutoff for decks cut much more unevenly than those in Bayer and Diaconis’ original work — including for decks cut into more than two piles. But the deck still had to be cut in the same way between each shuffle. He wanted a more realistic result, where the cuts from one shuffle to the next might look very different. And so in the summer of 2024, he teamed up with Shi and Wang, who had also expressed interest in the problem.

The trio first assigned each card a barcode. It starts when you cut the deck. All the cards in the left pile get assigned the number 1; those on the right, zero. Now shuffle, randomly interleaving the cards from the two piles one by one. Cut the deck again. If a card ends up in the left pile, add a 1 to its label; if it ends up in the right pile, add a zero.

As this process repeats through more riffle shuffles, each card builds up a longer and longer barcode of ones and zeros, which encodes its path through the shuffling process as it hops from left to right and back again. For instance, if the 17th card has a barcode of 0110 after four shuffles, that means it started in the right pile, ended up on the left twice, and then landed back on the right.

These numbers create a unique tracking label for every card in the deck. If two cards that started out in the same relative order — say, 16 and 17 — end up with the same barcode of ones and zeros, that means they took the exact same path through the shuffling process and are still in the same relative order.

To prove the presence of a cutoff, you have to show that very few of those matching barcodes remain after a certain number of shuffles — no matter how many cards you started with, or how the deck was cut. But comparing every barcode is time-consuming. Fortunately, the cold spots offer a shortcut, just as Lalley had hoped. Since those are the regions in the deck that tend to resist mixing, they’re the only places you have to check for barcodes that match.

Start with a deck of n cards and list the barcodes of all the cards in the deck’s cold spots in ascending order.