Posted on Categories:Modern Algebra, 数学代写, 现代代数

# 数学代写|现代代数代考Modern Algebra代写|The Extended Euclidean Algorithm

## avatest™帮您通过考试

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

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 数学代写|现代代数代考Modern Algebra代写|The Extended Euclidean Algorithm

The following extension of Algorithm 3.5 computes not only the gcd but also a representation of it as a linear combination of the inputs. It generalizes the representation
$$7=21-1 \cdot 14=21-(35-1 \cdot 21)=2 \cdot(126-3 \cdot 35)-35=2 \cdot 126-7 \cdot 35,$$

which is obtained by reading the lines of (1) from the bottom up. This important method is called the Extended Euclidean Algorithm and works in any Euclidean domain. In various incarnations, it plays a central role throughout this book.
Algorithm 3.6 Traditional Extended Euclidean Algorithm.
Input: $f, g \in R$, where $R$ is a Euclidean domain.
Output: $\ell \in \mathbb{N}, r_i, s_i, t_i \in R$ for $0 \leq i \leq \ell+1$, and $q_i \in R$ for $1 \leq i \leq \ell$, as computed below.
1.

1. $i \longleftarrow 1$
2. $\ell \longleftarrow i-1$
return $\ell, r_i, s_i, t_i$ for $0 \leq i \leq \ell+1$, and $q_i$ for $1 \leq i \leq \ell$

## 数学代写|现代代数代考Modern Algebra代写|Cost analysis for Z and F[x]

We want to analyze the cost of the traditional Extended Euclidean Algorithm 3.6 for $f, g \in R$ with $n=d(f) \geq d(g)=m \geq 0$. The number $\ell$ of division steps is obviously bounded by $\ell \leq d(g)+1$. We investigate the two important cases $R=$ $F[x]$ and $R=\mathbb{Z}$ separately, starting with $R=F[x]$, where $F$ is a field, and $d(a)=$ $\operatorname{deg} a$ as usual.

We let $n_i=\operatorname{deg} r_i$ for $0 \leq i \leq \ell+1$, with $r_{\ell+1}=0$. Then $n_0=n \geq n_1=m>n_2>$ $\cdots>n_{\ell}$, and $\operatorname{deg} q_i=n_{i-1}-n_i$ for $1 \leq i \leq \ell$. According to Section 2.4, we can divide the polynomial $r_{i-1}$ of degree $n_{i-1}$ by the polynomial $r_i$ of degree $n_i \leq n_{i-1}$ with remainder using at most $\left(2 n_i+1\right)\left(n_{i-1}-n_i+1\right)$ additions and multiplications plus one inversion in $F$. (Recall that we count a subtraction as an addition.) Thus the total cost for the traditional Euclidean Algorithm, that is, for computing only the $r_i$ and $q_i$, including a gcd of $f$ and $g$, is
$$\sum_{1 \leq i \leq \ell}\left(2 n_i+1\right)\left(n_{i-1}-n_i+1\right)$$
additions and multiplications plus $\ell \leq m+1$ inversions in $F$. We first evaluate the expression above for the normal case where the degree drops exactly by 1 at each step, so that $n_i=m-i+1$ for $2 \leq i \leq \ell=m+1$, and later show that this the worst case. Since $n_{i-1}-n_i+1=2$ for $i \geq 2$ and $n_1=m$, (3) simplifies to
\begin{aligned} (2 m+1) & (n-m+1)+2 \sum_{2 \leq i \leq m+1}(2(m-i+1)+1) \ = & (2 m+1)(n-m+1)+2\left(m^2-m\right)+2 m=2 n m+n+m+1 \end{aligned}
We now consider the sum $\sigma\left(n_0, n_1, \ldots, n_{\ell}\right)$ in (3) as a function of the integers $n_0 \geq$ $n_1>n_2>\cdots>n_{\ell} \geq 0$ and show that it increases if we insert an additional integer $n_{j-1}>k>n_j$ for some $j \in{2, \ldots, \ell}$ or append some integer $n_{\ell}>k \geq 0$ :
\begin{aligned} \sigma\left(n_0\right. & \left., \ldots, n_{j-1}, k, n_j, \ldots, n_{\ell}\right)-\sigma\left(n_0, \ldots, n_{\ell}\right) \ & =(2 k+1)\left(n_{j-1}-k+1\right)+\left(2 n_j+1\right)\left(k-n_j+1\right)-\left(2 n_j+1\right)\left(n_{j-1}-n_j+1\right) \ & =2\left(n_{j-1}-k\right)\left(k-n_j\right)+2 k+1>0 . \end{aligned}

# 现代代数代写

## 数学代写|现代代数代考Modern Algebra代写|The Extended Euclidean Algorithm

$$7=21-1 \cdot 14=21-(35-1 \cdot 21)=2 \cdot(126-3 \cdot 35)-35=2 \cdot 126-7 \cdot 35,$$

3.6传统的扩展欧几里得算法。

1.

$i \longleftarrow 1$

$\ell \longleftarrow i-1$

$$\sum_{1 \leq i \leq \ell}\left(2 n_i+1\right)\left(n_{i-1}-n_i+1\right)$$

\begin{aligned} (2 m+1) & (n-m+1)+2 \sum_{2 \leq i \leq m+1}(2(m-i+1)+1) \ = & (2 m+1)(n-m+1)+2\left(m^2-m\right)+2 m=2 n m+n+m+1 \end{aligned}

avatest.org 为您提供可靠及专业的论文代写服务以便帮助您完成您学术上的需求，让您重新掌握您的人生。我们将尽力给您提供完美的论文，并且保证质量以及准时交稿。除了承诺的奉献精神，我们的专业写手、研究人员和校对员都经过非常严格的招聘流程。所有写手都必须证明自己的分析和沟通能力以及英文水平，并通过由我们的资深研究人员和校对员组织的面试。

## MATLAB代写

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