18
$\begingroup$

This question is bothering me since I started using Stack Exchange. I just want to share examples of people that made me surprised.

I am talking about the users who are doing the math in answers. It is not joke math, it is serious math that is too tough for me to understand.

I am undergraduate student who is graduated from college. But we never had to do such theoretical questions in college. It was mostly numbers based instead of formulas based. And we didn't learn to do such proofs even though we did study theory of computation. We didn't have to prove a lot of dangerous looking things in that subject as well. Instead it was included for few marks and we were supposed to write the gist of that (rather than proving them).

We did discrete mathematics as well and we never had to study about such stuff. It was about graph theory and stuff, and our exams never tested us on deriving something, nor did the teacher's slides focus on it.

But this is really making me hurt that I don't know what almost everyone knows in CS.

Almost all posts of Yuval Filmus in cs.stackexchange.com surprises me. He has an unimaginable amount of knowledge and can prove anything and everything. How can one become near to that level of rigour? Honestly, this surprises me thus I am asking. I studied computer engineering in college which is a mixture of CS and electronics/communication engineering.

$\endgroup$
9
  • 4
    $\begingroup$ "Mathematics not make one great." (paraphrase) $\endgroup$
    – Scott Rowe
    Jun 7, 2022 at 10:21
  • 3
    $\begingroup$ As Jared says. "almost everyone" is entirely wrong. A very small cadre of highly specialised people know this stuff, it's greek to the rest of us. The kind of deep number-theory and mathematical material you're looking at is a whole branch of mathematics and computer-science that most people never learn. I don't know it, and I'm a software dev who's been working professionally for a decade! $\endgroup$ Jun 7, 2022 at 12:22
  • 5
    $\begingroup$ I just want to point out that Yuval Filmus, assuming this is his real name, is an Associate Professor at Technion, a school well-known for theoretical CS (yuvalfilmus.cs.technion.ac.il). The answer to "How do I get that good at theoretical CS?" is "study it for all your adult life and also have a lot of innate talent". If you expected that your undergrad degree in a related field would you bring you anywhere close to that level of knowledge, you had too high expectations ;) $\endgroup$
    – xLeitix
    Jun 7, 2022 at 13:10
  • 6
    $\begingroup$ All those examples are from cryptography stack exchange. Cryptography is a branch of computer science which is literally all about coming up with and analyzing complicated math problems. The stuff cryptography experts deal with on a daily basis is far more math-heavy than in any other branch of CS. Most of what they talk about is black magic to most computer scientists with other specializations. Stackoverflow and even Security SE are so scared of them, they exiled them to their own site :) $\endgroup$
    – Philipp
    Jun 7, 2022 at 13:43
  • 4
    $\begingroup$ @Philipp And most employers will not find this level of mathematics useful, applicable, or even comprehensible. As important as cryptography is, significant portion of the CS workforce don't have to do mathematics at this level, so almost no employers will expect this unless you're specifically hired to to cryptography. $\endgroup$
    – Nelson
    Jun 8, 2022 at 4:16

8 Answers 8

24
$\begingroup$

What makes you think that "almost everyone" knows things like elliptic curves (your 3rd link)? That is pretty advanced math. In fact, it was developed by mathematicians who may not have been programmers at all. Don't feel bad that with only undergraduate knowledge you haven't mastered all of this.

Computers were developed for doing computations. Ballistic trajectories and such. Those computations come from physics, and as such have been studied long before there were electronic computers. So a good part of computer science consists of other sciences (graph theory, partial differential equation solving, cryptography) that happen to suit being done on a computer. To know all of this you'd need to study all those other sciences.

