# A Knapsack by Any Other Name: Presentation impacts LLM performance on NP-hard problems

arXiv: https://arxiv.org/abs/2502.13776 · HTML: https://mlsanity.com/paper/2502.13776/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- Builds on 1 of its 6 references that are in the map.
- First posted on arXiv 19 Feb 2025.

## Builds on (most cited first, 1 of 1)

- [Can Large Language Models Reason and Plan?](https://mlsanity.com/paper/2403.04121/) (2024)

## Built on by (most cited first, 5 of 5)

- [What Makes an LLM a Good Optimizer? A Trajectory Analysis of LLM-Guided Evolutionary Search](https://mlsanity.com/paper/2604.19440/) (2026)
- [Formalize, Don't Optimize: The Heuristic Trap in LLM-Generated Combinatorial Solvers](https://mlsanity.com/paper/2605.12421/) (2026)
- [ZEBRA: Zero-shot Budgeted Resource Allocation for LLM Orchestration](https://mlsanity.com/paper/2605.20485/) (2026)
- [Barriers to Universal Reasoning With Transformers (And How to Overcome Them)](https://mlsanity.com/paper/2604.25800/) (2026)
- [LLM and Human Modes of Representation](https://mlsanity.com/paper/2606.21616/) (2026)

## Abstract (arXiv)

To investigate the effect of problem presentation on LLMs' ability to solve optimization problems, we introduce the dataset of Everyday Hard Optimization Problems (EHOP), a collection of NP-hard problems expressed in natural language. EHOP includes problem formulations that could be found in computer science textbooks (e.g., graph coloring), versions that are dressed up as problems that could arise in real life (e.g., party planning), and variants with inverted rules. We find that state-of-the-art LLMs, across multiple prompting strategies, systematically solve textbook problems more accurately than their real-life and inverted counterparts. While reasoning models are more capable, they nonetheless show high variance across problem presentations, suggesting they lack a truly robust reasoning mechanism. We argue that this constitutes evidence that LLMs are still heavily dependent on what was seen in training and struggle to generalize to novel problems.
