计算机数学基础⑥(Trees)

Trees

Definition 6.1. A graph G has another graph H as a subgraph if H
is “contained within” G. In other words, if you can take G and remove
vertices and/or edges from it until you get the graph H, then H is a
subgraph of G.

一个图G有另一个图H作为子图,如果H“包含在”G中,换句话说,如果你可以取G并移除其中的顶点和/或边,直到你得到图H,那么H就是G的子图。

例如:
在这里插入图片描述

Definition 6.2. A tree is a graph T that is connected and has no cycle
graph Cn as a subgraph.

树是一个连通的图T,子图没有环图Cn

例如下面就是三个树:
在这里插入图片描述

Theorem 6.1. If T is a tree containing at least one edge, then T has
at least two leaves.

如果T是一个至少包含一条边的树,那么T至少有两个叶。

Useful Results on Trees(关于树的结论)

在这里插入图片描述
如果我们说T是一个树,那么以下两点一定成立:

  • 在T中的任意两个顶点之间都有一条路径。
  • T是连通的,有n - 1条边

Rooted Trees(有根树)

Definition 6.4. We say that the children of a vertex v are all of the
neighbors of v at the level directly below v, and the parent of v is the
neighbor of v at the level directly above v. The height of a rooted tree is
the largest level index created when drawing the graph as above.

树的高度是树的最大索引值

在这里插入图片描述
二叉树是一棵有根的树,其中每个顶点要么没有子结点,要么只有一个子结点,要么有两个子结点。你可以将它推广到m个树中,对于任意m,通过改变这里的限制,要求每个顶点最多有m个子结点。

如果每个顶点都没有子结点或两个子结点,则为满。

  • 5
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

十八岁讨厌编程

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值