Abstract
We give efficient algorithms for Sorting k-Sets in Bins. The Sorting k-Sets in Bins problem can be described as follows: We are given numbered n bins with k balls in each bin. Balls in the i-th bin are numbered n − i + 1. We can only swap balls between adjacent bins. How many swaps are needed to move all balls to the same numbered bins. For this problem, we design an efficient greedy algorithm with \(\frac{k+1}{4}n^2+O(kn)\) swaps. As k and n increase, this approaches the lower bound of \(\lceil \binom{kn}{2}/(2k-1) \rceil\). In addition, we design a more efficient recursive algorithm using \(\frac{15}{16}n^2+O(n)\) swaps for the k = 3 case.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Bóna, M., Flynn, R.: Sorting a Permutation with Block Moves. arXiv:0806.2787v1
Martínez, C., Rösler, U.: Partial quicksort and quickpartitionsort. In: DMTCS Proceedings 2001, pp. 505–512 (2010)
Cranston, D., Sudborough, I.H., West, D.B.: Short Proofs for Cut-and-Paste Sorting of Permutations. Discrete Mathematics 307, 2866–2870 (2007)
Daskalakis, C., Karp, R.M., Mossel, E., Eiesenfeld, S.J., Verbin, E.: Sorting and selection in posets. SIAM Journal on Computing 40(3), 597–622 (2011)
Dweighter, H.: Elementary Problems. American Mathematical Monthly 82, 1010 (1975)
Elizalde, S., Winkler, P.: Sorting by Placement and Shift. In: Proc. ACM/SIAM Symp. on Discrete Algorithms (SODA), pp. 68–75 (2009)
Eriksson, H., Eriksson, K., Karlander, J., Svensson, L., Wástlund, J.: Sorting a bridge hand. Discrete Math. 241, 289–300 (2001)
Faigle, U., Tuŕan, G.: Sorting and Recognition Problems for Ordered Sets. SIAM Journal on Computing 17(1), 100–113 (1988)
Gates, W.H., Papadimitriou, C.H.: Bounds for sorting by prefix reversal. Discrete Math. 27, 47–57 (1979)
Heydari, M.H., Sudborough, I.H.: On the diameter of pancake network. J. Algorithms 25, 67–94 (1997)
Hoare, C.A.R.: PARTITION (Algorithm 63);QUICKSORT (Algorithm 64);FIND (Algorithm 65). Communication of the Association for Computing Machinery 4, 321–322 (1961)
Ito, H., Teruyama, J., Yoshida, Y.: An almost optimal algorithm for winkler’s sorting pairs in bins. Progress in Informatics (9), 3–7 (2012)
Püttmann, A.: Krawattenproblem, http://www.springer.com/cda/content/document/cda_downloaddocument/SAV_Krawattenraetsel_Loesung_Puettmann
Winkler, P.: Mathematical Puzzles: A Connoisseur’s Collection. A K Peters 143, 149–151 (2004)
West, D.B.: (2008), http://www.math.uiuc.edu/~west/regs/sortpair.html
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Nagao, A., Seto, K., Teruyama, J. (2014). Efficient Algorithms for Sorting k-Sets in Bins. In: Pal, S.P., Sadakane, K. (eds) Algorithms and Computation. WALCOM 2014. Lecture Notes in Computer Science, vol 8344. Springer, Cham. https://doi.org/10.1007/978-3-319-04657-0_22
Download citation
DOI: https://doi.org/10.1007/978-3-319-04657-0_22
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-04656-3
Online ISBN: 978-3-319-04657-0
eBook Packages: Computer ScienceComputer Science (R0)