$\endgroup$
5
  • $\begingroup$ Programming definitely got off to a bad start with all that WW2 codebreaking stuff. But then, many new technologies were initially developed as munitions. $\endgroup$
    – Scott Rowe
    Jun 7, 2022 at 10:39
  • 7
    $\begingroup$ @ScottRowe Codebreaking is a "bad start"? It likely shortened the war considerably. Are you saying things would be better if WWII had been a bit longer? $\endgroup$
    – Muzer
    Jun 7, 2022 at 11:06
  • 2
    $\begingroup$ @ScottRowe I'm not sure that code breaking was the main application that computers were intended for. Look up what ENIAC stands for. Likewise, what motivated Babbage? Zuse seems to have had aerodynamics as application in mind. $\endgroup$ Jun 7, 2022 at 13:34
  • $\begingroup$ Well, you mentioned rocket trajectories, and the first rockets were in WW2, as best I recall. And who wanted those tables of logarithms done, long before computers existed? Some General I think... Who was that guy who broke Enigma? Computer theorist, I think. $\endgroup$
    – Scott Rowe
    Jun 7, 2022 at 20:15
  • 1
    $\begingroup$ @ScottRowe ...I don't know whether or not you mean Turing by 'the guy who broke Enigma' or the Polish mathematicians whose work was fundamental to breaking Enigma (see here; like much work it's more complicated than one person doing it solo)? If you do mean Turing, please read about him; he had a tragically short life but was incredibly brilliant. $\endgroup$
    – auden
    Jun 8, 2022 at 4:13
19
$\begingroup$

Computer science emerged out of a branch of mathematics, and many of the sub-branches of modern computer science also emerged from branches of mathematics. That means that there are deep, pervasive links between the two fields, and you don't have to dig too far to find them.

However, it is usually unnecessary to be fluent in the parent mathematical field in order to be an excellent practitioner of the child CS field.

The reason that your undergraduate program didn't cover the mathematics so deeply is because the deeper mathematics mostly doesn't help you to engineer, produce, or code better, and what gains there are falter in the face of a simple cost-benefit analysis. It takes a lot of effort and time to become a Yuval Filmus, who is, after all, a mathematician, and the benefits to coding and engineering are quite small relative to that effort.

If your goal is engineering, then, your efforts are better spent elsewhere.

Now that my answer is done, I will also dispense some advice:

  • If you are fascinated by the mathematics, then that is a reward in and of itself, and the meager gains in engineering will be well worth it because, given the expense of learning the mathematics, few of your peers will be able to do the handful of new things that you can now do. Therefore, if you are interested in the mathematics for the sake of the mathematics and interest, absolutely pursue it. You'll gain good rewards, both in life and in engineering.

  • However, if you are interested in the mathematics mostly for the gains you'll get as an engineer, I would not advise you to head far in that direction. You will find it a very difficult hill to climb. It won't feel especially rewarding, it will feel especially hard, and the engineering rewards will be few and far between.

$\endgroup$
12
  • 1
    $\begingroup$ So people like yuval filmus are with math degree and minor in cs or sth like that right? $\endgroup$
    – kudmea
    Jun 6, 2022 at 14:13
  • 3
    $\begingroup$ @kudmea I mean, according to his resume (linked from his homepage), it appears that his degrees are in CS. However, he's clearly a mathematician at heart. You can see that in his posts, his research interests, and his publications :) $\endgroup$
    – Ben I.
    Jun 6, 2022 at 14:43
  • 1
    $\begingroup$ I will always yearn for a world where programming had emerged from electronics and engineering instead of mathematics. sigh $\endgroup$
    – Scott Rowe
    Jun 7, 2022 at 10:28
  • 1
    $\begingroup$ @kudmea Maybe. Or they may just have a degree in CS and have spent a lot of time involved with the math side of things. Or they may even have a completely unrelated degree. It’s not so much important what degree you have, especially if it’s just an undergraduate degree, what matters is what experience you have and what you do with it. I have no formal degree myself and can argue about graph theory or set theory as they apply to coding just as well as my co-workers who have CS related degrees despite this. $\endgroup$ Jun 7, 2022 at 12:40
  • 1
    $\begingroup$ Actually @ScottRowe you can find competing histories - CS = math. And CS = machine engineering. See m-cacm.acm.org/magazines/2014/1/… for a contra mainstream view $\endgroup$
    – Rusi
    Jun 7, 2022 at 16:25
9
$\begingroup$

What you have discovered is that there is a vast difference between math and CS. Each of those fields can in some ways apply the other for some things but the thinking process is quite different.

The math you need for things like cryptography is quite advanced and depends on a deep knowledge of other things.

