Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

QUantum sort  RSS feed

 
Jayesh A Lalwani
Rancher
Posts: 2762
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scientists have discovered a way to sort an array in O(n) time using a quantum computer. The algorithm of the program is

a) Use a quantum computer to shuffle an unsorted array
b) Check if the array is sorted
c) If not sorted, destroy the universe


By the multi-worlds interpretation of quantum theory, the quantum sorting of the array will create 2^(N-1) universes, out of which one will have the array sorted. All the other universes will destroy themselves.

 
Campbell Ritchie
Sheriff
Posts: 53734
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is analogous to using quantum computing to crack RSA cyphers. The quantum computer produces a solution corresponding to every one of the 2¹⁰²⁴ or however many possible keys. Then you only have to read every one to work out which is the correct decryption
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15860
80
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From XKCD:

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!