Posted on Categories:Number Theory, 数学代写, 数论

# 数学代写|数论代写Number Theory代考|An algorithm for factoring integers

avatest™

## avatest™帮您通过考试

avatest™的各个学科专家已帮了学生顺利通过达上千场考试。我们保证您快速准时完成各时长和类型的考试，包括in class、take home、online、proctor。写手整理各样的资源来或按照您学校的资料教您，创造模拟试题，提供所有的问题例子，以保证您在真实考试中取得的通过率是85%以上。如果您有即将到来的每周、季考、期中或期末考试，我们都能帮助您！

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 数学代写|数论代写Number Theory代考|An algorithm for factoring integers

We now present a probabilistic, subexponential-time algorithm for factoring integers. The algorithm uses techniques very similar to those used in Algorithm SEDL in $\S 16.2$.

Let $n>1$ be the integer we want to factor. We make a few simplifying assumptions. First, we assume that $n$ is odd – this is not a real restriction, since we can always pull out any factors of 2 in a pre-processing step. Second, we assume that $n$ is not a perfect power, that is, not of the form $a^b$ for integers $a>1$ and $b>1$-this is also not a real restriction, since we can always partially factor $n$ using the algorithm in $\S 10.5$ if $n$ is a perfect power. Third, we assume that $n$ is not prime-this may be efficiently checked using, say, the Miller-Rabin test (see $\S 10.3$ ). Fourth, we assume that $n$ is not divisible by any primes up to a “smoothness parameter” $y$-we can ensure this using trial division, and it will be clear that the running time of this pre-computation is dominated by that of the algorithm itself.

With these assumptions, the prime factorization of $n$ is of the form
$$n=q_1^{f_1} \cdots q_w^{f_w}$$
where the $q_i$ are distinct, odd primes, all greater than $y$, the $f_i$ are positive integers, and $w>1$.

The main goal of our factoring algorithm is to find a random square root of 1 in $\mathbb{Z}n$. Let $$\theta: \mathbb{Z}{q_1^{f_1}} \times \cdots \times \mathbb{Z}_{q_w^{f_w}} \rightarrow \mathbb{Z}_n$$
be the ring isomorphism of the Chinese remainder theorem. The square roots of 1 in $\mathbb{Z}_n$ are precisely those elements of the form $\theta( \pm 1, \ldots, \pm 1)$, and if $\beta$ is a random square root of 1 , then with probability $1-2^{-w+1} \geq 1 / 2$, it will be of the form $\beta=\theta\left(\beta_1, \ldots, \beta_w\right)$, where the $\beta_i$ are neither all 1 nor all -1 (i.e., $\beta \neq \pm 1$ ). If this happens, then $\beta-1=\theta\left(\beta_1-1, \ldots, \beta_w-1\right)$, and so we see that some, but not all, of the values $\beta_i-1$ will be zero. The value of $\operatorname{gcd}(\operatorname{rep}(\beta-1), n)$ is precisely the product of the prime powers $q_i^{f_i}$ such that $\beta_i-1=0$, and hence this gcd will yield a non-trivial factorization of $n$, unless $\beta= \pm 1$.

## 数学代写|数论代写Number Theory代考|Better smoothness density estimates

From an algorithmic point of view, the simplest way to improve the running times of both Algorithms SEDL and SEF is to use a more accurate smoothness density estimate, which dictates a different choice of the smoothness bound $y$ in those algorithms, speeding them up significantly. While our Theorem 16.1 is a valid lower bound on the density of smooth numbers, it is not “tight,” in the sense that the actual density of smooth numbers is somewhat higher. We quote from the literature the following result:

Theorem 16.7. Let $y$ be a function of $x$ such that for some $\epsilon>0$, we have
$$y=\Omega\left((\log x)^{1+\epsilon}\right) \text { and } u:=\frac{\log x}{\log y} \rightarrow \infty$$
as $x \rightarrow \infty$. Then
$$\Psi(y, x)=x \cdot \exp [(-1+o(1)) u \log u] .$$
Proof. See $\S 16.5$.
Let us apply this result to the analysis of Algorithm SEF. Assume that $y=\exp \left[(\log n)^{1 / 2+o(1)}\right]$-our choice of $y$ will in fact be of this form. With this assumption, we have $\log \log y=(1 / 2+o(1)) \log \log n$, and using Theorem 16.7, we can improve the inequality (16.8), obtaining instead (verify)
$$\mathrm{E}[T] \leq \exp [(1+o(1)) \max {(1 / 2)(\log n / \log y) \log \log n+2 \log y, 3 \log y}] .$$
From this, if we set
$$\left.y:=\exp \left[(1 / 2)(\log n \log \log n)^{1 / 2}\right)\right]$$

we obtain
$$\mathrm{E}[T] \leq \exp \left[(2+o(1))(\log n \log \log n)^{1 / 2}\right]$$
An analogous improvement can be obtained for Algorithm SEDL.
Although this improvement reduces the constant $2 \sqrt{2} \approx 2.828$ to 2 , the constant is in the exponent, and so this improvement is not to be scoffed at!

## 数学代写|数论代写Number Theory代考|An algorithm for factoring integers

$$\mathrm{E}[T] \leq \exp [(1+o(1)) \max (1 / 2)(\log n / \log y) \log \log n+2 \log y, 3 \log y] .$$

$$\left.y:=\exp \left[(1 / 2)(\log n \log \log n)^{1 / 2}\right)\right]$$

$$\mathrm{E}[T] \leq \exp \left[(2+o(1))(\log n \log \log n)^{1 / 2}\right]$$

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。