The recovery time complexity of a coin weighing algorithm

Hanxuan Wang
{"title":"The recovery time complexity of a coin weighing algorithm","authors":"Hanxuan Wang","doi":"10.54254/2753-8818/30/20241106","DOIUrl":null,"url":null,"abstract":"Given n identical-looking coins each with possible weight in {0, 1}, and a scale that can measure the weight of any arbitrary set of coins, the coin weighing problem studies how to find out the weight of every coin with as few weighing as possible. The algorithm in Lindstrm takes O(n/logn) non-adaptive weighings to determine the coins, which gives an O(logn) factor improvement compared with the nave algorithm that measures each coin on its own. However, it is unclear that with the O(n/logn) queries, how long it takes to retrieve x. This paper is about establishing and further optimizing the nave recovery time complexity of Lindstrm s algorithm. The recovery time complexity here is defined as the time complexity to recover x given Dx under the RAM model, where D{0,1}^(mn),, each row being a weighing query, is the Lindstrm query matrix. The brute force recovery algorithm has running time O(m2n), whereas our algorithm only takes O(mn). Finally, we run experiments to verify our results with the actual running time of the algorithm on various size of inputs","PeriodicalId":489336,"journal":{"name":"Theoretical and Natural Science","volume":" 15","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-01-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Theoretical and Natural Science","FirstCategoryId":"0","ListUrlMain":"https://doi.org/10.54254/2753-8818/30/20241106","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Given n identical-looking coins each with possible weight in {0, 1}, and a scale that can measure the weight of any arbitrary set of coins, the coin weighing problem studies how to find out the weight of every coin with as few weighing as possible. The algorithm in Lindstrm takes O(n/logn) non-adaptive weighings to determine the coins, which gives an O(logn) factor improvement compared with the nave algorithm that measures each coin on its own. However, it is unclear that with the O(n/logn) queries, how long it takes to retrieve x. This paper is about establishing and further optimizing the nave recovery time complexity of Lindstrm s algorithm. The recovery time complexity here is defined as the time complexity to recover x given Dx under the RAM model, where D{0,1}^(mn),, each row being a weighing query, is the Lindstrm query matrix. The brute force recovery algorithm has running time O(m2n), whereas our algorithm only takes O(mn). Finally, we run experiments to verify our results with the actual running time of the algorithm on various size of inputs
硬币称重算法的恢复时间复杂度
硬币称重问题研究的是如何用尽可能少的称量找出每枚硬币的重量。Lindstrm 中的算法需要 O(n/logn) 次非自适应称重来确定硬币的重量,与单独测量每枚硬币的 nave 算法相比,改进了 O(logn) 倍。然而,对于 O(n/logn) 查询,检索 x 所需的时间并不清楚。本文旨在建立并进一步优化 Lindstrm 算法的 nave 恢复时间复杂度。这里的恢复时间复杂度定义为在 RAM 模型下给定 Dx 恢复 x 的时间复杂度,其中 D{0,1}^(mn) 是 Lindstrm 查询矩阵,每一行都是一个权重查询。蛮力恢复算法的运行时间为 O(m2n),而我们的算法只需 O(mn)。最后,我们进行了实验,用算法在不同大小输入上的实际运行时间来验证我们的结果
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信