文件名称:ntree
介绍说明--下载内容来自于网络,使用问题请自行百度
设T 是一棵带权树,树的每一条边带一个正权。又设S 是T 的顶点集,T/S 是从树T 中
将S中顶点删去后得到的森林。如果T/S中所有树的从根到叶的路长都不超过d ,则称T/S
是一个d 森林。
(1)设计一个算法求T的最小顶点集S,使T/S是d 森林。(提示:从叶向根移动)
(2)分析算法的正确性和计算复杂性。
(3)设T中有n 个顶点,则算法的计算时间复杂性应为O(n)。-based T is a right to bring a tree for every one of the sideband is the right one. S is also based Vertex Set T, T / S from the tree T Lieutenant General S vertex deletion the forest. If the T / S all trees from the roots to leaves of a long road, do not exceed d, said the T / S is a d forest. (1) design a T algorithm for the minimum vertex set S, T / S is d forest. (Tip : from roots to leaves mobile) (2) analysis algorithm correctness and computational complexity. (3) The T with n vertices, the algorithm complexity of computing time for the O (n).
将S中顶点删去后得到的森林。如果T/S中所有树的从根到叶的路长都不超过d ,则称T/S
是一个d 森林。
(1)设计一个算法求T的最小顶点集S,使T/S是d 森林。(提示:从叶向根移动)
(2)分析算法的正确性和计算复杂性。
(3)设T中有n 个顶点,则算法的计算时间复杂性应为O(n)。-based T is a right to bring a tree for every one of the sideband is the right one. S is also based Vertex Set T, T / S from the tree T Lieutenant General S vertex deletion the forest. If the T / S all trees from the roots to leaves of a long road, do not exceed d, said the T / S is a d forest. (1) design a T algorithm for the minimum vertex set S, T / S is d forest. (Tip : from roots to leaves mobile) (2) analysis algorithm correctness and computational complexity. (3) The T with n vertices, the algorithm complexity of computing time for the O (n).
(系统自动生成,下载前可以参看下载内容)
下载文件列表
d 森林问题.cpp
www.dssz.com.txt
www.dssz.com.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.