# 数学代写|离散数学作业代写discrete mathematics代考|МATH300

## 数学代写|离散数学作业代写discrete mathematics代考|Algorithm for Determining Primes

The Sieve of Eratosthenes algorithm (Fig. 3.7) is a famous algorithm for determining the prime numbers up to a given number $n$. It was developed by the Hellenistic mathematician, Eratosthenes.

The algorithm involves first listing all of the numbers from 2 to $n$. The first step is to remove all the multiples of two up to $n$; the second step is to remove all the multiples of three up to $n$; and so on.

The $k$ th step involves removing multiples of the $k$ th prime $p_k$ up to $n$, and the steps in the algorithm continue while $p \leq \sqrt{n}$. The numbers remaining in the list are the prime numbers from 2 to $n$.

1. List the integers from 2 to $n$.
2. For each prime $p_k$ up to $\sqrt{n}$, remove all the multiples of $p_k$.
3. The numbers remaining are the prime numbers between 2 and $n$.
The list of primes between 1 and 50 is given in Fig. 3.7. They are 2,3, 5, 7, 11, $13,17,19,23,29,31,37,41,43$ and 47.

Theorem $3.3$ (Fundamental Theorem of Arithmetic) Every natural number $n>1$ may be written uniquely as the product of primes:
$$n=p_1^{\alpha_1} p_2^{\alpha_2} p_3^{\alpha_3} \ldots p_k^{\alpha_2} .$$
Proof There are two parts to the proof. The first part shows that there is a factorization, and the second part shows that the factorization is unique.

## 数学代写|离散数学作业代写discrete mathematics代考|Greatest Common Divisors

Let $a$ and $b$ be integers, not both zero. The greatest common divisor $d$ of $a$ and $b$ is a divisor of $a$ and $b$ (i.e. $d \mid a$ and $d \mid b$ ), and it is the largest such divisor (i.e. if $k \mid$ $a$ and $k \mid b$ then $k \mid d)$. It is denoted by $\operatorname{gcd}(a, b)$.
Properties of Greatest Common Divisors
(i) Let $a$ and $b$ be integers not both zero, then there exist integers $x$ and $y$ such that
$$d=\operatorname{gcd}(a, b)=a x+b y .$$
(ii) Let $a$ and $b$ be integers not both zero, then the set $S={a x+b y$ where $x$, $y \in \mathbb{Z}}$ is the set of all the multiples of $d=\operatorname{gcd}(a, b)$.

Proof (of i) Consider the set of all the linear combinations of $a$ and $b$ forming the set ${k a+n b: k, n \in \mathbb{Z}}$. Clearly, this set includes positive and negative numbers. Choose $x$ and $y$ such that $m=a x+b y$ is the smallest positive integer in the set. Then we shall show that $m$ is the greatest common divisor.

We know from the division algorithm that $a=m q+r$ where $0 \leq rd| a x+b y$ for all integers $x$ and $y$ and so every element in the set $\mathrm{S}={a x+b y$ where $x, y \in \mathbb{Z}}$ is a multiple of $d$.

# 离散数学代写

## 数学代写|离散数学作业代写discrete mathematics代考|Algorithm for Determining Primes

1. 列出从 2 到 $n$.
2. 对于每个䋏数 $p_k$ 取决于 $\sqrt{n}$, 去掉所有的倍数 $p_k$.
3. 剩下的数是 2 到 $n$.
图 $3.7$ 给出了 1 到 50 之间的溸数列表。它们是 2,3,5,7,11,13, 17, 19, 23, 29, 31, 37, 41, 43和 47。
定理3.3 (算术基本定理) 每个自然数 $n>1$ 可以唯一地写为素数的乘积:
$$n=p_1^{\alpha_1} p_2^{\alpha_2} p_3^{\alpha_3} \ldots p_k^{\alpha_2} .$$
证明证明有两个部分。第一部分表明存在分解，第二部分表明分解是唯一的。

## 数学代写|离散数学作业代写discrete mathematics代考|Greatest Common Divisors

(i) 让 $a$ 和 $b$ 是整数不都是零，那么存在整数 $x$ 和 $y$ 这样
$$d=\operatorname{gcd}(a, b)=a x+b y .$$
(ii) 让 $a$ 和 $b$ 是不都是零的整数，那么集合 $S=a x+b y \$ w h e r e \$x \$, \$y \in \mathbb{Z}$ 是所有倍数的集合 $d=\operatorname{gcd}(a, b)$.

myassignments-help数学代考价格说明

1、客户需提供物理代考的网址，相关账户，以及课程名称，Textbook等相关资料~客服会根据作业数量和持续时间给您定价~使收费透明，让您清楚的知道您的钱花在什么地方。

2、数学代写一般每篇报价约为600—1000rmb，费用根据持续时间、周作业量、成绩要求有所浮动(持续时间越长约便宜、周作业量越多约贵、成绩要求越高越贵)，报价后价格觉得合适，可以先付一周的款，我们帮你试做，满意后再继续，遇到Fail全额退款。

3、myassignments-help公司所有MATH作业代写服务支持付半款，全款，周付款，周付款一方面方便大家查阅自己的分数，一方面也方便大家资金周转，注意:每周固定周一时先预付下周的定金，不付定金不予继续做。物理代写一次性付清打9.5折。

Math作业代写、数学代写常见问题

myassignments-help擅长领域包含但不是全部: