Posted on Categories:Discrete Mathematics, 数学代写, 离散数学

数学代写|离散数学代写Discrete Mathematics代考|MATH215 Fermat’s “Little” Theorem

avatest™

avatest™帮您通过考试

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

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

数学代写|离散数学代写Discrete Mathematics代考|Fermat’s “Little” Theorem

Primes are important because we can compose every integer from them; but it turns out that they also have many other, often surprising, properties. One of these was discovered by the French mathematician Pierre de Fermat (1601-1655), now called the “Little” Theorem of Fermat.

Theorem 6.5.1 (Fermat’s Theorem) If $p$ is a prime and $a$ is an integer, then $p \mid a^p-a$.

Before proving this theorem, we remark that it is often stated in the following form: If $p$ is a prime and $a$ is an integer not divisible by $p$, then
$$p \mid a^{p-1}-1 .$$
The fact that these two assertions are equivalent (in the sense that if we know the truth of one, it is easy to prove the other) is left to the reader as Exercise $6.10 .20$.

To prove Fermat’s Theorem, we need a lemma, which states another divisibility property of primes (but is easier to prove):
Lemma 6.5.2 If $p$ is a prime and $0<k<p$, then $p \mid\left(\begin{array}{l}p \ k\end{array}\right)$.
Proof. We know by Theorem $1.8 .1$ that
$$\left(\begin{array}{l} p \ k \end{array}\right)=\frac{p(p-1) \cdots(p-k+1)}{k(k-1) \cdots 1}$$

Here $p$ divides the numerator, but not the denominator, since all factors in the denominator are smaller than $p$, and we know by Exercise 6.3.3(a) that if a prime $p$ does not divide any of these factors, then it does not divide the product. Hence it follows (see Exercise 6.3.3(b)) that $p$ is a divisor of $\left(\begin{array}{l}p \ k\end{array}\right)$

Proof [of Theorem 6.5.1]. Now we can prove Fermat’s Theorem by induction on $a$. The assertion is trivially true if $a=0$. Let $a>0$, and write $a=b+1$. Then
\begin{aligned} a^p-a & =(b+1)^p-(b+1) \ & =b^p+\left(\begin{array}{c} p \ 1 \end{array}\right) b^{p-1}+\cdots+\left(\begin{array}{c} p \ p-1 \end{array}\right) b+1-b-1 \ & =\left(b^p-b\right)+\left(\begin{array}{l} p \ 1 \end{array}\right) b^{p-1}+\cdots+\left(\begin{array}{c} p \ p-1 \end{array}\right) b \end{aligned}

数学代写|离散数学代写Discrete Mathematics代考|The Euclidean Algorithm

So far, we have discussed several notions and results concerning integers. Now we turn our attention to the question of how to do computations in connection with these results. How do we decide whether or not a given number is a prime? How do we find the prime factorization of a number?
We can do basic arithmetic-addition, subtraction, multiplication, division with remainder-efficiently, and we will not discuss this here.

The key to a more advanced algorithmic number theory is an algorithm that computes the greatest common divisor of two positive integers $a$ and $b$. This is defined as the largest positive integer that is a divisor of both $a$ and $b$. (Since 1 is always a common divisor, and no common divisor is larger than either integer, this definition makes sense: There is always at least one common divisor, and in the set of common divisors there must be a greatest element.) The greatest common divisor of $a$ and $b$ is denoted by $\operatorname{gcd}(a, b)$. Thus
$$\begin{array}{lll} \operatorname{gcd}(1,6)=1, & \operatorname{gcd}(2,6)=2, & \operatorname{gcd}(3,6)=3 \ \operatorname{gcd}(4,6)=2, & \operatorname{gcd}(5,6)=1, & \operatorname{gcd}(6,6)=6 \end{array}$$
We say that two integers are relatively prime if their greatest common divisor is 1 . It will be convenient to define $\operatorname{gcd}(a, 0)=a$ for every $a \geq 0$.
A somewhat similar notion is the least common multiple of two integers, which is the least positive integer that is a multiple of both integers. It is denoted by $\operatorname{lcm}(a, b)$. For example,
$$\begin{array}{lll} \operatorname{lcm}(1,6)=6, & \operatorname{lcm}(2,6)=6, & \operatorname{lcm}(3,6)=6 \ \operatorname{lcm}(4,6)=12, & \operatorname{lcm}(5,6)=30, & \operatorname{lcm}(6,6)=6 \end{array}$$

数学代写|离散数学代写Discrete Mathematics代考|Fermat’s “Little” Theorem

$$p \mid a^{p-1}-1 .$$

$6.10 .20$.

$$a^p-a=(b+1)^p-(b+1) \quad=b^p+(p 1) b^{p-1}+\cdots+(p p-1) b+1-b-1=\left(b^p-b\right)+(p 1) b^{p-1}+\cdots+(p p-1) b$$

数学代写|离共数学代可Discrete Mathematics代考|The Euclidean Algorithm

$$\operatorname{gcd}(1,6)=1, \quad \operatorname{gcd}(2,6)=2, \quad \operatorname{gcd}(3,6)=3 \operatorname{gcd}(4,6)=2, \quad \operatorname{gcd}(5,6)=1, \quad \operatorname{gcd}(6,6)=6$$

$$\operatorname{lcm}(1,6)=6, \quad \operatorname{lcm}(2,6)=6, \quad \operatorname{lcm}(3,6)=6 \operatorname{lcm}(4,6)=12, \quad \operatorname{lcm}(5,6)=30, \quad \operatorname{lcm}(6,6)=6$$

MATLAB代写

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