16 ms·
Algorithms by Jeff Erickson
- whoisburbansky 6y agoDoes the cover say Al-Khawarizmi, rotated 90 degrees and stamped four times?
- gfaure 6y agoIt does indeed, with the dot on خ being the central dot (repeated once per rotation).
- gladuz 6y agoCan you please explain it in detail. I don't know Arabic and can't figure out the pattern. He is born in my country and it would be cool to show the cover to my peers.
- jazzyjackson 6y agoThe pattern is the script called "Square Kufic" (a google image search +mosaic reveals many wondrous examples) and the arabic form of al-Khwarizmi is الخوارزمي The kufic letters are fairly abstract but look for the verticals, there are 9 letters (last 2 are joined, I think, I cannot read it either just looking closely) ا A ل l خ kh و w ا a ر r ز z م m ي i
- ignoramous 6y ago> ...Square Kufic Its superset, "Geometric Kufic", is a more interesting rabbit hole. In general, Arabesque patterns are almost exclusively floral / geometric. See also: https://news.ycombinator.com/item?id=12049316 https://news.ycombinator.com/item?id=12049316
- matsemann 6y agoA discussion about it from earlier here that might be of interest: https://news.ycombinator.com/item?id=18805877 https://news.ycombinator.com/item?id=18805877
- jason2323 6y agoIn my experience these actually didn’t do a great job of explaining things like dynamic programming. I prefer Kleinberg and Tardos
- tinmandespot 6y agoI had the opposite experience, though I agree that YMMV. I return to the chapter on Dynamic Programming every time I need to prepare for an interview.
- dehrmann 6y agoI don't think I've ever been asked a DP problem in an interview, and only had to use it while programming once. That said, I liked the MIT lecture on it: https://www.youtube.com/watch?v=OQ5jsbhAv_M https://www.youtube.com/watch?v=OQ5jsbhAv_M
- curiousDog 6y agoI wish the solutions to the problems in this book were available somewhere.
- codeisawesome 6y agoIMO it’s a major waste of time to go through a book if I can’t check my solutions and be satisfied that I understood everything the instructor intended to from the problem. I won’t be investing the time into this book. Algorithms by Sedgwick instead has (third party) Solutions online.
- aspaceman 6y agoYou can still get value from a book that doesn’t give you all the answers. You can even get more value. Christ the answers have been all solved in papers, in literature, it’s all out there in small baby words what to do. But the whole damn point of math is learning to do it on your own. It’s like bitching that an art textbook doesn’t include draw by numbers in the back pages. “I just want to know I’m doing it right“ Then check your work? Proofs can be checked. People did math alone before you. I really view this mentality as pretty childish. Life doesn’t have a solutions guide. Get over it. This is easily one of the best written books on the subject. And I love that the problems remain difficult and meaningful, _because_ there’s not just a solution guide out there for every problem.
- avindroth 6y agoWhy are you so mad. Your argument is so overblown that even the modicum of value that is in your argument is rendered useless. Why don’t you ask people to invent math, then, and not show them the way? Why even teach anything? Of course people learn by checking their proof and being thorough, but it’s up to them. Solutions can provide certainty for people, much like how peers and peer review system can in science. Even the most decorated academics need a second opinion, and you are pretending like that isn’t a thing. I think you need to stop being so harsh and get over yourself. Not everybody uses a solutions manual the way you think.
- asicsp 6y agoFrom https://jeffe.cs.illinois.edu/teaching/algorithms/hwex.html#solutions https://jeffe.cs.illinois.edu/teaching/algorithms/hwex.html#... >Please do not ask me for solutions. With very rare exceptions, I will say no, even if you are an instructor. I recognize that my stance limits the utility of these materials, especially for self-learners, but I'm trying to optimize the learning experience of my own students at Illinois. The point of homework is not to solve that particular homework problem, but to practice solving a type of problem and get honest feedback on your progress. I've found that when solutions are available, my own students are much more likely to rely on them, rather than trying to figure out the problems themselves, which means they get both less practice and less honest feedback, which means they do worse on exams and in the course overall. Interesting. I was asked multiple times for solutions to my self-pub ebooks that I relented. I didn't add them initially as I wanted readers to solve by themselves or ask for help if needed (and I did get a few mails, saw one of them asked on stackoverflow as well). See also https://github.com/tayllan/awesome-algorithms https://github.com/tayllan/awesome-algorithms for more learning resources, practice problems, visualizations, etc.
- notmenope 6y agoAs someone who likes an occasional refresher on CS topics this is disappointing, but as someone who makes over $100/hr to complete CS assignments for other people, I'm ecstatic.
- Robotbeat 6y agoMy preferred approach is when solutions to odd numbered problems are available. This is especially helpful years hence when help may not be immediately available.
- jrib 6y agoYep, I think this is a good middle ground. By all means encourage students to churn when solving a problem, but you can get stuck. Actually reading and following a solution to a similar problem can provide some insight.
- JoshTriplett 6y ago
- deleted 6y ago[deleted]
- oplav 6y agoHere's a previous post on HN with lots of discussion: https://news.ycombinator.com/item?id=18805624 https://news.ycombinator.com/item?id=18805624
- ycombobreaker 6y agoI'm happy to see that the top comment is about his 25% credit for I Don't Know. That willingness to fold with grace is something that gets lost with standardized testing. IIRC, he also announced that the top 5% of the class would be automatic (and the only) A+ grades, and the bottom 5% would be automatic F grades. But don't worry, there would inevitably be more F's than that, naturally, so nobody was going to get screwed by that rule. As the international student base grew, I could imagine pressure from the dean to stop applying or even publicising that grading rule. (edit: didn't state my assumptions here. The international students pay quite a bit more than in-state resident students. They are more likely to contain the "cream of the crop" from nations like China and India, both considerably larger than Illinois's in-state population. These students are likely to have different expectations coming in, due to the competitive schools they may have come from; and they are more likely to risk "breaking" the 5% threshold for F's)
- matsemann 6y agoThat's how I'm used to it being in Europe. The average is correctly a C in most cases. But taking a year abroad in the US one would lose their spot if one got two B's. Not a big issue as the A's were given away like candy, though.
- jefferickson 6y ago> I'm happy to see that the top comment is about his 25% credit for I Don't Know. That willingness to fold with grace is something that gets lost with standardized testing I'm afraid I'm going to disappoint you. After using the "I don't know = 25%" policy for fifteen years, I was finally convinced to abandon it. Not because of pressure from administration, but rather from an honest evaluation of actual student behavior. The IDK policy was meant to reward self-awareness, but in practice it seems to actually punish lack of confidence. In particular, female students answered IDK more often than male students with similar scores on questions that they both answered in full. (I suspect the same is true of international and BIPOC students, but my rosters don't reveal which students those are.) I've seen lots of students who lacked confidence get trapped in mind games, wasting time worrying about (and sometimes asking me or the TAs) whether their solution was worth more or less than IDK, instead of putting forward their honest best effort. In particular, I've seen students who were already struggling, who might have scored 30-50% on an exam question, "play it safe" by answering IDK instead, and then after seeing the solution say "I did know that!" The last time I taught algorithms, five students (out of 300) took the three-hour final exam in fifteen minutes or less. They walked in, sat down, got their exam booklets, wrote their name on the first page, wrote IDK on every other page, handed in the exam and walked out. None of those students passed. I expect the next time I teach algorithms, without the IDK policy, exam averages will be slightly HIGHER, not lower. (I'd have data already, but the pandemic clouds everything.) I saw a similar score increase years ago when I stopped dropping the lowest problem score on each exam. > IIRC, he also announced that the top 5% of the class would be automatic (and the only) A+ grades, and the bottom 5% would be automatic F grades. Oh god no. I've never used grade quotas; that's just evil. My usual policy is that students with course averages above 95% automatically get an A+, students with course averages below 40% automatically get an F, and intermediate grade cutoffs are determined by score distributions that ignore those outliers. (I plan to move to an absolute grading scale the next time I teach the class.) In practice, that usually means about 4-6% A+s and 2-3% Fs, but I don't set those percentages in advance.
- app4soft 6y ago> Algorithms by Jeff Erickson (Free algorithms textbook) Please, change title to: "Algorithms by Jeff Erickson, free book (2019)"
- pronoiac 6y agoI emailed the mods.
- dang 6y agoThanks, I've changed the title. But I'm confused by the page saying "1st edition (2019)" when there are HN threads going back at least to 2015: https://news.ycombinator.com/item?id=10661376 https://news.ycombinator.com/item?id=10661376
- app4soft 6y ago> HN threads going back at least to 2015 Guess, as on 2015 it was WIP.[0] [0] http://web.archive.org/web/20160102200214/http://web.engr.illinois.edu/~jeffe/teaching/algorithms/ http://web.archive.org/web/20160102200214/http://web.engr.il...
- jefferickson 6y agoThe book evolved from lecture notes that I've been publicly posting since at least 2005.
- bfung 6y agoGood ‘ole CS 373, had Erickson back in 2002 and it’s def. a defining course in CS at UIUC. The answers to a lot of these are now google-able; you’ll learn more by researching than being spoon fed the solution! Imagine those of us students back then when google wasn’t a verb yet trying to solve these problems!
- jtokoph 6y agoAll of the X73 classes were defining for me. Probably my favorite classes and ones that changed the way my brain works.
- reasonabl_human 6y agoFor someone out of the UIUC construct, does X73 mean various levels of algorithms courses? Could you elaborate on their titles or content? I am looking to self-study for core CS content that I missed out on in school after being largely self-taught, and courses that change the way one’s brain works sound like the right ones to take.
- at_a_remove 6y agoThat is a very familiar pain to me. I started programming when I was ten and kept up with it since, but my education was not in programming (although I would take courses as it suited me), so I never had any formal training in data structures or algorithms. I have occasionally found that I had re-invented some known algorithm and wondered just how much difficult I would have been spared if I had known about it in the first place.
- oplav 6y agoYes, the X73 courses were theory based. Something changed after I graduated and now I think CS 374 is the algorithms course, but I'm not sure. If you want to start with the fundamentals, CS 173 (Discrete Structures) is required of all undergrad CS majors and is the first of the sequence (usually taken as a freshman/sophomore). The book is available online along with problems/solutions: http://mfleck.cs.illinois.edu/building-blocks/index.html http://mfleck.cs.illinois.edu/building-blocks/index.html
- Maksadbek 6y agoI think there are more than enough books to learn algorithms now. But there are a very little amount of resources that teach how to use them to solve problems.
- FAANG_dream 6y agoThat comes mostly from practice, and failing, and failing, and failing again, and finally succeeding.
- dominotw 6y agowhat about leetcode?
- digianarchist 6y agoGood practice tool, not for learning though.
- reasonabl_human 6y agoDo you have personal recommendations for books to use for self-study for base algos knowledge?
- cloverich 6y agoI (self taught) went through Segewick's Algorithms. It is a serious study, but very code focused as opposed to math / proof focused, depending on your tastes. Its a masterpiece. As an extension... whether one should read it depends on the goals. If you want to ace google style algorithm questions, you are better off spending an equivalent time churning through hackerrank (etc). This book will serve more as deep dive for curious minds that would put you (far) ahead of most devs in understanding, but you need to work through the exercises (or pair w/ leetcode / hackerrank) to demonstrate as much in an interview.
- deleted 6y ago[deleted]
- chillee 6y agoFWIW, I really liked the sections of this book that I've read. In particular, I read the sections on "Minimum Spanning Trees" and "Fast Fourier Transform" and found them the clearest treatment of the subject that I've seen.
- ArcMex 6y agoDoesn't hurt to have Possible Solutions to the exercises to questions that don't have singular, definitive answers. I wouldn't even add answers to questions on definitions as those can be referenced in the text itself or the notes taken down. But filtering through a map can be done in many ways and a Possible Solution is an interesting way to appreciate a different point of view. But that means the learner, self-taught or otherwise, still should have the discipline to at least to arrive at solution themselves before reviewing the author's selected one(s).
- ArcMex 6y agoPardon the typos, mobile.
- dkfjs 6y agoNot proving solutions to textbooks seems to be a common theme in mathematics and theoretical computer science. It makes it difficult for those outside of the traditional classroom to learn the material. Instead textbook writers seem to have this adversarial approach against readers, thinking they’ll “cheat themselves” if they look up solutions or attempt to verify their work. Experts make mistakes, beginners would presumably make even more mistakes. Without a feedback mechanism beginners can’t truly know whether their logic is impeccable or if they have a subtle error that they themselves cannot detect. They could easily fool themselves that they have correct understanding. Due to that I will not recommend this current book to any colleagues. If you want an example of a fellow hacker news member that did things right, check out http://joshua.smcvt.edu/linearalgebra/ http://joshua.smcvt.edu/linearalgebra/ He provides solutions and lecture videos... this is truly a democratization approach to learning and a model that other academics should follow.
- 30f0fn 6y agoThe book contents are FREE! Look away if you're offended.
- dkarp 6y agoThey weren’t attacking the author. It’s a valid argument regardless of the cost of the book. Free doesn’t mean you can’t criticize anything.
- macintux 6y agoThere was an accusatory, hostile tone that I personally found off-putting and not worthy of an HN discussion. asicsp’s comment[1] was much more useful and neutral. 1: https://news.ycombinator.com/item?id=26074429 https://news.ycombinator.com/item?id=26074429
- cinntaile 6y agoHe stated his experiences with mathematics and computer sciences books and provides arguments for why he thinks this is not a good approach. I really can't see where he is being hostile or accusatory?
- nickkell 6y agoI'm a developer, but don't have the foggiest idea of how to prove something by induction. Is this the kind of book I should look at? Or is there something that should be taken as a prerequisite?
- mperreux 6y agoFormer Illinois student here. There was another course called CS173 Discrete Structures that we took as a prereq to this class. You can find the textbook here http://mfleck.cs.illinois.edu/building-blocks/index.html http://mfleck.cs.illinois.edu/building-blocks/index.html with a chapter dedicated to induction
- nickkell 6y agoMany thanks for the response, I'll take a look
- carapace 6y agoTry playing through the Natural Number Game by Kevin Buzzard and Mohammad Pedramfar. https://wwwf.imperial.ac.uk/~buzzard/xena/natural_number_game/ https://wwwf.imperial.ac.uk/~buzzard/xena/natural_number_gam...
- dfaiv 6y agoProf Erickson once told me I look like Richard Feynman - 20 years later, it looks like that may be the peak achievement of my software engineering career.
- mpurham 6y agoI remember spending hours sometimes trying to solve a single problem but I did not look up the solutions just worked my way through the problem sets. Algorithms definitely helped me prove code without explicitly writing it
- spicymaki 6y agoThanks for posting this. I like the links to prerequisite information as well.
- person_of_color 6y agoI still didn't understand the dynamic programming chapter. What's the best way to prepare for DP in interviews?
- alexbeloi 6y ago> What's the best way to prepare for DP in interviews? Do 100 of these problems: https://leetcode.com/tag/dynamic-programming/ https://leetcode.com/tag/dynamic-programming/
- paxys 6y agoJeff Erickson was my professor for the entire CS *73 stack at UIUC. Great teacher, but I still have nightmares thinking about those exams...
- weaksauce 6y agoit's a bit of a shame that the comments here have descended into a quibble over the availability of the solutions to the questions for each of the sections. All the while overlooking just how excellent the source material is written and also overlooking the fact that this is an entire textbook on college level algorithms that is being gifted away for free instead of locked behind a 150-200 dollar paywall at the bookstore. to Jeff Erickson: Thanks for the book
- jefferickson 6y agoThanks for the kind feedback!
- cpsempek 6y agoLove the style already. Here's a footnote from Chapter 1, and a reason while I'll continue to (very leisurely) read this book. > When I was an undergraduate, I attributed recursion to “elves” instead of the Recursion Fairy, referring to the Brothers Grimm story about an old shoemaker who leaves his work unfinished when he goes to bed, only to discover upon waking that elves (“Wichtelmänner”) have finished everything overnight. Someone more entheogenically experienced than I might recognize these Rekursionswichtelmänner as Terence McKenna’s “self-transforming machine elves”.
- maxtollenaar 6y agoCan't find the exact policy reference, but I remember that if you don't understand Jeff's problems(in HW or exams), you could write "I don't know" and get 25% of the grades for the problems not exact reference towards the policy: "In the table below, green scores are above 95% and red scores are below 25% (equivalent to "I don't know" on every page); those outliers were excluded when computing statistics and cutoffs." - https://courses.engr.illinois.edu/cs473/fa2012/ https://courses.engr.illinois.edu/cs473/fa2012/
- jefferickson 6y agoNot any more; see my comment here: https://news.ycombinator.com/item?id=26096052 https://news.ycombinator.com/item?id=26096052
- wrycoder 6y agoI’d recommend downloading at least the frontmatter, which has great information on prerequisites and matching (free) texts, plus an annotated bibliography of texts at the level of the book itself.