
Why Don't Computer Scientists Learn Math? (2016) - 0xCMP
http://lamport.azurewebsites.net/tla/math-knowledge.html
======
ajarmst
In Lamport's defence: (1) He's Leslie Lamport, so his comments about academic
Computer Science should be at least considered before they are dismissed. (2)
His audience (and the target of his critique) was not an arbitrary set of
self-taught programmers, hackers, and vencap enthusiasts. It was
_mathematicians and computer scientists who went to a Leslie Lamport talk_.
Ability to read basic set theory notation isn't exactly something that's weird
to expect in that environment. (3) The notation he is using is not at all
complex or obscure in academic CS. You literally would have trouble reading
even rudimentary papers and summaries of basic theorems in CS if you couldn't
follow that notation. He's pointing out that he's seeing a lot of people who
claim to be CS people that have the sort of disability that a "physicist" who
doesn't know what a matrix or determinant is would have. Without those
rudiments, they just can't follow the discussion. If you can't follow the
duscussion, you can't contribute to it. CS != Programming.

~~~
outworlder
He is correct in the sense that computer scientists should be able to
understand that. I'm one, or at least my diploma says that, even though I'm as
far away from the academia nowadays as it gets.

So, I watched the lecture on youtube. Speaking as someone who was glossing
over the mathematical notation and essentially deferring to the speaker for
correctness, I could not do it from the time he called it into attention to
the time he asked for hands up. I wouldn't have put my hand up, had I been at
the audience then.

Had he asked "are you able to understand this notation", then I'd put my hands
up. Scanning to see if anything unfamiliar is there takes hardly any time at
all. Actually reading and being confident that you understand what it means
and all the implications takes time, for someone who doesn't do that on a
daily basis.

Using a very silly example: e = mc^2. Can you read it? Certainly. Do you
_understand_ it?

------
excalibur
It's not the mathematical concepts they're struggling with in this example,
it's the notation. As someone who majored in math while an undergrad, even I
would have difficulty deciphering it were it not for an elective course in
Symbolic Logic.

~~~
majkinetor
Meh, its like saying that somebody who doesn't know to read doesn't struggle
with concepts, but with understanding letters...

That is basic, I didn't touch math 15 years and still now that.

~~~
krmboya
Meh, any competent programmer can understand sets..

I got the meaning presented in the article because I've practiced the notation
presented, but wouldn'nt have figured it out instantly otherwise.

We have different programming language syntaxes for a reason.

~~~
olgeorge
These are not programmers though, but rather computer scientists, a big
difference

------
Karrot_Kream
While I can't comment on this situation in particular (a room of computer
science researchers who couldn't understand basic notation), I can offer an
anecdote about the lack of mathematical knowledge in industry.

Yesterday one of my coworkers submitted some code to perform an upsert to code
review. His logic for calculating the diff set was extremely complicated, and
subtly wrong, filled with comments. To me the idea was incredibly simple,
because I only needed to think of the upserts in terms of set notation. So in
review, I wrote the set notation implementation of the upsert, and then
offered code to implement the idea.

My coworker was taken aback at how simple this set based implementation was,
despite it being very basic set mathematics. While this was just an anecdote,
I find that a lack of basic mathematical fluency peppers codebases with
unnecessary complexity and myriads of edge cases that could easily be tamed
with a slight application of mathematics.

~~~
user5994461
Is it a web startup by any chance?

This thing doesn't happen in finance. Or generally speaking places that
require a hard degree, and in extreme cases test maths aptitudes.

~~~
Karrot_Kream
We're a web shop, but not a startup. I don't mean this to knock on my
coworker: he loves learning and when presented with a new idea, takes his time
to digest it and really apply it to his thinking.

------
fdupoo
I was really interested in learning math. Was. i continue to be interested in
math, I'm discouraged by the total lack of good and available instructional
material on something as basic and essential as notation and set theory
notation. There is a ton of great material out there for total beginners and
people who have recieved formal instruction of advanced math. The in-
betweeners get a bit shafted.

I dunno if things have changed since I last pursued this, but 5 years ago it
was absurd.

