The Same Curve Governs Crime and Code: Why Growth Turns Dangerous Before It Turns Useful

Xuan Qin

Hatched by Xuan Qin

Jun 25, 2026

9 min read

68%

0

What do summer violence and runaway recursion have in common?

A city can get hotter, more crowded, and more stressed, and then crime starts to rise. A recursive function can get deeper, more branching, and suddenly its runtime explodes. At first glance, these belong to different universes: one is sociology, the other is computer science. But both are governed by the same unsettling pattern: small increases in pressure can produce disproportionately large increases in instability.

That pattern matters because it changes how we think about cause. We usually imagine linear systems. More heat means a little more aggression. More calls means a little more computation. But the deeper truth is harsher: in many systems, added stress does not simply add load. It changes the shape of the system itself. Once certain thresholds are crossed, the system starts feeding on its own complexity.

This is the hidden connection between climate, crime, and recursion: the world is full of processes that look manageable until growth turns multiplicative.


The seductive lie of linear intuition

Humans are excellent at imagining straight lines. If temperature rises, surely behavior rises a bit too. If one function call leads to two more, perhaps the program just doubles in effort. Linear thinking feels safe because it feels proportional. Yet many real systems are not proportional at all.

Heat does not merely make people uncomfortable. In dense environments, it can increase irritability, accelerate conflict, and intensify the conditions that already make violence more likely. Economic stress can magnify this effect, because scarcity does not just reduce resources, it raises the emotional and social cost of every interaction. A crowded, overheated neighborhood is not just “a little worse.” It can become a friction machine.

Recursion has the same deceptive quality. A function that calls itself seems elegant and compact. But if each call branches into two calls, and each of those branches again, the number of total calls can balloon toward O(2^n). The code looks simple on the surface. The computation is not. Without memoization, the function keeps solving the same subproblem over and over, turning elegance into waste.

The deeper lesson is not that heat equals crime or recursion equals violence. It is that systems with feedback and repetition can become unstable long before the underlying cause looks dramatic. The danger lives in the structure, not just the trigger.

The most important question is rarely, “How big is the input?” It is, “Does the system compound what it receives?”


When stress becomes self amplification

To understand why these domains rhyme, imagine two rooms.

In the first room, people are standing in a line with plenty of space. If one more person enters, nothing much happens. In the second room, the air is hot, the room is packed, and everyone is already irritated. One additional person may not seem like much, but now a minor dispute can spiral. The extra heat and crowding do not merely add discomfort. They lower the threshold for escalation.

Now imagine a recursive algorithm searching a tree. If the tree is narrow and shallow, the cost is manageable. But if each choice generates two new branches, and those branches overlap in the work they do, the algorithm begins to drown in its own repetition. It is not the existence of recursion that causes the explosion. It is uncontrolled duplication.

That is the real bridge between the two ideas: both systems become dangerous when they contain amplifiers.

In social life, amplifiers include:

  • crowding
  • scarcity
  • frustration
  • weak institutions
  • repeated exposure to stress

In computation, amplifiers include:

  • repeated subproblems
  • branching structures
  • lack of caching
  • hidden exponential growth

The exact mechanisms differ, but the logic is the same. When a system cannot absorb input efficiently, it starts to magnify it. When that magnification crosses a threshold, the system shifts from stable to brittle.

This is why climate effects on crime should not be understood as a simple temperature graph. They are better understood as a feedback ecology. Heat raises tension. Tension worsens interactions. Worsened interactions create more conflict. Economic hardship deepens the strain. The cycle continues.

And this is why memoization is more than a coding trick. It is a principle of governance for computation. It prevents the same work from being redone, cutting off the feedback loop that produces exponential waste.


Memoization is a moral idea, not just a technical one

Memoization is often taught as an optimization technique. Cache the result of a subproblem, avoid recalculating it, and reduce the time complexity. But that explanation is too narrow. Memoization is really a philosophy of refusing to pay twice for the same uncertainty.

That idea has a social analogue.

Communities that repeatedly experience the same shocks, such as heat waves, unemployment, unstable housing, or resource scarcity, often end up reprocessing the same pain. The cost is not only material. It is cognitive and emotional. Every crisis becomes another recursion into the same unresolved condition. People have to solve the same problem again and again because the system never stores a stable answer.

That is why institutions matter so much. Good institutions act like memoization for society. They convert recurring hardship into durable infrastructure, clear procedures, emergency support, and predictable expectations. When a community has functioning cooling centers, accessible mediation, reliable transit, and economic buffers, each new stressor does not need to trigger a fresh improvisation from scratch.

Think of the difference between these two approaches:

  1. A family without savings faces each bill as a new crisis.
  2. A family with reserves and routines absorbs shocks without reentering panic mode.

