【24h】

On a New Universal Algorithm for Coins Problem and Its Realization

机译:一种新的通用硬币问题算法及其实现

获取原文

摘要

This paper determines the shortest period of time for picking out a bad one from n(random quantity) coins and measuring its weight. The paper also offers a universal method to find out which one is bad among n coins and make sure of its weight with a balance in the shortest time, and the method is realized and tested with C++. The testing results show that the algorithm only requires as small space as that of simulating coins sequence, and that it needs one more comparison when the number of coins triples. The time and space needed minimize theoretically. The difference of before algorithm is it can judge if a bad coin in n coins.
机译:本文确定了从n个(随机数量)硬币中挑选出不良硬币并测量其重量的最短时间。本文还提供了一种通用的方法来找出n个硬币中哪个是坏的,并在最短的时间内平衡其重量,并用C ++实现并测试了该方法。测试结果表明,该算法只需要与模拟硬币序列一样小的空间,当硬币数量增加三倍时,还需要进行更多的比较。理论上需要的时间和空间最小化。之前算法的区别在于它可以判断n个硬币中是否有坏硬币。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号