CS, on the other hand, has a lot more material readily available for self-
study. I find the subject itself also lends itself to being more accessible.
Furthermore, unlike math, the practitioners of CS related fields seem to be
concerned with readable notation.

So, mathematicians: acessibility is key! Math is fascinating, but inaccessible
even to a large part of the intelligensia.

~~~
xelxebar
Pick up and typical math text and you can find an index of notation in the
frontmatter or appendices.

All these complaints about mathematical notation seem really uninspired to me.
It's like if I went around complaining that programming shouldn't require all
this horribly baroque textual input.

You may or may not have a point , but either way it's certainly not one that's
helping you at all.

If you find yourself frustrated at a seemingly nasty piece of notation, often
this is a (helpful!) signal that you're not fully grokking things. Make use of
that confused feeling to dig deeper.

Admittedly, compared to programming there are considerably fewer online
resources for hacking together some maths knowledge. However, in book form
there absolutely are tons of excellent materials!

Pick a subject, Google around for text recommendations, and then go raid your
local university's library. There are even pretty good IRC channels for
various math subjects! Try hitting up #math on freenode.

~~~
rnet85
I think you just proved his point. Yes, one must invest time and energy to
gain fluency, but making the whole process more accessible will always make it
easier and welcome more people.

------
binarymax
I bought this book [1] a couple years ago to help with the notation, and it's
awesome. I've been able to walk through papers that I never would have
understood without this rosetta stone.

[1] [https://www.amazon.com/Mathematical-Notation-Guide-
Engineers...](https://www.amazon.com/Mathematical-Notation-Guide-Engineers-
Scientists/dp/1466230525/)

~~~
badtuple
Thank you! I looked for something similar a while ago and came up empty.
Whenever I asked math friends the answer was always "there's too much
variation so a book couldn't tell you everything", which is probably true but
even common things would help.

Someday I'd love to see a similar thing that's simply an operator to function
index where you can read in code/pseudocode what an operator does on a
(bounded for ease of reading) datatype.

~~~
binarymax
A tool that parses equations in CS papers and outputs pseudocode is an amazing
idea!

------
strictnein
I learned all of that while I got my CompSci major. Had I filled out some form
I would have had a math minor upon graduation. But I could hardly tell you
what any of that meant 15 years later, because it never comes up in anything I
do.

~~~
jly
Same thing for me. I took an extensive array of mathematics and physics
courses while pursing an engineering degree. More than 10 years as a
practicing software engineer and I remember very little of it today since most
never comes up in my daily use. Back at graduation, I could have discussed a
lot more maths intelligently than I can today.

~~~
newbear
Phew. I thought I was the only one that got a degree only to not remember it a
few years later. I find that when I relearn the topics it does come a lot
easier. The memory might be hard to retrieve but it's in there somewhere ...

------
jfv
Sure, but how much time did he give them to respond? The CS people maybe need
a few seconds to "load" first-order logic into memory and may have been
thinking about it before he gave them time to put their hands up.

He could have instead asked:

"Raise your left hand if you can interpret this formula, and raise your right
hand once you've determined that you wouldn't be able to do it without
consulting a resource."

After a set timeout he'd have a better sense of where people stood.

That sounds complicated though. Maybe people just prefer simple consensus
algorithms, even with imperfect results.

------
abarrett
Provide this legend with the formula. Now how many people understand it?

∈ = is an element of

∀ = for all

∃ = there exists

~~~
stuartd
What does the colon mean?

~~~
tnecniv
As others have said, "such that." It's worth noting that some people use a
vertical line instead to mean the same thing.

------
bjourne
"I had already explained that [1..N ⟶ 1..N] is the set of functions that map
the set 1..N of integers from 1 through N into itself"

As a programmer, I would read that as if he is defining a set of function
objects. And the domain and codomain of the those function objects must be
integers in the range 1..N.

Come to think about it... Isn't the size of the set exactly the number of
permutations from 1..N? In other words N^N? If so, an audience of computer
scientists would probably have understood the following better:

    
    
        import itertools
        list(itertools.product(range(N), repeat = N))

