News for hackers. Stuff that matters.
Re:Great Scientist ≠ Good at Math by erichocean on Sunday April 07, 2013 @05:26AM (#5506616)
In my opinion, the problem with math is actual mathematical notation, which is, frankly, terrible. Ridiculously bad. Especially given the advances that have been made in CS in that regard.

Early programming languages created by mathematicians? They were terrible (for the most part). Then CS people started formalizing stuff, grammars were invented, and finally, the situation began to improve in the late 60s.

But not math. Nope, it's the same archaic, imprecise, terrible notation that's been around for centuries. AFAIK there's nothing in math comparable to the development of programming languages in CS. It simply doesn't improve. Imagine if the first language ever created in CS was also the last. That's math.

In CS, we've kept inventing new, better programming languages and conceptual foundations. Not math. There, they have a bad foundation, but they just keep building up and up and up, each paper even more hand-wavy and imprecise than the next.

It's to the point where things that are actually trivial mathematical concepts to understand are damn near impossible to learn by actually reading a math paper about the topic -- all because of the notation, implied rules, etc.

IN my experience, mathematical objects and concepts are simple, at the same level of difficulty as, say, quicksort or an AVL tree. All of math is that way. What's hard about math is the notation, not the concepts or mathematical objects that are presented.

And because the notation is so bad, it's very hard for people to make use of math in an À la carte manner. You either spend years of drudgery with little payoff, or you don't use math at all.

Contrast that with open source software (the CS equivalent, I would argue, to reading math papers), which is easy to use, because, hey, consistent notation, no hidden rules, no assumed set of knowledge or information. Everything has a definition. There is an answer for everything in the source code itself.

Math papers are the opposite, including the math articles on Wikipedia. Math is damn near unusable for that reason by anyone but mathematicians who can intuit the implicit rules, notational deviations, etc. after a lifetime of study.

It doesn't have to be this way.

Re:Great Scientist ≠ Good at Math by jpallen on Sunday April 07, 2013 @06:09AM (#5506690)
Can you give an example of a piece of math notation that you think could be improved?

Maths is more like a human language - the writing necessarily does not contain a complete picture, just like a book can never unambiguously describe a scene. This is what sets it apart from the computer programs you have compared it with since a computer program is a complete, unambiguous definition of the thing it is describing.

All that math notation does is give us a language that sits somewhere between description and precision to let us talk about concepts that are very hard to formulate in natural language.

If it was made completely precise too much would be lost. Context is everything, and sometimes that requires you to understand the previous work in the field. I don't see a way around that.

Re:Great Scientist ≠ Good at Math by erichocean on Sunday April 07, 2013 @06:22AM (#5506714)
Please see my reply to tome below.
Re:Great Scientist ≠ Good at Math by mebassett on Sunday April 07, 2013 @06:11AM (#5506692)
>>IN my experience, mathematical objects and concepts are simple, at the same level of difficulty as, say, quicksort or an AVL tree. All of math is that way. What's hard about math is the notation, not the concepts or mathematical objects that are presented.

Okay. So can you give some examples of better notation for an operad or a quasitriangular quasi-hopf algebra? Or even tracking the indices on tensors as in Riemannian geometry?

I'm not saying your wrong, the book Structure and Intepretation of Classical Mechanics makes some minor notation changes for greater clarity, or instance. But I don't think it terribly helpful to state that "math notation is horrible; no one can understand it but mathematicians".

Re:Great Scientist ≠ Good at Math by erichocean on Sunday April 07, 2013 @07:16AM (#5506820)
can you give some examples of better notation for an operad

Not really, no (although I don't think this proves anything one way or the other).

Obviously there's a difference between mathematics and computer science, as well as a lot of overlap.

My intuitive sense of things is that math "appears" to be more complex/novel/difficult than it actually is precisely because of the notation. More specifically, because math adopts notations that are useless without the accompanying text (see [0] for an example).

In CS, this would be like code that only "worked" if you also parsed and executed the comments!

My point is more or less that in math, this CS idea: List<List>, would be given a special name, it's own notation, along with a bunch of properties that, when presented as List<List>, clearly apply.

In the List<List> example, for instance, it's obvious I can iterate on each inner list -- I don't need to define a special "property" on this "object" telling me that.

In math, you would, along with special notation you invented just for your paper (yay!). When you define obvious properties of things, your mind starts to break down: the reason he's saying this is, presumably, because somewhere else some other obvious property doesn't hold. I need to pay attention.

Except...you don't. It's just an artifact of how math is done.

Of course, it's worse than that, because we wouldn't be content to refer to it as a List<List>. No, we'd need to give it a name, probably a random person's name, which you'd then have to learn.

So much of mathematics, to me, is like this. Pointless complexity, invented notation, and random names for mathematical "objects" that are no more interesting than List<List>. Wow, a group of groups. Here's your PhD.

Despite the snark, I do like math results, but I just really feel like they are needlessly unusable due to the notation. When you make something different, it feels different to people. They lose that concrete connection in their mind.

If, instead of List<List>, I called that a Domanixly torus (note: not the geometric torus[1]), and then I went ahead and defined a bunch of "properties" of this exotic object I've created, people would (rightly) assume this was some new and exotic object.

Except it's not, but the math-notation approach, and really, the whole way the field is conducted, makes it impossible to see that. Complexity is introduced where none was needed.

Anyway, that's my intuitive sense of things: that math-notation obscures what is actually there, and in the process, makes its own results very difficult to apply and use, while also scaring away people who don't want to clutter their mind with "Domanixly torus" when List<List> would have worked just as well, and required far less mental gymnastics, but sadly, won't get you a PhD.

[0] http://www.mtm.ufsc.br/~cmdoria/Notices/what-is-column/16-op... [1] http://en.wikipedia.org/wiki/Elliptic_curve , last paragraph of intro for an example

Re:Great Scientist ≠ Good at Math by papaf on Sunday April 07, 2013 @06:15AM (#5506701)
Mathematical notation can change to fit the problem. Sometimes a paper will introduce its own notation to make the description clearer.

If I was to pick a programming language most like mathematical notation I would go for lisp. You define the language to suit the problem.

A nice example is the Wikipedia page on least squares: https://en.wikipedia.org/wiki/Least_squares#Problem_statemen...

Everything is concisely described provided that you know the notation for calculus and summation. One definition builds on the previous.

Re:Great Scientist ≠ Good at Math by mitchi on Sunday April 07, 2013 @01:08PM (#5507815)
yes, LISP. That's also what I was thinking. At least Mathematicians get no ))))))) :)
Re:Great Scientist ≠ Good at Math by tome on Sunday April 07, 2013 @05:46AM (#5506652)
Could you give some examples?

[EDIT: unlike the other replies I don't actually disagree with the parent, I just want some examples!]

Re:Great Scientist ≠ Good at Math by erichocean on Sunday April 07, 2013 @06:17AM (#5506706)
As a trivial example, I would argue than infix notation[0] is needlessly complex, and that's pretty much the first math notation we introduce to children.

In CS, it's a notation we inherited from math and, literally, only use because of familiarity (the aforementioned introduction to children at an early age).

Infix sucks. It's ambiguous to parse, requiring the introduction of parenthesis. No one likes using the parenthesis, because it's ugly and takes up space, so on top of this (arguably bad foundation) we add in operator precedence. Genius -- except no one can remember all the rules. And when you leave out the parenthesis, and hand it to someone else, and it's ambiguous (i.e. has a complicated application of the operator precedence rules), how can you be sure the person meant what they wrote down?

The simple fact is that this:

    2 2 +
Is no more difficult to a child to understand than this:

    2 + 2
The former has a lot to recommend it, and high-end calculators use it for that reason. The latter just plain sucks. But thanks to math, and it's inability to improve its own notation over time, we teach infix notation to 5 year olds.

Now, this is super simple example, and math can't even get this much right. With more complex mathematics, we see additional symptoms of the above problems:

1. complex, implicit rules associated with the notation

2. a tendency to "leave important stuff off" because the notation is too verbose

The latter happens all the time. I work in 3D rendering, and basically no one writes out full equations for things, ever, because it's so verbose. So to save space, we just leave it out.

Now, I know it's missing, because one time, I just happened to see the full, correct equation. But what about that A la carte math user? Can they just read the paper and then go ahead and write some code implementing it? Not even close. Laughably not even close.

Of course, I cheated here, because even this equation is presented in dozens of different ways (I'm thinking here of the Rendering equation[1]). Depending on who's writing the paper, you'll have have to decipher it out -- including dealing with all of the "missing" stuff they've left out to save space.

All of math is like this, though. There's is no such thing as a self-contained math paper. Things are rarely "written out" at the level of detail we expect in CS.

[0] http://en.wikipedia.org/wiki/Infix_notation [1] http://en.wikipedia.org/wiki/Rendering_equation

Re:Great Scientist ≠ Good at Math by tome on Sunday April 07, 2013 @06:27AM (#5506720)
Thanks for the reply. I'm not convinced by your point on infix, but I do find it interesting.

Regarding infix, in most mathematics that I've seen there tend to be only two levels of operator precedence: some form of multiplication taking precedence over some form of addition. It's in computer programming where you get multiple levels and it becomes hard to remember.

1. complex, implicit rules associated with the notation

Again I would appreciate examples.

the Rendering equation

That's not really mathematics. It's a mathematical result of engineering presented in mathematical notation. If you want to argue that engineers horribly abuse mathematical notation then I'm right with you on that point!

Re:Great Scientist ≠ Good at Math by erichocean on Sunday April 07, 2013 @07:34AM (#5506861)
Again I would appreciate examples.

How about this? This is copied and pasted from the first sentence of the Wikipedia page[0] on the Guass-Newton algorithm:

    Given m functions r = (r1, …, rm) of n variables β = (β1, …, βn), with m ≥ n,
Quick, what is the signature of those functions? Do they have return values? What type? Are there multiple return values? Are the "n variables" the same for every function? Different? Is it a matrix, indexed by the function? Why is m greater than or equal to n?

This sentence, to me, is an integral part of "math notation". Personally, the CS way of saying what functions and variables are, along with their signatures, along with a precondition on a couple of length properties, is far superior to the above math notation, even though it's, perhaps, more verbose depending on the programming language.

The problem with the math notation is it's going to exclude anyone from understanding it who is not an abstract thinker even though nothing about it is actually abstract. It's become abstract only because we've been given the concrete ingredients, along with a written algorithm to construct the (now abstract) result. And we really need to understand that result to even finish the sentence!

That's math notation in a nutshell.

In CS, it'd be right there, concrete, unambiguous, sitting there on the screen (or page). In fact, you'd barely even need to say anything about it at all because there's nothing else, really, to say. CS notation is concrete and unambiguous.

These kinds of abstract, inline definitions are integral to math notation, and constitute the bulk of the problem people have with math: you force simple, concrete things to be abstract just by the notation itself.

[0] https://en.wikipedia.org/wiki/Gauss%E2%80%93Newton_algorithm

Re:Great Scientist ≠ Good at Math by tome on Sunday April 07, 2013 @07:49AM (#5506875)
OK, I have a challenge for you. I'm going to rewrite the Gauss-Newton sentence slightly so it's still in "math notation", as you call it, but so that it will be clear and unambiguous (at least in my opinion). You do the same, rewriting it in "CS notation".

    Given m real valued functions r = (r1, …, rm) of n real variables β = (β1, …, βn), with m ≥ n,
Three extra words and I think I've done my job. What do you think?

what is the signature of those functions?

Well, they're each of type R^n -> R.

Do they have return values?

Yes, of course. They're functions. That's what functions have.

What type?

R

Are there multiple return values?

No, functions don't have "multiple return values".

Are the "n variables" the same for every function? Different?

Do you mean is the number of variables n the same for every function? Yes. Otherwise I don't understand your question.

Is it a matrix, indexed by the function?

Huh?

Why is m greater than or equal to n?

Good question. I don't know.

In CS, it'd be right there, concrete, unambiguous, sitting there on the screen (or page). In fact, you'd barely even need to say anything about it at all because there's nothing else, really, to say. CS notation is concrete and unambiguous.

Perhaps you can give me a further example, because I don't know what you mean by "CS notation".

[deleted]
Re:Great Scientist ≠ Good at Math by hazov on Sunday April 07, 2013 @09:30AM (#5507141)
You realize there are tomes and tomes defining languages standards just that

def foo (Real): Real

do not have any ambiguity, right?

I really don't see how this is much more clear than

r:R^m -> R^n

Anyway, functions in mathematics are not the same thing as functions in programming languages, one generally can simply can be called subroutine, the other is commonly called mapping, they are not even same stuff. They're not in the same class.

There's really no "mathematical notation" as you think there is, people just use conventions for what we have, you can invent your own and advocate that's it's better, physicists and engineers do that all the time, and people will decide about it, maybe it is and you invented the new decimal numbering system for all of mathematics but probably you're just too naive.