Sameer Wagh set out to test the outer limits of large language models on a genuine open question in combinatorics. On July 26, 2026, he published findings that show an LLM agent can discover a strategy matching the tightest known upper bound for identifying a hidden permutation of 16 elements using adaptive bit queries. The work, detailed on his personal site, offers a fresh case study in how today’s models handle sequential decision-making under tight resource limits.
Wagh framed the challenge around a simple card game that grows into something far harder. Start with four cards from a deck – the ace and king of hearts and spades. Ask only whether a chosen card is red or a king. The task is to figure out the full layout with as few questions as possible. Scale that idea to 16 unique cards, each tied to a 4-bit value from 0 to 15. Four binary properties let you read each bit. Identify every card’s identity and position. A brute-force approach takes 64 queries. Information theory sets a floor of 45. The exact number required in the worst case against an adversarial responder sits somewhere in between. Wagh conjectures it equals 46. (snwagh.com)
Call that number D(16). A hidden permutation scrambles the values. Each query picks a card and a property, reveals one bit of the hidden value, and the process stops when only one permutation fits all answers. Strategies must adapt based on previous responses. The problem connects to decision trees, bipartite matchings, and even symmetries that shrink the search space. Wagh notes its similarity to problems Terence Tao has called attentionless. Progress here does not rely on pattern matching from training data alone. It demands genuine search and verification.
He began with strategies a human could devise on paper. Reading all properties on all cards guarantees success in 64 queries but wastes effort. Skip the last card and deduce it from the rest: 60 queries. A recursive approach that infers the most significant bit on the final card in each group, then repeats for smaller subgroups, drops to 49. Further refinement using known optimal solutions for eight-card subproblems reaches 47. Simple entropy splitting fails to hit the best bound on the eight-card case, though biased variants succeed.
But pen-and-paper methods hit a wall. So Wagh built a meta-harness. The LLM agent proposes ideas, writes code, runs experiments, reads results, and iterates. Everything ran on a single MacBook. No GPU clusters. No massive token budgets. Each attempt lived in its own folder. Failures stayed beside successes. The agent needed initial steering but improved as guardrails tightened. Over fifty versions, performance climbed.
The campaign produced a proven worst-case strategy of 46 queries. That matches the conjecture. An exhaustive minimax search confirmed it within computational limits. Sampled heuristics sometimes showed averages near 45 with worst cases at 46. The best guaranteed bound stepped down only when a new method proved its claim. Wagh included an interactive browser version so readers can test smaller variants themselves. The eight-card puzzle already shows how counterintuitive optimal play can become.
His results echo a famous episode in sorting networks. Donald Knuth long listed a 60-comparator network for 16 inputs as the best known. For decades its optimality remained unproven. Recent work finally settled some of these cases. A 2017 paper in the Journal of Computer and System Sciences examined optimal-depth sorting networks and noted the extreme difficulty of proving minimality for n=16. (sciencedirect.com) Earlier analysis from 2021 on jix.one walked through proofs for smaller networks that Knuth had cataloged. (jix.one) The parallel feels deliberate. Both involve adversarial worst-case analysis on combinatorial objects that resist brute force.
Recent discussions on X highlight growing interest in AI’s role with open mathematical questions. On July 28, 2026, user @chengkai_z described how frontier models helped solve a stuck problem on quantum channel capacity, work that had lingered since 2022. The arXiv preprint appeared alongside the post. Similar threads point to verification as the persistent bottleneck. One user noted that feeding open-problem lists to models is easy; confirming the solutions is not. Another highlighted economics and real-world feedback as potential signals for self-improving agents. These conversations suggest Wagh’s constrained, verifiable setup sits at a sweet spot. (x.com)
Yet the achievement stays narrow. The agent did not conjure the 46-query strategy from nothing. It explored a search space shaped by human guidance, ran exhaustive checks that a laptop could finish over a weekend, and benefited from clever state-space reductions. Wagh emphasizes the joy in watching models tackle objective, verifiable tasks. Their mechanisms remain surprisingly simple. Collective human engineering produced them. The wonder comes from seeing that simplicity yield concrete progress on a problem that sits outside easy pattern recall.
Resource limits mattered. Industrial labs can throw clusters at proof search or reinforcement learning. Wagh operated under realistic solo-researcher constraints. That practicality may explain why the experiment succeeded where broader claims about mathematical superintelligence still falter. The conjecture that D(16) equals 46 now has computational backing. Closing the gap to the information-theoretic limit of 45 remains open. Any strategy that proves 45 would rewrite the bound.
Connections to other domains keep surfacing. The query model resembles group-testing problems, adaptive coding, and certain database index designs. Automorphisms that exploit symmetry shrink the 16! permutations dramatically. Dynamic programming over consistent sets offers one attack vector, though memory grows fast. Wagh tried several formulations. The LLM harness navigated them without explicit instruction on every mathematical link.
Fast Company recently ran a piece arguing that AI still faces one unsolved problem. The article, published shortly before Wagh’s post, focused on reliability and real-world grounding rather than pure combinatorics. It captured the same tension: impressive capabilities exist, yet guarantees in adversarial or sparse-data settings stay elusive. (fastcompany.com)
Wagh closes his account with lessons from the collaboration. The agent excelled when the objective stayed crisp and feedback remained immediate. Vague prompts produced wandering code. Tight loops that paired proposal, implementation, execution, and critique drove steady gains. Reproducibility across isolated folders prevented regression. Exhaustive verification, even when expensive, provided the only trustworthy signal. Those observations align with broader commentary on X about verifiers and economic grounding for recursive improvement.
The card game itself entertains. Visitors drag questions onto face-down cards and watch possibilities collapse. With 24 arrangements left and a five-query floor, even the four-card version sharpens intuition. Larger instances reveal how quickly the decision tree branches. A single misplaced query can leave multiple permutations alive deep into the sequence. Optimal play often queries the same property across many cards early, then drills into subgroups. The interactive demo makes the abstract concrete.
So what does this mean for the field? It shows that current models, guided properly and paired with verification harnesses, can push on problems that combine search, adaptation, and proof. They will not replace mathematicians. They can accelerate exploration of spaces too large for manual enumeration. But every claim still needs the exhaustive check or formal proof. Wagh’s MacBook experiment sets a useful precedent. Others can replicate the harness on their own hardware. The conjecture may fall. Or it may stand. Either outcome advances understanding.
Interest in these boundary problems continues to build. A July 28 post from @lionellevine discussed the value of living open-problem lists that record progress and spawn variants. His list aims to do exactly that. Another user asked how to validate an AI-assisted solution to a MathOverflow question suspected to be open. The community response stressed careful verification and contact with domain experts. The pattern repeats: models propose, humans and machines together confirm.
Wagh’s work adds one more data point. An LLM agent found a 46-query strategy. The bound matches the conjecture. The gap to 45 persists. And the method – iterative, resource-aware, fully reproducible – offers a template worth copying. Mathematics has always progressed through a mix of insight and exhaustive effort. Today’s tools tilt the balance. They do not eliminate the need for rigor. They simply let a single researcher on a laptop join the conversation at a higher level than before.


WebProNews is an iEntry Publication