## 统计代写|算法设计代写Algorithm Design代考|CSE531

statistics-lab™ 为您的留学生涯保驾护航 在代写算法设计Algorithm Design方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写算法设计Algorithm Design代写方面经验极为丰富，各种代写算法设计Algorithm Design相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 统计代写|算法设计代写Algorithm Design代考|Demonstrating Incorrectness

The best way to prove that an algorithm is incorrect is to produce an instance on which it yields an incorrect answer. Such instances are called counterexamples. No rational person will ever defend the correctness of an algorithm after a counter-example has been identified. Very simple instances can instantly defeat reasonable-looking heuristics with a quick touché. Good counterexamples have two important properties:

• Verifiability – To demonstrate that a particular instance is a counterexample to a particular algorithm, you must be able to (1) calculate what answer your algorithm will give in this instance, and (2) display a better answer so as to prove that the algorithm didn’t find it.
• Simplicity-Good counter-examples have all unnecessary details stripped away. They make clear exactly why the proposed algorithm fails. Simplicity is important because you must be able to hold the given instance in your head in order to reason about it. Once a counterexample has been found, it is worth simplifying it down to its essence. For example, the counterexample of Figure 1.6(1) could have been made simpler and better by reducing the number of overlapped segments from five to two.

Hunting for counterexamples is a skill worth developing. It bears some similarity to the task of developing test sets for computer programs, but relies more on inspiration than exhaustion. Here are some techniques to aid your quest:

• Think small – Note that the robot tour counter-examples I presented boiled down to six points or less, and the scheduling counter-examples to only three intervals. This is indicative of the fact that when algorithms fail, there is usually a very simple example on which they fail. Amateur algorists tend to draw a big messy instance and then stare at it helplessly. The pros look carefully at several small examples, because they are easier to verify and reason about.

## 统计代写|算法设计代写Algorithm Design代考|Induction and Recursion

Failure to find a counterexample to a given algorithm does not mean “it is obvious” that the algorithm is correct. A proof or demonstration of correctness is needed. Often mathematical induction is the method of choice.

When I first learned about mathematical induction it seemed like complete magic. You proved a formula like $\sum_{i=1}^n i=n(n+1) / 2$ for some basis case like $n=1$ or 2 , then assumed it was true all the way to $n-1$ before proving it was in fact true for general $n$ using the assumption. That was a proof? Ridiculous!
When I first learned the programming technique of recursion it also seemed like complete magic. The program tested whether the input argument was some basis case like 1 or 2 . If not, you solved the bigger case by breaking it into pieces and calling the subprogram itself to solve these pieces. That was a program? Ridiculous!

The reason both seemed like magic is because recursion is mathematical induction in action. In both, we have general and boundary conditions, with the general condition breaking the problem into smaller and smaller pieces. The initial or boundary condition terminates the recursion. Once you understand either recursion or induction, you should be able to see why the other one also works.

I’ve heard it said that a computer scientist is a mathematician who only knows how to prove things by induction. This is partially true because computer scientists are lousy at proving things, but primarily because so many of the algorithms we study are either recursive or incremental.

Consider the correctness of insertion sort, which we introduced at the beginning of this chapter. The reason it is correct can be shown inductively:

• The basis case consists of a single element, and by definition a one-element array is completely sorted.
• We assume that the first $n-1$ elements of array $A$ are completely sorted after $n-1$ iterations of insertion sort.
• To insert one last element $x$ to $A$, we find where it goes, namely the unique spot between the biggest element less than or equal to $x$ and the smallest element greater than $x$. This is done by moving all the greater elements back by one position, creating room for $x$ in the desired location.

One must be suspicious of inductive proofs, however, because very subtle reasoning errors can creep in. The first are boundary errors. For example, our insertion sort correctness proof above boldly stated that there was a unique place to insert $x$ between two elements, when our basis case was a single-element array. Greater care is needed to properly deal with the special cases of inserting the minimum or maximum elements.

The second and more common class of inductive proof errors concerns cavalier extension claims. Adding one extra item to a given problem instance might cause the entire optimal solution to change. This was the case in our scheduling problem (see Figure 1.8). The optimal schedule after inserting a new segment may contain none of the segments of any particular optimal solution prior to insertion. Boldly ignoring such difficulties can lead to very convincing inductive proofs of incorrect algorithms.

## 统计代写|算法设计代写Algorithm Design代考|Demonstrating Incorrectness

