wood burning stoves*
The moose likes Meaningless Drivel and the fly likes QUantum sort Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "QUantum sort" Watch "QUantum sort" New topic
Author

QUantum sort

Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2052
    
  22

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

Joined: Oct 13, 2005
Posts: 36453
    
  15
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
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13868
    
  10

From XKCD:



Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: QUantum sort
 
Similar Threads
JasperReports Cookbook: concepts
The Universe that Discovered Itself
what's the best way to sort primitive array ?
question on array and printing
How would you design this java class