1276 points · by ingve · 10y ago · 141 comments
While causally browsing I noted the following in the 8-queens backtracking example:
"The following recursive algorithm, essentially due to Gauss (who called it “methodical groping”), ..."
Hilarious, especially given the current situation. I'd like to know what his original German term was.
Gauss indeed wrote "methodisches tatonniren"[1], the latter of which is not a common German word, nor does it suggest grouping. I believe it to be an expression used at the time which was borrowed from French "tâtonner", which means "fumble", to describe a step-by-step process, "approaching" a solution. The closest I get in modern German is "herantasten", which in turn does not have an elegant English translation; you will have to take its elements "heran" (onto) and "tasten" (touch/feel/grope) individually to judge how close it is to fumble.
So, methodical groping is not as far off as you might have thought!
[1] https://books.google.com/books?id=3jEDAAAAQAAJ&pg=RA1-PA106&... This may be a typo—the regular verb form would be "tatonnieren"—then again a lot of German spelling has changed since the time of those letters.
I personally used it in an observable collection library, where I needed efficient indexed insert and the ability to compute the index of a node.
Given a directed graph with on each arc a maximum flow and a cost per unit of flow, how to find the least cost flows for a given total flow? That is linear programming. The simplex algorithm takes on a special form, and a simplex basic solution corresponds to a spanning tree. A simplex pivot is adding an arc to the tree to yield a circuit, and getting the cost of sending a unit of flow around the circuit evaluates that new arc. Etc.
W. Cunningham defined a strongly feasible basic solution which avoids cycling.
IIRC, D. Bertsekas has a good (polynomial) algorithm for that problem.
I didn't see such mentioned in your table of contents.
On my 14" screen, your PDF files would be much easier to read if the maximum number of characters per line was about 50.
Also, this: http://jeffe.cs.illinois.edu/teaching/pikachu.html
"Algorithm design manual" is another my favorite.
I never find CLRS appealing to read other than being used as a textbook in a formal class.
https://www.google.com/search?q=Algorithms+Jeff+Erickson+sit...
I know people like to debate the merits of "thee algorithm book" be it CLRS or Desgupta etc. but I find that having many such books is extremely beneficial - occasionally one author will articulate a particular insight that will resonate for me in such a way that makes me believe I maybe hadn't completely internalized that thing before, despite having read similar content from other sources on many occasions and believing I had.
Anyway this looks like a great such addition to my personal canon. Thanks for sharing!
Says on the title page: Creative Commons!
"Attribution-NonCommercial-ShareAlike 4.0 International"
http://courses.csail.mit.edu/6.851/spring14/scribe/2012scrib...
--
Playlist (2012 lectures from MIT OpenCourseWare):
https://www.youtube.com/watch?v=T0yzrZL1py0&list=PLUl4u3cNGP...
I've been trying to find them on the site to no avail.
But right now as a programmer, I am using data-structures more on an as-needed basis. Sometimes it is difficult to find the right data-structures for the job. So then it would be nice to have a resource that provides the functionality of data-structures as a black box. Learning these would make more sense than learning also all of the gory technical details upfront.
Even if you already have and are happy with CLRS, Skiena's book is a great addition to your library.
(Note that is a correct usage of the O notation; because of the fact that those two things are equal we generally just use O(n) because for clarity you might as well use the simplest member of the equivalence class defined by the O notation, but it is still valid to write O(n/10). It's just an error to treat it as anything other than equal to O(n).)
But when you need more, it's good to know your options.
In fact I'd say nobody can afford to be intimately familiar with all the various advanced data structures. But most people will, at most, just need to know the things they might need, then go learn about them when they need it, and many won't even need that much.
At the other end of the spectrum - accessible and brief, I find Dasgupta et al.'s Algorithms a refreshingly engaging read.
Does that count?
P.S. I have never recommended it to anyone though, I don't recommend books I haven't read all the way through. I will get through TAOCP one day, (it's now on my retirement bucket list, along with learning Sanskrit) but I first need to read through a bunch of Math books forst, so I can get past the 50 page hump.
Might this one suffice: Concrete Mathematics: A Foundation for Computer Science (Knuth et.al.)
On the other hand, it isn't a very practical solution to most people who are thinking "I'm not sure what algorithm to use here".
(spent 2 min trying to find them)
https://www.youtube.com/playlist?list=PLUl4u3cNGP61hsJNdULdu...
I've learned so much and am really impressed with their depth of knowledge and how they are able to convey complex ideas in a very easy to understand way, I can't wait to start the next courses.
Anyone would recommend resources for learning fundamental of data structures?
Book, video, or courses are welcome. I don't care the programming languages that are used for implementations. I am OK with C.
Another would be Sedgewick's Algorithms. He has a pair of courses on Coursera [0] that follow his 4th edition which uses Java.
You're in for such a treat! Learning data structures and algorithms is so fun and really changes the way you think about programming.
[0] https://www.coursera.org/learn/introduction-to-algorithms
Really enjoyed that book! It intersperses real world use cases which helps when your motivation starts to wane and has a warmer tone than most algorithm books. That being said, it is still pretty rigorous and will take a lot of work to get through it all.
Whichever resource you choose, make sure it has exercises and do them! Even if you can't 100% figure some of them out just trying to will help your thinking immensely.
I like your advice.
For data structures in specific, You can go through following courses
1. CS 61B, Prof Jonathan Shewchuk, UC Berkeley -> [1]
2. COP 3530 Data Structures and Algorithms, Prof Sahni, UFL -> [2], videos are available at [3]
3. COP 5536 Advanced Data Structures, Prof Sahni - UFL [4]
All above courses focus on ideas than on mathematical rigour.
[1] https://www.youtube.com/playlist?list=PL4BBB74C7D2A1049C
[2] http://www.cise.ufl.edu/~sahni/cop3530/
[3] http://www.cise.ufl.edu/academics/courses/preview/cop3530sah...
Alg Design Manual is great and gives shorter shrift to complexity notation and the math behind it, while still giving you a robust introduction to it. Also, it's not as long as it appears as much of the book is devoted to going through specific algorithms so you can be familiar and add them to your mental "tool kit."
When I was taking analysis and design of algorithm class in my school, my lecturer used CLRS book as the main book. I think that book is so hard to learn. Some parts in the book is easy to understand, some other part is not.
[1] http://adit.io/posts/2016-05-25-Grokking-Algorithms-Is-Out.html
[2] https://www.amazon.com/dp/1617292230/ref=cm_sw_su_dpQuite the pre-reqs...
I don't care about financial success, I am curious about scientific success.
God I wish there was mind recorder. I would listen to his (and people like he) mind all day, how they think, what they think , how they manage their time, everything.
Scientists should study these guys, imagine a world filled with people like Erik (in all careers) how beautiful that world would be.
I literally worship people like Douglas Schmidt, Erik Demanine, Tim Roughgarden, Robert Sedgwick ...
They literally changed my life.
Can you imagine third world universities? I am sure not. After 4 year , you end up knowing nothing , literally nothing,not even writing hello world.
Thanks to these guys I am reading a book every month. For past two months I was reading Silberchats database books.
I cannot understand how in earth you infer from that to cloning them.
I think a lot of programmers have good understanding of many data structures. But I think hashes and dictionaries are still taken for granted. What they really need to think of hashes as many magical black boxes and the hashing function directs which key to go to which magical bucket. :)