首页> 外文OA文献 >Randomized Algorithms for Finding a Majority Element
【2h】

Randomized Algorithms for Finding a Majority Element

机译:求多数元的随机算法

摘要

Given n colored balls, we want to detect if more than n/2 of them have the same color, and if so find one ball with such majority color. We are only allowed to choose two balls and compare their colors, and the goal is to minimize the total number of such operations. A well-known exercise is to show how to find such a ball with only 2n comparisons while using only a logarithmic number of bits for bookkeeping. The resulting algorithm is called the Boyer-Moore majority vote algorithm. It is known that any deterministic method needs 3n/2-2 comparisons in the worst case, and this is tight. However, it is not clear what is the required number of comparisons if we allow randomization. We construct a randomized algorithm which always correctly finds a ball of the majority color (or detects that there is none) using, with high probability, only 7n/6+o(n) comparisons. We also prove that the expected number of comparisons used by any such randomized method is at least 1.019n.
机译:给定n个彩色球,我们要检测是否有n / 2个以上的球具有相同的颜色,如果是,则找到一个具有多数颜色的球。我们只能选择两个球并比较它们的颜色,目的是最大程度地减少此类操作的总数。一项众所周知的练习是展示如何在仅使用对数位数进行簿记的情况下,仅通过2n次比较就找到这样的球。所得的算法称为Boyer-Moore多数投票算法。众所周知,在最坏的情况下,任何确定性方法都需要进行3n / 2-2比较,这很严格。但是,尚不清楚如果允许随机化,所需的比较次数是多少。我们构造了一种随机算法,该算法始终以很高的概率仅使用7n / 6 + o(n)比较就可以正确地找到大多数颜色的球(或检测到没有颜色的球)。我们还证明,任何此类随机方法使用的比较预期次数至少为1.019n。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号