• 可验证性——为了证明一个特定的实例是一个特定算法的反例，你必须能够（1）计算你的算法在这种情况下会给出什么答案，并且（2）显示一个更好的答案，以证明该算法没找到。
• 简单——好的反例都去掉了所有不必要的细节。他们清楚地说明了为什么提出的算法会失败。简单很重要，因为您必须能够在脑海中记住给定的实例才能对其进行推理。一旦找到反例，就值得将其简化为本质。例如，图 1.6(1) 的反例可以通过将重叠段的数量从五个减少到两个而变得更简单和更好。

• 小处思考——请注意，我提出的机器人巡回反例归结为六个点或更少，而调度反例仅包含三个间隔。这表明当算法失败时，通常有一个非常简单的例子说明它们失败了。业余算法学家倾向于画一个大而杂乱的实例，然后无助地盯着它。专业人士会仔细查看几个小例子，因为它们更容易验证和推理。

## 统计代写|算法设计代写Algorithm Design代考|Induction and Recursion

• 基本情况由一个元素组成，根据定义，一个元素数组是完全排序的。
• 我们假设第一个n−1数组元素一个完全排序后n−1插入排序的迭代。
• 插入最后一个元素X至一个，我们找到它去哪里，即最大元素之间的唯一点小于或等于X和大于的最小元素X. 这是通过将所有较大的元素向后移动一个位置来完成的，为X在所需的位置。

﻿

﻿

﻿

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

﻿

## MATLAB代写

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

﻿

The graphs above are incomplete. These figures only show a vertex with degree four (vertex E), its nearest neighbors (A, B, C, and D), and segments of A-C Kempe chains. The entire graphs would also contain several other vertices (especially, more colored the same as B or D) and enough edges to be MPG’s. The left figure has A connected to $C$ in a single section of an A-C Kempe chain (meaning that the vertices of this chain are colored the same as A and C). The left figure shows that this A-C Kempe chain prevents B from connecting to $\mathrm{D}$ with a single section of a B-D Kempe chain. The middle figure has A and C in separate sections of A-C Kempe chains. In this case, B could connect to D with a single section of a B-D Kempe chain. However, since the A and C of the vertex with degree four lie on separate sections, the color of C’s chain can be reversed so that in the vertex with degree four, C is effectively recolored to match A’s color, as shown in the right figure. Similarly, D’s section could be reversed in the left figure so that D is effectively recolored to match B’s color.

Kempe also attempted to demonstrate that vertices with degree five are fourcolorable in his attempt to prove the four-color theorem [Ref. 2], but his argument for vertices with degree five was shown by Heawood in 1890 to be insufficient [Ref. 3]. Let’s explore what happens if we attempt to apply our reasoning for vertices with degree four to a vertex with degree five.

## 数学代写|图论作业代写Graph Theory代考|The previous diagrams

The previous diagrams show that when the two color reversals are performed one at a time in the crossed-chain graph, the first color reversal may break the other chain, allowing the second color reversal to affect the colors of one of F’s neighbors. When we performed the $2-4$ reversal to change B from 2 to 4 , this broke the 1-4 chain. When we then performed the 2-3 reversal to change E from 3, this caused C to change from 3 to 2 . As a result, F remains connected to four different colors; this wasn’t reversed to three as expected.
Unfortunately, you can’t perform both reversals “at the same time” for the following reason. Let’s attempt to perform both reversals “at the same time.” In this crossed-chain diagram, when we swap 2 and 4 on B’s side of the 1-3 chain, one of the 4’s in the 1-4 chain may change into a 2, and when we swap 2 and 3 on E’s side of the 1-4 chain, one of the 3’s in the 1-3 chain may change into a 2 . This is shown in the following figure: one 2 in each chain is shaded gray. Recall that these figures are incomplete; they focus on one vertex (F), its neighbors (A thru E), and Kempe chains. Other vertices and edges are not shown.

Note how one of the 3’s changed into 2 on the left. This can happen when we reverse $\mathrm{C}$ and $\mathrm{E}$ (which were originally 3 and 2 ) on E’s side of the 1-4 chain. Note also how one of the 4’s changed into 2 on the right. This can happen when we reverse B and D (which were originally 2 and 4) outside of the 1-3 chain. Now we see where a problem can occur when attempting to swap the colors of two chains at the same time. If these two 2’s happen to be connected by an edge like the dashed edge shown above, if we perform the double reversal at the same time, this causes two vertices of the same color to share an edge, which isn’t allowed. We’ll revisit Kempe’s strategy for coloring a vertex with degree five in Chapter $25 .$

