Hacker News new | ask | show | jobs
by bo1024 1483 days ago
It sounds like he's just talking about using variables to solve equations. I think the point he's making in that section is just about learning a good process so you can solve harder and harder problems, e.g.

Problem 1: Two numbers add to 100, one is 20 larger.

Smart student: oh, I see, 60 and 40.

Dumb student Knuth: x + y = 100 and x = y + 20, solves to x=60, y=40.

..

Problem 2: Four numbers sum to 1024, one is half the sum of the other three less 17, one of the others...

Smart student: uh, I don't see the answer.

Dumb student Knuth: w + x + y + z = 1024, w = (x + y + z)/2 - 17, ... solved it.

2 comments

Algebra goes so much deeper than this. I had so much trouble with my compilers class because my professor expressed all the ideas and principles of compilation using algebra.

So I second OP's comment - I wish there were a course one could take on algebra itself - not merely numeric expressions with variables.

> I wish there were a course one could take on algebra itself

Depending a little on just what you mean, that's likely the upper-division undergraduate math department course called "Algebra" at most universities. Groups and rings and such.

> the upper-division undergraduate math department course called "Algebra"

And be careful what you wish for - the way eighth-grade algebra hurt your brain when you were 13 will be nothing compared to the way abstract algebra will hurt your brain when you're 20.

In my case abstract algebra was much easier to grasp than polynomials with no context.
... in a good way.

I liked "high school" algebra okay, but group theory was fun, even if homework was sometimes spending hours and pages to wind up with a 10 line proof.

I thought of that, but it sounded like it was just studying particular mathematical structures -- not learning "how to read arbitrary algebraic expressions".

Or perhaps algebraic expressions in different mathematical specialties are differentiated enough to make knowledge about how to read a given expression mostly non-transferable?

Ah, to my mind "algebra" is the structure. It sounds like you want a survey of mathematical notation?
> a survey of mathematical notation

YES!

I think in some part you had it right that it differs a bit by specialty, but I think the bigger part of it is that the syntax doesn't mean much without the concepts behind it. Notation is a way to compress concepts that are already understood in elaboration.

Being able to recognize notation without the conceptual underpinning might be useful in directing you towards what you need to learn for a particular task, but it's going to be difficult to learn without anything to hang it on. That said, maybe what you actually want is a math notation OCR that can direct you to documentation for possible interpretations.

Yes of course it does and Knuth is well aware (as am I to a lesser extent), but I’m just saying I don’t think it’s relevant to the point he’s making here.
What are the principles of compilation using algebra?
x + y = 100

x - y = 20

2x + y - y = 120

2x = 120

x = 60

y = 100 - x

y = 40.