When LLMs Meet Combinatorial Explosion: Boundaries of Human-AI Collaborative Puzzle Solving

    A developer tests one of the strongest code-assistant LLMs on a geometry-constrained puzzle from a top quantitative firm. After four hours and two out-of-memory crashes, both the search process and the model fail. The article reconstructs the puzzle, the engineering approach, the combinatorial explosion, and why general LLMs struggle with long-chain precise reasoning and huge state spaces. It argues that constraint solvers are the right tool for combinatorial optimization, while LLMs are better used as modeling assistants in a human–machine–machine workflow. Readers get a practical lesson on matching problem structure to tools.

    When LLMs Meet Combinatorial Explosion: Boundaries of Human-AI Collaborative Puzzle Solving

    1. Origin: Why Challenge AI with a Hard Puzzle

    As a developer who has long followed cross-border technology and intelligent tools, I have always been curious about the reasoning boundaries of LLMs. One day I came across a monthly reasoning puzzle published by a top quantitative firm. Such firms are known for strong mathematical foundations, and their monthly puzzles are often seen as a test of reasoning ability. I decided to challenge it with one of the strongest code-assistant LLMs available.

    Four hours later, both sides had lost. The process was killed by the operating system twice due to memory exhaustion, and the model rarely admitted on its own that it “could not push it to the end.” But the process itself was far more valuable than the final answer: it clearly marked where the reasoning boundary of current LLMs lies.

    2. The Puzzle: A Carefully Designed Geometric Constraint Problem

    Here is a simplified description of the puzzle structure:

    • In a 9x9 grid, some cells are pre-labeled with numbers, and some cells are marked as forbidden areas.
    • You need to draw 90° circular arcs (radius 1) inside white cells, connecting opposite corners.
    • All arcs divide the grid into several closed regions, and each region must have an integer area.
    • The “score” of each region is defined as: region area × the number of smooth arc segments on its boundary.
    • For a numbered cell, the score of the region containing it must exactly equal that number.
    • The final answer = the sum of squares of certain per-row counts + the sum of squares of certain per-column counts.

    The difficulty comes from three coupled layers:

    1. Geometry layer: the orientation of each arc directly affects the region topology.
    2. Arithmetic layer: integer-area requirements and score constraints form nonlinear equations.
    3. Global layer: constraints from 18 regions must be satisfied at the same time, and any local change can trigger a global chain reaction.

    3. The Attempt: An Engineering Approach Led by the LLM

    We did not ask the model to “guess the answer directly.” Instead, we used a standard engineering approach and had the model build a solving system step by step:

    Step 1: Geometry engine. We wrote code to compute the area and number of “smooth segments” of each region under any arc configuration. The model did this well, including polygon Boolean operations and geometric judgments for arc stitching.

    Step 2: Local enumeration. For each numbered cell, we enumerated all geometrically valid local shapes of the region containing it. Problems began to appear: for a single region labeled 35 in the center, there were already 4,553 local candidates.

    Step 3: Constraint propagation and convergence. We tried to use consistency constraints among local solutions to prune gradually and converge to a global solution. By the time we reached the region labeled 45, the set of visited states had exploded. 12 GB of memory was fully exhausted, and the Python process was killed directly by the system’s memory protection mechanism—twice in a row.

    After the second crash, the model gave this judgment: “The state space of this puzzle is designed to be anti-AI. Rather than give you a number that is 99% likely to be wrong, I would rather stop here and say clearly that I cannot do it.”

    This was the first time I had seen an LLM voluntarily give up on a task. Its reason for giving up was completely rational: joint consistency verification across 18 regions is a classic combinatorial explosion, and it fundamentally exceeds the capability scale of “LLM + general search framework.”

    4. Why This Puzzle Is “Anti-AI”

    Looking back at the whole process, three structural weaknesses of current LLMs stand out:

    1. Decay in long-chain precise reasoning. LLM reasoning is generated step by step from context. The longer the chain, the higher the probability of accumulated errors in intermediate states. This puzzle requires dozens of geometric reasoning steps, and after each step the area and segment count must be absolutely precise—there is no room for error.

    2. Lack of true state-space management. A general LLM cannot systematically maintain a search tree, record visited states, and perform efficient backtracking and pruning like a solver. It can write pruning code, but the search space that code faces is astronomically large.

    3. Limited working memory. 4,553 local candidates × multiple regions is far beyond what any context window can hold. The model can only rely on external programs, and those programs are then blocked by physical memory limits.

    A horizontal comparison confirms this: we tried the same puzzle with another mainstream conversational AI product, and it almost completely ignored the constraints, producing a result with no basis. This puzzle requires not a one-shot answer but continuous geometric reasoning and iteration over several hours. Mechanisms that support long-running adaptive reasoning are indeed better suited to this kind of task.

    5. The Right Direction: Specialized Constraint Solvers

    The biggest gain from this failure was a clear principle for technology selection:

    For problems with combinatorial optimization, strict constraints, and huge state spaces, the right tool is a constraint solver, not a general LLM.

    The mature industry approach is to remodel the problem using a constraint satisfaction/optimization solver:

    1. # Illustrative modeling approach (pseudocode)
    2. Variables: arc orientation for each white cell ∈ {two diagonal directions}
    3. Constraint 1: area of each region formed by connected arcs ∈ integers
    4. Constraint 2: for the region containing a numbered cell, area × smooth segment count == labeled number
    5. Objective: minimize the number of unsatisfied constraints (or directly find a feasible solution)

    Such solvers have built-in algorithms accumulated over decades, including arc consistency propagation, conflict-driven learning, and symmetry breaking. Their efficiency in handling combinatorial explosion far exceeds hand-written search.

    A better paradigm is three-layer human–machine–machine collaboration: the LLM understands the puzzle semantics, translates natural-language constraints into a solver model, and debugs modeling errors; the solver performs brute-force but rigorous search; the human judges whether the model faithfully represents the problem. In this architecture, the LLM is a “modeling assistant,” not a “puzzle solver,” which plays to its strengths and avoids its weaknesses.

    In real engineering, such hybrid intelligence solutions can also rely on general-purpose container platforms and elastic compute on the cloud to host long-running solving tasks, use object storage to save intermediate states, and use monitoring and alerting to catch memory or compute bottlenecks in time—avoiding the awkward situation of “running for four hours and being killed twice.”

    6. Conclusion: Acknowledging Boundaries Is the Start of Better AI Use

    In the end, we submitted a candidate answer obtained by greedy filling (choosing the option with the fewest unsolved regions), which was almost certainly wrong. But as the model and I agreed: the first time is about participation and building an understanding of the problem structure; next time we will fight again with the right tools.

    This practice left three lessons for all developers:

    1. LLMs have clear capability boundaries: ultra-long-chain precise reasoning and huge state-space search are not their home turf.
    2. Admitting “I can’t do it” is a valuable model quality, far better than confidently giving a wrong answer.
    3. The essence of technology selection is matching the problem structure: give combinatorial constraint problems to specialized solvers, give semantic understanding and modeling to LLMs, and leave judgment and decisions to humans.

    AI will not replace humans and traditional algorithms in every dimension, but understanding its boundaries is exactly the prerequisite for using it efficiently.