## 数学代写|图论作业代写Graph Theory代考|The shading of one section of the B-R

• MPG 是三角测量的。它由具有三个边和三个顶点的面组成。
• 每个面的三个顶点必须是三种不同的颜色。
• 每条边由两个相邻的三角形共享，形成一个四边形。
• 每个四边形将有 3 或 4 种不同的颜色。如果与共享边相对的两个顶点恰好是相同的颜色，则它有 3 种颜色。
• 对于每个四边形，四个顶点中的至少 1 个顶点和最多 3 个顶点具有任何颜色对的颜色。例如，具有 R、G、B 和G有 1 个顶点R−是和3个顶点乙−G，或者您可以将其视为 1 个顶点乙−是和3个顶点G−R，或者您可以将其视为 BR 的 2 个顶点和 GY 的 2 个顶点。在后一种情况下，2G’ 不是同一链的连续颜色。
• 当您将更多三角形组合在一起（四边形仅组合两个）并考虑可能的颜色时，您将看到 Kempe 的部分

• 画一张R顶点和一个是由边连接的顶点。
• 如果一个新顶点连接到这些顶点中的每一个，它必须是乙或者G.
• 如果一个新顶点连接到 R 而不是是，可能是是,乙， 或者G.
• 如果一个新的顶点连接到是但不是R，可能是R,乙， 或者G.
• RY 链要么继续增长，要么被 B 包围，G.
• 如果你关注 B 和 G，你会为它的链条得出类似的结论。
• 如果一条链条完全被其对应物包围，则链条的新部分可能会出现在其对应物的另一侧。
Kempe 证明了所有具有四阶的顶点（那些恰好连接到其他四个顶点的顶点）都是四色的 [Ref. 2]。例如，考虑下面的中心顶点。

## 数学代写|图论作业代写Graph Theory代考|In the previous figure

• A 和 C 或者是 AC Kempe 链的同一部分的一部分，或者它们各自位于 AC Kempe 链的不同部分。（如果一种和C例如，是红色和黄色的，则 AC 链是红黄色链。） – 如果一种和C每个位于 AC Kempe 链的不同部分，其中一个部分的颜色可以反转，这有效地重新着色 C 以匹配 A 的颜色。如果 A 和 C 是 AC Kempe 链的同一部分的一部分，则 B 和 D每个都必须位于 BD Kempe 链的不同部分，因为 AC Kempe 链将阻止任何 BD Kempe 链从 B 到达 D。（如果乙和D是蓝色和绿色，例如，那么一种BD Kempe 链是蓝绿色链。）在这种情况下，由于 B 和 D 分别位于 BD Kempe 链的不同部分，因此 BD Kempe 链的其中一个部分的颜色可以反转，这有效地重新着色 D 以匹配 B颜色。– 因此，可以使 C 与 A 具有相同的颜色或使 D 具有与 A 相同的颜色乙通过反转 Kempe 链的分离部分。

Kempe 还试图证明五阶顶点是可四色的，以证明四色定理 [Ref. 2]，但 Heawood 在 1890 年证明他关于五次顶点的论点是不充分的 [Ref. 3]。让我们探讨一下如果我们尝试将我们对度数为四的顶点的推理应用于度数为五的顶点会发生什么。

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

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

## 统计代写|算法设计代写Algorithm Design代考|CSE431

statistics-lab™ 为您的留学生涯保驾护航 在代写算法设计Algorithm Design方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写算法设计Algorithm Design代写方面经验极为丰富，各种代写算法设计Algorithm Design相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 统计代写|算法设计代写Algorithm Design代考|Selecting the Right Jobs

Now consider the following scheduling problem. Imagine you are a highly in demand actor, who has been presented with offers to star in $n$ different movie projects under development. Each offer comes specified with the first and last

Figure 1.5: An instance of the non-overlapping movie scheduling problem. The four red titles define an optimal solution.
day of filming. Whenever you accept a job, you must commit to being available throughout this entire period. Thus, you cannot accept two jobs whose intervals overlap.

For an artist such as yourself, the criterion for job acceptance is clear: you want to make as much money as possible. Because each film pays the same fee, this implies you seek the largest possible set of jobs (intervals) such that no two of them conflict with each other.

