📚 The State: A ‘Necessary Evil’ in Mathematics | 数学中的“必要之恶”:状态
In political philosophy, the state is often called a 'necessary evil' – something we resent for its constraints yet cannot live without. Mathematics, too, has its own version of this concept: the notion of state. Whether in a recursive sequence, a dynamic programming problem, or a Markov chain, the state carries all the information needed to move forward, but it also brings complexity, storage burdens, and sometimes a combinatorial explosion. This article explores why the state in mathematics is exactly that – an indispensable nuisance we must learn to manage.
在政治哲学中,国家常被称为“必要之恶”——一种我们厌恶其约束却又离不开的东西。数学中也有类似的概念:状态。无论是在递归序列、动态规划问题还是马尔可夫链中,状态承载着继续推进所需的全部信息,但它也带来了复杂性、存储负担,有时甚至是组合爆炸。本文将探讨为什么数学中的状态正是这样一种——我们必须学会应对的、不可或缺的麻烦。
1. What Is a ‘State’ in Mathematics? | 数学中的“状态”是什么?
A state, in the most general sense, is a snapshot of a system at a given moment that contains all relevant information to determine its future behaviour. In a recursive sequence like the Fibonacci numbers, the state at step n can be thought of as the pair (Fn, Fn-1), because knowing these two values is sufficient to compute Fn+1. The state condenses the past into a minimal yet complete summary.
在最一般的意义上,状态是系统在某一时刻的快照,包含了决定其未来行为所需的所有相关信息。在斐波那契数列这样的递归序列中,第 n 步的状态可以视为 (Fn, Fn-1),因为知道这两个值就足以计算 Fn+1。状态将过去浓缩成一个最小但完整的摘要。
Without a well-defined state, we would be forced to carry the entire history forward, which is both clumsy and inefficient. The state is thus a necessary abstraction. It forces us to pinpoint exactly what matters, discarding irrelevant details. Yet the very act of defining a state can introduce its own headaches: too many state variables, and the problem becomes unwieldy; too few, and the model is inaccurate.
如果没有明确定义的状态,我们将被迫携带全部历史记录前行,这既笨拙又低效。因此,状态是一种必要的抽象。它迫使我们精确指出哪些因素重要,丢弃无关细节。然而,定义状态这个行为本身也会带来麻烦:状态变量太多,问题会变得笨重;太少,模型又会失真。
2. State in Recursive Sequences: Necessary Bookkeeping | 递归序列中的状态:必要的记账
Consider a second-order linear recurrence such as un+2 = 3un+1 – 2un. To generate the sequence, we need two initial values. The state can be represented as a vector (un+1, un). Updating the state becomes a matrix multiplication:
考虑一个二阶线性递推,例如 un+2 = 3un+1 – 2un。要生成数列,我们需要两个初始值。状态可以用向量 (un+1, un) 表示。状态的更新就成为了矩阵乘法:
[un+2, un+1] = [3 -2; 1 0] × [un+1, un]
This representation is elegant and compact, but it is also an evil we must accept: the state vector grows in size if the recurrence is of higher order. A tenth-order recurrence demands a ten-dimensional state, making manual calculation nearly impossible. The state is a necessary evil because we need all those past values to correctly compute the next step, yet we resent the dimensional burden.
这种表示既优雅又紧凑,但也是我们必须接受的恶:如果递推阶数更高,状态向量的大小也会增长。一个十阶递推需要十维状态,使得人工计算几乎不可能。状态是必要的恶,因为我们需要所有这些过去的值来正确计算下一步,却又憎恶维度带来的负担。
3. Dynamic Programming and the Curse of State | 动态规划与状态的诅咒
Dynamic programming (DP) is a powerful technique in decision mathematics (Edexcel D1/D2) that relies entirely on the concept of state. A classic example is the shortest path problem on a directed acyclic graph. Here, the state at a node is the minimum distance from the source to that node. The DP recurrence is:
动态规划是决策数学中的一项强大技术,完全依赖于状态的概念。一个经典例子是有向无环图上的最短路径问题。在这里,节点处的状态是从源点到该节点的最短距离。DP 递推公式为:
d(v) = min(u,v)∈E { d(u) + w(u,v) }
odes, we have O(nm) states. In many real-world problems, the state definition includes multiple parameters – remaining budget, time, inventory level, etc. The product of these parameters creates a ‘state space’ that can become astronomically large. This is the notorious curse of dimensionality: a necessary evil because we cannot solve the problem without tracking these variables, yet the state space makes computation infeasible.
每个状态 d(v) 都必须存储。随着图的增大,状态数量急剧膨胀。如果图是一个 n × m 的网格,我们有 O(nm) 个状态。在许多实际问题中,状态的定义包含多个参数——剩余预算、时间、库存水平等。这些参数的乘积创造了一个可能极大无比的“状态空间”。这就是臭名昭著的维数灾难:一种无法避免的恶,因为不跟踪这些变量就无法解决问题,但状态空间又使计算变得不可行。
To cope, mathematicians invent heuristic methods or approximations, effectively trimming the state space. This is akin to limiting government power – we accept a smaller, less perfect state in order to preserve manageability.
为了应对,数学家发明了启发式方法或近似算法,实际上是修剪状态空间。这类似于限制政府权力——我们接受一个较小、不那么完美的状态,以保持可管理性。
4. Markov Chains: States That Rule Probability | 马尔可夫链:统治概率的状态
In a Markov chain, the future depends only on the present state, not on the sequence of states that preceded it. A state could be a stock level, a weather condition (sunny, rainy), or a board position in a game. The transition matrix P where Pij = P(Xt+1 = j | Xt = i) encapsulates the state dynamics.
在马尔可夫链中,未来只取决于当前状态,而不取决于之前的状态序列。状态可以是库存水平、天气状况(晴、雨),或是游戏中的一个棋盘局面。转移矩阵 P 中 Pij = P(Xt+1 = j | Xt = i) 概括了状态的动态变化。
The state is a 'necessary evil' because without it we cannot compute long-term probabilities or expected hitting times. Yet the state space can be enormous – imagine all possible configurations of a chessboard. Even for a simple random walk with reflecting barriers, the number of states equals the number of positions. The state forces us to think in terms of discrete, often numerous, possibilities, making the problem both solvable and frighteningly large.
状态是“必要之恶”,没有它我们就无法计算长期概率或期望到达时间。然而状态空间可能极为庞大——想象一下棋盘的所有可能布局。即使是一个带反射壁的简单随机游走,状态的数量也等于位置的个数。状态迫使我们以离散的、往往数量繁多的可能性来思考,使问题既可解,又大得吓人。
5. State Equations: Reducing Order at a Price | 状态方程:以降阶为代价
t-order equations by introducing state variables. For example, the second-order equation y'' + 3y' + 2y = 0 becomes:
高阶微分方程或差分方程可以通过引入状态变量转化为一阶方程组。例如,二阶方程 y'' + 3y' + 2y = 0 变为:
x1 = y, x2 = y' → x1' = x2, x2' = -2x1 – 3x2
Now we have two state variables instead of one higher-order equation. This is a necessary trade-off: we increase the number of variables to standardise the form, simplifying numerical and analytical treatment. Yet the state vector has doubled the dimension, and for an n-th order equation we create n state variables. This is the 'evil' we willingly accept for the benefit of a uniform method.
现在我们有了两个状态变量,而不是一个高阶方程。这是一种必要的取舍:我们增加变量数量以标准化形式,简化数值和解析处理。但状态向量使维数加倍,对于 n 阶方程,我们会创造出 n 个状态变量。这就是我们为了统一方法的益处而甘愿接受的“恶”。
6. State Explosion in Backtracking and Recursion | 回溯与递归中的状态爆炸
When solving problems via recursion (e.g., generating permutations or solving the N-Queens puzzle), the state includes the partial solution built so far, the list of remaining choices, and possibly the index of the current choice. This state is passed along the recursion tree. For N-Queens, the state typically comprises the positions of queens placed so far. The number of possible states grows factorially. We prune the state tree to avoid exploring hopeless branches, but we cannot eliminate the state entirely – it embodies the history of our decisions. Thus, the state is the necessary burden that makes backtracking algorithms both powerful and potentially slow.
当通过递归解决问题时(例如生成排列或解决 N 皇后问题),状态包括目前已构建的部分解、剩余选择的列表,可能还有当前选择的索引。这个状态沿着递归树传递。对于 N 皇后问题,状态通常由迄今放置的皇后位置组成。可能的状态数以阶乘级增长。我们修剪状态树以避免探索无望的分支,但无法彻底消除状态——它承载着我们决策的历史。于是,状态成为回溯算法既强大又可能缓慢的必要负担。
7. Why Is the State a ‘Necessary Evil’? A Summary | 为何状态是“必要之恶”?总结
The state is necessary because it condenses the past, provides a complete description of the current situation, and enables systematic progress towards a solution. Without a clearly defined state, we cannot apply recurrence relations, dynamic programming, or Markov analysis. In essence, the state is the mathematical equivalent of memory: you must remember something to compute forward, but the more you remember, the heavier the cognitive or computational load.
状态之所以必要,是因为它浓缩了过去,提供了对当前情况的完整描述,并使系统性地推进求解成为可能。没有明确定义的状态,我们就无法应用递推关系、动态规划或马尔可夫分析。本质上,状态就是数学中的记忆:你必须记住一些东西才能向前计算,但记住得越多,认知或计算负担就越重。
The 'evil' stems from the explosion of possibilities: every additional state variable multiplies the size of the state space. This leads to the curse of dimensionality, where problems become intractable despite having a perfectly clear DP formulation. We resent the state for bringing us to the edge of computability, yet we cannot function without it.
“恶”源于可能性的爆炸:每增加一个状态变量,状态空间的大小就会倍增。这导致了维数灾难,使得尽管有完全清晰的动态规划公式,问题依然变得难以处理。我们憎恶状态将我们推向可计算性的边缘,却没有它就无法运作。
8. The Art of Choosing a Minimal State | 选择最小状态的艺术
A skilled mathematician tries to define the state as parsimoniously as possible. In the classic 'Coin Change' problem, if we only care about the number of coins needed to make an amount, the state can be just the remaining amount A. But if we track which coins have been used, the state expands. The minimal sufficient state is the holy grail: it retains all necessary information while discarding redundancies.
娴熟的数学家试图尽可能精简地定义状态。在经典的“硬币找零”问题中,如果我们只关心凑出某个金额所需的硬币数量,状态可以仅仅是剩余金额 A。但如果我们跟踪使用了哪些硬币,状态就会扩大。最小且足够的状态是圣杯:它保留了所有必要的信息,同时丢弃冗余。
This act of modelling our 'mathematical state' mirrors how we might argue for a minimal but effective government. We tolerate a state that enforces contracts and protects rights, but we resent one that micromanages. Similarly, a well-designed mathematical state makes the solution elegant; a bloated one brings paralysis.
这种对“数学状态”的建模,恰恰反映了我们如何主张一个最小但有效的政府。我们容忍一个执行合同并保护权利的国家,却厌恶一个事无巨细进行微观管理的国家。同样,一个精心设计的数学状态使得解法优雅;一个臃肿的状态则带来瘫痪。
9. State in Game Theory and Decision Trees | 博弈论与决策树中的状态
In sequential games, a state (often called a 'node' or 'information set') captures whose turn it is, what actions have been taken, and sometimes what is known to each player. Solving such games by backward induction requires storing and evaluating a huge number of states. The state here is undeniably evil because it multiplies with every possible move, quickly exceeding human memory. Yet it is necessary to deduce optimal strategies.
在序贯博弈中,状态(通常称为“节点”或“信息集”)捕捉了轮到谁、已采取的行动,有时还包括每个玩家所知的信息。通过逆向归纳法求解此类博弈需要存储和评估数量庞大的状态。在这里,状态无疑是恶的,因为它随着每一步可能的行动而成倍增加,很快超出人类记忆容量。然而要推导最优策略,它又是必需的。
简化后的例子可以是一个两人游戏的小决策树,状态数目以指数增长。我们没办法避免这种增长,只能承受。
A simplified example could be a small decision tree for a two-player game; the number of states grows exponentially. There is no escaping this growth; we must bear it.
10. Coping with the Evil: Techniques for Taming the State | 应对此恶:驯服状态的技术
Over the years, mathematicians have developed an arsenal to fight state explosion: memoisation, state compression, abstraction, and approximate dynamic programming. In memoisation, we store only the states we actually encounter, which may be far fewer than the entire state space. In state compression, we use bitsets or hashes to represent states compactly. Abstracting the state means grouping similar states into a single representative, sacrificing accuracy for speed.
多年来,数学家们发展出一整套武器来对抗状态爆炸:记忆化、状态压缩、抽象化以及近似动态规划。在记忆化中,我们只存储实际遇到的状态,这远比整个状态空间小得多。在状态压缩中,我们使用位集或哈希来紧凑地表示状态。状态抽象则是指将相似状态归入一个代表状态,以牺牲准确性为代价换取速度。
These techniques acknowledge that the state is a necessary evil but argue that the evil can be mitigated. We may never fully eliminate the burden, but we can make it tolerable.
这些技术承认状态是必要之恶,但主张这种恶是可以减轻的。我们或许永远无法完全消除负担,但能使其可以忍受。
11. State in Linear Programming: A Subtle Presence | 线性规划中的状态:微妙的存在
In linear programming, the state is less explicit but still present. The decision variables xj, slack variables, and the values of the basis matrix at each pivot step collectively form a state. The simplex algorithm moves from one basic feasible solution (state) to another. While we don't call it 'state' in the same way, the conceptual burden is analogous: we must keep track of current variable values to decide the next pivot.
在线性规划中,状态不那么显式,但仍然存在。决策变量 xj、松弛变量以及每次换基时基矩阵的值共同构成了一个状态。单纯形法从一个基本可行解(状态)移动到另一个。虽然我们不叫它“状态”,但概念上的负担是类似的:我们必须跟踪当前变量值才能决定下一次换基。
所以,状态这个概念渗透于优化问题之中,不依不饶地成为我们无法抛弃的思维框架。
Thus, the concept of state pervades optimization problems, persistently serving as a mental framework we cannot discard.
12. Conclusion: Embracing the Necessary Evil | 结论:拥抱必要之恶
The state in mathematics is a tool we love to hate. It gives us the power to analyse complex systems step by step, from Fibonacci numbers to industrial logistics. Yet it punishes us with exponential growth when we try to capture too much. Recognising the state as a 'necessary evil' is the first step toward mastering it: we learn to define it parsimoniously, compress it ingeniously, and approximate it when needed. In mathematics, as in politics, the art lies in designing a state that is strong enough to function and small enough to be efficient.
数学中的状态是我们又爱又恨的工具。它赋予我们一步步分析复杂系统的能力,从斐波那契数到工业物流。然而,当我们试图捕捉过多信息时,它又以指数增长惩罚我们。承认状态是一种“必要之恶”是掌握它的第一步:我们学着精简地定义它、精巧地压缩它,并在需要时对其进行近似。在数学中,正如在政治中,艺术在于设计一个既足够强大以运行、又足够小巧以高效的状态。
Published by TutorHao | Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图