Live data from Hacker News

Equations True Computer Science Geeks Should (at Least Pretend to) Know

elegantcoding.com

91–100 of 100 posts

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#91
post #71

Earlier quoted context omitted.

The way you think of it is precisely the mathematical way of thinking about n-dimensions. Mathematically, an n-dimensional space is R^n, that is, the cross product of the real numbers (R) with itself n times. Each copy of R lets you specify a number independently of all the others. Mathematics is just careful abstraction. If you are abstracting away certain aspects of your problem and carefully making deductions abou…

>Mathematically, an n-dimensional space is R^n, that is, the cross product of the real numbers (R) with itself n times. Each copy of R lets you specify a number independently of all the others. See, that's exactly what I'm talking about. This gibberish makes sense to no one except a mathematician. The explanation I've given - while maybe the same in essence - conveys the meaning in a comprehensible way that's not com…

I was writing it mathematically as I thought you would appreciate how your intuitive grasp of what n-dimensions is described mathematically.

The terminology (gibberish) I used is nothing more than a convenient but very precise shorthand for communicating abstractions. The reason these particular abstractions are given special names by mathematicians is that they occur over and over again. There is a lot of conceptual leverage to be gained if you are able to see the same patterns in seemingly unrelated problems.

As Poincaré put it, "Mathematics is the art of giving the same name to different things". I'd argue it's worth knowing some of those names.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#92
post #2

The Y Combinator and the pumping lemma seem a bit contrived on that list, especially the former. I would add the maximum margin separation equation, which underlies many modern machine learning methods like SVMs and MMMF, and the P=NP equality question.

Understanding the pumping lemma is essential to really understanding why regular languages are limited. Which in the real world is important for quickly assessing the question of "can I hack this solution together with some clever regexps or do I need a real parser?" I'll agree that the y-combinator is less essential, however if you even have a sense of what's going on it means that you have an understanding of the b…

The pumping lemma is cool, but the Myhill-Nerode theorem is more powerful (as someone mentioned).

I think, too, that what was meant by 'contrived' was that the pumping lemma is not really an equation. But you don't get hits if you talk about the top ten theorems CS geeks should know...

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#94

Here's a real simple and practical equation: 1+2+3+4 . . . N = N(N+1)/2 This equation represents the number of edges on a complete graph with N+1 vertices or the number of possible pairings given N+1 objects. Useful when estimating O(N) for certain algorithms that involve comparing an item to every other item in a set.

It's more useful if you know how to prove it: just add the series to itself written backwards, then divide by two.

One of my math professors said that this and multiplying by things equal to one were among the tricks he used most often.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#95

Earlier quoted context omitted.

>Mathematically, an n-dimensional space is R^n, that is, the cross product of the real numbers (R) with itself n times. Each copy of R lets you specify a number independently of all the others. See, that's exactly what I'm talking about. This gibberish makes sense to no one except a mathematician. The explanation I've given - while maybe the same in essence - conveys the meaning in a comprehensible way that's not com…

I certainly agree that an intuitive understanding of a concept can be helpful as a guide and emotionally satisfying. However, I don't think that it is at all sufficient and it is precisely "mathematical gibberish" which resolves the problem. An isolated concept is worthless. It is only when you are about to apply it by reasoning with it that becomes valuable. The problem with intuitive explanations is that they don't…

>So by the intuitive explanation we can make this single line any dimension that we want.

And if this makes sense in the given context - sure, why not?

You seem to be missing my point. What I'm saying is that it's useless to have totally generalized abstractions (outside of pure math) since more often than not, they are so far removed from reality that most people can no longer make any connection to use cases.

My entire argument is that there's a heavy communication failure between mathematicians and scientists of every other field where math is used as a tool. Sure, it's convenient for a mathematicians to be able to use shorthand gibberish to talk to other mathematicians. It doesn't justify pushing this jargon on other fields.

Besides which, convenience is no excuse for making something hard to understand. Sure it's convenient to name all your variables in a program a, b, c etc but you're going to get lynched by any programmer that tries to read your code later, including yourself.