For example, consider the available projects in Figure 1.5. You can star in at most four films, namely “Discrete” Mathematics, Programming Challenges, Calculated Bets, and one of either Halting State or Steiner’s Tree.

You (or your agent) must solve the following algorithmic scheduling problem:
Problem: Movie Scheduling Problem
Input: A set $I$ of $n$ intervals on the line.
Output: What is the largest subset of mutually non-overlapping intervals that can be selected from $I$ ?

Now you (the algorist) are given the job of developing a scheduling algorithm for this task. Stop right now and try to find one. Again, I’ll be happy to wait…

There are several ideas that may come to mind. One is based on the notion that it is best to work whenever work is available. This implies that you should start with the job with the earliest start date – after all, there is no other job you can work on then, at least during the beginning of this period:
Earliest.JobFirst $(I)$
Accept the earliest starting job $j$ from $I$ that does not overlap any previously accepted job, and repeat until no more such jobs remain.
This idea makes sense, at least until we realize that accepting the earliest job might block us from taking many other jobs if that first job is long. Check out Figure 1.6(1), where the epic War and Peace is both the first job available and long enough to kill off all other prospects.

This bad example naturally suggests another idea. The problem with War and Peace is that it is too long. Perhaps we should instead start by taking the shortest job, and keep seeking the shortest available job at every turn. Maximizing the number of jobs we do in a given period is clearly connected to the notion of banging them out as quickly as possible.

Hopefully, the previous examples have opened your eyes to the subtleties of algorithm correctness. We need tools to distinguish correct algorithms from incorrect ones, the primary one of which is called a proof.

A proper mathematical proof consists of several parts. First, there is a clear, precise statement of what you are trying to prove. Second, there is a set of assumptions of things that are taken to be true, and hence can be used as part of the proof. Third, there is a chain of reasoning that takes you from these assumptions to the statement you are trying to prove. Finally, there is a little square (I) or QED at the bottom to denote that you have finished, representing the Latin phrase for “thus it is demonstrated.”

This book is not going to emphasize formal proofs of correctness, because they are very difficult to do right and quite misleading when you do them wrong. A proof is indeed a demonstration. Proofs are useful only when they are honest, crisp arguments that explain why an algorithm satisfies a non-trivial correctness property. Correct algorithms require careful exposition, and efforts to show both correctness and not incorrectness.

Before we start thinking about algorithms, we need a careful description of the problem that needs to be solved. Problem specifications have two parts: (1) the set of allowed input instances, and (2) the required properties of the algorithm’s output. It is impossible to prove the correctness of an algorithm for a fuzzilystated problem. Put another way, ask the wrong question and you will get the wrong answer.

Some problem specifications allow too broad a class of input instances. Suppose we had allowed film projects in our movie scheduling problem to have gaps in production (e.g. filming in September and November but a hiatus in October). Then the schedule associated with any particular film would consist of a given set of intervals. Our star would be free to take on two interleaving but not overlapping projects (such as the above-mentioned film nested with one filming in August and October). The earliest completion algorithm would not work for such a generalized scheduling problem. Indeed, no efficient algorithm exists for this generalized problem, as we will see in Section 11.3.2.

## 统计代写|算法设计代写Algorithm Design代考|Selecting the Right Jobs

Earliest.JobFirst(我)

﻿

﻿

﻿

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

﻿

## MATLAB代写

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

﻿

The graphs above are incomplete. These figures only show a vertex with degree four (vertex E), its nearest neighbors (A, B, C, and D), and segments of A-C Kempe chains. The entire graphs would also contain several other vertices (especially, more colored the same as B or D) and enough edges to be MPG’s. The left figure has A connected to $C$ in a single section of an A-C Kempe chain (meaning that the vertices of this chain are colored the same as A and C). The left figure shows that this A-C Kempe chain prevents B from connecting to $\mathrm{D}$ with a single section of a B-D Kempe chain. The middle figure has A and C in separate sections of A-C Kempe chains. In this case, B could connect to D with a single section of a B-D Kempe chain. However, since the A and C of the vertex with degree four lie on separate sections, the color of C’s chain can be reversed so that in the vertex with degree four, C is effectively recolored to match A’s color, as shown in the right figure. Similarly, D’s section could be reversed in the left figure so that D is effectively recolored to match B’s color.

