

What do you think is the most beautiful algorithm? - itamarb


======
rudiger
Euclid's Algorithm [1]; it's one of the oldest algorithms still in use,
simple, elegant, powerful, has lots of generalizations, many theoretical and
practical applications...

[1] <http://en.wikipedia.org/wiki/Euclidean_algorithm>

------
rch
Algorithm or equation? Either way, I'd suggest the Navier-Stokes system of
equations, and associated numeric solutions.

Have a look at Chung's 'Computational Fluid Dynamics' (2010) via Google books:

[http://books.google.com/books?id=Cq6tqmMVJREC&lpg=PP1...](http://books.google.com/books?id=Cq6tqmMVJREC&lpg=PP1&ots=Hbb60cClyn&dq=chungs%20computational%20fluid%20dynamics&pg=PA55#v=onepage&q=Navier-
Stokes&f=false)

~~~
itamarb
by beatiful, I meant an algorithm that it is simple, easy to understand and
still has an intelligent solution. I'm not sure that algorithm in
computiational fluid dynamics feat...

~~~
rch
Those terms, simple and easy, should be taken as relative to the system being
described.

I would argue that CFD models are surprisingly simple relative to the task of
understanding multi-phase, particle-laden, turbulent fluids.

------
sagacity
Read _only_ if you're up for a good laugh: ahem... _Bubble Sort!!_ ;-)

------
HardyLeung
Not sure about most beautiful, but Union-Find definitely is very clever,
clean, and useful.

------
sebastianhoitz
I really like AVL trees (or balanced trees) and the way they are restructured.

------
HowardRoark
I think Binary search algorithm is very elegant.

~~~
rjrodger
Only if you get it right: [http://reprog.wordpress.com/2010/04/19/are-you-one-
of-the-10...](http://reprog.wordpress.com/2010/04/19/are-you-one-of-
the-10-percent/)

