## 数学代写|离散数学作业代写discrete mathematics代考|Prime Number Theory

A positive integer $n>1$ is called prime if its only divisors are $n$ and 1 . A number that is not a prime is called composite.
Properties of Prime Numbers
(i) There are an infinite number of primes.
(ii) There is a prime number $p$ between $n$ and $n$ ! $+1$ such that $n0$, there exist $k$ consecutive composite integers).

Proof (i) Suppose there are a finite number of primes and they are listed as $p_1, p_2$, $p_3, \ldots, p_k$. Then consider the number $N$ obtained by multiplying all known primes and adding one. That is,
$$N=p_1 p_2 p_3 \ldots p_k+1$$

Clearly, $N$ is not divisible by any of $p_1, p_2, p_3, \ldots, p_k$ since they all leave a remainder of 1 . Therefore, $N$ is either a new prime or divisible by a prime $q$ (that is not in the list of $p_1, p_2, p_3, \ldots, p_k$ ).

This is a contradiction since this was the list of all the prime numbers, and so the assumption that there are a finite number of primes is false, and we deduce that there are an infinite number of primes.

Proof (ii) Consider the integer $N=n !+1$. If $N$ is prime then we take $p=N$. Otherwise, $\mathrm{N}$ is composite and has a prime factor $p$. We will show that $p>n$.

Suppose $p \leq n$ then $p \mid n !$ and since $p \mid N$ we have $p \mid n !+1$ and therefore $p \mid 1$, which is impossible. Therefore, $p>n$ and the result is proved.

Proof (iii) Let $p$ be the smallest prime divisor of $n$. Since $n$ is composite $n=u v$, and clearly $p \leq u$ and $p \leq v$. Then $p^2 \leq u v=n$ and so $p \leq \sqrt{n}$.

Proof (iv) Consider the $k$ consecutive integers $(k+1) !+2,(k+1) !+3, \ldots$, $(k+1) !+k,(k+1) !+k+1$. Then each of these is composite since $j \mid(k+1) !+j$ where $2 \leq j \leq k+1$.

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

An algorithm is a well-defined procedure for solving a problem, and it consists of a sequence of steps that takes a set of values as input, and produces a set of values as output. It is an exact specification of how to solve the problem, and it explicitly defines the procedure so that a computer program may implement the algorithm. The origin of the word ‘algorithm’ is from the name of the 9th Persian mathematician, Muhammad al-Khwarizmi.

It is essential that the algorithm is correct and that it terminates in a reasonable time. This may require mathematical analysis of the algorithm to demonstrate its correctness and efficiency, and to show that termination is within an acceptable time frame. There may be several algorithms to solve a problem, and so the choice of the best algorithm (e.g. fastest/most efficient) needs to be considered. For example, there are several well-known sorting algorithms (e.g. merge sort and insertion sort), and the merge sort algorithm is more efficient $[\mathrm{\alpha}(n \lg n)]$ than the insertion sort algorithm $\left[0\left(n^2\right)\right]$.

An algorithm may be implemented by a computer program written in some programming language (e.g. C++ or Java). The speed of the program depends on the algorithm employed, the input value(s), how the algorithm has been implemented in the programming language, the compiler, the operating system and the computer hardware.

An algorithm may be described in natural language (care is needed to avoid ambiguity), but it is more common to use a more precise formalism for its description. These include pseudo code (an informal high-level language description); flowcharts; a programming language such as $\mathrm{C}$ or Java; or a formal specification language such as VDM or $\mathrm{Z}$. We shall mainly use a natural language and pseudo code to describe an algorithm. Among the early algorithms developed was an algorithm to determine the prime numbers up to a given number $n$, and Euclid’s algorithm for determining the greatest common divisor of two natural numbers. These are discussed below.

# 离散数学代写

## 数学代写|离散数学作业代写discrete mathematics代考|Prime Number Theory

(i) 有无限个质数。
(ii) 有一个㭌数 $p$ 之间 $n$ 和 $n !+1$ 这样 $n 0$ ， 存在 $k$ 连续复合整数）。

$$N=p_1 p_2 p_3 \ldots p_k+1$$

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

myassignments-help数学代考价格说明

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

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

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

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

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