Kempe also attempted to demonstrate that vertices with degree five are fourcolorable in his attempt to prove the four-color theorem [Ref. 2], but his argument for vertices with degree five was shown by Heawood in 1890 to be insufficient [Ref. 3]. Let’s explore what happens if we attempt to apply our reasoning for vertices with degree four to a vertex with degree five.

## 数学代写|图论作业代写Graph Theory代考|The previous diagrams

The previous diagrams show that when the two color reversals are performed one at a time in the crossed-chain graph, the first color reversal may break the other chain, allowing the second color reversal to affect the colors of one of F’s neighbors. When we performed the $2-4$ reversal to change B from 2 to 4 , this broke the 1-4 chain. When we then performed the 2-3 reversal to change E from 3, this caused C to change from 3 to 2 . As a result, F remains connected to four different colors; this wasn’t reversed to three as expected.
Unfortunately, you can’t perform both reversals “at the same time” for the following reason. Let’s attempt to perform both reversals “at the same time.” In this crossed-chain diagram, when we swap 2 and 4 on B’s side of the 1-3 chain, one of the 4’s in the 1-4 chain may change into a 2, and when we swap 2 and 3 on E’s side of the 1-4 chain, one of the 3’s in the 1-3 chain may change into a 2 . This is shown in the following figure: one 2 in each chain is shaded gray. Recall that these figures are incomplete; they focus on one vertex (F), its neighbors (A thru E), and Kempe chains. Other vertices and edges are not shown.

Note how one of the 3’s changed into 2 on the left. This can happen when we reverse $\mathrm{C}$ and $\mathrm{E}$ (which were originally 3 and 2 ) on E’s side of the 1-4 chain. Note also how one of the 4’s changed into 2 on the right. This can happen when we reverse B and D (which were originally 2 and 4) outside of the 1-3 chain. Now we see where a problem can occur when attempting to swap the colors of two chains at the same time. If these two 2’s happen to be connected by an edge like the dashed edge shown above, if we perform the double reversal at the same time, this causes two vertices of the same color to share an edge, which isn’t allowed. We’ll revisit Kempe’s strategy for coloring a vertex with degree five in Chapter $25 .$

## 数学代写|图论作业代写Graph Theory代考|The shading of one section of the B-R

• MPG 是三角测量的。它由具有三个边和三个顶点的面组成。
• 每个面的三个顶点必须是三种不同的颜色。
• 每条边由两个相邻的三角形共享，形成一个四边形。
• 每个四边形将有 3 或 4 种不同的颜色。如果与共享边相对的两个顶点恰好是相同的颜色，则它有 3 种颜色。
• 对于每个四边形，四个顶点中的至少 1 个顶点和最多 3 个顶点具有任何颜色对的颜色。例如，具有 R、G、B 和G有 1 个顶点R−是和3个顶点乙−G，或者您可以将其视为 1 个顶点乙−是和3个顶点G−R，或者您可以将其视为 BR 的 2 个顶点和 GY 的 2 个顶点。在后一种情况下，2G’ 不是同一链的连续颜色。
• 当您将更多三角形组合在一起（四边形仅组合两个）并考虑可能的颜色时，您将看到 Kempe 的部分

• 画一张R顶点和一个是由边连接的顶点。
• 如果一个新顶点连接到这些顶点中的每一个，它必须是乙或者G.
• 如果一个新顶点连接到 R 而不是是，可能是是,乙， 或者G.
• 如果一个新的顶点连接到是但不是R，可能是R,乙， 或者G.
• RY 链要么继续增长，要么被 B 包围，G.
• 如果你关注 B 和 G，你会为它的链条得出类似的结论。
• 如果一条链条完全被其对应物包围，则链条的新部分可能会出现在其对应物的另一侧。
Kempe 证明了所有具有四阶的顶点（那些恰好连接到其他四个顶点的顶点）都是四色的 [Ref. 2]。例如，考虑下面的中心顶点。

## 数学代写|图论作业代写Graph Theory代考|In the previous figure

