Algorithms reference?

Can any of you direct me to a good reference for advanced programming and algorithms? I’m working on a rather complex project, and if useful algorithms have already been designed, I’d rather use them than reinvent the wheel.

An online resource would be preferable, but I’d also like to pick up a few good books.


Laugh hard; it’s a long way to the bank.

Maybe you ought to be just a bit more specific, without divulging the secrets of your project.

Ray

It would be easier to recommend a reference if you could narrow down the type of problems you are trying to solve.

As a jumping of point, I have always found Numerical Recipes in C to be useful over a broad range of applications. But it may be a little out of date these days. (I don’t drop code anymore, and I am not certain when the last update was published.) Still, it is worth looking at if you are doing any significant number crunching. There are also variations for other languages if you are not familiar with C.


The best lack all conviction
The worst are full of passionate intensity.
*

“The Algorithm Design Manual” by Steven S. Skiena is quite good for just generic algorithms.

There are lots of good books dealing with specific branches of computer algorithms.


“Glitch … Anything.” - Bob the Guardian

If you want some theory mixed with your algs, go with
Introduction to Algorithms
by Corman, et.al.
ISBN: 0262031418
(I’ve always heard this one referred to as the “CLR” book, from the authors’ last names)

Its a massive book that has some very slick basic data structure manipulation algs.

Also, Sedgewicks Algorithms In C++ (ISBN: 0201350882) is pretty good.

And for the truly hard-core, Kunth’s the Art of Computer Programming can’t be beat.

That would be “The Art of Computer Programming” series by Donald Knuth. Not to be nitpicky, but spelling the author’s name wrong would make it difficult to find in a search engine.

The Art of Computer Programming : Volume I, Fundamental Algorithms, Third Edition; Knuth, Donald E.
Addison Wesley Longman; 06/1997; 650 pages

The Art of Computer Programming : Volume 2, Seminumerical Algorithms, Third Edition; Knuth, Donald E.
Addison Wesley; 10/1997; 762 pages

The Art of Computer Programming : Sorting and Searching, Volume 3, Second Edition; Knuth, Donald E .
Addison Wesley; 05/1998; 780 pages


Quand les talons claquent, l’esprit se vide.
Maréchal Lyautey

Just to build consensus, I will echo that Knuth’s 3 volumes are the Torah of computer algorithms and is worth bonus geek points whenever used as a reference, and that Sedgewick is what actually appears on most programmers bookshelves.

Arnold: Thanks for the correction. I really should double check before I post.

Jebediah: Thats been my experience too. I’ve only known two people with a copy of any of Knuth’s books, and only one of them has actually read them.

I still like the CLR book better than Sedgwick, because of the theory and proofs and all that jazz. But I’ll agree that for a production environment you could give a damn about proving the worst case runtime for an alg. and just want something you can plug into your code. Sedgwicks book is great for that.

A few words apparently got lost from my first post. In particular, that should have read “…advanced geometric programming and algorithms”.

I know that Knuth’s books are considered the canonical reference, but they cost a bit more than I’m willing to spend right now. That’s one big reason I’d like to find a web reference; it’s fre

Aah, geometric algorithms…

OK, try the comp.graphics.algorithms FAQ ( http://www.faqs.org/faqs/graphics/algorithms-faq/ ), that has links to all kinds of alg. pages. It also has a list of computational geometry books.
http://www.magic-software.com is a good resource for algs you can copy and paste into your code.

The geometry center at Univ. Minnesota is another place to check out: http://www.geom.umn.edu/
and http://www.geom.umn.edu/software/cglist/

Hope that helps.
(BTW: Sedgewick has a few chapters on some simple geometry algorithms. Convex hulls, quad-trees and the like, IIRC)

Probably not what the OP was looking for, but I did (re)invent an algorithm for determining whether bit(x) in the binary value of a decimal number is zero or one. I was rather pleased with myself.