设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)。
标签: 树
上传时间: 2015-05-31
上传用户:我们的船长
The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition
标签: government streamline important alphabet
上传时间: 2015-06-09
上传用户:weixiao99
HDOJ ACM input:The input consists of T test cases. The number of test cases ) (T is given in the first line of the input. Each test case begins with a line containing an integer N , 1<=N<=200 , that represents the number of tables to move. Each of the following N lines contains two positive integers s and t, representing that a table is to move from room number s to room number t (each room number appears at most once in the N lines). From the N+3-rd line, the remaining test cases are listed in the same manner as above.
上传时间: 2015-10-18
上传用户:三人用菜
UCS (Ultra Corba Simulator) is one more powerful corba client/servant simulator tool than other similar products(e.g. Telcopro s MtSim, or OpenFusion s Corba Explorer, or eaiBridge s CAST). It doesn t need idl-related helper class or IR service.
标签: Simulator simulator powerful servant
上传时间: 2016-01-17
上传用户:hustfanenze
The XML Toolbox converts MATLAB data types (such as double, char, struct, complex, sparse, logical) of any level of nesting to XML format and vice versa. For example, >> project.name = MyProject >> project.id = 1234 >> project.param.a = 3.1415 >> project.param.b = 42 becomes with str=xml_format(project, off ) "<project> <name>MyProject</name> <id>1234</id> <param> <a>3.1415</a> <b>42</b> </param> </project>" On the other hand, if an XML string XStr is given, this can be converted easily to a MATLAB data type or structure V with the command V=xml_parse(XStr).
标签: converts Toolbox complex logical
上传时间: 2016-02-12
上传用户:a673761058
WMTSA toolbox is an implemenation for MATLAB of the wavelet methods for time series analysis techniques presented in: Percival, D. B. and A. T. Walden (2000) Wavelet Methods for Time Series Analysis. Cambridge: Cambridge University Press.
标签: implemenation for analysis toolbox
上传时间: 2014-01-15
上传用户:huangld
ardware sensors monitor 4.4.2.2 (June 2008) (Shareware, trial period is two weeks) The most universal hardware monitoring program for Windows 9X/ME/NT/2000/XP/2003/VISTA x86/x64 editions This program monitors and displays certain parameters (temperatures, voltages, fans RPM) taken from h/w sensor chips, installed on smart motherboards and/or graphics cards. Customizable alarms can be displayed. Professional license includes thermo control features (so-called "Software cooling"), nVidia/ATi graphics cards and HDD S.M.A.R.T. monitoring.
标签: Shareware ardware sensors monitor
上传时间: 2013-12-17
上传用户:894898248
该文设计的 D S P最小系统可应用于教学,本科生通过在此硬件平台上实现 F S K的调 制及 F I R滤波器的实现两个实验,可以掌握 D S P硬件调试方法,增加对 D S P开发过程,以及 D S P基本 算 法 实现 的理 解。文 中所 设计 的 D S P最 小 系统 由 T I公 司 的定 点 D S P芯 片 T MS 3 2 0 V C 5 4 0 2及其相关电源和时钟电路 、片外扩展存储 器、A / D、D / A、标准 U A R T接 口构成
上传时间: 2016-10-09
上传用户:caozhizhi
Modern C++ Design is an important book. Fundamentally, it demonstrates generic patterns or pattern templates as a powerful new way of creating extensible designs in C++--a new way to combine templates and patterns that you may never have dreamt was possible, but is. If your work involves C++ design and coding, you should read this book. Highly recommended.-Herb Sutter。好书!
标签: Fundamentally demonstrates important patterns
上传时间: 2013-11-29
上传用户:PresidentHuang
A novel met hod t o p artially compensate sigma2delta shap ed noise is p rop osed. By injecting t he comp en2 sation cur rent int o t he p assive loop f ilte r during t he delay time of t he p hase f requency detect or ( PFD) , a maximum reduction of t he p hase noise by about 16dB can be achieved. Comp a red t o ot he r compensation met hods , t he tech2 nique p rop osed he re is relatively simple and easy t o implement . Key building blocks f or realizing t he noise cancel2 lation , including t he delay va riable PFD and comp ensation cur rent source , a re sp ecially designed. Bot h t he behavior level and circuit level simulation results a re p resented.
标签: sigma2delta compensate injecting artially
上传时间: 2013-12-18
上传用户:qlpqlq