December 07, 2006

Algorithms

I just finished a fantastic book called "Algorithms", by Sanjoy Dasgupta, Christos Papadimitriou and Umesh Vazirani. Even better: this book is free and can be downloaded in PDF form.

At 300+ pages, it's not lightweight either, but the authors have done a fantastic job at explaining the main foundations of essential algorithms in simple terms that even developer who don't have a CS degree will find easy to read and to absorb. You will see a few mathematics formulas and proofs here and there, but you can safely skip them if you are not comfortable with them and just take away the very natural and friendly wordings that the authors never omit to make when they are trying to get you to understand the overall idea behind an algorithm.

The book is very extensive and covers the most important algorithms you will ever come across in your life as a developer, starting with the introduction of the "big O" notation, and then progressively moving to more complex topics such as graphs, dynamic programming (nothing to do with dynamic languages), linear programming and culminating this area with the Simplex algorithm (I loved this section).

I would consider the chapters that follow as a "second part" of the book (even though it's not structured as such) since they cover more advanced (and sometimes, still not completely understood yet) problems such as NP completeness and quantum programming.

A must-read for any developer who never got a chance to understand how all these algorithms work or who simply want to get a refresher...

And hats off to Sanjoy, Christos and Umesh for making such a great contribution to the computing world!

Posted by cedric at December 7, 2006 10:10 AM

Comments

hi cedric,

thanks for the link.

BR,
~A

Posted by: anjan bacchu at December 7, 2006 01:23 PM

Thanx. This is very helpful. I think I could be an excellent programmer, but as a matter of fact, Ive been not good at math&Algorithm. This book, I must read to be a better one in IT industry.

Posted by: liewec at December 7, 2006 04:58 PM

Hello !
Someone strong to french translation ? :)

Posted by: TiSc at December 8, 2006 12:16 AM

Really Nice book ! Thanks for referring !

Posted by: Ankur at December 8, 2006 01:56 AM

hey Cedric,
I remeber the Simplex algorithm being something fun !
I am curious: did you buy the book or if you read the PDF, what did you use ?

Posted by: Celinio at December 8, 2006 06:19 AM

This is what I think I had been looking for. I work in IT even though from Mech Engg background. Basic math and programming languages are enough for working in business oriented apps. But when interviewed in product development or big companies (Amazon, Oracle, Sun), I always ran into people asking me algorithm related questions. I wondered why and if they would really use those algorithms in day-to-day work or were just showing off to me. But now, I guess this will help me in that situation.

Posted by: KK at December 8, 2006 07:41 AM

I agree with KK. I also lack a formal CS education (though I took a handful of programming course while in college). I'd estimate 95% of the time developing software is solving practical problems, usually involving human interaction with a system.

Soon I'll be moving into a new job role as a java performance engineer (which is a fancy way of saying I'll find inefficiencies in code and fix them). I feel very comfortable analyzing and refactoring code from a stylistic perspective, but think a better knowledge of basic computer operations would really help me out.

I just read through the first chapter and really enjoy this.

Thanks for the link Cedric.

Posted by: Sean at December 8, 2006 09:18 AM

I appreciate the desire expressed by some of these comments--to become a better programmer--but the concept of becoming a better programmer through algorithms kind of frightens me.

These are like tools. Imagine a plumber saying "I need to become a better plumber, I'm going to get a better set of tools"

IMO, to become a better programmer you really need techniques, not algorithms. If you are really looking for a book that helps you actually program better, I'd spend my time with Refactoring--esp. the "Bad Code Smells" section. I think that is one of the most insightful programming books I've read--and many interviewers actually ask about it these days.

Not that this doesn't sound like an excellent book, but I'd consider it a great read and an excellent reference, but perhaps not something that will take your programming to the next level. It looks like it will also grease your mind up and give your imagination something to work on which is always good for an engineer.

Posted by: BIll Kress at December 8, 2006 09:34 AM

