DocumentCode :
3592202
Title :
On a New Universal Algorithm for Coins Problem and Its Realization
Author :
Dai, Liang ; Lin, Zhuying ; Fu, Shujia
Author_Institution :
Sch. of Math. & Comput. Sci., Guizhou Normal Univ., Guiyang, China
Volume :
1
fYear :
2011
Firstpage :
226
Lastpage :
229
Abstract :
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.
Keywords :
C++ language; C++ language; coins problem; universal algorithm; Algorithm design and analysis; Arrays; Decision trees; Testing; Time measurement; Weight measurement; C++; decision tree; n-coins problem;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Information Technology, Computer Engineering and Management Sciences (ICM), 2011 International Conference on
Print_ISBN :
978-1-4577-1419-1
Type :
conf
DOI :
10.1109/ICM.2011.136
Filename :
6113397
Link To Document :
بازگشت