Skip to main content
Log in

Rainbow Sort: Sorting at the Speed of Light

  • Published:
Natural Computing Aims and scope Submit manuscript

Abstract

Rainbow Sort is an unconventional method for sorting, which is based on the physical concepts of refraction and dispersion. It is inspired by the observation that light that traverses a prism is sorted by wavelength. At first sight this “rainbow effect” that appears in nature has nothing to do with a computation in the classical sense, still it can be used to design a sorting method that has the potential of running in Θ (n) with a space complexity of Θ (n), where n denotes the number of elements that are sorted. In Section 1, some upper and lower bounds for sorting are presented in order to provide a basis for comparisons. In Section 2, the physical background is outlined, the setup and the algorithm are presented and a lower bound for Rainbow Sort of Ω (n) is derived. In Section 3, we describe essential difficulties that arise when Rainbow Sort is implemented. Particularly, restrictions that apply due to the Heisenberg uncertainty principle have to be considered. Furthermore, we sketch a possible implementation that leads to a running time of O(n+m), where m is the maximum key value, i.e., we assume that there are integer keys between 0 and m. Section 4 concludes with a summary of the complexity and some remarks on open questions, particularly on the treatment of duplicates and the preservation of references from the keys to records that contain the actual data. In Appendix A, a simulator is introduced that can be used to visualise Rainbow Sort.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  • JJ Arulanandham CS Calude MJ. Dinneen (2004) ArticleTitle‘A fast natural algorithm for searching’ Theoretical Computer Science. 320 IssueID1 3–13 Occurrence Handle10.1016/j.tcs.2004.03.040 Occurrence Handle2005a:68063

    Article  MathSciNet  Google Scholar 

  • Cormen TH, Leiserson CE, Rivest RL, Stein C. (2001), Introduction to Algorithms. 2nd edition, MIT Press.

  • Hecht E. (2002) Optics. 4th edition, Addison-Wesley.

  • Klehr A, Bugge F, Erbert G, Hofmann L, Knauer A, Sebastian J, Smirnitzki VB, Wenzel H, Tränkle G. (2000). 300 GHz continuously tunable high power three section DBR laser diode at 1060nm. In: Proceedings of the 26th International Symposium on Compound Semiconductors, Vol. 166, Inst. Phys. Conf. Ser., pp. 383–386.

  • RF. Service (2001) ArticleTitle‘ULTRAFAST LASERS: Strobe Light Breaks the Attosecond Barrier’ Science. 292 IssueID5522 1627–1628 Occurrence Handle10.1126/science.292.5522.1622

    Article  Google Scholar 

  • Serway RA, Moses CJ and Moyer CA (1997), Modern Physics. 2nd edition, Saunders College Publishing.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Dominik Schultes.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Schultes, D. Rainbow Sort: Sorting at the Speed of Light. Nat Comput 5, 67–82 (2006). https://doi.org/10.1007/s11047-004-3379-3

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11047-004-3379-3

Keywords

Navigation