~~~
pron
> If so, an audience of computer scientists would probably have understood the
> following better

I'm a very experienced programmer (>25 years) and I don't know the language
you're using in your notation (Python maybe?). The kind of mathematical
notation Lamport is using is much more universal (at least after he explains
its particular peculiarities). Also, reading your notation, I assume that
you're describing a list, while he's describing a set.

~~~
bjourne
Yes, it is Python. Python has become a lingua franca in the programming world,
and you'd be well-advised to learn it. It creates a list but that is
inconsequential. Here is the fixed code (to actually generate permutations)
and examples:

    
    
        >>> from itertools import *
        >>> [s for s in product(range(2), repeat=2) if len(set(s))==2]
        [(0, 1), (1, 0)]
        >>> [s for s in product(range(3), repeat=3) if len(set(s))==3]
        [(0, 1, 2), (0, 2, 1), (1, 0, 2), (1, 2, 0), (2, 0, 1), (2, 1, 0)]
        >>> len([s for s in product(range(4), repeat=4) if len(set(s))==4])
        24
        >>> len([s for s in product(range(5), repeat=5) if len(set(s))==5])
        120

~~~
pron
> Python has become a lingua franca in the programming world

I don't think so. Probably depends on your section of the industry. In mine,
C, Java and Matlab are all better known than Python.

> you'd be well-advised to learn it

I did; a few times, actually. I just keep forgetting because I never get an
opportunity to use it. Once you've used well over 10 languages, you don't even
try to maintain your skills as that would be a waste of time. You just relearn
the language next time you need it, especially as popular languages come and
go. Standard mathematical notation, however, has been with us, pretty much
unchanged, for about 100 years now.

In any event, you can't express in Python nearly everything you can express in
standard mathematical notation, unless Python has gained some features that
allow it to express uncomputable objects since last time I used it. Does the
itertools library support infinite sequences? How about uncountable sets?

------
partycoder
At least they don't rediscover calculus and get citations for it.

[https://fliptomato.wordpress.com/2007/03/19/medical-
research...](https://fliptomato.wordpress.com/2007/03/19/medical-researcher-
discovers-integration-gets-75-citations/)

------
bluetwo
I sigh every time someone tries to explain a complex concept using a formula
in that manner.

In the name of efficiency it is kind of being exclusionary, which I kind of
resent.

I love math but it is not the only way to express complex concepts.

I depend more of the concepts from statistics than higher level mathematics
courses.

Is this data nominal, ordinal, interval or ratio? OK, let's work with that.

