讨论标号树的Neville编码的编解码算法.文献中常见的第2种Neville编解码算法需要O(n log n)时间.近期研究文献指出至今尚未找到第2种Neville编解码的线性时间算法.本文对第2种Neville编解码问题的本质特征进行较深入的分析,从简单算法出发,逐步简化,得到一个非常简单实用的O(n)时间Neville编解码算法.本文采用的解决问题的方法也具有一定的技巧,可供解决类似问题时借鉴.
Studied the algorithms for coding and decoding Neville's second codes of a labeled tree. The algorithms for coding and decoding Neville's second codes of a labeled tree in the literatures require O( n log n) time usually. As stated in [ 1 ] [ 2 ], no linear time algorithms for the Neville's second codes. In this paper we consider the Neville's second code problem in a different angle and a more direct manner. We start from a na? ve algorithm, then improved it gradually and finally we obtain a very practical linear time algorithm. The techniques we used in this paper are interesting themselves.