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/
He provides solutions and lecture videos... this is truly a democratization approach to learning and a model that other academics should follow.
I agree that worked problems make a text much more valuable and useful; even students in a class may spend a lot of time doing self-study. And for self-study, without worked problems the book is only useful as a reference while working problems from elsewhere. The author essentially agrees with this.
However, it's not "thinking" students will cheat themselves, it's knowing for a fact that many will. If you give homework that takes multiple hours each week, then for students who have gotten behind or don't know the background they should, it will take multiples of that time. Many, if not most, simply won't do it if there's a shortcut handy. Challenging people to do more than they would on their own is necessarily adversarial.
When I took electrodynamics the first semester I worked through all the problems myself. I started on Sunday would ask questions Monday and Tuesday where I was stuck and the process took me 20ish hours each week. When I took the second semester, a couple of the other students had the solution manual. I would attempt the problem, then when I got stuck, I would consult the solutions manual, understand what the solution manual was doing, then go back to my work and understand the problem. It would help me track down errors I made in algebra. I ended up spending about 10 hours a week on the problem sets, understood the material better (as well as the material from other classes) and got better grades (on both tests without solutions and homework).
I used to tutor kids in physics and one of my students went from a C at midterm to an A because there was real time feedback for the homework he is trying to do so he was able to grok the material. Worked out solutions to the homework problems is the next best thing.
When I was teaching myself machine learning, it was the same deal, I started working through other peoples worked out problems, it helped me grow my programming skills and learn machine learning more effectively. I would take their code break it down, add comments to lines I didn't understand on first reading and ran the programs.
Learning from solutions is one of the best ways to learn. And it is stupid to have to do twice as much work for the homework problems because some kids might cheat themselves. The alternative for students who have gotten behind or don't know the background is that they don't learn the material because you don't have . The solutions manual gives them an opportunity to catch up.
I've had several classes that worked like that, and it worked great.
The problems in the text book aren't meant for homework, they are meant for practice. This is just the teacher not wanting to make their own problem set and instead use the ones they got for free in the textbook imo.
I think I found the problem. Educators have such an obsession with homework and stealing more class time from their students they can't imagine different models where having the answers in front of you doesn't detract from learning.
Have you never used flash cards? My answers are on the back and yet...
We still learned it all for exams, and received our exam grades accordingly, which are generally >60% of the full grade for the class.
But we were putting in 80+ hours a week on engineering classes and it simply wasn't enough for the obscene amount of work professors assigned. Students crying, having breakdowns, and pulling their hair out in the library and in the classroom was pretty common.
[1] https://www.cambridge.org/core/books/algorithm-design-with-h...
[2] https://faculty.math.illinois.edu/~west/
[3] https://store.doverpublications.com/0486653552.html
In that sense, I agree that this book isn't designed for self study. Every homework was done in groups of 3 and probably took a combined 30-60 manhours a week to complete. It would be pretty hard I'd imagine.
The reality is - if you're a developer and someone asks you to develop a program that does x, you rarely have the privilege of having a complete source code waiting in the end to compare against. But you build it iteratively. You do a bit of research. Sometimes you ask for feedback through a pull request. You think about every corner case and edge case. These are all basic practical skills you don't get to exercise if your mindset is to just grind through math problems.
These days, the internet is full of knowledge, social and connected as it can possibly be. StackOverflow and research papers are one google search away. (I say this because every problem in the book are usually based on very interesting theoretical CS papers) Discord servers have become huge chat rooms for people to organize like-minded individuals. Assembling a group of motivated individuals online and working on problems together is a very effective way to learn than trying to dive into material by yourself. Whether it be this book or any other textbook. I don't think this book should be faulted for trying to incentivize that philosophy.
Unfortunately I don't have a good solution for the self learner here... There is no way in hell I would have gotten through that class without the TAs and workgroups. Just being able to peek at the answers would have been terrible.
In a lot of cases, those resources just don't exist, even at universities. That's why worked examples and problems with solutions are so invaluable. In fact, they're so valuable, I've spent half a decade compiling these kind of resources for mathematics and physics, back when I was a master's student. I literally crawled through professor course pages manually downloading pdfs.
It seems like he will include a subset of solutions in a later edition, whenever he has time to publish it.
It's also kind of insulting to assume that teachers with decades of experience don't know how students behave.
Student cheating or working is not binary; it's a continuum. There are plenty of students in the middle of that continuum that will copy answers and not learn if answer are easily available, but that would do the work if answers are not available, and those students are better off having to put in effort when they don't have easy answers.
Then we must hope people don't publish solutions on github!
Me too! But I don't know how to write a useful auto-grader for free-form English text and pseudocode, and neither does anyone else.
Even a pedagogically useful auto-grader for actual _code_ — one that doesn't just check a bunch of test cases, but diagnoses the code to identify design errors and offers specific feedback for improvement — would be utterly revolutionary.
It’s really hard for everyone when there are no solutions provided. Even if you arrive at the correct answer it’s nice to know how the author is thinking about the problem
I guess I'll have to go through this one.
You're of course welcome not to recommend my book to anyone for any reason. But in my own defense, my reluctance to release solutions is not a moral stance, or a belief that I know what's best for all learners. I completely agree that a textbook with solutions would be a better resource for independent learners than a textbook alone.
But my first allegiance is to my students at Illinois. My textbook grew out of course materials for the algorithms classes I've been teaching at UIUC for more than two decades, and it's still the primary reference for those classes.
I religiously release solutions to my homework, exam, and discussion problems every semester, but only after the homeworks are due, exams are taken, or discussion sections are over. (Experience strongly suggests that having homework solutions _after the fact_ significantly improves later exam performance on similar questions.) I also include at least one solved problem in every homework assignment, to help students calibrate the level of rigor and detail that we expect, and to give a worked example of the type of problem that the assignment is covering. (This pisses off several of my colleagues, who really wish I wouldn't publish solutions at all.)
But whenever I've assigned homework or lab problems whose solutions are readily available _in advance_—either from me or elsewhere on the web—students have performed worse on average on similar exam problems later in the same semester. I take that as strong evidence that they didn't learn the material as well. This isn't a philosophical or moral stance about what students _should_ do; it's an empirical observation.
tl;dr: In practice, releasing solutions in advance hurts my primary audience. That's why I don't do it.
"Why not just make up new problems every semester?", I hear you ask. I do make up new homework and exam problems every time I teach, which is why the textbook has so many problems, but not enough to fill an entire course. Developing problems that are substantively new (not merely old problems in new clothes), focused on the target skills, and neither too easy nor too difficult to be pedagogically useful, is *HARD*. (Most competitive-programming and interview-practice questions are terrible, because they're not designed for the same purpose.) I do it, because I have to, but it's one of the hardest parts of teaching this material, and I don't always succeed. Other parts of my job life also require time and attention, and I'd really like to sleep, so yes, I do rely on good problems that I've used before,after they've been fallow for a few years. (The same goes for the other algorithms faculty at Illinois and elsewhere.)
Similarly, collecting all (or even a significant fraction of) the problem solutions and polishing them into a common publishable form, even just for instructors, would require a serious amount of work, especially without a professional editor (because I'd want to self-publish, so that I could give it away free). Finishing the textbook required a full-year sabbatical, free from my usual teaching and committee work. Again, I'd like to sleep.
I completely understand and sympathize with your frustration, but I still believe I made the right choice. I'd like to think that my textbook and other course materials are useful even without solutions; otherwise, I wouldn't have published it. But it can't be all things to all people.
>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 for more learning resources, practice problems, visualizations, etc.
For me it's ok, I guess. I have graduated years ago and it's strictly for fun. But I wonder if it also creates a kind of artificial divide for those not able to attend a university but could have gotten good use of this kind of material by self study.
Edit, found this quote from him on an earlier discussion which summarizes it nicely:
> I'm honestly seriously torn about this. There is a serious tension between pedagogical needs of students in formal classrooms and the pedagogical needs of self-learners. I've chosen to aim for the former. Yes, I know it's a bummer.
I think they've all evolved now to where that is only available for paid tiers.
One innovation I really enjoyed was marking and commenting another student's answers, once you'd submitted your own. There are flaws but it's a valuable variation on graded feedback.
I definitely agree with you on this. However, there are three things self-learners (or even students) can do.
1. Find a textbook with worked solutions or a different presentation of material.
2. Look for course material that has problem sets with solutions, worked tutorials, or worked examples.
3. Learn numerical or other methods to evaluate your solutions. I know this isn’t possible for proofs, but if it’s an algorithm’s run time, I don’t see how implementing the algorithm and plotting run times over different input sizes wouldn’t be a good way to see if you have the correct run time.
The right thing to do is to publish detailed solutions to textbook problems and create new problems for HWs.
No. He's the author, this is his choice. People who don't take his course don't have to use the book.
You could always publish the solutions in a separate paid ebook. If people want to be able to check their own answers, or they want to use the exercises to set homework and make it easier to grade, they might be willing to pay you for them.
Yeah that's an option too, especially with gumroad/leanpub providing version/packages for such cases.
In my case, I provide my ebook for free online (inspired by FOSS and authors such as Al Sweigart and Allen Downey) and charge for pdf/epub formats. Good enough to pay my living costs (and a bit more in recent months). So, I don't mind providing solutions as well.
- Defines a macro with no parentheses
- Uses unsigned for length and capacity (should be size_t)
- Uses () instead of (void) for an empty parameter list
- Useless use of "extern" for function declarations
- I think that leading double underscores and structures ending with _t are reserved identifiers, but I don't really have a good source for this
[0]: https://github.com/TheAlgorithms/C/blob/master/data_structur...
Oooo, nice. Thanks for the link!
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.
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!
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.
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)
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.
2018 (a bit) https://news.ycombinator.com/item?id=16379236
2015 (a bit) https://news.ycombinator.com/item?id=10661376
Please, change title to: "Algorithms by Jeff Erickson, free book (2019)"
Guess, as on 2015 it was WIP.[0]
[0] http://web.archive.org/web/20160102200214/http://web.engr.il...
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.
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/
to Jeff Erickson: Thanks for the book
What's the best way to prepare for DP in interviews?
Do 100 of these problems: https://leetcode.com/tag/dynamic-programming/
> 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”.
Algorithms definitely helped me prove code without explicitly writing it