If you want to learn mathematics, then you need to study mathematics. The sorts of things you study from math in an undergraduate CS program is a tiny fraction of math as a whole. Discrete math is important to a lot of CS so it is normally studied. But number theory is pretty esoteric and requires its own insights. Insight in math isn't easily transferred from one subfield to another.

Crypto isn't my field (or interest) so I can't provide specific guidance, but if I wanted to study it, I'd find a good book and see whether I could understand it or had to go back to basics.

I'd also look at the requirements of a good cryptography course at a good university and look at what prerequisites are needed.

The Duke University course has many prerequisites including multivariate calculus, linear algebra and differential equations. I'm guessing that your undergrad CS program didn't include much of that.

Note also that crypto stands on the cusp between math and CS and requires applications of both fields. It is an applied field with theoretical underpinnings. If you studied a rather different applied math field (engineering) then they might be lots of gaps.

Get studying.

$\endgroup$
12
  • 1
    $\begingroup$ ioenotes.edu.np/ioe-bct-syllabus (look up to first 4 semesters engineering mathematics) They taught us all math indeed, 4 engineering mathematics that are taught to every engineering branches. But our math was based on solving problems rather than deriving, proving etc. $\endgroup$
    – kudmea
    Jun 6, 2022 at 13:41
  • 2
    $\begingroup$ I dont think Calculus is relevant. My choices of areas would be: (a) Abstract algebra (group theory going on to rings and fields) (b) Basic number theory (modular arithmetic) (c) Combinatorics (d) Linear algebra. See reddit.com/r/crypto/comments/cdgfp2/… $\endgroup$
    – Rusi
    Jun 6, 2022 at 13:44
  • 1
    $\begingroup$ @Rusi, I just listed the requirements for the course at Duke. They include a lot of multivariate calculus. I was a bit surprised myself. $\endgroup$
    – Buffy
    Jun 6, 2022 at 13:46
  • 1
    $\begingroup$ Yes @kudmea engineering math -- solving problems -- and higher math -- proving results -- is fundamentally different like Horowitz and Art Tatum. I would not put one above the other (the "higher" notwithstanding). But one does not do much for the other $\endgroup$
    – Rusi
    Jun 6, 2022 at 13:46
  • 1
    $\begingroup$ Yeah I know Buffy. And I never miss the opportunity to point out that calculus is as likely relevant to most things math as arcane assembly tricks is to programming 😉 Its there for hoaryness not relevance reasons. I enjoyed it when I studied math. But that does not change the fact that it takes up way too much room in the curriculum. Main point (for OP) is that UG calculus is just tricks for solving problems and misleads students to what math is on a broader perspective.. Real and complex analysis which is just 2nd level calculus may be better for that $\endgroup$
    – Rusi
    Jun 6, 2022 at 13:50
8
$\begingroup$

There is math and math and ... and math. [See Map of Math]. Its very important to not get sidetracked by getting dazzled!

Just as there is music and music ... and music.

Let's look a little deeper at the music analogy.

Its not often that devotees of one form will be drawn (much) to the others.

More important:

Practice of one form will not conduce to (much) development on the other sides

Yeah...Yeah. There are famous exceptions like Ravi Shankar collaborating with Yehudi Menuhin. But these are exceptions!

Two points I'd like to leave you with:

  • 99.9% of those who are inspired to play an instrument by looking at someone like Horowitz will not even nearly approximate Horowitz

  • 95% of those who do try (assuming the attempt is not a trivial 1 month attempt) will go on to become better than they were before.
    See this compressed progress story

So just as in music there is no alternative but to practice, math is likewise. Take the area you want to be good at...

And work at it!


PS. Yuval Filmus usually writes at CS-SE.
All your examples are from Crypto-SE. Notice? They are different!

PPS. If Yuval Filmus is your idol you should ask Yuval Filmus! Maybe on CS-SE... Maybe on meta-CS-SE


Added later

This YouTube video seems like a nifty taste of the difference between CS-math & math-math.

