← Back to home

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!

Comments (27)

anjan bacchu

hi cedric, thanks for the link. BR, ~A

liewec

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.

TiSc

Hello ! Someone strong to french translation ? :)

Ankur

Really Nice book ! Thanks for referring !

Celinio

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 ?

KK

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.

Sean

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.

BIll Kress

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.

Chris Johnston

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.

Chris Johnston

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.

Bill Kress

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!

fazlu

i want to read this book

AnonymousCoward

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. :)

maran

hai

Tonio

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" ? ;)

Marek

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

JJELLIS

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

rafin

very good

rafin

very good

MOHAMED EL MEHDI

Thank you for mail reading.

Ravi

How can i get the solution of exercises of this book

Adeel Munawar

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.

Anonymous

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.

e

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

abush abera

you do good things

abush abera

you do good things

nandita

hey thanx for the link do u happen to the solution manual to it??