Did the Problem Actually Get Harder? Testing LLMs on Paired P and NP-Complete Problems Hardened by Adversarial Multi-Agent Rewriting
Nurul Labib Sayeedi, Md. Faiyaz Abdullah Sayeedi, Zabir Al Nazi, Mahbub E Sobhani, Shubhashis Roy Dipta
Abstract
Many NP-complete (NPC) problems have a polynomial-time (P) twin that differs in a single structural detail, such as 3- versus 2-colouring a graph. A model that reasons rather than recalls should notice which side of this boundary a problem falls on, yet existing benchmarks either fix the wording of each task or ignore its complexity class, so they cannot separate the two. We introduce P2NPCBench, a benchmark of 12 problem families in which every NPC problem is paired with a P twin posed over the same surface. To remove the textbook cues that enable recall, we build it with AgentGAN, an adversarial multi-agent framework in which a generator rewrites each statement until a panel of frozen code models fails, while an executable validity gate keeps every rewrite answer- and class-preserving. The result is 2,114 hardened statements with hand-verified reference human solvers. Evaluating 12 proprietary and open-source models, we find that every model scores lower on NPC statements than on their P twins (35.4% vs. 63.8% pass@1), and that 95.1% of model-family pairs fail more often on the NPC side. A tenfold time limit raises NPC accuracy only from 28.5% to 31.9%, so failures stem from wrong or crashing programs rather than slow ones. Hardening also narrows the class gap from 24.8 to 14.6 points, showing that part of the apparent gap reflects familiarity with textbook phrasing rather than complexity class.
Create a lesson
Related papers
LongZero: Enhancing Long-Context Reasoning in LLMs from Zero Data
Zhennan Wan, Jianfei Chen
Environment Duels: A Microcosm of LLM Co-Evolution
Shibo Jin, Zhiqiu Xu, Yiling Zou et al.
Quant-Arena: Benchmarking LLM Agents for Quantitative Trading Research
Houde Qian, Zheng Jiang, Wenyi Li et al.
GoiBERT: Compact Vietnamese Language Models via Two-Stage Knowledge Distillation
Quang Anh Kiet Tran, Nam Anh Tran, Manh Hung Trinh et al.
Looped Uniform Diffusion Language Models
Saiteja Utpala, Chieh-Hsin Lai, Yuki Mitsufuji et al.
What the Author Wrote, What the Agent Reads: Silent Cue Loss in Enterprise Document Ingestion
Yikai Zhao, Saurabh Pandey, Pradeep Kumar Misra