• A 和 C 或者是 AC Kempe 链的同一部分的一部分，或者它们各自位于 AC Kempe 链的不同部分。（如果一种和C例如，是红色和黄色的，则 AC 链是红黄色链。） – 如果一种和C每个位于 AC Kempe 链的不同部分，其中一个部分的颜色可以反转，这有效地重新着色 C 以匹配 A 的颜色。如果 A 和 C 是 AC Kempe 链的同一部分的一部分，则 B 和 D每个都必须位于 BD Kempe 链的不同部分，因为 AC Kempe 链将阻止任何 BD Kempe 链从 B 到达 D。（如果乙和D是蓝色和绿色，例如，那么一种BD Kempe 链是蓝绿色链。）在这种情况下，由于 B 和 D 分别位于 BD Kempe 链的不同部分，因此 BD Kempe 链的其中一个部分的颜色可以反转，这有效地重新着色 D 以匹配 B颜色。– 因此，可以使 C 与 A 具有相同的颜色或使 D 具有与 A 相同的颜色乙通过反转 Kempe 链的分离部分。

Kempe 还试图证明五阶顶点是可四色的，以证明四色定理 [Ref. 2]，但 Heawood 在 1890 年证明他关于五次顶点的论点是不充分的 [Ref. 3]。让我们探讨一下如果我们尝试将我们对度数为四的顶点的推理应用于度数为五的顶点会发生什么。

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

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

## 统计代写|算法设计代写Algorithm Design代考|COMP3027

statistics-lab™ 为您的留学生涯保驾护航 在代写算法设计Algorithm Design方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写算法设计Algorithm Design代写方面经验极为丰富，各种代写算法设计Algorithm Design相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 统计代写|算法设计代写Algorithm Design代考|Introduction to Algorithm Design

What is an algorithm? An algorithm is a procedure to accomplish a specific task. An algorithm is the idea behind any reasonable computer program.

To be interesting, an algorithm must solve a general, well-specified problem. An algorithmic problem is specified by describing the complete set of instances it must work on and of its output after running on one of these instances. This distinction, between a problem and an instance of a problem, is fundamental. For example, the algorithmic problem known as sorting is defined as follows:
Problem: Sorting
Input: A sequence of $n$ keys $a_1, \ldots, a_n$.
Output: The permutation (reordering) of the input sequence such that $a_1^{\prime} \leq$ $a_2^{\prime} \leq \cdots \leq a_{n-1}^{\prime} \leq a_n^{\prime}$

An instance of sorting might be an array of names, like {Mike, Bob, Sally, Jill, Jan $}$, or a list of numbers like ${154,245,568,324,654,324}$. Determining that you are dealing with a general problem instead of an instance is your first step towards solving it.

An algorithm is a procedure that takes any of the possible input instances and transforms it to the desired output. There are many different algorithms that can solve the problem of sorting. For example, insertion sort is a method that starts with a single element (thus trivially forming a sorted list) and then incrementally inserts the remaining elements so that the list remains sorted. An animation of the logical flow of this algorithm on a particular instance (the letters in the word “INSERTIONSORT”) is given in Figure 1.1.
This algorithm, implemented in $\mathrm{C}$, is described below:

Note the generality of this algorithm. It works just as well on names as it does on numbers. Or anything else, given the appropriate comparison operation $(<)$ to test which of two keys should appear first in sorted order. It can be readily verified that this algorithm correctly orders every possible input instance according to our definition of the sorting problem.

There are three desirable properties for a good algorithm. We seek algorithms that are correct and efficient, while being easy to implement. These goals may not be simultaneously achievable. In industrial settings, any program that seems to give good enough answers without slowing the application down is often acceptable, regardless of whether a better algorithm exists. The issue of finding the best possible answer or achieving maximum efficiency usually arises in industry only after serious performance or legal troubles.

This chapter will focus on algorithm correctness, with our discussion of efficiency concerns deferred to Chapter 2. It is seldom obvious whether a given algorithm correctly solves a given problem. Correct algorithms usually come with a proof of correctness, which is an explanation of why we know that the algorithm must take every instance of the problem to the desired result. But before we go further, it is important to demonstrate why it’s obvious never suffices as a proof of correctness, and is usually flat-out wrong.

## 统计代写|算法设计代写Algorithm Design代考|Robot Tour Optimization

Let’s consider a problem that arises often in manufacturing, transportation, and testing applications. Suppose we are given a robot arm equipped with a tool, say a soldering iron. When manufacturing circuit boards, all the chips and other components must be fastened onto the substrate. More specifically, each chip has a set of contact points (or wires) that need be soldered to the board. To program the robot arm for this job, we must first construct an ordering of the contact points so that the robot visits (and solders) the first contact point, then the second point, third, and so forth until the job is done. The robot arm then proceeds back to the first contact point to prepare for the next board, thus turning the tool-path into a closed tour, or cycle.

