Textbooks cost way too much money, as any college student knows. Take Peter Lawrence's The Making of a Fly, which for a moment last week would have run you a cool $23,698,655.93 on Amazon.

A few weeks ago, UC Berkeley evolutionary biologist and blogger Michael Eisen was looking to pick up a copy of Lawrence's book ("classic work in developmental biology," he raves). The book's out of print, but Amazon gave Eisen an option: Either one of the 15 used copies, starting at $35.54, or one of two new copies, the cheapest of which is $1,730,045.91 (plus, as Eisen points out, four dollars for shipping).

The other copy, meanwhile, cost $2,198,177.95. What was happening? Were we watching the rise of a Peter Lawrence bubble? Many of us would likely have blamed "the evil eye" and lit an extra stick of incense. But Eisen, a science-minded fellow, tracked the slowly-increasing price of the two new copies of The Making of Fly, and noticed a pattern. He even made a chart! (Scientists! They are just the best.)

Once a day [bookseller number one] profnath set their price to be 0.9983 times [bookseller number two] bordeebook's price. The prices would remain close for several hours, until bordeebook "noticed" profnath's change and elevated their price to 1.270589 times profnath's higher price. The pattern continued perfectly for the next week.

As it happened, profnath and bordeebook were both using pricing algorithms to determine the optimum prices for their books. Profnath's algorithm was designed to have the lowest price possible—but only by a small amount, hence 0.9983—while bordeebook's was designed to set the highest price—presumably, Eisen writes, because they don't actually have a copy of the book and would need to buy one elsewhere to deliver it to a customer. Profnath and bordeebook had become locked in an algorithmic death-struggle, that eventually led the book to be priced at $23,698,655.93, shipping not included.

Alas, the sellers seem to have noticed, and profnath dropped the price back down to a rather more reasonable $106.23 earlier in the week, before an idle rich person decided to buy the textbook just because. Interestingly, similar algorithms are used to execute stock trades on a large scale. Not that anything this crazy could happen in the market!

[Michael Eisen via Reddit]