{"title":"An almost optimal algorithm for Winkler's sorting pairs in bins (Special issue : Theoretical computer science and discrete mathematics)","authors":"Hiro Ito, Junichi Teruyama, Yuichi Yoshida","doi":"10.2201/niipi.2012.9.2","DOIUrl":null,"url":null,"abstract":"We investigate the following sorting problem: We are given n bins with two balls in each bin. Balls in the ith bin are numbered n + 1 − i. We can swap two balls from adjacent bins. How many number of swaps are needed in order to sort balls, i.e., move every ball to the bin with the same number. For this problem the best known solution requires almost 4 n 2 swaps. In this paper, we show an algorithm which solves this problem using less than 2n 2 3 swaps. Since it is known that the lower bound of the number of swaps is 2n 2 /3 = 2n 2 3 − n 3 , our result is almost tight. Furthermore, we show that for n = 2 m + 1( m ≥ 0) the algorithm is optimal.","PeriodicalId":91638,"journal":{"name":"... Proceedings of the ... IEEE International Conference on Progress in Informatics and Computing. IEEE International Conference on Progress in Informatics and Computing","volume":"741 1","pages":"3-7"},"PeriodicalIF":0.0000,"publicationDate":"2010-01-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"... Proceedings of the ... IEEE International Conference on Progress in Informatics and Computing. IEEE International Conference on Progress in Informatics and Computing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.2201/niipi.2012.9.2","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3
Abstract
We investigate the following sorting problem: We are given n bins with two balls in each bin. Balls in the ith bin are numbered n + 1 − i. We can swap two balls from adjacent bins. How many number of swaps are needed in order to sort balls, i.e., move every ball to the bin with the same number. For this problem the best known solution requires almost 4 n 2 swaps. In this paper, we show an algorithm which solves this problem using less than 2n 2 3 swaps. Since it is known that the lower bound of the number of swaps is 2n 2 /3 = 2n 2 3 − n 3 , our result is almost tight. Furthermore, we show that for n = 2 m + 1( m ≥ 0) the algorithm is optimal.