Robots are expensive devices, so we want the tour that minimizes the time it takes to assemble the circuit board. A reasonable assumption is that the robot arm moves with fixed speed, so the time to travel between two points is proportional to their distance. In short, we must solve the following algorithm problem:
Problem: Robot Tour Optimization
Input: A set $S$ of $n$ points in the plane.
Output: What is the shortest cycle tour that visits each point in the set $S$ ?
You are given the job of programming the robot arm. Stop right now and think up an algorithm to solve this problem. I’ll be happy to wait for you… Several algorithms might come to mind to solve this problem. Perhaps the most popular idea is the nearest-neighbor heuristic. Starting from some point $p_0$, we walk first to its nearest neighbor $p_1$. From $p_1$, we walk to its nearest unvisited neighbor, thus excluding only $p_0$ as a candidate. We now repeat this process until we run out of unvisited points, after which we return to $p_0$ to close off the tour.

This algorithm has a lot to recommend it. It is simple to understand and implement. It makes sense to visit nearby points before we visit faraway points to reduce the total travel time. The algorithm works perfectly on the example in Figure 1.2. The nearest-neighbor rule is reasonably efficient, for it looks at each pair of points $\left(p_i, p_j\right)$ at most twice: once when adding $p_i$ to the tour, the other when adding $p_j$. Against all these positives there is only one problem. This algorithm is completely wrong.

Wrong? How can it be wrong? The algorithm always finds a tour, but it doesn’t necessarily find the shortest possible tour. It doesn’t necessarily even come close. Consider the set of points in Figure 1.3, all of which lie along a line. The numbers describe the distance that each point lies to the left or right of the point labeled “0”. When we start from the point ” 0 ” and repeatedly walk to the nearest unvisited neighbor, we might keep jumping left-right-left-right over “0” as the algorithm offers no advice on how to break ties. A much better (indeed optimal) tour for these points starts from the left-most point and visits each point as we walk right before returning at the left-most point.

Try now to imagine your boss’s delight as she watches a demo of your robot arm hopscotching left-right-left-right during the assembly of such a simple board.

## 统计代写|算法设计代写Algorithm Design代考|Robot Tour Optimization

Input：A set小号的n平面上的点。

﻿

﻿

﻿

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

﻿

## MATLAB代写

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

﻿

The graphs above are incomplete. These figures only show a vertex with degree four (vertex E), its nearest neighbors (A, B, C, and D), and segments of A-C Kempe chains. The entire graphs would also contain several other vertices (especially, more colored the same as B or D) and enough edges to be MPG’s. The left figure has A connected to $C$ in a single section of an A-C Kempe chain (meaning that the vertices of this chain are colored the same as A and C). The left figure shows that this A-C Kempe chain prevents B from connecting to $\mathrm{D}$ with a single section of a B-D Kempe chain. The middle figure has A and C in separate sections of A-C Kempe chains. In this case, B could connect to D with a single section of a B-D Kempe chain. However, since the A and C of the vertex with degree four lie on separate sections, the color of C’s chain can be reversed so that in the vertex with degree four, C is effectively recolored to match A’s color, as shown in the right figure. Similarly, D’s section could be reversed in the left figure so that D is effectively recolored to match B’s color.

Kempe also attempted to demonstrate that vertices with degree five are fourcolorable in his attempt to prove the four-color theorem [Ref. 2], but his argument for vertices with degree five was shown by Heawood in 1890 to be insufficient [Ref. 3]. Let’s explore what happens if we attempt to apply our reasoning for vertices with degree four to a vertex with degree five.

## 数学代写|图论作业代写Graph Theory代考|The previous diagrams

The previous diagrams show that when the two color reversals are performed one at a time in the crossed-chain graph, the first color reversal may break the other chain, allowing the second color reversal to affect the colors of one of F’s neighbors. When we performed the $2-4$ reversal to change B from 2 to 4 , this broke the 1-4 chain. When we then performed the 2-3 reversal to change E from 3, this caused C to change from 3 to 2 . As a result, F remains connected to four different colors; this wasn’t reversed to three as expected.
Unfortunately, you can’t perform both reversals “at the same time” for the following reason. Let’s attempt to perform both reversals “at the same time.” In this crossed-chain diagram, when we swap 2 and 4 on B’s side of the 1-3 chain, one of the 4’s in the 1-4 chain may change into a 2, and when we swap 2 and 3 on E’s side of the 1-4 chain, one of the 3’s in the 1-3 chain may change into a 2 . This is shown in the following figure: one 2 in each chain is shaded gray. Recall that these figures are incomplete; they focus on one vertex (F), its neighbors (A thru E), and Kempe chains. Other vertices and edges are not shown.

