下面提到的问题的算法请帮助 [英] Algorithm for below mentioned Questions Please Help

查看:83
本文介绍了下面提到的问题的算法请帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

执行以下归纳证明:



设d1,d2,...,dn,n至少为2,为正整数。使用数学归纳来解释为什么,如果d1 + d2 + ... + dn = 2n-2,那么必须有一个具有n个顶点的树,其度数正好是d1,d2,...,dn。 (请注意阅读此声明。与顶点度d1,d2,...,dn的任何树必须满足d1 + d2 + ... + dn = 2n-2的情况不同,尽管这也是正确的。相反,它说如果你从数字d1,d2,...,dn开始,那么你可以找到这样的树。)

Do the following inductive proof:

Let d1, d2, ..., dn, with n at least 2, be positive integers. Use mathematical induction to explain why, if d1+ d2+…+dn = 2n-2, then there must be a tree with n vertices whose degrees are exactly d1, d2, ..., dn. (Be careful with reading this statement. It is not the same as saying that any tree with vertex degrees d1, d2, ..., dn must satisfy d1+ d2+...+dn = 2n-2, although this is also true. Rather, it says that if you begin with the numbers d1, d2, ..., dn, then you can find such a tree.)

推荐答案

我们不做你的功课:这是有原因的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。



如果这是一个面试问题,那么我们如何给你答案帮助任何人?如果我们这样做,你能做得更好吗?没有。



亲自尝试,你可能会发现它并不像你想象的那么难!
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

If it's an interview question, then how does us giving you answers help anybody? Would you be able to do the job any better if we did? No.

Try it yourself, you may find it is not as difficult as you think!


这篇关于下面提到的问题的算法请帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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