When it comes to a point where gibberish becomes the only way to explain mathematical abstractions, then you should step back and ask yourself "where the hell did this go wrong?".

>This isn't just a problem within mathematics. For a simple programming example:[...]

I believe in giving simple explanations and expanding them whenever there's a loophole that needs to be fixed. You don't make programs that cover every single niche use case, either (if you don't have to, that is). That's the problem with math - the generalizations, while useful in math itself, are sheer overkill in many situations outside of math.

Lastly, sorry taking this out of order, but:

>An isolated concept is worthless.

So is a generalized abstraction without any context. I'm saying that the sweet spot is somewhere in between for most people to understand and apply concepts, and that it's better to generalize upwards from reality and actual use cases instead of starting utterly removed from reality and trying to apply the generalizations downwards.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#96

Earlier quoted context omitted.

No. Programming is logic , and logic is a superset of math. What you need to make good programs isn't some obscure, arcane language that the few who actually understand it (mathematicians) assert to be the universal answer to everything, yet refuse to make it more accessible (when it could be), what you need is logical thinking and the ability to think in abstractions. Yes, studying math will teach you this, because…

This opinion alone will get (and has got) me branded as a heretic amongst many people, and that alone proves how deeply we are stuck in this tar-pit. Caution is advised when interpreting opposition to a position as justification for the position. This kind of tenuous logic is frequently used to justify continued oppression in e.g. obscure religious communities ("They all hate us, so we must be right!"). I'm not sayin…

True, I shouldn't argue like this. Thanks for pointing out that fallacy.

What I've been trying to convey is that I've come with what I think is a sensible position, and often got responses that ranged from fervent opposition to (very occasionally) verbally violent backlash. Maybe it was just me incorrectly stating my point, though.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#97

Earlier quoted context omitted.

At two jobs now I've had a conversation with talented comp sci grads and we all agreed 99% of programming is drudgery and the 1% that requires you to turn off your music and sit in dead silence is rare and still not as challenging as comp sci syllabuses (syllabi?) would suggest. An unfortunate side-effect is that many people who could have become highly productive mid-level programmers are scared off because they don…

I disagree. Programming is math. Highly advanced math, in fact. It's just a different type of math. And the 11 equations in the OP's article just barely touches on what CS is about. There is far more to it than that.

Programming is a branch of math.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#98
post #90

Earlier quoted context omitted.

>sounds like you had a bad high school experience. Not exactly high school. I'm a university student in Germany. But yes, it's pretty much a bad experience. I've seen quite a lot of other students which are otherwise bright persons struggle with math simply because they aren't good at learning to interpret arcane sequences of symbols which pretty much represent nothing relevant to reality. Math the way it is taught h…

I think you are obsessing about minutiae. Perhaps mathematical instruction is very different in Germany than in the United States, or perhaps our brains are simply incompatible, but I've never found symbology to significantly affect my understanding. Symbols are just convenient and useful abbreviations. In my experience, they facilitate both speed and precision in mathematical work, far and above what is possible in…

>I won't deny that many mathematicians have a hard time expressing themselves in natural-language speech and writing.

Yes, that's exactly what I've been getting at. As I said in other comments, I respect math as a field. What I'm pointing out is that there's a heavy communication problem between math and other fields, and this is something that needs to be solved.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#99

Earlier quoted context omitted.

I certainly agree that an intuitive understanding of a concept can be helpful as a guide and emotionally satisfying. However, I don't think that it is at all sufficient and it is precisely "mathematical gibberish" which resolves the problem. An isolated concept is worthless. It is only when you are about to apply it by reasoning with it that becomes valuable. The problem with intuitive explanations is that they don't…

>So by the intuitive explanation we can make this single line any dimension that we want. And if this makes sense in the given context - sure, why not? You seem to be missing my point. What I'm saying is that it's useless to have totally generalized abstractions (outside of pure math) since more often than not, they are so far removed from reality that most people can no longer make any connection to use cases. My en…

The way you are talking about jargon in mathematics suggests you have a limited experience of what mathematicians do. Here's an illustrative example of mathematics as done by mathematicians.

~~~~~~~~~~~

Define: An integer n is `even' if there exists some integer m such that n = 2m.

Theorem: For any two even integers n and a, the sum n + a is an even integer.

Proof: Since n and a are even there exist integers m and b such that n = 2m and a = 2b. Now,

  n + a = 2m + 2b; by assumption
        = 2(m+b); by the distributive property
        = 2z; for the integer z = m+b
Therefore there exists some integer z such that n+a = 2z. Hence n+a is even.

~~~~~~~~

That is to say, in mathematics we introduce some definitions/gibberish/jargon (in this case `even') and then we use logic to reason about the implication of our choice of definition (the sum of even integers being even.)

The important thing is that the definition plays an essential role; definitions are the building blocks on which all of mathematics operates. To emphasize: if you strip away the definitions you literally have nothing to build on - we can't apply logic to nothing and arrive at something.

This leads to the point I made in my earlier comment: the reason we need definitions rather than intuitive explanations is that you can't logically reason about a concept unless you nail down the relevant details of what that concept is exactly. We can't do the 'proof the theorem' part of the above example.

So how does mathematics then fit into application?

Guy 1: In this basket I have as many stones as I have fingers and in that basket I have as many stones as I have toes. For each basket I can pair up the stones so that each has a partner. Will this still be the case if I combine the stones from each basket?

Mathematician: Well, lets represent the number of stones in each basket with the integer 10. Pairing stones corresponds to the integer being even and combining the baskets corresponds to adding the two integers. I note that 10 is even since 10 = 2x5 and so I can apply my theorem to conclude that the sum 10+10 is even. Thus I conclude that when you combine the baskets you will still be able to pair each stone with a partner.

Guy 1: Wait, wait, wait! I don't understand this 'even' jargon. Do it again without the jargon.

Mathematics: The definition of 'even' was central to my whole processes. Without it I can't even set up the problem, let alone apply the theorem used to justify the answer. I could perhaps just give you an answer, "MATHEMATICS SAYS YES", but then you wouldn't be able to repeat it yourself for different numbers of stones.

If the above is understood then I can quickly address the claims you have made.

> it's better to generalize upwards from reality and actual use cases instead of starting utterly removed from reality and trying to apply the generalizations downwards.

Mathematics is generalisation utterly removed from reality. This is why we have "Adding integers" and not "Adding together collections of dogs" and "Adding together collections of apples" and "Adding together collections of hats" and ...

> Sure, it's convenient for a mathematicians to be able to use shorthand gibberish to talk to other mathematicians.

Mathematics is the practice of defining new gibberish and then reasoning about that gibberish. The gibberish isn't a shorthand for something, it is the thing.

> It doesn't justify pushing this jargon on other fields.

Mathematics is definitions/gibberish/jargon. Applying mathematics to a field thus means applying definitions/gibberish/jargon to that field.

> When it comes to a point where gibberish becomes the only way to explain mathematical abstractions, then you should step back and ask yourself "where the hell did this go wrong?".

At least since Euclid's formulation of geometry.

>> So by the intuitive explanation we can make this single line any dimension that we want. > And if this makes sense in the given context - sure, why not?

The problem is that it doesn't. Your explanation of an n-dimensional space is more a description of the larger space in which our space of interest is embedded.

In all instances the space (the line) remains unchanged, the only thing which changes is how we are describing it. For the dimension of the space to be a property of the space it needs ignore how we choose to describe it.

Re: Equations True Computer Science Geeks Should (at Least Pretend to) Know

#100
post #36

Earlier quoted context omitted.

Fair enough, but note that the list doesn't say "true software engineers should know" but "true computer science geeks should know".

My response to this is that I am a "true computer science geek". Why isn't P=NP (or P!=NP) on that list? Why not more about set theory? Why not proof by induction? How about lambda calculus? There is far more to CS than what that list implies. I realize that it's not supposed to be all-encompassing, but seriously, saying it's "something all CS geeks should know", in my mind is unfair - I have little understanding of…

Yeah, you're right. "10 best..." lists are usually B.S. anyway.
Post reply on HN