本目录下的源代码均属示例、教学性质。作者不对这些代码的功能和性能作任何担保或承诺。 -------- 功能说明 -------- 本目录下的程序用8种不同的方式实现了Huffman编码算法,这8种方式分别是 * huffman_a 使用链表结构生成Huffman树的算法,这是最基本的实现方法,效率最低。 * huffman_b 使用《数据结构》(严蔚敏,吴伟民,1997,C语言版)中给出的算法,将二叉树存放在连续空间里(静态链表),空间的每个结点内仍有左子树、右子树、双亲等指针。 * huffman_c 使用Canonical Huffman编码,同时对huffman_b的存储结构进行改造,将二叉树存放在连续空间tree里,空间的每个结点类型都和结点权值的数据类型相同,空间大小为2*num,tree[0]未用,tree[1..num]是每个元素的权值,生成Huffman后,tree[1..2*num-1]中是双亲结点索引。 * huffman_d 在huffman_c的基础上,增加预先排序的功能先用QuickSort算法对所有元素的权值从小到大排序,这样,排序后最前面的两个元素就是最小的一对元素了。我们可以直接将它们挑出来,组合成一个子树。然后再子树的权值用折半插入法插到已排序的元素
上传时间: 2013-12-20
上传用户:franktu
自己做的数据结构实验题(合并链表,huffman tree,表达式求值)
上传时间: 2016-12-31
上传用户:redmoons
The solution of Ziemer s book Digital communication. This version of Digital communication is the Bible in telecommunication.
标签: communication Digital solution version
上传时间: 2016-12-31
上传用户:wpwpwlxwlx
专家点评: Y P7 `. @ {$ r% pa.功能很强大,可以看出花了很多心血在算法上,非常好。算法上还有一点瑕疵,例如在删除一个员工的同时没有办法自动建立其他员工的上下级关系,必须删除全部下级员工,不是非常合理。此外,界面设计过于简单,应该加强. " W" R+ b* g$ a$ Sb.程序运用了自己的算法来提高Tree控件显示的速度和资源分配,这个非常值得肯定和鼓励。* C. c4 D0 e9 ` J$ w# U c.基本实现所有规定的功能,在所有参赛者中唯一熟 : O) l- F6 F9 f) S7 Q. l练使用面向对象设计方式开发程序的工程师,很不错!程序体现了作者非常扎实的数据结构功底,值得大家学习。工程管理也做得非常好,体现了作者在软件工程方面也有很深入的研究,该代码是很好的学习范例。 % G* H$ ~3 W1 ]. e! id.算法的创新是独特之处(hashtable算法建立),可见作者在数据结构方面的熟练掌握.此程序是很多专家会员学习典范.
上传时间: 2017-01-19
上传用户:奇奇奔奔
The combinatorial core of the OVSF code assignment problem that arises in UMTS is to assign some nodes of a complete binary tree of height h (the code tree) to n simultaneous connections, such that no two assigned nodes (codes) are on the same root-to-leaf path. Each connection requires a code on a specified level. The code can change over time as long as it is still on the same level. We consider the one-step code assignment problem: Given an assignment, move the minimum number of codes to serve a new request. Minn and Siu proposed the so-called DCAalgorithm to solve the problem optimally. We show that DCA does not always return an optimal solution, and that the problem is NP-hard. We give an exact nO(h)-time algorithm, and a polynomial time greedy algorithm that achieves approximation ratio Θ(h). Finally, we consider the online code assignment problem for which we derive several results
标签: combinatorial assignment problem arises
上传时间: 2014-01-19
上传用户:BIBI
加密的步骤 1) 计算N的有效位数tn(以字节数计),将最高位的零忽略掉,令tn1=tn-1。比如N=0x012A05,其有效位数tn=5,tn1=4。 2) 将明文数据A分割成tn1位(以字节数计)的块,每块看成一个大数,块数记为bn。从而,保证了每块都小于N。 3) 对A的每一块Ai进行Bi=Ai^E MOD N运算。Bi就是密文数据的一块,将所有密文块合并起来,就得到了密文数据B。
上传时间: 2014-12-05
上传用户:caozhizhi
Huffman codes In telecommunication, how do we represent a set of messages, each with an access frequency, by a sequence of 0’s and 1’s? To minimize the transmission and decoding costs, we may use short strings to represent more frequently used messages. This problem can by solved by using an extended binary tree which is used in the 2- way merging problem.
标签: telecommunication represent messages Huffman
上传时间: 2014-01-04
上传用户:x4587
读取XML信息,显示在tree上。并且提供各种控制功能
上传时间: 2013-12-19
上传用户:gououo
This is an implementation of double-array structure for representing trie, as proposed by Junichi Aoe [1]. Trie is a kind of digital search tree, an efficient indexing method with O(1) time complexity for searching. Comparably as efficient as hashing, trie also provides flexibility on incremental matching and key spelling manipulation. This makes it ideal for lexical analyzers, as well as spelling dictionaries. See the details of the implementation at [2]: http://linux.thai.net/~thep/datrie/datrie.html Historically, this was first implemented as C++ classes in a library called midatrie [2], but later simplified and rewritten from scratch in C.
标签: implementation double-array representing structure
上传时间: 2013-12-10
上传用户:shinesyh
spoj dtree. Count the number of distinct elements in a given range. Usage is done using fenwick trees. Offline algorithm for queries
标签: distinct elements fenwick number
上传时间: 2014-01-20
上传用户:lhw888