Algorithms from the “Book”
cstheory.stackexchange.com
cstheory.stackexchange.com
"The Book" is all around us. The algorithms that nature cares about are woven into the fabric of the physical world. Our algorithms are just poor approximations, intended to make simulation tractable on discrete computers.
For example, this site occasionally carries posts about making water look realistic in games. Those posts usually acknowledge that the graphics approach they describe is cheating compared to actually solving the Navier-Stokes equations. But the NS equations are just a mathematical expression of reality. We then cook that mathematical expression down even more, in order to arrive at a collection of algorithms (finite-difference approximations, domain partitioning, numerical solvers) that attempt to embody the math.
Yet problems that today we would consider impossibly hard to solve computationally-- for example, fully resolving the flow of water around a sailboat, not to mention the wind in its sails, and the stresses in the mast-- nature solves billions upon billions upon billions of times a second.
That's really all I could understand from this. I would love to hear what would "algorithms being woven into the fabric of the physical world" even mean?
By the way, I would say not all algorithms occur in reality, and when they do, nature isn't necessarily very good at them. For example, sort and binary search just don't seem that high up on the list of things the physical world cares about. The natural sorting process by which dirt in a container separates out into various gradations of size, corresponds to bubble sort-- not an especially efficient algorithm.
The idea is that a proof from "The Book" feels perfect in the same way that, say, listening to Bach does. Less natural, more transcendental.
But OK, I'll do it your way:
An interesting class of algorithms is finite-difference approximations [1]. Even more interesting are algorithms for designing such approximations [2]. A key insight to making these algorithms work is that Taylor series approximations can be used to study the truncation errors of discrete approximations to continuous phenomena. However these techniques, by themselves, mainly interest me in the context of the physical problems they are meant to address. Since those problems come from the physical world, I would argue that the algorithms themselves don't satisfy the formal criteria set forth in the original question, of what algorithms god would write down in a book.
[1] See LeVeque, "Finite Difference Methods for Ordinary and Partial Differential Equations".
[2] See Hamming, "Numerical Methods for Scientists and Engineers".
http://www.amazon.co.uk/Proofs-THE-BOOK-Martin-Aigner/dp/3642008550
Stuffed with beautiful short proofs. Each section starts at a fairly basic level, but finishes with some fairly deep maths.(Edit: oh wait, the book is linked at the beginning of the SO thread. Never mind :) )
http://www.amazon.com/How-Solve-It-Mathematical-Princeton/dp...
There's another recent mathsy book called "How to solve it: modern heuristics" which is actually about optimization algorithms and has basically nothing to do with Polya's book.
[1] http://hackage.haskell.org/packages/archive/prelude-safeenum... [2] http://www.cs.ox.ac.uk/jeremy.gibbons/publications/rationals...
It's one of the best books I've ever bought measured in raw joy and satisfaction per page. Like all proofs, reading is a very involved process, but these are genuinely stunning ones.
=================
The Kindle edition is completely worthless, because it is missing many symbols. It appears to have been done using OCR, and it was confused by mathematical symbols. For example, there are some places where I THINK it was supposed to be the greek letter phi, but it comes out as a left parenthesis and a right parenthesis. At least with that you can figure out what it was supposed to be. There is much worse--places where symbols are completely gone. E.g., there is a place where you just get a capital sigma with a subscript giving a summation limit, a blank space, a less than sign, and another blank space. So, the proof is saying the some of something is less than something else.
This is a shame, because the book itself, from what I can see, is EXCELLENT.
=================
This illustrates a major annoyance with Amazon's review system. They combine reviews for all formats of a book. This is bad both from the review side and the potential purchaser side.
From the review side, how many stars should I have given the book? The non-Kindle versions are excellent. 5 stars. The Kindle edition, as I said, was completely worthless. 1 star. So do I give 5 stars or 1 star? 3 stars?
From the purchaser side, the combined reviews are annoying because I want to see the reviews specifically for the format I'm considering. For "Proofs from the Book" this is not too much of a problem because there are only 17 reviews. I can just read them all. For books with hundreds of reviews, it is a problem.
As far as math books on Kindle go, PftB is the worst I've tried, but I've not actually found any math book that was acceptable to me. The others I've seen have had all the symbols there, but it was done by having the math handled as embedded images, which did not resize if I changed the font size, and were smaller than the math in the paper book.
Simple statements can be expressed in pure Unicode (though the Kindle fonts have incomplete Unicode support for the relevant blocks). Anything more than that has to be an image, which is the bane of digital publishing, since it won't scale with the base font size. epub 3 might be able to cope with it but apart from iBooks I don't know anyone else using it.
"If you set up a Glider Gun when the Earth was first formed 4.5 billion years ago, and ran one generation per second, in the 143.4 quadrillion seconds that have elapsed since then, how many cells would be alive?"
In less than three seconds, my 2010 iMac had the answer: the pattern would grow to 23,900,000,000,000,036 live cells.
A colleague walks up to Von Neumann at a party. "Hey!" he challenges. "Two locomotives are speeding towards each other on a track. They begin ten miles apart and are both travelling at 30mph."
"A fly on the hood of one locomotive flies to the other locomotive at 60mph, then returns to the first, and keeps going back and forth between them until the two crash, killing the fly."
"How far has the fly travelled?"
Von Neumann considers, then gives the correct answer. "It's true," his colleague says, "you can instantly see the insight to any problem. You knew that you could merely sort out how long it takes and then work out the distance from the fly's speed."
Von Neumann frowns. "It seemed simpler to sum the series in hy head, and it's a more general solution."
Did you end up releasing your Coffeescript implementation? There's stuff like Golly but not a great deal in the way of readable higher-level language implementations out there.
(tl;dr ) Whenever i see a real tree it looks to me like a specialized tree data structure implemented by the Almighty.
Also i tried to add little programming puns in my pseudo enigma styled poem thing.
To anyone who hasn't read it, I would heartily recommend 'Proofs from the Book' but moreso than that, to those who regularly come in contact with (semi-)formal methods (be they mathematical or logical) I would heartily recommend looking out for proofs that catch your eye like that and debating their worthiness for 'The Book'- it's a fun exercise! :)
http://www.cl.cam.ac.uk/teaching/2004/IntroFuncProg/lecture0...