四个俄罗斯人算法(Method of Four Russians)

四俄方法是一种用于加速涉及布尔矩阵或具有限可能值的矩阵单元的算法的技术。该方法通过将矩阵划分为小的方块,并使用查找表在每个方块中快速执行操作来提高效率。此方法可用于计算图的传递闭包、布尔矩阵乘法、编辑距离计算等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://en.wikipedia.org/wiki/Method_of_Four_Russians

 

In computer science, the Method of Four Russians is a technique for speeding up algorithms involving Boolean matrices, or more generally algorithms involving matrices in which each cell may take on only a bounded number of possible values.

Idea

The main idea of the method is to partition the matrix into small square blocks of size t × t for some parameter t, and to use a lookup table to perform the algorithm quickly within each block. The index into the lookup table encodes the values of the matrix cells on the block boundary prior to some operation of the algorithm, and the result of the lookup table encodes the values of the boundary cells after the operation. Thus, the overall algorithm may be performed by operating on only (n/t)2 blocks instead of on n2matrix cells, where n is the side length of the matrix. In order to keep the size of the lookup tables (and the time needed to initialize them) sufficiently small, t is typically chosen to be O(log n).

Applications

Algorithms to which the Method of Four Russians may be applied include:

In each of these cases it speeds up the algorithm by one or two logarithmic factors.

The Method of Four Russians matrix inversion algorithm published by Bard is implemented in M4RI library for fast arithmetic with dense matrices over F2. M4RI is used by theSage mathematics software and the PolyBoRi library.[1]

History

The algorithm was introduced by V. L. Arlazarov, E. A. Dinic, M. A. Kronrod, and I. A. Faradzev in 1970.[2] The origin of the name is unknown; Aho, Hopcroft & Ullman (1974)explain:

The second method, often called the "Four Russians'" algorithm, after the cardinality and nationality of its inventors, is somewhat more "practical" than the algorithm in Theorem 6.9. [3]

It was later determined that not all of the four are Russian, but the name stuck.[4]

Notes

References

  • Arlazarov, V.; Dinic, E.; Kronrod, M.; Faradzev, I. (1970), "On economical construction of the transitive closure of a directed graph" (in Russian), Dokl. Akad. Nauk. 194(11), English Translation in Soviet Math Dokl.
  • Aho, Alfred V.; Hopcroft, John E.; Ullman, Jeffrey D. (1974), The design and analysis of computer algorithms, Addison-Wesley
  • Bard, Gregory V. (2009), Algebraic Cryptanalysis, Springer, ISBN 978-0-387-88756-2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值