Bogosort - Wikipedia, the free encyclopedia

Quantum Bogosort

An in-joke among some computer scientists is that quantum computing could be used to effectively implement a bogosort with a time complexity of O(n). It uses true quantum randomness to randomly permute the list. By the many-worlds interpretation of quantum physics, the quantum randomization spawns an infinite array of universes and some of these will be such that the single shuffle had produced the list in sorted order because the total number of distinct orderings, though large, is not infinite. The list is then tested for sortedness (requiring n-1 comparisons); should it be out of order, the computer triggers its "destroy universe" operation (typically accompanied by a dry observation that implementing this operation is left as an exercise to the reader). The only observers will then be in the surviving universes and will see that the randomization worked the first time and that the list is in sorted order.

Note, however, that even here there is no free lunch – while this algorithm is O(n) in time, permuting the list requires that we consume O(n log n) bits of quantum randomness. (It also assumes that destroying the universe is O(1) in operation - since it has to be executed at most n-1 times.)

This sort of made my day. I laughed out loud when I read this while eating my bagel.

My guess is that destruction of the world isn't O(1) or even doable in polynomial time ... ;)

Loading mentions Retweet
Filed under  //  science  
Comments (0)
Posted 7 months ago

Debris from a long week

Three beers. Tall coffee. Liter of Gatorade. Plates and chopsticks.

Loading mentions Retweet
Comments (3)

Play Oregon Trail from your Browser

This is properly classified under 'retro junk' but I couldn't resist -- Oregon Trail was the hands-down favorite game of all the kids enrolled in Mrs. Z's GATE class back in the day. We were so addicted we busted the space bars on all of our Apple ][e computers trying to mow down squirrels, bison, and deer in a half-hearted attempt to shoot our way to Oregon and avoid typhoid and starvation.

Now you can play it on your browser ...
http://www.virtualapple.org/oregontraildisk.html


     

Loading mentions Retweet
Comment (1)
Posted 7 months ago

100 trillion zim dollars

The previous post got me interested in Zimbabwean (Zim) dollars. This is a pile of Zim dollars in various denominations (who wants to be a trillionaire, hundreds of times over?)

Poking around a bit, the Zim dollar seems to be undergoing exponential devaluation --- as of January 2009, the official exchange rate set 1E+23 Zim Dollars = 1 US dollar! Of course, the true rate was probably much higher.

Not only could you be a trillionaire, you could be a MOLE-inaire (1 mole == 6.02E+23). Ironically, the kitsch cachet of holding worthless Zim dollars is now worth much more than the actual Zim dollar. On EBay, a 100 trillion Z$ is currently bidding for ~$1. This beats the current exchange rate by about 20 orders of magnitude.

Still think our economy's in the dumps??

Chart of Zim Dollars to US Dollar:
http://upload.wikimedia.org/wikipedia/commons/3/3e/ZWDvUSDchart.png

Loading mentions Retweet
Comments (4)
Posted 8 months ago

Zimbabwean Dollar: World’s First Trillion Dollar Ad Campaign - Neatorama

A dramatic (and subversive!) advertising campaign. To protest the rampant inflation facing ordinary Zimbabweans, a newspaper in that beleaguered country has created a series of clever ads, billboards, and murals all made from trillions of near-worthless Zimbabwean dollars.

Reminds me of between-World-Wars Germany where wheelbarrows of Reichsmarks were needed to pay for ordinary items and German school kids would play with indifferently discarded piles of cash.

Loading mentions Retweet
Comments (0)
Posted 8 months ago

Free: 5 Peek Prontos to Posterous users. Tell us why you need one! - The Official Posterous Posterous

I really need a peek because ... oh God, I'm so desperate ..

;)

Loading mentions Retweet
Comment (1)
Posted 8 months ago

Random connections between seemingly disjoint sets ..

I always appreciate the random connections between seemingly disconnected things that I learn. Without fail, concepts, ideas, and skills learned in one part of my life inevitably find application in other parts of my life that I would have never thought of. Earlier in my grad school life, I would enjoy taking "random and useless" classes in areas of physics that interested me, but weren't applicable to my current line of research.

More recently, I've been doing some coding on the side for some friends, spending a lot of time learning Ruby, Rails, etc.. from scratch. A side effect of that is that I got to learn Ruby, an amazing language that was so effective that I quickly switched all of my script programming over to Ruby, quickly allowing me to boost my productivity. And it doesn't stop there -- just the other day, when I was thinking about how to store a large body of simulation data, I immediately started sketching out how to do it with MySQL and ActiveRecord --- something that's very natural for web developers, but probably not for biophysicists!

So the seemingly disconnected bits of knowledge that you learn always find interesting "off-label" uses. Aside: I got thinking about this today when I very naturally typed this line of code during some coding for a simulation I was running. I realized that what is now second nature was totally foreign to me only about 4 months ago:

dist1_res = `#{cmd}`.split("\n").collect! { |f| f.to_f if f.match(/\d+\.\d+/)  }.compact!


Try doing that in Perl!

Loading mentions Retweet
Comment (1)
Posted 8 months ago

Wow. This guy needs to grow a pair ... seriously.

Not to belittle woman on man domestic violence .. ;) But what a bizarre phone call on the HuffPost today ..

Loading mentions Retweet
Comments (0)
Posted 8 months ago

Another joyous day with Facebook!

When publishing from the server side, like you are, you only get one-line stories unless the user specifically changes their settings to allow larger stories for the application. Since most users don't know you can change those settings, and you can't tell what the setting are to prompt them, this is unlikely.

Another day of struggling with the FB platform, this helpful bit of forum advice made me want to laugh/cry at the same time. The absurdity!

Loading mentions Retweet
Comments (2)
Posted 8 months ago

Four barrel coffee

Loading mentions Retweet
Comments (0)