N个节点的二叉树形状数有随高度的N-1? [英] Number of binary tree shapes of N nodes are there with height N-1?

查看:303
本文介绍了N个节点的二叉树形状数有随高度的N-1?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何N个节点的许多二叉树的形状有随高度的N-1? 还有,你怎么会去感应打样?

How many binary tree shapes of N nodes are there with height N-1? Also, how would you go about proofing by induction?

高N-1与节点,二叉树n表示所有的节点都只有1名儿童,排序链状结构?因此,二叉树的数量会有所不同排列是N N数字。我在想,在正确的方向?

So binary tree of height n-1 with node n means all node will have only 1 child, sort of chain like structure? So number of binary tree will be different permutation of n numbers which is n. Am I thinking in the right direction?

推荐答案

您正在考虑在正确的方向,你已经正确改变了原来的问题很简单。然而令人奇怪的是,它是明确表示,树是二进制的时候,其实在声明中规定更严格的约束。

You are thinking in the right direction and you have correctly transformed the original problem to a simple one. However what is strange is that it is explicitly stated that the tree is "binary" when in fact the statement dictates even tighter constraint.

这篇关于N个节点的二叉树形状数有随高度的N-1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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