I have to disagree with Bill Kress. All computer programs are basically algorithms, therefore, understanding algorithms allows one to understand the basis or foundation on which their programs are built. A better analogy may be your plumber trying to understand pipes and water better.

I would say that Refactoring is the tool and algorithms is the understanding. One I understand how the algorithms work (either the ones in the book or ones I create) then I can apply the tool of refactoring and make those algorithms better.

When I was taking my CompSci degree, the first thing the prof said to us in my first comp sci course was that we were not there to study programming; we where there to study algorithms.

Posted by: Chris Johnston at December 8, 2006 10:12 AM

I have to disagree with Bill Kress. All computer programs are basically algorithms, therefore, understanding algorithms allows one to understand the basis or foundation on which their programs are built. A better analogy may be your plumber trying to understand pipes and water better.

I would say that Refactoring is the tool and algorithms is the understanding. One I understand how the algorithms work (either the ones in the book or ones I create) then I can apply the tool of refactoring and make those algorithms better.

When I was taking my CompSci degree, the first thing the prof said to us in my first comp sci course was that we were not there to study programming; we where there to study algorithms.

Posted by: Chris Johnston at December 8, 2006 10:14 AM

Perhaps you are right. I kind of assumed a certain level of understand of algorithms in computer engineers.

I was seeing from a certain angle--like the encryption portion is really useful if you are coding encryption, but not so much otherwise--and even then 99% of people dealing with "Encryption" are using libraries, only 1% (if that) are going to be coding them.

Regardless, It's a great book. I've been reading pieces of it all day--thanks!

Posted by: Bill Kress at December 8, 2006 12:48 PM

i want to read this book

Posted by: fazlu at December 10, 2006 09:49 PM

Thanks for the link, will take a look.

A good way to learn *many* algorithms and techniques: try to be a "yellow" (or red) coder in TopCoder's online competitions... You won't get there without having a strong understanding of memoization, DP and you need to know a *lot* of algorithms. That's the company Google is teaming with to organize the Google Code Jam btw.

:)

Posted by: AnonymousCoward at December 13, 2006 06:56 AM

hai

Posted by: maran at December 20, 2006 11:23 PM

Thanks for this link Cedric !
It was pointed out to me by many people that seems to have really enjoyed reading it !
Your name is quite familiar to me ... did we fight on xtrek some years ago ... the last century ? you were "Real" ? ;)

Posted by: Tonio at December 21, 2006 05:49 AM

The link is no longer valid. Do you know about other location of the book or willing to send me the PDF?

Posted by: Marek at February 21, 2007 09:54 AM

WOULD YOUR BOOK ASSIST ME IN UNDERSTANDING HOW TO REDUCE THE ODDS IN LOTTERY NUMBERS.

Posted by: JJELLIS at March 8, 2007 06:30 PM

very good

Posted by: rafin at June 3, 2007 06:28 AM

very good

Posted by: rafin at June 3, 2007 06:28 AM

Thank you for mail reading.

Posted by: MOHAMED EL MEHDI at June 28, 2007 01:20 PM

How can i get the solution of exercises of this book

Posted by: Ravi at August 27, 2007 03:03 PM

I was very glad to see this free edition on the internet. It is a good thing for those students who can't afford to buy costly books or those who want to many books for the same subject.

Posted by: Adeel Munawar at September 21, 2007 08:37 PM

Can i get solutions for the exercises in the book. I desperately need it. Please help me. I will be thankfull if anyone can help me.
Thank you so much.

Posted by: at October 4, 2007 05:42 PM

solution of exercise 5.4.3 and 5.4.4 and 5.4.6
and 6.2.3 and 6.3.3 and problem 5.2 and 6.2

Posted by: e at October 26, 2007 12:40 AM

you do good things

Posted by: abush abera at November 28, 2008 02:18 PM

you do good things

Posted by: abush abera at November 28, 2008 02:18 PM
Post a comment






Remember personal info?