请输入您要查询的英文单词:

 

单词 Trial division
释义

Trial division

中文百科

试除法

试除法是整数分解算法中最简单和最容易理解的算法。

给定一个合数n(这里,n是待分解的正整数),试除法看成是用小于等于\sqrt{n}的每个素数去试除待分解的整数。如果找到一个数能够整除除尽,这个数就是待分解整数的因子。

试除法一定能够找到n的因子。因为它检查n的所有可能的因子,所以如果这个算法“失败”,也就证明了n是个素数。

试除法可以从几条途径来完善。例如,n的末位数不是0或者5,那幺算法中就可以跳过末位数是5的因子。如果末位数是2,检查偶数因子就可以了。

某种意义上说,试除法是个效率非常低的算法,如果从2开始,一直算到\sqrt{n}需要 \pi(\sqrt{n})次试除,这里pi(x)是小于x的素数的个数。这是不包括素性测试的。如果稍做变通——还是不包括素性测试——用小于\sqrt{n}的奇数去简单的试除,则需要{\sqrt{n}\over 2}次。

英语百科

Trial division 试除法

Trial division is the most laborious but easiest to understand of the integer factorization algorithms. The essential idea behind trial division tests to see if an integer n, the integer to be factored, can be divided by each number in turn that is less than n. For example, for the integer n = 12, the only numbers that divide it are 1,2,3,4,6,12. Selecting only the largest powers of primes in this list gives that 12 = 3 × 4.

随便看

 

英汉双解词典包含3607232条英汉词条,基本涵盖了全部常用单词的翻译及用法,是英语学习的有利工具。

 

Copyright © 2004-2022 Newdu.com All Rights Reserved
京ICP备09058993号 更新时间:2025/5/9 2:09:24