# FL（复杂性）

在计算复杂性理论中，**FL** 是一类可由确定性图灵机计算的字符串函数类，该[图灵机](https://www.edgepedia.org/zh/turing-machine)在其工作带上仅使用对数空间，输入位于只读带上，输出写入只写带，且输出带不计入空间界<sup>[1](https://academ.us/article/2607.15881/)</sup>。它是判定类 L（对数空间）的函数对应物：L 收集判定问题，而 FL 收集由同类空间受限机器计算的函数<sup>[2](https://www.researchgate.net/publication/251409833_Space_complexity_the_classes_L_FL_NL_and_PSPACE)</sup>。FL 在实践中很重要，因为对数空间归约——证明 P 内问题完全性的标准工具——恰好就是 FL 中的函数<sup>[3](https://citeseerx.ist.psu.edu/document?doi=7130620fbbf0c01677667df70d6773c3694ba4ca&repid=rep1&type=pdf)</sup>。

| 关键事实 | 详情 |
|---|---|
| 定义 | 可由带有只写输出带的确定性对数空间图灵机计算的函数 \( f : \Sigma^* \to \Sigma^* \)<sup>[1](https://academ.us/article/2607.15881/)</sup> |
| 机器模型 | 只读输入带、对数长度工作带、只写单向输出带；空间界不适用于输出带<sup>[4](https://www.cambridge.org/core/journals/journal-of-functional-programming/article/readwrite-factorizable-programs/E00B881B91D79D7806634C2B306DEF06)</sup> |
| 与 FP 的关系 | \( \mathrm{FL} \subseteq \mathrm{FP} \subseteq \mathrm{FPSPACE} \)，其中 FP 是多项式时间可计算函数类<sup>[5](https://www.cse.iitm.ac.in/~jayalal/teaching/CS6840/2012/lecture04.pdf)</sup> |
| 与计数类的关系 | 每个 FL 函数都是 GapL 函数，\( \mathrm{FL} \subseteq \mathrm{GapL} \)<sup>[6](https://citeseerx.ist.psu.edu/document?doi=843882e1d7d3f728e5305d58d161a5a0485ad391&repid=rep1&type=pdf)</sup> |
| 在归约中的作用 | 从 \( L \) 到 \( L' \) 的对数空间多一归约是一个 FL 中的函数，满足 \( x \in L \iff f(x) \in L' \)<sup>[1](https://academ.us/article/2607.15881/)</sup> |
| 代数刻画 | Lind（1974）将对数空间字符串函数刻画为包含相等性与连接、并在显式变换、代入和两种受限的记法递归下封闭的最小类<sup>[7](https://dspace.mit.edu/entities/publication/6fd9097a-4c48-4f3b-850d-e86c9d2c48ba)</sup> |
| 示例成员 | 整数除法与迭代乘积可在 \( O(\log n) \) 空间中计算<sup>[8](https://www.numdam.org/item/ITA_2001__35_3_259_0.pdf)</sup> |

## 机器模型

定义 FL 的机器是对数空间转换器，它有三条带。输入带是只读的，工作带在长度为 \( n \) 的输入上限于 \( O(\log n) \) 个单元，输出带是只写且单向的<sup>[4](https://www.cambridge.org/core/journals/journal-of-functional-programming/article/readwrite-factorizable-programs/E00B881B91D79D7806634C2B306DEF06)</sup>。输出带不计入空间核算，因此机器可以写出远长于其工作空间的输出；它做不到的是记住任意中间结果。在长度为 \( n \) 的输入上，机器的整个格局——包括状态、读写头位置和工作带内容——只需 \( O(\log n) \) 位即可表示，因此它只有多项式多个格局<sup>[9](https://relationofnctotime-spaceclasses.weebly.com/uploads/2/7/0/2/27022199/theory_of_computation_by_dexter_c._kozen.pdf)</sup>。

对数空间的限制是仍能让机器索引其输入任意位置的最小界：编码指向 \( n \) 个输入位置之一的指针需要 \( O(\log n) \) 位<sup>[10](https://doi.org/10.1016/J.IC.2015.04.006)</sup>。这就是为什么对数空间机器可以遍历输入并对其进行计数，却不能存储输入本身的很大一部分。

## 与判定类及归约的关系

FL 位于标准空间类图景之中。判定类为 \( \mathrm{L} = \mathrm{DSPACE}(\log n) \subseteq \mathrm{NL} = \mathrm{NSPACE}(\log n) \subseteq \mathrm{P} \subseteq \mathrm{PSPACE} \)，而 FL 是对应的函数类<sup>[3](https://citeseerx.ist.psu.edu/document?doi=7130620fbbf0c01677667df70d6773c3694ba4ca&repid=rep1&type=pdf)</sup>。每个 FL 函数都可在多项式时间内计算，从而 \( \mathrm{FL} \subseteq \mathrm{FP} \subseteq \mathrm{FPSPACE} \)<sup>[5](https://www.cse.iitm.ac.in/~jayalal/teaching/CS6840/2012/lecture04.pdf)</sup>。

**归约。** 对数空间可归约性通过 FL 定义：语言 \( L \) 归约到 \( L' \)，如果存在 FL 中的函数 \( R \) 使得 \( x \in L \iff R(x) \in L' \)<sup>[1](https://academ.us/article/2607.15881/)</sup>。两个对数空间可计算函数的复合仍是对数空间可计算的，这正是这些归约具有传递性并可用于完全性证明的原因<sup>[11](https://eccc.weizmann.ac.il/report/2020/074/revision/1/download/)</sup>。许多自然问题恰在这些归约下对 P 内的类完全；例如，电路值问题在对数空间归约下是 P 完全的<sup>[12](https://pages.cs.wisc.edu/~jyc/810notes/book.pdf)</sup>。

**电路。** 多项式大小布尔电路的对数空间一致族恰好计算类 P：对数空间计算可以生成每个电路的描述，而多项式时间机器可由这样的族模拟，只需对数级的簿记<sup>[13](https://cs.yale.edu/homes/aspnes/classes/468/notes.pdf)</sup>。由于对数空间一致的电路族必然具有多项式大小，FL 函数可由多项式大小电路计算<sup>[8](https://www.numdam.org/item/ITA_2001__35_3_259_0.pdf)</sup>。

## 通过递归与编程语言的刻画

**Lind 的函数代数。** 在 1974 年的一份麻省理工学院技术报告中，John C. Lind 将对数空间字符串函数刻画为满足以下条件的最小递归字符串函数集合：包含连接与相等性测试，在显式变换和以函数替换变量下封闭，并允许两种受限的记法递归。<sup>[7](https://dspace.mit.edu/entities/publication/6fd9097a-4c48-4f3b-850d-e86c9d2c48ba)</sup> 一种形式是连接递归，只允许递归调用的值出现在连接的最顶层；另一种是记法上的对数界递归，只定义在长度为 \( n \) 的输入上输出长度为 \( O(\log n) \) 的函数<sup>[7](https://dspace.mit.edu/entities/publication/6fd9097a-4c48-4f3b-850d-e86c9d2c48ba)</sup>。后来的工作细化了这一图景，通过投影与常量在复合和记法上的同步递归下的闭包来刻画对数空间<sup>[14](https://www.researchgate.net/publication/220467865_Neat_function_algebraic_characterizations_of_logspace_and_linspace)</sup>。

**编程语言与逻辑。** 同一类也通过编程语言对 PTIME 与 LOGSPACE 的内在刻画、通过其证明可编译为 LOGSPACE 函数的线性逻辑受限版本<sup>[16](https://doi.org/10.1109/lics.2007.45)</sup>，以及通过恰好刻画对数空间可计算函数的函数式语言 intml<sup>[10](https://doi.org/10.1016/J.IC.2015.04.006)</sup>，在没有外部强加资源界的情况下被捕获<sup>[15](https://www.sciencedirect.com/science/article/pii/S0304397598003570)</sup>。

## 已知属于 FL 的函数

二进制整数上的算术提供了标准示例。\( n \) 位整数的加法与乘法早已可由对数空间一致、多项式大小、对数深度的电路计算<sup>[8](https://www.numdam.org/item/ITA_2001__35_3_259_0.pdf)</sup>。除法更难：Beame、Cook 和 Hoover 给出了对数深度多项式大小的除法电路，但他们的族不是对数空间一致的，除法能否在对数空间中计算仍悬而未决<sup>[8](https://www.numdam.org/item/ITA_2001__35_3_259_0.pdf)</sup>。Chiu、Davida 和 Litow 在 2001 年通过为整数除法构造对数空间一致的 \( \mathrm{NC}^1 \) 电路族解决了这一问题，根据一个标准结果，这将除法置于对数空间中；同样的技术表明迭代乘积可在 \( O(\log n) \) 空间中计算<sup>[8](https://www.numdam.org/item/ITA_2001__35_3_259_0.pdf)</sup>。这在结构上很重要，因为迭代乘积曾似乎是可在 P 中计算但不在对数空间中计算的问题候选<sup>[8](https://www.numdam.org/item/ITA_2001__35_3_259_0.pdf)</sup>。

## 变体与相关函数类

若干函数类通过修改 FL 机器来定义。函数 \( f : \Sigma^* \to \mathbb{N} \) 属于 **#L**，如果某台对数空间非确定性图灵机在输入 \( x \) 上恰有 \( f(x) \) 条接受路径；它属于 **GapL**，如果它可对数空间多一归约到计算整数矩阵行列式；每个 FL 函数都是 GapL 函数<sup>[3](https://citeseerx.ist.psu.edu/document?doi=7130620fbbf0c01677667df70d6773c3694ba4ca&repid=rep1&type=pdf)</sup><sup> • </sup><sup>[6](https://citeseerx.ist.psu.edu/document?doi=843882e1d7d3f728e5305d58d161a5a0485ad391&repid=rep1&type=pdf)</sup>。诸如 \( \mathrm{FL}^{\mathrm{NP}} \) 的预言机版本捕获在对数空间中可访问 NP 预言机计算的函数<sup>[17](https://journals.sagepub.com/doi/pdf/10.3233/FI-1993-18105)</sup>。

一个更近的变体去掉了单独的输出带。在**原地**模型中，机器必须在同一条带上将输入转换为输出，仅使用对数级额外工作空间；由此得到的类 \( \mathsf{inplaceFL} \) 无条件地严格弱于 FL，而在密码学假设下，整数乘法和求值 \( \mathsf{NC}^0_4 \) 电路等问题位于其外<sup>[18](https://arxiv.org/abs/2510.12005)</sup>。原地类对输入编码也比 FL 更敏感，因为低效的编码可以被压缩以释放工作空间<sup>[19](https://eccc.weizmann.ac.il/report/2025/150/download/)</sup>。

## References

1. [Counting in logarithmic space, arXiv:2607.15881](https://academ.us/article/2607.15881/)
2. [Space complexity: the classes L, FL, NL and PSPACE](https://www.researchgate.net/publication/251409833_Space_complexity_the_classes_L_FL_NL_and_PSPACE)
3. [Blondin, Krebs & McKenzie, The Complexity of generalized automata intersection problems](https://citeseerx.ist.psu.edu/document?doi=7130620fbbf0c01677667df70d6773c3694ba4ca&repid=rep1&type=pdf)
4. [Read/write factorizable programs, Journal of Functional Programming](https://www.cambridge.org/core/journals/journal-of-functional-programming/article/readwrite-factorizable-programs/E00B881B91D79D7806634C2B306DEF06)
5. [CS6840 Advanced Complexity Theory, Lecture 4, IIT Madras](https://www.cse.iitm.ac.in/~jayalal/teaching/CS6840/2012/lecture04.pdf)
6. [On quantum and classical space-bounded processes](https://citeseerx.ist.psu.edu/document?doi=843882e1d7d3f728e5305d58d161a5a0485ad391&repid=rep1&type=pdf)
7. [John C. Lind, Computing in Logarithmic Space, MIT-LCS-TM-052 (1974)](https://dspace.mit.edu/entities/publication/6fd9097a-4c48-4f3b-850d-e86c9d2c48ba)
8. [Chiu, Davida & Litow, Division in logspace-uniform NC1, RAIRO Theoretical Informatics and Applications 35 (2001)](https://www.numdam.org/item/ITA_2001__35_3_259_0.pdf)
9. [Dexter C. Kozen, Theory of Computation, Lecture 5](https://relationofnctotime-spaceclasses.weebly.com/uploads/2/7/0/2/27022199/theory_of_computation_by_dexter_c._kozen.pdf)
10. [Computation by interaction for space-bounded functional programming, Information and Computation](https://doi.org/10.1016/J.IC.2015.04.006)
11. [Electronic Colloquium on Computational Complexity, Report No. 74 (2020), Revision 1](https://eccc.weizmann.ac.il/report/2020/074/revision/1/download/)
12. [Dieter van Melkebeek, Complexity theory lecture notes, University of Wisconsin](https://pages.cs.wisc.edu/~jyc/810notes/book.pdf)
13. [James Aspnes, Notes on Computational Complexity Theory, Yale University](https://cs.yale.edu/homes/aspnes/classes/468/notes.pdf)
14. [Neat function algebraic characterizations of logspace and linspace](https://www.researchgate.net/publication/220467865_Neat_function_algebraic_characterizations_of_logspace_and_linspace)
15. [LOGSPACE and PTIME characterized by programming languages, Theoretical Computer Science](https://www.sciencedirect.com/science/article/pii/S0304397598003570)
16. [Stratified Bounded Affine Logic for Logarithmic Space](https://doi.org/10.1109/lics.2007.45)
17. [Iain A. Stewart, Logical Characterizations of Bounded Query Classes I: Logspace Oracle Machines, Fundamenta Informaticae (1993)](https://journals.sagepub.com/doi/pdf/10.3233/FI-1993-18105)
18. [The Structure of In-Place Space-Bounded Computation, arXiv:2510.12005](https://arxiv.org/abs/2510.12005)
19. [Electronic Colloquium on Computational Complexity, Report No. 150 (2025)](https://eccc.weizmann.ac.il/report/2025/150/download/)

---
*Initially written Oct 15, 2026 · Edited: Oct 25, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Algorithms and computational methods › Computational complexity › Classical complexity classes

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/fl-complexity

English original: https://www.edgepedia.org/fl-complexity
