Abstract
We study the number of inversions after running the Insertion Sort or Quicksort algorithm, when errors in the comparisons occur with some probability. We investigate the case in which probabilities depend on the difference between the two numbers to be compared and only differences up to some threshold \(\tau \) are prone to errors. We give upper bounds for this model and show that for constant \(\tau \), the expected number of inversions is linear in the number of elements to be sorted. For Insertion Sort, we also yield an upper bound on the expected number of runs, i.e., the number of consecutive increasing subsequences.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The number of inversions of a sequence \(\sigma =(\sigma _1,\ldots ,\sigma _n)\) is the number of pairs (i, j) with \(i<j\) such that \(\sigma _i> \sigma _j\).
- 2.
We find the correct position of an element by linear search not by binary search.
- 3.
The analysis on the number of inversions appearing after one run of Quicksort holds for arbitrarily chosen pivots. In particular, it also holds for random pivots.
- 4.
See [7] for a analysis of the time complexity of Quicksort with errors.
- 5.
This modification of marking the elements is purely imaginary; the Quicksort algorithm does not know the correctness of a comparison.
- 6.
This is true if and only if the sequence contains at least one non-trivial block.
References
Ajtai, M., Feldman, V., Hassidim, A., Nelson, J.: Sorting and selection with imprecise comparisons. ACM Trans. Algorithms 12(2), 19 (2016)
Alonso, L., Chassaing, P., Gillet, F., Janson, S., Reingold, E.M., Schott, R.: Quicksort with unreliable comparisons: a probabilistic analysis. Comb. Probab. Comput. 13(4–5), 419–449 (2004)
Braverman, M., Mossel, E.: Noisy sorting without resampling. In: Proceedings of the 19th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 268–276 (2008)
Cicalese, F.: Fault-Tolerant Search Algorithms - Reliable Computation with Unreliable Information. MTCSAES. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-17327-1
Diaconis, P., Graham, R.L.: Spearman’s footrule as a measure of disarray. J. Roy. Stat. Soc.: Ser. B (Methodol.) 39(2), 262–268 (1977)
Feige, U., Raghavan, P., Peleg, D., Upfal, E.: Computing with noisy information. SIAM J. Comput. 23(5), 1001–1018 (1994)
Funke, S., Mehlhorn, K., Näher, S.: Structural filtering: a paradigm for efficient and exact geometric programs. Comput. Geom. 31(3), 179–194 (2005)
Geissmann, B., Mihalák, M., Widmayer, P.: Recurring comparison faults: sorting and finding the minimum. In: Kosowski, A., Walukiewicz, I. (eds.) FCT 2015. LNCS, vol. 9210, pp. 227–239. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-22177-9_18
Geissmann, B., Penna, P.: Sort well with energy-constrained comparisons. arXiv e-prints, arXiv:1610.09223, October 2016
Hadjicostas, P., Lakshmanan, K.B.: Bubble sort with erroneous comparisons. Australas. J. Comb. 31, 85–106 (2005)
Hadjicostas, P., Lakshmanan, K.B.: Measures of disorder and straight insertion sort with erroneous comparisons. ARS Combinatoria 98, 259–288 (2011)
Hadjicostas, P., Lakshmanan, K.B.: Recursive merge sort with erroneous comparisons. Discret. Appl. Math. 159(14), 1398–1417 (2011)
Klein, R., Penninger, R., Sohler, C., Woodruff, D.P.: Tolerant algorithms. In: Demetrescu, C., Halldórsson, M.M. (eds.) ESA 2011. LNCS, vol. 6942, pp. 736–747. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-23719-5_62
Lakshmanan, K.B., Ravikumar, B., Ganesan, K.: Coping with erroneous information while sorting. IEEE Trans. Comput. 40(9), 1081–1084 (1991)
Leighton, F.T., Ma, Y.: Tight bounds on the size of fault-tolerant merging and sorting networks with destructive faults. SIAM J. Comput. 29(1), 258–273 (1999)
Leighton, F.T., Ma, Y., Plaxton, C.G.: Breaking the theta (n log\({^2}\) n) barrier for sorting with faults. J. Comput. Syst. Sci. 54(2), 265–304 (1997)
Palem, K.V., Lingamneni, A.: Ten years of building broken chips: the physics and engineering of inexact computing. ACM Trans. Embed. Comput. Syst. 12(2s), 87 (2013)
Pelc, A.: Searching games with errors - fifty years of coping with liars. Theoret. Comput. Sci. 270(1–2), 71–109 (2002)
Thurstone, L.L.: A law of comparative judgment. Psychol. Rev. 34(4), 273 (1927)
Yao, A.C.-C., Yao, F.F.: On fault-tolerant networks for sorting. SIAM J. Comput. 14(1), 120–128 (1985)
Acknowledgements
This research has been supported by the Swiss National Science Foundation (SNFS project 200021_165524).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG
About this paper
Cite this paper
Geissmann, B., Penna, P. (2018). Inversions from Sorting with Distance-Based Errors. In: Tjoa, A., Bellatreche, L., Biffl, S., van Leeuwen, J., Wiedermann, J. (eds) SOFSEM 2018: Theory and Practice of Computer Science. SOFSEM 2018. Lecture Notes in Computer Science(), vol 10706. Edizioni della Normale, Cham. https://doi.org/10.1007/978-3-319-73117-9_36
Download citation
DOI: https://doi.org/10.1007/978-3-319-73117-9_36
Published:
Publisher Name: Edizioni della Normale, Cham
Print ISBN: 978-3-319-73116-2
Online ISBN: 978-3-319-73117-9
eBook Packages: Computer ScienceComputer Science (R0)