arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1307.5296cs.DScs.ITmath.IT
收藏

先到先服务的在线时隙分配和霍夫曼编码

First-Come-First-Served for Online Slot Allocation and Huffman Coding

Monik Khare, Claire Mathieu, Neal E. Young

摘要:

在不知道底层分布的情况下,人们能在运行中选择一个好的霍夫曼代码吗?在线插槽分配(OSA)模型这个和类似的问题:有n个插槽,每个都有一个已知的成本。有n个项目。物品的申请单是按日抽取的。在每个请求之后,如果项目i先前未被请求,则算法(知道时隙成本和到目前为止的请求,但不知道p)必须将项目放置在某个空闲时隙j(i)中。目标是最小化项目的概率乘以其分配槽的成本的总和。最佳离线算法很简单:将最可能的物品放在最便宜的位置,将第二可能的物品放在第二便宜的位置,等等。最佳在线算法是先到先得(FCFS):把第一个要求的项目在最便宜的插槽,第二个任何在线算法的最优竞争比对于一般成本是1+H(n-1)~ ln n,对于凹成本是2。对于对数成本,该比率渐进地为1:FCFS给出成本opt + O(log opt)。对于Huffman编码,FCFS产生一个在线算法(根据需要分配码字,而不知道潜在的概率分布),保证渐进最优成本:至多opt + 2 log(1+opt)+ 2。

英文摘要:

Can one choose a good Huffman code on the fly, without knowing the underlying distribution? Online Slot Allocation (OSA) models this and similar problems: There are n slots, each with a known cost. There are n items. Requests for items are drawn i.i.d. from a fixed but hidden probability distribution p. After each request, if the item, i, was not previously requested, then the algorithm (knowing the slot costs and the requests so far, but not p) must place the item in some vacant slot j(i). The goal is to minimize the sum, over the items, of the probability of the item times the cost of its assigned slot. The optimal offline algorithm is trivial: put the most probable item in the cheapest slot, the second most probable item in the second cheapest slot, etc. The optimal online algorithm is First Come First Served (FCFS): put the first requested item in the cheapest slot, the second (distinct) requested item in the second cheapest slot, etc. The optimal competitive ratios for any online algorithm are 1+H(n-1) ~ ln n for general costs and 2 for concave costs. For logarithmic costs, the ratio is, asymptotically, 1: FCFS gives cost opt + O(log opt). For Huffman coding, FCFS yields an online algorithm (one that allocates codewords on demand, without knowing the underlying probability distribution) that guarantees asymptotically optimal cost: at most opt + 2 log(1+opt) + 2.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