[HN Gopher] Algorithms by Jeff Erickson
___________________________________________________________________
Algorithms by Jeff Erickson
Author : ngzhian
Score : 530 points
Date : 2021-02-09 05:43 UTC (17 hours ago)
(HTM) web link (jeffe.cs.illinois.edu)
(TXT) w3m dump (jeffe.cs.illinois.edu)
| person_of_color wrote:
| I still didn't understand the dynamic programming chapter.
|
| What's the best way to prepare for DP in interviews?
| alexbeloi wrote:
| > What's the best way to prepare for DP in interviews?
|
| Do 100 of these problems: https://leetcode.com/tag/dynamic-
| programming/
| whoisburbansky wrote:
| Does the cover say Al-Khawarizmi, rotated 90 degrees and stamped
| four times?
| gfaure wrote:
| It does indeed, with the dot on kh being the central dot
| (repeated once per rotation).
| gladuz wrote:
| Can 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.
| matsemann wrote:
| A discussion about it from earlier here that might be of
| interest: https://news.ycombinator.com/item?id=18805877
| jazzyjackson wrote:
| The pattern is the script called "Square Kufic" (a google
| image search +mosaic reveals many wondrous examples) and
| the arabic form of al-Khwarizmi is lkhwrzmy
|
| 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 l
|
| kh kh
|
| w w
|
| a
|
| r r
|
| z z
|
| m m
|
| y i
| ignoramous wrote:
| > _...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
| jason2323 wrote:
| In my experience these actually didn't do a great job of
| explaining things like dynamic programming. I prefer Kleinberg
| and Tardos
| tinmandespot wrote:
| I 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 wrote:
| I 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
| curiousDog wrote:
| I wish the solutions to the problems in this book were available
| somewhere.
| codeisawesome wrote:
| IMO 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 wrote:
| You 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.
| carapace wrote:
| Yes. A lot of textbook writers take the time to structure
| the exercises so that working them out yourself guides you
| to a much deeper knowledge and appreciation.
|
| One day, out in the real world, you will be faced with
| problems for which there is no solution ready to go. A good
| education prepares you for that challenge.
| avindroth wrote:
| Why 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.
| aspaceman wrote:
| I TAed for this course. That's why I'm so mad. I have a
| personal stake in this game and you're talking out of
| your ass. I ain't asking them to invent math any more
| than I ask a painter to invent painting, or a writer to
| invent writing. Do they have solutions guides?
|
| I'm not asking anyone to invent math. I'm asking them to
| work through the solutions and attempt to find a proof
| themselves. A _proof_. Not a solution. Christ.
|
| Reading only solutions for proof-based mathematics misses
| the entire point of writing proofs. It's learning how to
| write. Do essay based courses have solution guides? Does
| your English course have a solution guide for the essay?
| How do you get better at writing? You read the written
| word. You read examples. Just like the examples Jeff
| works out tirelessly in every single chapter for you.
| Then you're expected to do it yourself.
|
| Read the actual damn exercises in the book instead of
| talking out of your ass from the comment section. Each
| question requires at least a couple paragraphs of
| articulation. Some require multiple pages - single
| spaced. Are you asking Jeff to provide a 5000 page
| solution guide for these problems? Some of these are even
| research problems, writing all the solutions to them
| would likely award Jeff a Turing Award.
|
| Just like writing, there's a lot of other resources and
| books to read out there. Plenty of things to reference
| and places to find inspiration in. But it has to be on
| your own. You can't just pull out "Great Gatsby Essay
| Solutions Guide" and use it to write your essay. I don't
| care if that's "just how you learn".
|
| Christ. I'm so angry because every one wants to teach
| every subject like it's fucking Calc 1. And that's plain
| idiocy. The entire value I got out of this course in
| undergrad was technical writing. Learning how to actually
| "write" a proof, and not just nonsensically sling
| notation at a poor soul. Comparing Jeff's writing with
| mine, seeing where I tripped up, and trying again.
|
| When I TA-ed for the course, I had to fail so many
| students who "had the right solution" and they did. They
| had the perfect answer, that they copied from the fuck
| next door and couldn't write about to save their life.
| The alegbra was exquisite, the typesetting immaculate,
| the writing and logic completely incomprehensible. 1/5
| points. Every time. Most of them couldn't compose a
| single full sentence.
|
| Fuck the solutions. And fuck your mentality.
| deliveryboyman wrote:
| While I agree with you, you have to remember who the HN
| audience is. There's a reason why the top voted comment in
| any thread about math is someone asking for solutions.
| trevor-e wrote:
| > And I love that the problems remain difficult and
| meaningful
|
| And there it is, your argument comes down to gatekeeping.
|
| If all the problems have been publicly solved, as you said,
| then what's the harm of having a solutions guide? The
| cheaters can already find what they're looking for and it
| helps the self-learners who are actually trying to learn.
| aspaceman wrote:
| They haven't. A lot of the exercises are unsolved
| research problems.
|
| You're missing the point entirely. You're just banging
| your head against "Different people learn in different
| ways". I am saying, that the thing this course, (that I
| took by the way), is trying to teach students is the
| skill of writing proofs effectively.
|
| A solutions guide, as you imagine it, would not teach
| students to write proofs effectively. Since many of the
| problems in this book are of a research level, many are
| highly advanced. Many require many multiple pages of
| exposition to describe the solution effectively.
|
| You would thus have to make a tradeoff. Remove the harder
| questions and write simpler explanations, so you can
| write a cost-effective and printable solutions guide. But
| then the "solutions" aren't actually solutions at all,
| but vague allusions towards the correct process. The
| student assumes that the "answer" are these vague
| allusions, "since that's what the solutions guide says"
| and the entire point of the class is bypassed in favor of
| passing more students.
|
| It has absolutely nothing to do with gatekeeping, or
| cheaters. And quite frankly, I don't believe that
| advanced mathematics will ever able to be the most
| accessible thing in the world. And that's just its
| nature.
|
| EDIT: Seriously if this was Calc, I'd totally agree with
| you 110%. A lot of people can only learn that stuff by
| staring at the answer being worked out. But that's not
| math man, and it's not what we want to teach people in
| this course.
| trevor-e wrote:
| Thanks for the more reasonable take, though I still have
| to disagree.
|
| What you're saying directly contradicts the professor's
| own statement:
|
| > 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.
|
| > And while I firmly believe that each student is
| ultimately responsible for their own learning, I also
| believe that it's my responsibility as an instructor to
| help them. Putting dessert on the table does not help
| anyone eat their vegetables.
|
| tl;dr: students tend to rely on solutions when they are
| available, they don't learn as much and get worse grades
| which reflects badly on him.
|
| It has _nothing_ to do with a tradeoff of writing simpler
| explanations for a more printable guide. He even
| acknowledges that it limits the utility for self-
| learners, which you disagree. He's a professor with
| obligations to his students so I understand his decision,
| just sucks that an amazing book won't be more accessible
| to people.
| dkfjs wrote:
| Not 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/
|
| He provides solutions and lecture videos... this is truly a
| democratization approach to learning and a model that other
| academics should follow.
| yifanl wrote:
| In a previous post, the author responded to this concern:
| https://news.ycombinator.com/item?id=18808010
|
| It seems like he will include a subset of solutions in a later
| edition, whenever he has time to publish it.
| ohdannyboy wrote:
| While I agree that this book isn't very useful for self
| learning, I have to defend the model you describe as
| adversarial. I took CS473 at UIUC (it's CS374 now) so I can
| tell you firsthand the course is brutal -- easily the hardest
| course in the CS program. You're given a LOT of resources
| through office hours and everyone uses them. The TAs are good
| at leading you down the right path instead of just showing you
| the answer and making you feel like you connected the dots (you
| probably didn't). Most of the answers are on Chegg if you want
| that, although I think Chegg is the worst thing ever for actual
| learning.
|
| 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.
| zinclozenge wrote:
| In the former situation you described, the actual textbook
| doesn't matter, it's all about the resources you described to
| help you along.
|
| 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.
| le-mark wrote:
| This x1000, I was/am a particularly dense student and the only
| way I learned was by working loads of problems repeatedly until
| the "tricks" became second nature. The worst are solutions
| manuals with hand wavey solutions.
| tmotwu wrote:
| I took this course a while back. Before every exam, students
| would create a massive crowdsourced google doc and attempt many
| problems in the book / fodder. Granted, we had TAs to review
| our results - but even they don't access to a solutions manual.
| But the docs were filled with comments, many different
| approaches and alternative viewpoints. The class discussion
| board was very active. I've never seen that sort of large scale
| student-led collaborative atmosphere in any other class.
|
| 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.
| mcguire wrote:
| Is that Computer Concrete Roman?!
|
| I guess I'll have to go through this one.
| charlescearl wrote:
| Thanks for the reference. Another algorithms text -- though
| Haskell centric -- that provides solutions is Algorithm Design
| With Haskell [1]. The exhaustive Combinatorial Mathematics by
| Douglas West [2] provides hints at least. These are advanced
| texts though. Another source of solved problems are "problems
| in" books. Dover offers affordable titles like Fifty
| Challenging Problems in Probability [3]. There are other
| classics like Combinatorial Problems and Exercises [4] or
| Proofs from the Book [5], all with solved exercises.
|
| [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
|
| [4] https://www.ams.org/books/chel/361/
|
| [5] https://www.springer.com/gp/book/9783642008566
| victor106 wrote:
| I agree with this 100%.
|
| 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
| unishark wrote:
| > 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.
|
| 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.
| thayne wrote:
| So provide worked answers for half of the problems, making
| sure that the problems with available solutions give the
| experience necessary to solve the ones that don't. Then
| ideally assign homework that includes _both_ problems, with
| the expectation that students will look up the solutions if
| they get stuck.
|
| I've had several classes that worked like that, and it worked
| great.
| skrtskrt wrote:
| In college, cheating on the homeworks was quite literally the
| only way to get all the work for 4 engineering classes done
| on time.
|
| 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.
| chasd00 wrote:
| I remember two breakdowns while going through Computer
| Science and Engineering at UTA ( far from a top-tier
| school, we liked to call it "UT Almost" ) in the late 90s
|
| 1. a student in physics broke down sobbing during the
| final, like uncontrolled wailing. The TA helped her get up
| and walk out
|
| 2. in the discreet structures course a student got up,
| walked to the front of the room in tears, tore up their
| final in front of the class and prof, and then walked out.
|
| 3. not sure if it counts but in that same physics class
| from #1 another student threw up all over themselves but
| sat there in it and finished the final. maybe just sick idk
|
| a lot of students are hotshit in HS and then get to college
| and find out they're not as smart as they thought. heh i
| came from rural TX armed with Algebra II and didn't even
| own a computer. Fortunately for me, i somehow ended up with
| a handful of upper classmen friends who seemed to make it a
| mission that i get through it. I owe them so much.
|
| EDIT: Professionally, i've been on plenty of conference
| calls where peers break down in tears. There's only so much
| pressure a person can bear before nerves just give way.
| mcguire wrote:
| I once met an engineering statistics professor under
| social circumstances. Said professor proceeded to brag
| about never having a student get an A on his final, along
| with other similar comments. Later, I took a class from a
| history instructor who started the first class by going
| around the room mocking the students individually. (I
| dropped that sucker so damn fast...)
|
| Some teachers specifically not to teach, but to take
| power trips over students. They are simply bad. Others
| are there because it's a paycheck; they're not very good.
| Some others are confused and loopy. They're not great.
|
| But most of the university and college teachers I've met
| were interested in teaching students---they're typically
| teaching something related to the field they've spent
| their lives on, right? Most were middling good, some were
| spectacular.
| avgDev wrote:
| This reminds of my DS class at a normal state uni. We
| started with about 30 students, 7 showed up for the final
| exam. 2 walked out during the exam.
| tmotwu wrote:
| Unless you were planning to graduate in 3 years or less,
| I've personally never seen anyone experience this.
|
| Advisors should have worked with you to make sure your
| semester workload floats at around 40-50 hours a week, 60
| hours at most during a bad semester. Some people actually
| care about retaining the material they're learning - taking
| 4 engineering classes a semester is a waste of time and
| likely detrimental to learning. It's usually 2-3
| engineering classes plus a few easy blow off classes a
| semester to get all done in 4 years.
| skrtskrt wrote:
| It was absolutely detrimental to learning and retention.
|
| We were on a quarter system (really trimesters, since one
| quarter is the summer quarter), with 48 classes required
| to graduate from engineering, which is 4 classes per
| quarter for 4 years assuming you don't have any AP
| credits. Only a handful of the 48 are allowed to be non-
| engineering, econ, or math.
|
| Most classes that would be a 14 weeks in a semester
| system were not broken up differently - they were crammed
| into 10 weeks to fit into the quarter system.
| abdullahkhalids wrote:
| This situation probably did not happen overnight. It was
| probably a long process driven by feedback loops. Some
| students started cheating, so profs made classes harder or
| assigned more work to ensure that students learn enough to
| get jobs/scholarships/grad school admissions.
|
| More students started cheating. Profs responded the same
| way because of organizational pressure. Ten years later,
| courses involve obscene amounts of work.
| peterwoerner wrote:
| Is it really cheating. If the goal is to learn the material
| using someone else's solution is incredibly helpful and can
| expedite the learning process. If there is a process to
| master a skill in 20 hours and another way to master it in 5,
| only the fool would chose the 20 hour process.
|
| 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.
| whimsicalism wrote:
| > 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.
|
| At the university I attended, this would be an honor code
| violation. But I agree with the value of worked problems.
| jmkr wrote:
| > Learning from solutions is one of the best ways to learn.
|
| Sometimes I feel like that's the only way to learn. There's
| no worse feeling than staring at a problem and having no
| idea where to start with no one to guide you.
|
| The corollary is that I feel sometimes it becomes
| _memorizing_ instead of _problem solving_.
|
| In a certain aspect, problem solving is recalling previous
| solutions you've done and applying various parts of them.
| But in another sense, just memorizing solutions doesn't
| necessarily help you apply them.
| [deleted]
| pm90 wrote:
| Reading your comment made me realize that this practice is
| common within programming itself where frameworks/languages
| often strive to provide "fully contained examples". When
| I'm learning a new framework, I will often first look at
| how others have written to learn things faster.
| KallDrexx wrote:
| Can't you (as a teacher) just, not assign homework that's
| static problems from a textbook and instead make your own
| problems?
|
| 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.
| karpierz wrote:
| Would you rather your teacher spent time writing problems
| or spent time coaching students through problems in person?
| mcguire wrote:
| I'd like my teacher to spend some time trying to
| understand and address the problems that students have
| with exercises. In practice, that seems to mean spending
| time writing problems.
| musingsole wrote:
| > If you give homework that takes multiple hours each week
|
| 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...
| unishark wrote:
| I don't know what you mean by stealing. In college you are
| generally supposed to devote twice as many hours outside of
| class as in class. It's probably stated in your student
| handbook. That is why 12 to 16 credit hours is called "full
| time". In a problem-solving discipline the best way to
| spend that study time is solving problems. As a bonus you
| can get personalized feedback when it is graded.
| musingsole wrote:
| I'm going to call that stockholm syndrome. Many people
| throw around the idea of spend twice as much time in
| class as out. That's a fine idea for some, but many don't
| need it. Forcing a student to fill out problems to
| satisfy the instructor's concept of enough time spent is
| completely tangential to purpose of an education.
|
| There isn't a requirement for the amount of time a MMA
| fighter spends in the gym. They set their own schedules
| and reap the results.
| unishark wrote:
| Let's face it, the average student won't do anything on
| their own till the night before the exam, which is a
| recipe for failure in any class that can't be memorized
| in an evening or two. If school was tailored towards the
| most elite self-motivated students, your analogy would
| apply. But something like half of gym members don't even
| go.
|
| Why do you think professors give homework? It would be so
| much easier to just point students at study materials and
| leave the responsibility to them. But it's frustrating
| for everyone when students fail.
| abdullahkhalids wrote:
| The idea is not "thrown around". It is called the
| Carnegie Unit: A course should be designed so that for
| each unit there should be 1 contact hour and 2 hours of
| outside-class work. This is the standard way courses are
| implemented in North American universities.
| tehjoker wrote:
| In my college (back in the day) they said an A student
| would spend 4 hours for every 1 hour. For a 15 credit
| student, that meant 60 hr work weeks every week and for a
| 20 credit student, 80 hours a week every week. It was
| brutal and exploitative imo. The one semester I took 12
| credits, my quality of life, ability to retain material,
| and grades went up.
| ycombobreaker wrote:
| How is that a stockholm syndrome? Classroom hours are set
| low enough specifically because of the expectation of
| out-of-classroom work/study. The courses could meet for
| longer and expect all work to be done in class, but that
| is incredibly restrictive for planning schedules.
| tdudzik wrote:
| It's kind of insulting to assume that students are unable to
| decide what's good for them. If someone wants to cheat, he/she
| will do it anyway. Not providing solutions harms people that
| really want to learn the material.
| bloodorange wrote:
| The author of this particular book made his choice based on
| his experience teaching the course. While, of course no one
| can stop you from criticising his choice, on any day, I'd
| respect his opinion more than that of an angry internet
| commenter as he (the author of the book) has more invested in
| it _and_ has given free resource to the community after
| putting a lot of work into it.
| mindcrime wrote:
| I mostly agree with your sentiment. But I don't necessarily
| see it as a question of respecting one opinion more than
| the other. The author of the book didn't make a statement
| like "books without solutions are universally" better or
| anything.
|
| But he did make it clear that he optimized for one
| particular audience (his students at Illinois) over another
| possible audience (self-learners). And on that, he totally
| has the right to make that choice. It's unfortunate that
| some commentators ignored that point, or choose to be
| critical anyway.
|
| OTOH, just because something is free doesn't mean that
| people can't criticize, IMO. The question just kinda
| becomes "what's the point of the criticism?" If one doesn't
| find this book useful, they're under no obligation to use
| it. And the author isn't likely to change his position
| based on a few grouchy Internet commentators.
|
| Personally I appreciate what the author has done and am
| glad his book is out there. Do I prefer books with
| solutions in general? Yes. Does that matter in this
| particular context? No.
| ycombobreaker wrote:
| > If one doesn't find this book useful, they're under no
| obligation to use it. And the author isn't likely to
| change his position based on a few grouchy Internet
| commentators.
|
| Yes this is what I don't understand. Why are there so
| many critical posts about this particular decision? Why
| didn't those users just close their browser tab and move
| on with life? They are bring offered a free resource, it
| doesn't meet their needs/desires, they choose to
| complain. It seems very rude to me. The few who have
| suggested alternatives are contributing.
| ChrisLomont wrote:
| >It's kind of insulting to assume that students are unable to
| decide what's good for them.
|
| 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.
| 30f0fn wrote:
| The book contents are FREE! Look away if you're offended.
| dkarp wrote:
| They 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 wrote:
| There 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
| chapium wrote:
| Tone policing on a textual medium isn't helpful either.
| cinntaile wrote:
| He 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?
| alanfranz wrote:
| I think the ideal would be something like an autograder, rather
| than a solution. There used to be a Coursera class from
| Princeton that relied on Sedgewick and Wayne algorithms book,
| and the class was very, very good.
|
| Then we must hope people don't publish solutions on github!
| dls2016 wrote:
| or chegg _barf_
| asicsp wrote:
| From
| 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 for more
| learning resources, practice problems, visualizations, etc.
| matsemann wrote:
| While I get this stance (the books are often written with
| students in mind), it's sometimes a bit hard when reading this
| kind of material while not enrolled. I don't have any TAs,
| professors, peers etc to ask or grade my stuff when working my
| way through a text book in my spare time. How can I be sure I
| understood stuff correctly?
|
| 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._
| bhrgunatha wrote:
| That's what was good about the early stages of sites like
| Coursera, Udacity and Edx - they had quizzes, exercises and
| exams that are auto-graded that provided that kind of
| valuable feedback for all tiers.
|
| 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.
| [deleted]
| stevegalla wrote:
| > I don't have any TAs, professors, peers etc to ask or grade
| my stuff when working my way through a text book in my spare
| time. How can I be sure I understood stuff correctly?
|
| 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.
| berta wrote:
| This would be like learning piano without a teacher listening
| to our mistakes.
| Hiopl wrote:
| I mean, he's aiming for his main demographic. For anybody who
| isn't a student of his, there is no honest feedback, because
| there's no feedback at all. What good is solving a problem if
| you never find out whether you made a mistake?
| notmenope wrote:
| As 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.
| TheTrotters wrote:
| I hate this attitude. It punishes students (and self-learners)
| who want to be as good as possible and who'd use solutions to
| get fast feedback.
|
| The right thing to do is to publish detailed solutions to
| textbook problems and create new problems for HWs.
| alexbeloi wrote:
| It doesn't punish anyone. If you want solutions, then the
| book is not for you, that's all. The author is not obligated
| to accommodate every audience, or even a majority audience.
| comeonseriously wrote:
| "The right thing to do..."
|
| No. He's the author, this is his choice. People who don't
| take his course don't _have_ to use the book.
| squeaky-clean wrote:
| Unless this is a book the author wrote solely to enjoy
| themselves, let's not pretend that feedback from potential
| buyers is something that shouldn't be allowed.
| vajrabum wrote:
| Professors frequently write their own textbooks.
| Sometimes these are only used in their own classrooms.
| That's pretty close to their own enjoyment. It allows
| them to have a book that exactly matches the way they
| want to teach. As far as buyers, this book is free.
| sigjuice wrote:
| The author has responded to this feedback on the website
| in great detail. At this point, this is less of feedback
| and more of entitled people demanding that the author
| write another book.
| azhenley wrote:
| The content is posted for free. If you buy it, you are
| paying for a physical copy of free material.
|
| PDF of the book: http://jeffe.cs.illinois.edu/teaching/al
| gorithms/book/Algori...
| mhh__ wrote:
| Poor logic. I don't have add tests to my code, after all
| they're free not to merge, but I should.
|
| Exercises with no solutions are very hard for people
| learning away from traditional academia - I haven't read
| this book so I don't know what they're like, but in a
| physics books it's often common to add questions that take
| fairly deep conceptual understanding which if you don't
| click with the book means you're totally out of action
| until you find somewhere else to learn from.
| comeonseriously wrote:
| Again, you don't _have_ to use this book. There are
| hundreds of books on algorithms, many of which have
| solutions for people who _need_ them. Getting all pissy
| with the author because he doesn 't provide them is sad
| and not neccessary.
| pm90 wrote:
| > Getting all pissy with the author because he doesn't
| provide them is sad and not neccessary.
|
| The only person who seems to be getting "pissy" is you.
|
| What is the point of making a comment like "if you don't
| like it, leave?". People who say this seem to think
| they're some pithy genius but it's not a comment that
| advances the conversation at all.
|
| "Hey I have some feedback ..."
|
| "I don't accept feedback. Take it or leave it"
|
| "Ok"
|
| That's not really what HN is meant for.
| sohdas wrote:
| I don't know, I think he made a very fair critique. Sure,
| there are hundreds of algorithms textbooks. But there are
| hundreds of anything. Anyone can make anything they want
| to, and they are subject to criticism for that.
| dominotw wrote:
| "right thing to do" is not a fair critique.
| Robotbeat wrote:
| My 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 wrote:
| Yep, 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.
| [deleted]
| JoshTriplett wrote:
| > I was asked multiple times for solutions to my self-pub
| ebooks that I relented.
|
| 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.
| aspaceman wrote:
| > they might be willing to pay you for them.
|
| I think we have some differences of opinion about the point
| of students not having the solutions.
|
| (Hint: Some people arent as greedy as you)
| JoshTriplett wrote:
| That wasn't the point. I tend to believe that solutions
| _should_ be available, and that their availability helps
| people learn, more so than it hinders. I suggested a paid
| download for two reasons: because it could potentially
| provide a minor barrier to prevent people from unthinkingly
| looking up a solution, and because it supports the
| presentation of detailed, worked solutions rather than just
| a simple answer key. The cost is one potential means (and
| not the only one), not an end unto itself.
| avindroth wrote:
| Ad hominem much?
| aspaceman wrote:
| How? What's the argument?
|
| I thought his idea showed he was a greedy fuck, so I
| called the dude a greedy fuck. There's no ad hominem if
| there's no argument. Just came off as transparently
| greedy and selfish
| asicsp wrote:
| > _You could always publish the solutions in a separate paid
| ebook_
|
| 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.
| tasogare wrote:
| Caricatural mercantile thinking at play here. It's sad to
| read.
| wrycoder wrote:
| I'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.
| cpsempek wrote:
| Love 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
| ("Wichtelmanner") have finished everything overnight. Someone
| more entheogenically experienced than I might recognize these
| Rekursionswichtelmanner as Terence McKenna's "self-transforming
| machine elves".
| paxys wrote:
| Jeff Erickson was my professor for the entire CS *73 stack at
| UIUC. Great teacher, but I still have nightmares thinking about
| those exams...
| ArcMex wrote:
| Doesn'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 wrote:
| Pardon the typos, mobile.
| app4soft wrote:
| > _Algorithms by Jeff Erickson (Free algorithms textbook)_
|
| Please, change title to: _" Algorithms by Jeff Erickson, free
| book (2019)"_
| pronoiac wrote:
| I emailed the mods.
| dang wrote:
| Thanks, 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
| app4soft wrote:
| > _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
| .il...
| Maksadbek wrote:
| I 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.
| reasonabl_human wrote:
| Do you have personal recommendations for books to use for self-
| study for base algos knowledge?
| dominotw wrote:
| what about leetcode?
| FAANG_dream wrote:
| That comes mostly from practice, and failing, and failing, and
| failing again, and finally succeeding.
| spicymaki wrote:
| Thanks for posting this. I like the links to prerequisite
| information as well.
| chillee wrote:
| FWIW, 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.
| maxtollenaar wrote:
| Can'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/
| [deleted]
| nickkell wrote:
| I'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?
| carapace wrote:
| Try playing through the Natural Number Game by Kevin Buzzard
| and Mohammad Pedramfar.
| https://wwwf.imperial.ac.uk/~buzzard/xena/natural_number_gam...
| mperreux wrote:
| Former 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 with a
| chapter dedicated to induction
| nickkell wrote:
| Many thanks for the response, I'll take a look
| oplav wrote:
| Here's a previous post on HN with lots of discussion:
| https://news.ycombinator.com/item?id=18805624
| ycombobreaker wrote:
| 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.
|
| 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 wrote:
| That'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.
| dang wrote:
| also 2019 https://news.ycombinator.com/item?id=20733923
|
| 2018 (a bit) https://news.ycombinator.com/item?id=16379236
|
| 2015 (a bit) https://news.ycombinator.com/item?id=10661376
| weaksauce wrote:
| it'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
| [deleted]
| dfaiv wrote:
| Prof 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.
| bfung wrote:
| Good '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!
| deadmutex wrote:
| Heh, btw, it was changed to 473 shortly after ;).
| jtokoph wrote:
| All of the X73 classes were defining for me. Probably my
| favorite classes and ones that changed the way my brain works.
| chrisshroba wrote:
| I always loved the Recursion Fairy!
| reasonabl_human wrote:
| For 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 wrote:
| That 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 wrote:
| Yes, 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
| totablebanjo wrote:
| Thank you for pointing out the starting course of the
| sequence!
| mpurham wrote:
| I 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
___________________________________________________________________
(page generated 2021-02-09 23:02 UTC)