Live data from Hacker News

Algorithms, by Jeff Erickson

jeffe.cs.illinois.edu

171–180 of 245 posts

Re: Algorithms, by Jeff Erickson

#171
post #168

Earlier quoted context omitted.

I’ve never understood why that’s a good policy. You’re (vindictively) punishing the student for pointing out — albeit selectively — where the teacher, supposedly a bedrock of truth on the course material, has falsely labeled your “training data”.

I think you're running under the assumption that all students making the request are doing it for the right reasons. I could be wrong, but my intuition goes the other way and I'm assuming most students do it to get a better grade, not learn more.

>I think you're running under the assumption that all students making the request are doing it for the right reasons.

No, that's what the "albeit selectively" clause was referring to.

>I could be wrong, but my intuition goes the other way and I'm assuming most students do it to get a better grade, not learn more.

As in my comment, it doesn't matter. Their job is to be an expert on this material. Failing to correctly label an answer is failing at their job. Punishing someone for pointing out a failure at your job is unprofessional.

Re: Algorithms, by Jeff Erickson

#172

gonna take this opportunity to ask for advice: i have an MS in CS and i've gone through all of CLRS twice (yes really all of it and really twice - once for my grad algos class and once in prep for interviews - and i still don't have whatever intuition i need to be able to effortlessly do DP. it's honestly kind of maddening - mincut/maxflow, RSA, knuth-morris-pratt etc are all completely obvious to me and i can whip t…

I'm honestly somewhat surprised that you-know-who is asking DP problems with that degree of complexity. Are you applying for a research/math-heavy role? If you're unlucky enough to see DP, usually it's pretty basic and memoization is considered fine, unless things have changed very recently. If they required that degree of rigor for regular SWE jobs, a lot of people I know certainly wouldn't be there.

> If you're unlucky enough to see DP, usually it's pretty basic and memoization is considered fine, unless things have changed very recently. If they required that degree of rigor for regular SWE jobs, a lot of people I know certainly wouldn't be there.

Did you interview in the past two years at the so-called FAANG companies? 'Leetcoding' has raised the bar considerably, even (or especially, in some cases) for senior positions.

Re: Algorithms, by Jeff Erickson

#173
post #100

Earlier quoted context omitted.

Random other point of brilliance I've seen: Our Organic Chem teacher (who was loved universally in the Program) had a rule about test corrections. If you wanted a correction to something you believed you should get credit on, he would only offer to regrade your WHOLE test, which meant you could actually get less points on the regrade because it was he and not a TA regrading (could have worked both ways). It really sc…

I agree. I've seen this done and it was effective. Combined with requiring the request to be made in person, during office hours, it also got struggling students to actually attend the office hours (which often was otherwise empty, and another waste of the grader's time).

The students I knew who tried to complain their way into a better grade would have been better off if they'd tried to study.

Re: Algorithms, by Jeff Erickson

#174

Earlier quoted context omitted.

>25% credit given on any exam question just for writing "I don't know", effectively a reward for acknowledging your own shortcoming and for saving the TA the time to decipher a bullshit answer. That’s brilliant, yet I’ve never heard of it. Should be standard scoring for written exams.

A friend of mine took a game theory class with this system. Partial credit also given for partially correct solution. Completely wrong bullshit answers would lose 10%, or something like that.

Yes, obviously wrong answers (like negative energy) would get negative credit. They'd get >=0 credit if they'd annotate the answer with "I know this is wrong, but I can't find my mistake."

Sounds sensible to me.

Re: Algorithms, by Jeff Erickson

#175

> Please do not ask me for solutions to the exercises. Even if you are [an] instructor, I will say no. That's kind of a bummer. I like to be able to check my answers when teaching myself things. Am I somehow alone in that?

Hi, I'm the author. 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. (From experience) providing solutions interferes with the learning process of my own students at Illinois. I have to change up homeworks and exam questions every semest…

Thank you for the wonderful material you've made available!

Re: Algorithms, by Jeff Erickson

#176

Earlier quoted context omitted.

Don’t rob the self-learner that doesn’t have access to TAs, fellow students, and professors the ability to check their work, just because someone else doesn’t have the discipline to not abuse it. Textbook solutions are good for those that aren’t in school, aren’t in formal programs and have no other way of receiving feedback. The “you should know if you’re right” mentality doesn’t necessarily fit a person that’s been…

I had a girlfriend who was doing her PhD in Physics. I remember one night she and her classmates spent all night working on a problem, that was essentially unsolvable. The next day they go to class and all of them made their best attempt, but no one could complete it. The problem? The professor accidentally used the wrong metric on one of the numbers meaning that they couldn't do the steps to what should have been an…