The first situation is computationally expensive in the deepest sense. Every event requires full recomputation. The second conserves energy by reusing prior structure.

This is why the metaphor of exponential growth matters so much. Exponential systems punish repetition. They do not reward effort proportionally. They reward structure. Whether you are designing code or policy, the goal is to build systems that do not multiply the same burden endlessly.

Efficiency is not just speed. It is the ability to prevent repeated suffering from becoming repeated collapse.


The real battle is between compounding and containment

If there is one thesis that unites these ideas, it is this: the world is shaped less by isolated causes than by whether systems compound stress or contain it.

That reframes the way we think about crime prevention. The usual instinct is to ask what caused a spike. But a better question is: what made the system able to multiply that spike? Did heat push already stressed people into closer contact? Did economic insecurity reduce the margin for error? Did weak institutions allow minor conflicts to escalate? The issue is not just the spark. It is the kindling and the airflow.

The same frame improves how we reason about complexity in software. A program is not slow merely because it has many lines. It is slow because its structure allows the same work to be repeated through a branching process. A well designed recursive solution often succeeds not by avoiding depth, but by containing duplication. Memoization transforms a tree of repeated effort into a map of remembered results.

That is a powerful general rule:

  • If a system is linear, added stress tends to be additive.
  • If a system is recursive, added stress can become multiplicative.
  • If a system has memory, it can absorb shocks more gracefully.
  • If a system lacks memory, it replays the same failure at every level.

This is true in code, and it is true in cities.

A summer heat wave can coincide with higher crime not because temperature alone dictates behavior, but because temperature interacts with density, stress, inequality, and opportunity. Likewise, a recursive algorithm becomes expensive not simply because it calls itself, but because each call may reopen the same branch of work. In both cases, interactions matter more than inputs.


A useful mental model: the staircase versus the tree

To make this concrete, picture two shapes.

A staircase rises step by step. Each step adds a fixed amount of elevation. This is the world of simple intuition, where causes scale in a predictable way.

A tree, by contrast, splits. One branch becomes two, two become four, four become eight. The growth is not just upward, it is outward. That is why trees are the natural image of both recursion and social escalation. Every unresolved conflict can branch into more conflict. Every repeated subproblem can branch into more repeated subproblems.

Now ask: which shape describes your current environment?

  • If your work process repeatedly rebuilds the same artifacts, you are living in a tree.
  • If your team reopens the same argument every week, you are living in a tree.
  • If your city faces the same crisis every summer without durable mitigation, it is also living in a tree.

Once you see the tree, the strategy becomes clear. You do not just work harder. You change the branching factor. You reduce duplication, lower friction, and create memory.

In software, that means memoization, dynamic programming, and smarter reuse. In civic life, that means cooling infrastructure, stronger social supports, and policies that reduce the stressors that feed conflict. In personal life, it means building routines that prevent every setback from becoming a full recomputation of identity.

The common goal is containment. Good systems do not eliminate stress, because they cannot. They prevent stress from becoming self reinforcing.


Key Takeaways

  1. Stop assuming change is linear. Many systems, especially those involving stress or repetition, can turn small inputs into large outcomes.

  2. Look for amplifiers, not just causes. Ask what makes a problem spread: crowding, scarcity, duplication, weak buffering, or repeated exposure.

  3. Build memory into systems. Memoization in code and institutions in society both reduce the cost of solving the same problem repeatedly.

  4. Focus on containment over brute force. The best response to escalating complexity is often not more effort, but less duplication and fewer branches.

  5. Use the tree test. When a problem branches into more of itself, you are no longer dealing with a simple issue. You are dealing with compounding dynamics.


The deepest lesson: complexity is a property of structure

We often talk about crime, climate, and computation as if they were separate domains with separate laws. But the same structural truth runs through them: outcomes are shaped by how systems process pressure, not just by the pressure itself.

That is why some hot months see more violence, why some recursive algorithms collapse into inefficiency, and why some institutions absorb shocks while others fracture under them. The key variable is not size alone. It is whether the system stores, reuses, and absorbs, or whether it branches, duplicates, and amplifies.

Once you internalize that, you begin to see the world differently. You stop asking only, “What happened?” and start asking, “What kind of system was this, one that could turn a small push into a large cascade?”

That question is more powerful because it applies everywhere. It is the question behind robust code, resilient cities, and stable lives. And it leads to one final reframing:

The challenge is not to eliminate all pressure. The challenge is to design systems that do not turn pressure into multiplication.

That is the shared logic of memoization and social resilience. Both are ways of saying: let the world be complex, but do not let it become self defeating.

Sources

← Back to Library

Hatch New Ideas with Glasp AI 🐣

Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)

Start Hatching 🐣