~~~
shas3
Richard P. Feynman (who else!) had a scathing critique of this:
[http://calteches.library.caltech.edu/2362/1/feynman.pdf](http://calteches.library.caltech.edu/2362/1/feynman.pdf)

To quote him, in reference to new mathematics of the post-Sputnik era,

"In regard to this question of words, there is also in the new mathematics
books a great deal of talk about the value of precise language - such things
as that one must be very careful to distinguish a number from a numeral and,
in general, a symbol from the object that it represents. The real problem in
speech is not precise language. The problem is clear language. The desire is
to have the idea clearly communicated to the other person. It is only
necessary to be precise when there is some doubt as to the meaning of a
phrase, and then the precision should be put in the place where the doubt
exists."

~~~
bluetwo
Thanks for sharing.

------
FullMtlAlcoholc
Im pretty sure that Topics include proof techniques and logic; induction;
sets, functions, and relations; etc. is a requirement to understanding Turing
Machines, and NP-Completeness.

That they probably forgot all of it immediately after the final is probably
indicative that they're interested in a career in software engineering not
research

------
shas3
I think we should look at the correct operation T on the set of all computer
scientists. If T is an operation that restricts the set to computer scientists
in the field of theoretical computer science (TCS), then the opposite seems to
hold as mentioned in this post, which talks about TCS math being more rigorous
than applied math: [https://windowsontheory.org/2014/10/12/applied-
mathematician...](https://windowsontheory.org/2014/10/12/applied-
mathematicians-vs-theoretical-computer-scientists/)

If, loosely speaking, T maps you to 'average computer scientist', then the
situation is different. And so on.

So depending on the type of T, subset or groups of computer scientists or
metrics you are looking at, Lamport's observations hold water.

------
smueller1234
How come so many are complaining about this being a notation issue? It is as
standard a notation I've ever seen for expressing this. It's perfectly okay to
be an engineer/developer and not read that on the spot. But if you're a
graduate student or young faculty member doing research in computer science
and give that as the explanation, I think that's just being defensive.

When I took CompSci 101 15 years ago, basic mathematical notation like this
was necessary to pass.

------
gmfawcett
I suspect that some of them were just intimidated. Lamport is a well-known
researcher in his field, and is giving a recorded presentation. Even a young
postdoc might hesitate to suggest they fully understand something, only to
have Lamport single them out and correct them on camera. In a different
context, like a non-recorded seminar, you might see a more confident response.

------
LeanderK
That's very weird. Located near Heidelberg is Karlsruhe, where i am a CS
bachelor student (university is KIT). This is very basic and we are absolutely
required to understand this without thinking twice.

~~~
codethief
> Remember, these were specially selected, bright young researchers from
> _around the world_.

[Emphasis by me]

------
dogma1138
In quite a few institutions CompSci is effectively math, undergrad compsci and
mathematics degrees may only very in a few courses.

When I did mine we didn't have a single "programming" course in the degree you
were expected to learn the language a corse utilized on your own.

Math and physics were at the undergrad level of their respective BSc. Degrees
and the coverage was nearly the same.

As far as notations goes then it was covered in one of the first 3 "101"
courses you take, your first program was effectively handwritten in this
manner.

------
legulere
I think the problem here really is that permutations are defined as
bijections, which is rather unintuitive. Now even though I learned that in my
undergraduate curriculum I already forgot about that again.

Now think of it as a sequence and you get something like this: {(aᵢ) i∈[1..N]
| aᵢ∈1..N, ∀i,j : aᵢ ≠ aⱼ}. Probably already easier to understand.

Or leave it off totally. Formal mathematical definitions don't make sense when
they are harder to understand than words and when you do not use them actually
later on.

------
Rampoina
I can read this formula and understand it, I just need a little bit more time
than the mathematicians. I'm pretty sure that was the case for most computer
scientists there.

------
kensai
These [1] are the current ACM recommendations for CS among related fields.

In all of them, math plays a major role. But is math notation necessary to
understand/communicate math in an ORAL way? I understand this is critical to
write a paper in a terse way, but orally?!

[1] [http://www.acm.org/education/curricula-
recommendations](http://www.acm.org/education/curricula-recommendations)

------
maglite77
One area I would argue benefits greatly from this type of formal treatment is
the specification of business rules in software. I can be quite insightful to
formally spell out requirements from the business, and then apply
converse/inverse/etc. analysis to drive out missing cases.

Admittedly, most of us can do this in our head quickly (for easy cases), but I
find the formal evidence lends itself well to more complex scenarios.

------
thiht
There's kind of a bias here. Does the author mean "computer scientists in
America"?

In France, I definitely learned mathematical notation. Actually, I learned ∈,
∀ and ∃ in __high school __. And I had set theory courses in the first year of
my master 's degree (I mean first year after high school), among other
mathematical courses.

------
leecarraher
totally readable to this lowly cse graduate. that said, the notation is overly
verbose and specific, if you could have defined it in less rigorous
notation(unless you truly needed it), more people would have understood and
engaged in your presentation. Mathematics is a language like many others where
the fundamental goal is to communicate ideas.

~~~
pron
> the notation is overly verbose and specific

That's what _formal_ notation is like. The advantage of a formal notation is
that it is both succinct and fully precise, and can, therefore, be used to
perform formal proofs, possibly using a mechanical proof checker. Formal
proofs are especially important in computer science, where theorems about
programs are not mathematically deep but do have a lot of details that can be
easily overlooked when reasoning informally. Lamport's talk was precisely
about that: formal reasoning about algorithms. In that context, the ideas must
not only need to be communicated so that they are intuitively or roughly
understood -- as is good enough for math -- but made absolutely precise.

~~~
leecarraher
as was part of the comment, unless "needed". Otherwise I've fallen into the
trap of breaking out the most precise notation from the depths of the annals
of mathematics to write slick looking, ultra concise pseudocode in latex
(algorithm2e) for submissions to ieee and acm journals, and almost every time
i get one or two reviewers saying that the notation is needlessly complex.

~~~
pron
Yes, but Lamport's talk was about _formal_ specification and verification, and
we're not talking some arcane stuff here: set membership and first order
logic. CS graduates should know how to read that.

------
jbmorgado
It's not about the math, it's about the notation. Mathematic notation is
archaic in many ways. We keep using notation that is millennia old in some
cases and centuries old in almost any other case.

To make things more difficult, any mathematician opposes vehemently to any
change in notation or to use easier notation to pass the same concept.

------
smdz
Its just the notations that they might not have recognized immediately, its
not the math.

~~~
lacampbell
How can you get beyond first year in undergrad maths without knowing that
notation though?

BTW as an anecdote I recognised the symbols but didn't derive the correct
meaning, as you can see elsewhere in this thread.

~~~
smdz
If they are not used to the notation quite often, they are likely to forget
it. I surely learnt all those notations, passed the math exams and don't
remember some of those notations.

May be related - Even with 15 years of programming, I tend to forget certain
syntaxes while programming - but that doesn't mean I don't know programming

------
grandDesigns
In {f ∈ [1..N ⟶ 1..N] : ∀ y ∈ 1..N : ∃ x ∈ 1..N : f[x]=y}

What does the colon : mean?

It used to be that:

| = given that

, = and

but, I have never seen a : used in math.

~~~
AstralStorm
It is TLA+, not quite typical math notation. Lambda and list comprehension
notations are more common.

------
colordrops
Can't we also say that mathematicians don't learn computer science? I don't
understand what the point is.

~~~
2_listerine_pls
The foundations of CS, ML, Cryptography, Algorithms, etc... are expressed in
mathematical terms. If you are unable to understand Them... well. Programming
is not computer science.

------
mactron
RWTH Aachen Computer Science Master student here and I know how to read it and
what it means.

------
Cyph0n
There was a discussion on this a few months back if I remember correctly.

------
bananabill
"Why aren't people experts outside of their field?"

~~~
jerf
No, I'm going to agree that that is 100% within the field of academic computer
science. I literally covered all the relevant notation in my freshman year.

What I'm wondering is whether or not there was some other factor going on,
because I'm trained as a computer scientist and found nothing particularly
objectionable about the formula, other than the f[] application notation. (And
as a polyglot programmer, I've long since made my peace with that sort of
notation mutation.) And I am by no means well-practiced in that sort of thing;
I've been out of school for 14 years now, and only dabble on the side in this
sort of thing now. The "forall y there exists an x such that" pattern in the
middle is an extremely common recurring pattern, and what surrounds it on
either side is also extremely simple.

~~~
bananabill
'Outside their field' was poor wording on my part. I meant more that it's not
the sort of thing that most CS engineers see day to day. People forget things
they don't use often.

~~~
thearn4
> CS

> engineers

I think it's important to realize that these are two different things. One is
a formal research science, the other deals with practical problem-solving and
implementations.

Your typical software engineer likely has a CS degree, but CS researchers and
software engineers are two separate populations. Sometimes the same person
will do both, but usually not at the same time in their life or for the same
organization.

edit: for example, you don't even need a computer to learn computer science
fundamentals. A notebook or deck of playing cards will do fine.

~~~
jerf
As I write this, thearn4's post is fading into the grey, but it's true. That's
why I qualified my post with _trained as a computer scientist_. I have a
Master's degree in the field, and I try to keep up with it to some extent, but
what I am now is an engineer. Degree or no, I can not currently say "I _am_ a
Computer Scientist" with a straight face.

------
AstralStorm
The two misnamed sort algorithms shown are bogosort and bozosort. Must be mr
Lamport's idea of a joke.

------
andmarios
Engineers learn math...

------
arekkas
> "people don't understand my notation"

> They don't know math

ok, let's move on to the next thread.