$\endgroup$
3
  • $\begingroup$ "Math and math! What is math??!?" (paraphrase) $\endgroup$
    – Scott Rowe
    Jun 7, 2022 at 10:26
  • $\begingroup$ Not sure what you're asking @ScottRowe. In any case I added a first line. Not mathematically very astute but ok as a conspectus $\endgroup$
    – Rusi
    Jun 7, 2022 at 11:06
  • 1
    $\begingroup$ Ok, you can find a video clip by searching for "Brain and brain! What is brain?" It's cute. Anyway it is like the old joke where a musician asks a cab driver how to get to Carnegie Hall. The cab driver says "Practice!" $\endgroup$
    – Scott Rowe
    Jun 9, 2022 at 10:12
3
$\begingroup$

As others have pointed out, you shouldn't really feel bad about not knowing these things; you say you have studied computer engineering rather than computer science, and there seems to be, in many places, a distinction between 'engineering' and 'science' in that the engineers learn how to do things - the formulas, algorithms etc - whereas the scientists learn why you should use certain formulas and algorithms. And that leaves us with a lot of computer engineers who feel frustrated that they don't understand theory better (as well as a number of computer scientists who couldn't string a piece of code together if their lives depended on it).

You should see your frustration as a good thing - it makes you want to learn more. The process of learning can be deeply rewarding in itself and on top of that, there are many indications that continuing to learn all your life may be an important factor in avoiding dementia in later life.

$\endgroup$
1
  • $\begingroup$ Right, "Use it or lose it" $\endgroup$
    – Scott Rowe
    Jun 9, 2022 at 10:15
3
$\begingroup$

You are asking two related questions:

  • Does college prepare one to answer random questions on Cryptography?
  • How does one get better at answering such questions?

The first question is answered (implicitly) in your post:

We never had to do such theoretical questions in college. We didn't learn to do such proofs. Our exams never tested us on deriving something.

The only conclusion is that your college education didn't focus on theorem proving; it had different aims, presumably preparing you for the job market.

Is this typical? Are you lacking knowledge which is commonplace in CS, to paraphrase your penultimate paragraph? Let's break this down to two questions:

  1. Do CS programs usually aim at imparting theorem proving skills?
  2. Are CS programs which aim at imparting such skills successful in imparting them?

The answer to the first question depends on the type of the program: the country, the type of academic institution, and so on. In Israel, traditionally CS programs are highly theoretical, whereas in the US, only half the degree is focused on the major, and the mathematical level is dramatically lower (proof-based math classes, which our undergraduates start taking during their very first semester, are delayed until the third year in the US).

The answer to the second question depends on many factors, include student motivation. According to my experience, the typical student can write a proof (they have to, in order to pass some of the more theoretical classes), but they don't have a deep understanding of the material, and so won't be able to answer random questions on Cryptography.

Indeed, people who are answering such questions are mostly (though not exclusively) experts on the topic, who have spent many years honing the relevant skills. It's not fair to compare yourself, a college graduate, to someone who is doing their PhD, let alone someone who is faculty. You simply have less experience than these folks. Moreover, people doing their PhD are more naturally inclined toward mathematical thinking (that's why they chose to do a PhD in such a topic), and so they are (much) better than average; all the more so for faculty.

Finally, how do you get better? Study, Practice, and Talent (a complex combination of nature and nurture). But first, you need to have realistic expectations so you don't get discourage. Don't expect to be at the level of a world expert right away. You get better with time. Studying in a structured setting and collaborating with peers and more senior experts is a great help. Research is a lifelong endeavor, and we are constantly learning and improving. This is a big topic which really merits its own separate discussion.

$\endgroup$
1
  • 1
    $\begingroup$ This is the first time I've seen a question directly about a stack exchange user, and now it is answered by that user. Nice! I hope you got a kick out of it 😂 $\endgroup$
    – Ben I.
    Jun 14, 2022 at 21:44
2
$\begingroup$

But this is really making me hurt that i don't know what almost everyone knows in cs.

Why?

This is the most important question... why is that? What does it matter?

