定点,这在计算机科学领域意味着什么


19

我在stackexchange上经常遇到关于定点问题的参考,并且在网上查找含义,显然是在诸如Wikipedia之类的网站上找到参考。但是,这些参考文献都没有真正回答我的问题,即什么是固定点及其在计算机科学领域的含义。


1
即使定点的概念通常源于某些对使得f x = x,但在许多不同的框架中,该术语的使用具有不同的含义和结果。f,xf(x)=x
拉斐尔

Answers:


17

在计算机科学中,定点的最有争议的用途是格论 ¹。点阵是部分有序集与附加的属性,给出的任何两个元素X ÿ 小号,该组{ X ÿ }既具有确界和下确界(在小号)。(S,)x,yS{x,y}S

现在您经常考虑单调函数这个格子其“收敛”,这是一些X 小号你有˚F X = X。该领域的重要结果是Kleene不动点定理Knaster-Tarski定理fxSf(x)=x

一个突出的实例是格一些组,和˚F通过电感定义诱导。例如,让= { 一个b } *和我们定义一个语言大号2 { 一个b } *(2A,)AfA={a,b}L2{a,b}

wLε,aLawLbawLbwLabw,bbwL

此归纳定义对应于单调函数

f(A)={ε,a}A{bawawL}{abw,bbwbwL}

通过克纳斯特-塔斯基定理,我们知道具有这是所有更小的“中间结果”(其对应于有限经常施加归纳定义的构造函数),并且最小的不动点是确实的上确界最小固定点大号fL

顺便说一下,最大的修复点也有用途。请参阅此处的示例。


在递归理论中,还有另一个定点定理,这也是由于克莱因。它 ²,

一个哥德尔数 ³和- [R ÑÑ共有,可计算函数(直觉:一个编译器)。再有就是Ñ使得φ - [R = φ φr:NNiNφr(i)=φi

实际上,甚至有无限多个这样的。如果只有有限的地方,我们可以修补r(通过查表)不具有定点,这与定理矛盾。ir


  1. 每个人每天都在使用它,即使您没有意识到。
  2. 我不喜欢维基百科的文章;您最好检查一本体裁书。
  3. 一种特殊的功能编号。为了直观,可以将其视为一种(图灵完备的)编程语言。

13

让我详细说明一下meisterluk的答案:想象一下我们正在尝试定义阶乘函数:请记住阶乘函数的定义:

fact 0     = 1
fact (n+1) = n*(fact n)

现在在某些PL框架(即 calculusλ)中,如何定义这样的函数并不立刻显而易见。但是,定义下面的高阶函数可能很容易,之所以这么称呼,是因为它将另一个函数和自然数作为输入

Fact f 0     = 1
Fact f (n+1) = n * (f n)

此函数定义中不使用递归。但是,如果有找到的某种方式固定点Fact,那就是,一个函数,使得 事实 φ ñ = φ ñ 为每个ñ,那么很容易检查φ的确是阶乘函数的实现。ϕ

Fact ϕ n = ϕ n
nϕ

λ

在计算机科学中,定点的概念还有许多其他用途,但是大多数归结为我上面显示的那个,即证明存在某些定点以能够表明某些功能或构造在您的框架(这里我们已经证明了阶乘函数存在)。


9

f:AA is an element x for which f(x) is equal to x. For example, the function x2 has two fixed points, which are the values 0 and 1, and the function x3 has three fixed points. Mathematically that is the definition.

Now, depending on the mathematical structure you are dealing with, there are very many different reasons to be interested in fixed points. For example, if you consider a dynamic system that looks at the state of the world and changes it (like a thermostat) then a fixed point corresponds to a stable configuration. If you think of games in the mathematical sense of game theory, fixed points correspond to equillibria, if you think of the the behaviour of an optimization routine that iteratively improves its solution, a fixed point corresponds to an optimal solution. So the mathematical notion of a fixed point has a lot of applications in a lot of different contexts.

A very common, and fundamental application of fixed points in computer science is to mathematically model loops and recursive programs. If we try to model a program as a mathematical function, both loops and recursion are not obvious to model. This is because the body of a loop is a program and can be represented as a mathematical function. How do we derive the function representing the loop's behaviour? It corresponds to applying the loop body repeatedly, in conjunction with the loop guard, until no further change is possible. Similarly, if we model recursive programs mathematically, we need a mathematical notion of what it means for a function to apply itself. This answer is provided by fixed points.


7

A function in mathematics is a map between input and output values. Fixed points are input values (for a function) which map to output values satisfying equality with the input.

For the equality function f(x)=x the set of input value equals to the set of fixed points of the function. For a function f(x)=x2 the set of fixed points is limited to {0,1}.

As far as computer science is concerned, we are talking a lot about partial functions, but this does not change the definition of fixed points for us.

You might also be confused about a totally different topic: Fixed-point arithmetic is a concept how to represent real numbers in the memory. But the name "fixed points" does not reference to this topic in general (because there is only 1 point).


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.