On the other hand, struggling all night to solve an un-solvable problem is a valuable learning experience, too. In the real world we struggle all the time with problems that don't have solutions.

Re: Algorithms, by Jeff Erickson

#177

> Please do not ask me for solutions to the exercises. Even if you are [an] instructor, I will say no. That's kind of a bummer. I like to be able to check my answers when teaching myself things. Am I somehow alone in that?

Hi, I'm the author. 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. (From experience) providing solutions interferes with the learning process of my own students at Illinois. I have to change up homeworks and exam questions every semest…

Thanks for making this available under a Creative Commons license, which I also use for several of my books.

Re: Algorithms, by Jeff Erickson

#178

gonna take this opportunity to ask for advice: i have an MS in CS and i've gone through all of CLRS twice (yes really all of it and really twice - once for my grad algos class and once in prep for interviews - and i still don't have whatever intuition i need to be able to effortlessly do DP. it's honestly kind of maddening - mincut/maxflow, RSA, knuth-morris-pratt etc are all completely obvious to me and i can whip t…

This book has about 26 pages dedicated to Dynamic Programming (the remaining 36 pages in the chapter detail different exercise problems but I'm sure are just as educational).

I think a strong foundation in recognizing the recurrence is key to becoming better at Dynamic Programming. If you're not able to first see the recurrence, then you're doomed to rote-learn a la videos on youtube where the main focus is table filling (I'm looking at you, Tushar Roy). Here's a snippet from the DP chapter in Erickson's book:

> In a nutshell, dynamic programming is recursion without repetition. Dynamic programming algorithms store the solutions of intermediate subproblems, often but not always in some kind of array or table. Many algorithms students (and instructors, and textbooks) make the mistake of focusing on the table— because tables are easy and familiar—instead of the much more important (and difficult) task of finding a correct recurrence. As long as we memoize the correct recurrence, an explicit table isn’t really necessary, but if the recurrence is incorrect, we are well and truly hosed.

On a quick skim of the chapter, here's what it offers that other traditional book chapters don't:

* Progressive optimization of memoized solutions. The example used is Fibonacci where each recurrence is cached, then it's transformed into an iterative for-loop based solution where a table/array is filled, and finally 2 variables are used instead of the whole array to store intermediate solutions.

* Dynamic Programming on trees (both as a datastructure for storing intermediate solutions and sometimes as a problem ex: Optimal BST construction)

Re: Algorithms, by Jeff Erickson

#179
post #168

Earlier quoted context omitted.

I’ve never understood why that’s a good policy. You’re (vindictively) punishing the student for pointing out — albeit selectively — where the teacher, supposedly a bedrock of truth on the course material, has falsely labeled your “training data”.

I think you're running under the assumption that all students making the request are doing it for the right reasons. I could be wrong, but my intuition goes the other way and I'm assuming most students do it to get a better grade, not learn more.

Yeah no, you don't get to say students should care more about learning than grades when jobs, opportunities, and scholarships given by the very university that claims learning is more important are riding on grades.

It is the professor's responsibility to grade accurately, and honestly if there is so much inconsistency in grading that there's a significant probability that the student will lose marks despite having pointed out a reason they should gain marks, the professor is screwing up very badly[1]. Don't pin that on the student not having noble intentions or whatever.

[1]:Or at least that's the case in STEM. My humanities friends tell me that grading is much more subjective there which is a bit disturbing but I'm hardly qualified to make such judgments.

Re: Algorithms, by Jeff Erickson

#180

> Please do not ask me for solutions to the exercises. Even if you are [an] instructor, I will say no. That's kind of a bummer. I like to be able to check my answers when teaching myself things. Am I somehow alone in that?

Hi, I'm the author. 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. (From experience) providing solutions interferes with the learning process of my own students at Illinois. I have to change up homeworks and exam questions every semest…

I know that my copy of CLR went into the recycling bin because the 'left as an exercise to the reader' aspect of the book made it completely useless as a reference book. Even when the Internet was wrong (as it often was) it was better than nothing (which is what CLR offers). Also the damned thing has so much clay on the paper that it weighs more than a brick.

I wonder if a better solution is to provide a set of questions and answers for the book but not use the book questions as the graded homework/exam material.

The one has to be dynamic for the reasons you listed. The other doesn't, and any professor that tries to use your book without creating their own questions will quickly find themselves in the same boat you were, regarding memorization vs internalization.

Post reply on HN