Skip to main content

Inversions from Sorting with Distance-Based Errors

  • Conference paper
  • First Online:
SOFSEM 2018: Theory and Practice of Computer Science (SOFSEM 2018)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 10706))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The number of inversions of a sequence \(\sigma =(\sigma _1,\ldots ,\sigma _n)\) is the number of pairs (ij) with \(i<j\) such that \(\sigma _i> \sigma _j\).

  2. 2.

    We find the correct position of an element by linear search not by binary search.

  3. 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. 4.

    See [7] for a analysis of the time complexity of Quicksort with errors.

  5. 5.

    This modification of marking the elements is purely imaginary; the Quicksort algorithm does not know the correctness of a comparison.

  6. 6.

    This is true if and only if the sequence contains at least one non-trivial block.

References

  1. Ajtai, M., Feldman, V., Hassidim, A., Nelson, J.: Sorting and selection with imprecise comparisons. ACM Trans. Algorithms 12(2), 19 (2016)

    MathSciNet  MATH  Google Scholar 

  2. 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)

    Article  MathSciNet  MATH  Google Scholar 

  3. 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)

    Google Scholar 

  4. 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

    Book  MATH  Google Scholar 

  5. 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)

    MathSciNet  MATH  Google Scholar 

  6. Feige, U., Raghavan, P., Peleg, D., Upfal, E.: Computing with noisy information. SIAM J. Comput. 23(5), 1001–1018 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  7. Funke, S., Mehlhorn, K., Näher, S.: Structural filtering: a paradigm for efficient and exact geometric programs. Comput. Geom. 31(3), 179–194 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  8. 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

    Chapter  Google Scholar 

  9. Geissmann, B., Penna, P.: Sort well with energy-constrained comparisons. arXiv e-prints, arXiv:1610.09223, October 2016

  10. Hadjicostas, P., Lakshmanan, K.B.: Bubble sort with erroneous comparisons. Australas. J. Comb. 31, 85–106 (2005)

    MathSciNet  MATH  Google Scholar 

  11. Hadjicostas, P., Lakshmanan, K.B.: Measures of disorder and straight insertion sort with erroneous comparisons. ARS Combinatoria 98, 259–288 (2011)

    MathSciNet  MATH  Google Scholar 

  12. Hadjicostas, P., Lakshmanan, K.B.: Recursive merge sort with erroneous comparisons. Discret. Appl. Math. 159(14), 1398–1417 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  13. 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

    Chapter  Google Scholar 

  14. Lakshmanan, K.B., Ravikumar, B., Ganesan, K.: Coping with erroneous information while sorting. IEEE Trans. Comput. 40(9), 1081–1084 (1991)

    Article  Google Scholar 

  15. 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)

    Article  MathSciNet  MATH  Google Scholar 

  16. 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)

    Article  MATH  Google Scholar 

  17. 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)

    Article  Google Scholar 

  18. Pelc, A.: Searching games with errors - fifty years of coping with liars. Theoret. Comput. Sci. 270(1–2), 71–109 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  19. Thurstone, L.L.: A law of comparative judgment. Psychol. Rev. 34(4), 273 (1927)

    Article  Google Scholar 

  20. Yao, A.C.-C., Yao, F.F.: On fault-tolerant networks for sorting. SIAM J. Comput. 14(1), 120–128 (1985)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

This research has been supported by the Swiss National Science Foundation (SNFS project 200021_165524).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Barbara Geissmann .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics