一棵树的程度是多少? (如同,一棵树ADT) [英] What is the degree of a tree? (As in, a tree ADT)

查看:213
本文介绍了一棵树的程度是多少? (如同,一棵树ADT)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



但是,我们如何定义一个树的程度?

解决方案

一般来说,图形具有最小程度和最大程度,只是图中所有节点的最大程度的最小值。



如果图是k-规则的,那就是所有节点都具有正好相邻的k个邻居,最小和最大等于k,并且图表示为k度。 / p>

因为一棵树不是常规的,你不能说它有grad k,但你可以找到它的最小或最大grad。



相当普遍的是k-ary树,它们是根树,每个节点最多有k个孩子。


I understand that the degree of a node is the number of children it has.

However, how do we define the degree of a tree?

解决方案

In general a graph has a minimum degree and a maximum degree, that is just the minimum respectivly the maximum degree of all nodes in the graph.

If a graph is k-regular, that is all nodes have exactly k neighbours, minimum and maximum degree equal k and the graph is said to be of degree k.

Because a tree is not k-regular you cannot say it has grad k, but you can find its minimum or maximum grad.

Quite common are k-ary trees, that are rooted trees where each node has at most k childs.

这篇关于一棵树的程度是多少? (如同,一棵树ADT)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