News for hackers. Stuff that matters.
Re:A bad citizen in Javaland (2006) by TeMPOraL on Thursday December 03, 2015 @06:55AM (#10669119)
Hence, Many World Interpretation of quantum mechanics.
Re:A bad citizen in Javaland (2006) by koenigdavidmj on Thursday December 03, 2015 @08:17AM (#10669371)
Sorting in O(n) time:

1. Apply a quantum permutation to your list.

2. Check if it's sorted.

3. If not, destroy the universe.

Re:A bad citizen in Javaland (2006) by evanpw on Thursday December 03, 2015 @10:13AM (#10669933)
Related (amazing) paper by Scott Aaronson: "NP-complete Problems and Physical Reality" (http://arxiv.org/abs/quant-ph/0502072). He proposes "anthropic computing" as a way of solving NP-complete problems in polynomial time: guess an answer, then kill yourself if the answer is wrong.
Re:A bad citizen in Javaland (2006) by dtech on Thursday December 03, 2015 @11:57AM (#10670658)
It would be very eerie if suddenly all the guesses started being right.
Re:A bad citizen in Javaland (2006) by kragen on Thursday December 03, 2015 @10:25AM (#10670022)
I am worried that someone will actually try this sometime and it will turn out not to work, either because MWI is wrong or because the destruction of the universe was incomplete — for example, collapsing the false vacuum would merely change the state of the things in the universe, not destroy the universe per se.

Fortunately, we don't have any currently promising avenues for nucleating a true vacuum or anything like that, so this algorithm is purely theoretical.

For now.

Re:A bad citizen in Javaland (2006) by arethuza on Thursday December 03, 2015 @08:40AM (#10669466)
That made me think of Greg Egan's Quarantine:

https://en.wikipedia.org/wiki/Quarantine_%28Greg_Egan_novel%...

Re:A bad citizen in Javaland (2006) by moron4hire on Thursday December 03, 2015 @08:47AM (#10669494)
Best-case runtime = 1. Worst-case = infinity.
Re:A bad citizen in Javaland (2006) by AndrewOMartin on Thursday December 03, 2015 @09:37AM (#10669745)
I think the joke is that in all cases but the best-case, you won't be around to observe it, this becomes practical once you can create a universe for every permutation and destroy all but the universe which notifies you that it's the best-case.

In all good text books this is left as an exercise for the reader.

Re:A bad citizen in Javaland (2006) by AnimalMuppet on Thursday December 03, 2015 @12:38PM (#10671041)
In a really good text book, this is left as an exercise that the reader won't do.
Re:A bad citizen in Javaland (2006) by danieldk on Thursday December 03, 2015 @09:38AM (#10669748)
No, checking whether a list is sorted is O(n) ;).

Bogosort is O(n) in the best case and O(inf) in the worst case).

Re:A bad citizen in Javaland (2006) by lisivka on Thursday December 03, 2015 @10:57AM (#10670257)
Optimize out the check, so it will be O(1) in some cases. ;)
Re:A bad citizen in Javaland (2006) by frozenport on Thursday December 03, 2015 @10:59AM (#10670274)
The convergence of this method depends on the underlying distribution for your random process. It could be O(never).
Re:A bad citizen in Javaland (2006) by jerf on Thursday December 03, 2015 @01:26PM (#10671495)
As Scott Aaronson points out, the easy solution to this is that you add a slight quantum chance that the algorithm will yield "Reject". As long as that chance is non-zero, but greatly smaller than the probability of any particular successful permutation, you will survive in the universe that says "Reject".
Re:A bad citizen in Javaland (2006) by theseoafs on Thursday December 03, 2015 @02:46PM (#10672040)
This sounds like a joke but this is exactly the proof that sorting is in NP.
Re:A bad citizen in Javaland (2006) by andrepd on Thursday December 03, 2015 @11:24AM (#10670443)
What is a quantum permutation?