Hacker News new | past | comments | ask | show | jobs | submit login
Introduction to Algorithms: A Creative Approach by Udi Manber [pdf] (lagout.org)
273 points by ggr2342 on May 27, 2023 | hide | past | favorite | 37 comments



Students learning Algorithms for the first time should never touch CLRS. It is the worst thing that a beginner can pick up. It is good as a reference text.

Beginners should start with this. This book "actually" teaches you how algorithms are designed and how to break down problems into chunks and solve them using induction/recursion.

Your mind will just be blown.


What infuriated me about CLRS was that so much of the content was in the exercises - that had no answers you could check your results against. There are solutions guides you can look up now, but that they would publish such a hostile math book in the first place rubbed me the wrong way.


At some point Cormen had a page of shame where he would name people who asked him for solutions to some of the problems. I remember it was removed with a note that it was a bit much. Though, I suspect it was pointed out to him that this made him look bad.

I think this says a lot about the logic of the authors, though.


i frequently see him post on Quora--he appears as a pompous, abrasive and highly anti-social individual who acts like a gatekeeper to knowledge. He grudges the readers their knowledge by making it extremely boring and difficult to break into. Many 'authors' are like that. Which is feels like a conspiracy.


> so much of the content was in the exercises

I have this reaction to some Coursera courses (Odersky's Scala course did this to me). I mean it's wonderful if you get the "ah hah" to figure out the exercise, and it's probably the most meaningful learning, but it shouldn't be the ONLY way.

It's like working on some super expensive niche car; if you have the magic tool that fixes your issue it's trivial, if you don't it's almost impossible.


I wouldn't say that, it's just the audience is different. It's basically a math theory text for getting into academic CS.


I think the main key is the teacher. I followed the teacher in the class and the course was using CLRS, and I did not feel anything hard in homework and exams as long as I fully understood what was taught during the class time.


CLRS barely touches the intuition part and that makes it worst from a beginner's perspective.


> Students learning Algorithms for the first time should never touch CLRS. It is the worst thing that a beginner can pick up.

I can second that. CLRS is a great reference work for people who already know algorithms, and I can absolutely understand why CS Professors use it to prepare courses and exercises.

But as an introductory text for newcomers? No. Absolutely not.


And if not a beginner I would go straight to chapter 5 "Design of Algorithms by Induction". One of my favorite algorithms books.


Notably, this material is based on an earlier paper on the design of algorithms by induction, also by the author: http://akira.ruc.dk/~keld/teaching/CSS_e10/Manber88.pdf


I also recommend Jeff Erickson's book.


I didn't know what CLRS is. Seems to be "Introduction to Algorithms" by Cormen, Leiserson, Rivest and Stein (CLRS).


Maybe I'm different, but I used Kleinberg/Tardos and CLRS in my undergraduate algorithms class, and I preferred CLRS to KT and the other alternatives (Algorithm Design Manual, etc.), though KT was great too. I've heard from others that KT was better for them for learning how to actually design algorithms as well.


I had a similar experience. It may be that I have a math background and CLRS feels more like a math book than do other algo texts, but it was a breath of fresh air for me after looking at other popular texts that felt so much more handwavy. It felt so much more concise and the math arguments felt more compelling to me anyway. I mean, I am glad though that different texts exist because different people seem to benefit from different texts.


Agreed! I also recommend Grokking Algorithms for a friendly overview. There are also some great topic-specific books, such as Who's #1? and In Pursuit of the Traveling Salesman.


I loved CLRS! It was my first algorithms book in undergrad.

A beginner can and should pick it up if they love math and programming.


What about people who took a basic alg/ds class in the past but forgot most of it many years later?


I’m in this boat too, and would love suggestions to freshen up my algorithm skills.


There is one book which is fairly recently published, and it is not known much.

The book is Jay Wengrow's A Common Sense Guide to Data Structure and Algorithm [0].

It is published by Pragmatic Programmers.

I have found it to be the greatest algorithm book for self-learners.

It actually teaches you in what scenarios you might use which data structures and so on. Very highly recommend. What algorithms stand for and when you'd use one over another. Has nice code snippets, exercises that makes the learning whole.

Another great algo book is DPV. This is math-heavy, but this book has a soul.

Among the famous and ubiquitous ones, I like Steven Skiena.

[0]: https://pragprog.com/titles/jwdsal2/a-common-sense-guide-to-...


I hate to throw shade on this, but look at theorem 2.1, proving by induction that x*n - 1 is divisible by x-1. The concluding sentence I believe mistakenly refers to the left hand term, when they intend to refer to the right hand term.

"But the left term is divisible by x - 1 by the induction hypothesis, and the right term is just x-1.".

I would spend many hours staring at that sentence wondering why I "just" did not understand, cycling through a whole range of feelings, years later to find out that there was likely a typographical error.

Additionally, many textbooks like this give a complicated expression and rather than reduce it mathematically, they expect the reader just to do this in their head and come to the conclusion that it is true.

Such things may seem like trivialities, and perhaps I am not the smartest math person around, but not paying attention to these subtle points can lead to deep frustration for the reader.


I had to look at theorem 2.1 to verify you had blatantly mistyped the theorem itself. Was that just to mess with us? :)


Err no they mean the left "addend" technically but they are definitely talking about the RHS of the equation (first addend/term of the RHS).


Textbooks have separate publications called errata, usually findable on the author's website, or your favorite search engine. You should basically never open up a textbook that you are independently studying from without also opening the errata.


A book that has a similar style to this one (teaching algorithm design) and my personal favourite is Algorithmic Problem Solving by Roland Backhouse.

It just teaches algorithmic problem solving via math, but unlike mathy algorithmic books like CLRS, you only need algebra for this one.

I like how the book, IIRC, starts with invariants, providing the reader the foundational skill needed to notice underlying patterns and to decompose problems.


Uh... this looks like a pirate copy made from a scan of the book.

Should we really be linking to it?


It's been out of print for a while which absolves any moral quandary for me personally.

I had a hard-copy that I regret selling.


Overall seems like a great book. The hashing chapter is a bit half baked though. It claims without reservation that deletions simply cannot be efficiently implemented with linear probing. But there are at least two two efficient to do this (lazy deletions or just fix up the hash table), and both are worthwhile for students to know.


This is a great book for teaching you how to invent algorithms. I use the skills i learned from it all the time.


This is also taught, by some degree, in Steven Skiena's book.

That is a great book, too.


Can you show some example(s) on the techniques ?


The general idea is that you develop the algorithm and the proof of correctness for the algorithm at the same time. The two views are duals in a certain sense, and each gives you insight about the other.


I would recommend the first 2-3 chapters to start.


I took CS 445 Algorithms at Arizona with Udi Manber as the professor in the late 90s. Tough class. The .com boom was picking up at that point and I think he went to Yahoo shortly after.


IIRC he was also at Google.



Nice one.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: