搜索资源列表
-
2下载:
设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 o
-
-
0下载:
在一个圆形操场的四周摆放着n堆石子。现要将石子有次序地合并成一堆。规定每次只能选相邻的两堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的得分。试设计一个算法,计算出将n堆石子合并成一堆的最小得分和最大得分,并分析算法的计算复杂度。-in a circle around the playground are placed n gravel pile. Is a stone should order to be merged into a heap. Stipulated that only
-
-
0下载:
对三种数据结构的分析.avl tree,splaytree和binary search tree的插入和删除的算法复杂度分析.-of three data structure analysis. Avl tree, splaytree and binary search tree insertion and deletion algorithm complexity analysis .
-
-
0下载:
作品:算法设计课程作业
作者:陈兴
学号:J04120010
操作说明:
1、最长公共子序列:
用VC6.0打开文件以后输入一串数字,按“\\”为结束,输出结果。
2、背包问题
用vc6.0打开文件以后按提示操作。
3、残缺棋盘问题
用vc6.0打开文件以后按提示操作。
4、(3.1和3.2还有3.3)
这个是课本82页的作业,基本实现了。其中3.2的算法时间复杂度不是nlogn而是n,nlogn的算法没做出来!
-e
-
-
0下载:
排序算法的内部复杂度分析,有八个算法,有时间和空间的分析,比较完整-internal sorting algorithm complexity analysis, eight algorithm, time and space analysis, a relatively complete
-
-
1下载:
如果采用单链表保存单词,可采用如下办法压缩存储空间。如果两个单词的后缀相同,则可以用同一个存储空间保存相同的后缀。例如,原来分别采用单链表保存的单词Str1“abcdef”和单词Str2“dbdef”,经过压缩后的存储形式如下。
请设计一个高效的算法完成两个单链表的压缩存储,并估计你所设计算法的时间复杂度。
要求:阅读预设代码,编写函数SNODE * ziplist( SNODE * head1, SNODE * head2 )
ziplist的功能是:
-
-
0下载:
算法导论之红黑树算法,红黑树主要用在内核的算法,该算法的时间复杂度很好!-Introduction to the red and black tree algorithm algorithm, a red, black tree in the main core of the algorithm time complexity good!
-
-
0下载:
KMP算法的实现,算法复杂度为O(m+n),C++。-KMP Algorithm, algorithm complexity is O (m+ n), C++.
-
-
0下载:
1,KMP:实现了在一个字符串中查找字串的高效算法,复杂度为O(m+n)
2,max_match:求两个字符串的最大匹配字串
在vc6.0中调试通过,可以使用-1, KMP: realized in a string to find String efficient algorithm complexity is O (m+ n) 2, max_match: seeking two strings maximum matching string in the vc6.0 debug en
-
-
0下载:
三角剖分求二维平面上的点集的一个最小生成树,算法复杂度为O(nlogn)。-Seeking two-dimensional triangulation of points on the set of a minimum spanning tree, the algorithm complexity is O (nlogn).
-
-
0下载:
贪心算法一般来说是解决“最优问题”,具有编程简单、运行效率高、空间复杂度低等特点。-Greedy algorithm to solve general, " optimal problems" , with programming is simple, efficient, and low space complexity.
-
-
1下载:
图搜索的非启发式和启发式算法, 着重分析了它们各自的复杂性、优缺点及
其相互关系, 提出了改进要点. 这对于如何选用一个合适的搜索算法是十分有益的.-Figure of non-heuristic and heuristic search algorithm, analyzes the complexity of their respective advantages and disadvantages and their relationship, an improved points.
-
-
0下载:
计算任意两棵树结构间的编辑距离,是Zhang和Shasha提出来的,时间复杂度为O(V*V *min(L, D)*min(L , D -compute the edit distance between two tree structures, it s proposed by Zhang and Shasha , time complexity is O(V*V *min(L, D)*min(L , D ))
-
-
0下载:
通过内部排序算法实现,熟练掌握各种排序算法的基本技术。通过各种排序算法在数据随机分布、正序和逆序情况下,数据比较次数和数据元素移动次数,对不同排序算法的时间复杂读获得只管的感受。-Through internal sorting algorithm, to master the basic techniques of various sorting algorithms. Data through a variety of sorting algorithms in random distri
-
-
0下载:
算术表达式的求值,实现了加减乘除等基本运算,代码简单易懂,实现算法复杂度小-Arithmetic expressions are evaluated to achieve the basic operations addition, subtraction, etc., is straightforward, small algorithm complexity
-
-
0下载:
C语言实现的各种排序算法之间的复杂度比较,数据有系统随机产生,各种排序算法运用后分析时空复杂度-C language implementation of the various sorting algorithm complexity comparison between the data in a systematic random, after the analysis of various sorting algorithms use time and space complexity
-
-
0下载:
KMP算法主要用于匹配字符串,算法复杂度为O(N),本代码用C 语言编写-KMP string matching algorithm is used, the algorithm complexity is O (N), the code written in C language
-
-
0下载:
各种排序算法的比较,具体有直接插入排序、希尔排序,冒泡排序、快速排序、选择排序、堆排序,归并排序,基数排序八种,通过时间复杂度的比较,取平均值判断-Comparison of various sorting algorithms, specifically the direct insertion sort, shell sort, bubble sort, quick sort, selection sort, heap sort, go side by side
Sequence, Ra
-
-
0下载:
用C++实现的汉诺塔,递归算法,复杂度比较高,但是编码和思路比较简单-C++ implementation of the Tower of Hanoi recursive algorithm complexity is relatively high, but relatively simple coding and ideas
-
-
1下载:
各种内部排序算法的时间复杂度分析结果只给出了算法执行时间的阶,或大概的执行时间。试通过随机的数据比较各算法的关键字比较次数和关键字移动的次数。-The time complexity analysis of the various internal sorting algorithm only gives the order of the algorithm execution time, or about the execution time. Test the random data al
-