There is a much more philosophical question at the heart of this post that I think you need to address. For example, what is "joke math"? What is serious math? Your version of serious math to me is joke math to me, and my version of serious math is joke math to a MSc/PhD. For this reason, I don't think it's worth talking about because it's too subjective and ill-defined. This becomes a fruitless endeavor because every time you get better, your window will shift, and it's a never ending chase that you don't resolve if your intention is to "become good at math".

Ask yourself another question, suppose you got all this information in the span of a second, then what? I suspect you would feel happy for a brief period and be back to the same empty void that is making you "really hurt".

I disagree with people telling you to study math here, I think you should do that after you have spent time figuring out, deeply, why you feel this way, and whether it is a phantom of inadequacy or not. Only then can you decide for yourself whether pursuing mathematics more formally is something you should consider. Life is unbelievably short, make your time worth it.

$\endgroup$
4
  • $\begingroup$ +1 from me. However this is the wellknown philosophy problem called Meno's paradox faculty.washington.edu/smcohen/320/menopar.htm $\endgroup$
    – Rusi
    Jun 7, 2022 at 5:12
  • $\begingroup$ Personally, I value math and research(not that practical things are not great) that is why I was mesmerized. But I looked at yuval filmus's biography, he is multiple degree holder and has a PhD. That explains. And I have always felt I have lacked in cs related math compared to conventional one, so I wanted to fix this. $\endgroup$
    – kudmea
    Jun 9, 2022 at 3:32
  • $\begingroup$ CS related math is a worthy goal @kudmea! And in most schools badly addressed. Your question strongly suggests crypto related math — similar but different. You should edit it accordingly. Just one more note. When I was a student theory & research were v close. Nowadays research almost means opposite of theory. Bar and gantt charts and little content $\endgroup$
    – Rusi
    Jun 9, 2022 at 5:02
  • $\begingroup$ @kudmea Keep in mind that some people start their 'work' (what they become known for) fairly late in life. There is a famous photographer who first picked up a camera at age 70, as I recall. (Now you can't help but pick up a camera at age 2, but you get the point.) $\endgroup$
    – Scott Rowe
    Jun 9, 2022 at 10:03
1
$\begingroup$

If by mathematics you mean exactly that, mathematics, not including logic or even if you mean the kind of mathematics used in cryptography, then I don't have much to add.

However, if you mean a mathematical approach to computer science or programming then have a look at the following keywords: formal methods, formal verification, model checking, SMT solvers, Event-B, Hoare-Floyd logic, the Z formal notation, the Coq proof assistant, Isabelle/HOL, Temporal Logic of Actions (TLA), Communicating Sequential Processes (CSP), $\pi$-calculus, linear time temporal logic (LTL), type theory, category theory, relation algebra, and a very long etcetera.

All that is mathematics for computer science. Most of those topics has nothing to do with traditional math such as calculus, linear algebra, geometry, continuous functions, integrals, derivatives, etc.

"Ben I" said in an answer above:

The reason that your undergraduate program didn't cover the mathematics so deeply is because the deeper mathematics mostly doesn't help you to engineer, produce, or code better, and what gains there are falter in the face of a simple cost-benefit analysis.

In my opinion this is not right. There's a body of mathematics and logic that is tantamount to your value as a software developer. Unfortunately, most CS curricula don't tech that or does it in optional courses, while forcing you to take courses on mathematics which will not help you to maximize your programming/CS skills.

$\endgroup$
2
  • 1
    $\begingroup$ My "mostly" was an important hedge :) In truth, I expect that the large majority of programmers never use (at least in any way that they are aware of) even a bit of what you've outlined. It's easy to demonstrate that, too. Go to 10 random programmers and ask them which of those topics they feel that they know well. That's what I mean about the diminishing returns: you can study a LOT and still gain very little "practical" in your day-to-day. (FWIW, I support learning regardless, but I am perhaps more sympathetic than you are to degree programs that choose to deemphasize mathematics.) $\endgroup$
    – Ben I.
    Jun 15, 2022 at 21:35
  • $\begingroup$ It's difficult to state, because if you know something that really solves a problem, it justifies a lot of time spent learning many other things. You never know what specific things will turn out essential in the future. $\endgroup$
    – Scott Rowe
    Jun 25, 2022 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.