Best algorithm book: The Art of Computer Programming or Introduction to Algorithms?

DWW

Platinum Member
Apr 4, 2003
2,030
0
0
Heya,

Well parents want to buy me something for birthday and I'm tired of language specific books. Want a theory/algorithm book to help me better understand things especially sorting and how to optimize it and the likes.

I have decent math skills but I'm no math undergrad by far. Simply a programmer wishing to up his theory/math side of things and hope to buy a single book (or set of books in the case of Donald Knuth's set) for algorithms with respect to computer science.

The two I come across time and time again are:
The Art of Computer Programming v1-3 by Donald E Knuth
Introduction to Algorithms by Cormen, Leiserson, Rivest and Stein.

I want something to help me become a better programmer so any advice you have on either book or which is better to start ;)

 

Haircut

Platinum Member
Apr 23, 2000
2,248
0
0
I have Introduction to Algorithms and have found it to be very thorough.
Obviously Knuth's book(s) are more in depth, but I think they may be overkill for what you want.

As far as maths knowledge goes , I don't think you have anything to worry about. If you have the mathematical knowledge to be able to program then you should cope OK.
I am a maths graduate, but there is nothing in the book that you shouldn't cover with CS maths classes.
 

DWW

Platinum Member
Apr 4, 2003
2,030
0
0
Let me clarify: I'm not stupid. I can do math, but I don't have the advanced knowledge that most do. Wish I furthered my math skills in high school but I didn't. I ended up just doing finite and a little algebra THATS IT.

But when overlooking algorithms like when I learned bubble sort and quick sort I understood the math behind them fine and why quick sort was faster etc.

Introduction to Algorithms is available online to me as a student, but I'd really like to have a physical copy that I can sit outside and read in the summer sort of thing.
 

Noid

Platinum Member
Sep 20, 2000
2,390
193
106
When I went thru college ... Math was required for a CS degree, but if you go a Buisiness route ,,, you dont need Math.

Math isnt required to program these days, methodology is desired more usually.
(you do have to have a attention to detail and logic (process flow))

It depends on where you want to be later in your career.

If you want to understand how data is manipilated, check into Data Structures. Books describing data structures usually describe the math.
 

DWW

Platinum Member
Apr 4, 2003
2,030
0
0
Noid: cool thanks.

I'm really not sure where I want to end up. I'd like to have a better understanding of programming logic thats for sure. Sure I can re-use a quicksort someone else wrote, but I'd like to understand it so maybe, I can optimize it even just a little?

I'm a C/C++ programmer on UNIX and at school I'm mostly focusing on "less hardcore" stuff like ASP .NET and databases.

But yeah, I still want to have a good working knowledge so I can understand more details. I don't want to look at someone and say "duh this sort is faster than that one cause...everyone says so!" sort of thing if you know what I mean ;)
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
I'm kinda in the same boat as you, DWW. I did pretty crappy in high school and the most math I got was a bit of algebra, although that was the fault of my own laziness and I actually got 99s for math on standardized tests.

However, your potential doesn't really matter if you just plain *don't know* something. I was looking through the intro to algorithms class notes here and it was using a lot of math that I had no idea how to understand. Kinda sucks. Well anyways, the intro to algorithms book was the one recommended to me, since I'm also getting into C and am interested in data structures and algorithms and whatnot. Can't really recommend it though, since I haven't read it.
 

DWW

Platinum Member
Apr 4, 2003
2,030
0
0
Yeah most of the time I found math easy once the concepts and algorithms were put out and explained. My comprehension and rentention are great. Its just that I got real lazy in high school :D
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Not a particularly exciting birthday present ;)

I really can't recommend a book, my algorithm education was CSC130: Data Structures and Algorithm Analysis.
 

DWW

Platinum Member
Apr 4, 2003
2,030
0
0
notfred: I'm going to be an old man--21 ;( Anything after 19 doesn't seem too exciting. In Canada, 19 is the drinking age :)
 

Garet Jax

Diamond Member
Feb 21, 2000
6,369
0
71
I graduated with a Bachelor of Mathematics in Computer Science and one of the books we had to buy was Introduction to Algorithms. It is one of the few books I still have. In fact, it is on my desk right now.

I don't know much about the other book you mentioned, but I can vouch for the Introduction to Algorithms.
 

DWW

Platinum Member
Apr 4, 2003
2,030
0
0
Garet Jax

Think I might go for that one, save the Donald Knuth series for my graduation present (or maybe Christmas) ;)