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

# 数学代写|离散数学代写Discrete Mathematics代考|MATH271 How to Define Trees

avatest™

## avatest™帮您通过考试

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

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 数学代写|离散数学代写Discrete Mathematics代考|How to Define Trees

We have met trees when we were studying enumeration problems; now we take a look at them as graphs. A graph $G=(V, E)$ is called a tree if it is connected and contains no cycle as a subgraph. The simplest tree has one node and no edges. The second simplest tree consists of two nodes connected by an edge. Figure $8.1$ shows a variety of other trees.

Note that the two properties defining trees work in opposite directions: Connectedness means that the graph cannot have “too few” edges, while the exclusion of cycles means that it cannot have “too many.” To be more precise, if a graph is connected, then if add a new edge to it, it remains connected (while if we delete an edge, it may become disconnected). If a graph contains no cycle, then if we delete any edge, the remaining graph will still not contain a cycle (while adding a new edge may create a cycle). The following theorem shows that trees can be characterized as “minimally connected” graphs as well as “maximally cycle-free” graphs.

Theorem 8.1.1 (a) A graph $G$ is a tree if and only if it is connected, but deleting any of its edges results in a disconnected graph.
(b) A graph $G$ is a tree if and only if it contains no cycles, but adding any new edge creates a cycle.

Proof. We prove part (a) of this theorem; the proof of part (b) is left as an exercise.

First, we have to prove that if $G$ is a tree then it satisfies the condition given in the theorem. It is clear that $G$ is connected (by the definition of a tree). We want to prove that if we delete any edge, it cannot remain connected. The proof is indirect: Assume that when the edge $u v$ is deleted from a tree $G$, the remaining graph $G^{\prime}$ is connected. Then $G^{\prime}$ contains a path $P$ connecting $u$ and $v$. But then, if we put the edge $u v$ back, the path $P$ and the edge $u v$ will form a cycle in $G$, which contradicts the definition of trees.

Second, we have to prove that if $G$ satisfies the condition given in the theorem, then it is a tree. It is clear that $G$ is connected, so we only have to argue that $G$ does not contain a cycle. Again by an indirect argument, assume that $G$ does contain a cycle $C$. Then deleting any edge of $C$, we obtain a connected graph (Exercise 7.2.5). But this contradicts the condition in the theorem.

## 数学代写|离散数学代写Discrete Mathematics代考|How to Grow Trees

The following is one of the most important properties of trees.
Theorem 8.2.1 Every tree with at least two nodes has at least two nodes of degree 1.

Proof. Let $G$ be a tree with at least two nodes. We prove that $G$ has a node of degree 1 , and leave it to the reader as an exercise to prove that it has at least one more. (A path has only two such nodes, so this is the best possible we can claim.)

Let us start from any node $v_0$ of the tree and take a walk (climb?) on the tree. Let’s say we never want to turn back from a node on the edge through which we entered it; this is possible unless we get to a node of degree 1 , in which case we stop and the proof is finished.

So let’s argue that this must happen sooner or later. If not, then eventually we must return to a node we have already visited; but then the nodes and edges we have traversed between the two visits form a cycle. This contradicts our assumption that $G$ is a tree and hence contains no cycle.
8.2.1 Apply the argument above to find a second node of degree 1.
A real tree grows by developing new twigs again and again. We show that graph-trees can be grown in the same way. To be more precise, consider the following procedure, which we call the Tree-growing Procedure:

• Start with a single node.
• Repeat the following any number of times: If you have any graph $G$, create a new node and connect it by a new edge to any node of $G$.

## 数学代写|离散数学代写Discrete Mathematics代考|How to Define Trees

(b) 图表 $G$ 是一棵树当且仅当它不包含循坏，但添加任何新边都会创建一个循环。

## 数学代写|离散数学代写Discrete Mathematics代考|How to Grow Trees

$8.2 .1$ 应用上面的论证找到度数为 1 的第二个节点。

• 从单个节点开始。
• 重复以下任意次数: 如果您有任何图形 $G$ ，创建一个新节点并通过一条新边将其连接到 $G$.

## MATLAB代写

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