层次记忆模型上的最优二叉搜索树
Optimum Binary Search Trees on the Hierarchical Memory Model
摘要:
计算的分层存储器模型(HMM)类似于标准随机存取机(RAM)模型,除了HMM具有以编号为1到h的层级组织的非均匀存储器。访问内存位置的成本随着级别数的增加而增加,并且访问属于同一级别的内存位置的成本相同。形式上,对地址a处的存储器位置的单次访问的成本由m(a)给出,其中m:N -> N是存储器成本函数,并且m的h个不同值模拟存储层次结构的不同级别。我们研究的问题,构建和存储一个二叉搜索树(BST)的最小成本,在一组关键字,成功和不成功的搜索概率,在HMM与任意数量的内存级别,并为特殊情况下h=2。虽然对于标准RAM模型已经很好地研究了构造最优二叉搜索树的问题,但是HMM的附加参数m增加了问题的组合复杂性。我们提出了两个动态规划算法来构造最优BST自底向上。这些算法在关于存储层次结构的一些自然假设下有效地运行。我们还给出了一个有效的算法来构建一个BST是接近最佳的,通过修改一个众所周知的线性时间近似算法的RAM模型。我们猜想,构造一个最佳的BST的HMM与任意的内存成本函数m的问题是NP-完全的。
英文摘要:
The Hierarchical Memory Model (HMM) of computation is similar to the standard Random Access Machine (RAM) model except that the HMM has a non-uniform memory organized in a hierarchy of levels numbered 1 through h. The cost of accessing a memory location increases with the level number, and accesses to memory locations belonging to the same level cost the same. Formally, the cost of a single access to the memory location at address a is given by m(a), where m: N -> N is the memory cost function, and the h distinct values of m model the different levels of the memory hierarchy. We study the problem of constructing and storing a binary search tree (BST) of minimum cost, over a set of keys, with probabilities for successful and unsuccessful searches, on the HMM with an arbitrary number of memory levels, and for the special case h=2. While the problem of constructing optimum binary search trees has been well studied for the standard RAM model, the additional parameter m for the HMM increases the combinatorial complexity of the problem. We present two dynamic programming algorithms to construct optimum BSTs bottom-up. These algorithms run efficiently under some natural assumptions about the memory hierarchy. We also give an efficient algorithm to construct a BST that is close to optimum, by modifying a well-known linear-time approximation algorithm for the RAM model. We conjecture that the problem of constructing an optimum BST for the HMM with an arbitrary memory cost function m is NP-complete.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。