Note how one of the 3’s changed into 2 on the left. This can happen when we reverse $\mathrm{C}$ and $\mathrm{E}$ (which were originally 3 and 2 ) on E’s side of the 1-4 chain. Note also how one of the 4’s changed into 2 on the right. This can happen when we reverse B and D (which were originally 2 and 4) outside of the 1-3 chain. Now we see where a problem can occur when attempting to swap the colors of two chains at the same time. If these two 2’s happen to be connected by an edge like the dashed edge shown above, if we perform the double reversal at the same time, this causes two vertices of the same color to share an edge, which isn’t allowed. We’ll revisit Kempe’s strategy for coloring a vertex with degree five in Chapter $25 .$

## 数学代写|图论作业代写Graph Theory代考|The shading of one section of the B-R

• MPG 是三角测量的。它由具有三个边和三个顶点的面组成。
• 每个面的三个顶点必须是三种不同的颜色。
• 每条边由两个相邻的三角形共享，形成一个四边形。
• 每个四边形将有 3 或 4 种不同的颜色。如果与共享边相对的两个顶点恰好是相同的颜色，则它有 3 种颜色。
• 对于每个四边形，四个顶点中的至少 1 个顶点和最多 3 个顶点具有任何颜色对的颜色。例如，具有 R、G、B 和G有 1 个顶点R−是和3个顶点乙−G，或者您可以将其视为 1 个顶点乙−是和3个顶点G−R，或者您可以将其视为 BR 的 2 个顶点和 GY 的 2 个顶点。在后一种情况下，2G’ 不是同一链的连续颜色。
• 当您将更多三角形组合在一起（四边形仅组合两个）并考虑可能的颜色时，您将看到 Kempe 的部分

• 画一张R顶点和一个是由边连接的顶点。
• 如果一个新顶点连接到这些顶点中的每一个，它必须是乙或者G.
• 如果一个新顶点连接到 R 而不是是，可能是是,乙， 或者G.
• 如果一个新的顶点连接到是但不是R，可能是R,乙， 或者G.
• RY 链要么继续增长，要么被 B 包围，G.
• 如果你关注 B 和 G，你会为它的链条得出类似的结论。
• 如果一条链条完全被其对应物包围，则链条的新部分可能会出现在其对应物的另一侧。
Kempe 证明了所有具有四阶的顶点（那些恰好连接到其他四个顶点的顶点）都是四色的 [Ref. 2]。例如，考虑下面的中心顶点。

## 数学代写|图论作业代写Graph Theory代考|In the previous figure

• A 和 C 或者是 AC Kempe 链的同一部分的一部分，或者它们各自位于 AC Kempe 链的不同部分。（如果一种和C例如，是红色和黄色的，则 AC 链是红黄色链。） – 如果一种和C每个位于 AC Kempe 链的不同部分，其中一个部分的颜色可以反转，这有效地重新着色 C 以匹配 A 的颜色。如果 A 和 C 是 AC Kempe 链的同一部分的一部分，则 B 和 D每个都必须位于 BD Kempe 链的不同部分，因为 AC Kempe 链将阻止任何 BD Kempe 链从 B 到达 D。（如果乙和D是蓝色和绿色，例如，那么一种BD Kempe 链是蓝绿色链。）在这种情况下，由于 B 和 D 分别位于 BD Kempe 链的不同部分，因此 BD Kempe 链的其中一个部分的颜色可以反转，这有效地重新着色 D 以匹配 B颜色。– 因此，可以使 C 与 A 具有相同的颜色或使 D 具有与 A 相同的颜色乙通过反转 Kempe 链的分离部分。

Kempe 还试图证明五阶顶点是可四色的，以证明四色定理 [Ref. 2]，但 Heawood 在 1890 年证明他关于五次顶点的论点是不充分的 [Ref. 3]。让我们探讨一下如果我们尝试将我们对度数为四的顶点的推理应用于度数为五的顶点会发生什么。

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

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