# What Math Courses Should We Teach CS Students?

#### Cliff posted more than 7 years ago | from the too-much-or-not-enough dept.

392
Coryoth asks: *"If you're taking computer science then getting as much mathematics as you can is probably a good idea. Ultimately, however, there are only so many math courses you an squeeze in. Given that, what areas of mathematics should we be teaching CS students for maximum benefit? Traditionally university math courses are structured around the needs of the physical sciences and engineering, which means calculus is what gets offered. While a decent calculus course can teach a certain amount of formality in reasoning, wouldn't CS students be better served with a course in mathematical logic and foundations with its greater degree of formal reasoning and obvious connections to fundamental concepts in computer science? Are courses in abstract algebra and graph theory going to be useful to CS students? Should courses in category theory (yes, it applies to computer science) be required of students going on in theoretical computer science? In short — what areas of mathematics are going to be the most useful and most applicable to computer science students? What courses were of the most value to you?"*

## It realy doesn't matter (3, Insightful)

## Silver Sloth (770927) | more than 7 years ago | (#16850178)

## Re:It realy doesn't matter (4, Funny)

## ObsessiveMathsFreak (773371) | more than 7 years ago | (#16850450)

Except for mathematical logic. Those guys leave all semblance of logic at the door.

## Some Math greater than Other Math (4, Insightful)

## Dareth (47614) | more than 7 years ago | (#16850898)

## Re:Some Math greater than Other Math (3, Insightful)

## TapeCutter (624760) | more than 7 years ago | (#16851176)

## Re:Some Math greater than Other Math (4, Informative)

## SQLGuru (980662) | more than 7 years ago | (#16852260)

Graphics programming - Linear Algebra (matrix math) would be invaluable

Business application programming - plain old Algebra and maybe some statistics

Engineering apps - physics / calculus, stats

Compression programming - linear algebra, "new math"

etc.

When I was in college (90 to 94) at an engineering school, my CS degree required Calculus through the third one (because it was in the Engineering department) and statistics (because otherwise, noone in their right mind would ever take statistics) and an elective "math" the your advisor would point you towards based on what type of work you were interested in doing. I think this approach has worked out well for me.

Layne

## Re:It realy doesn't matter (4, Informative)

## NibbleAbit (528568) | more than 7 years ago | (#16851516)

I am VP of software development at a software company. I hire a lot of recent graduates (and am always looking for more good talent).

What I look for as a starting point is a solid understanding of how programs work, and enough programming experience that I am not teaching the basics. Experience with both lower level languages (C++) and higher level languages (Java, VB, etc) is required just to get past HR. Also, knowledge of the context (networks, operating systems, databases) is required.The above just gets you to the point that HR will really read your resume, and possibly pass it on to me. Once I get a resume, I assume those skills are present. What I look for are things that are more intangible.

The graduates that can show these traits are very likely to be hired. Those that don't, won't. Some of these characteristics can be taught in formal courses, others have more to do with personal development and maturity. Specific languages can be taught to the right person very quickly. A solid background in math is also essential (Algebra, Statistics and Calculus) but I have yet to use n-dimensional calculus in non-cartesian space for practical business applications.

## Re:It realy doesn't matter (1)

## Nutria (679911) | more than 7 years ago | (#16851790)

lower level languages (C++)Is C++ really now considered "low level"

## computational statistics (3, Insightful)

## lubricated (49106) | more than 7 years ago | (#16850182)

## Re:computational statistics (3, Informative)

## Anonymous MadCoe (613739) | more than 7 years ago | (#16850320)

The danger of not teaching it is that most guys that need it in their professional life think they are very smart, start using it and suffer from the "sourcer's apprentice syndrome".

## Re:computational statistics (4, Funny)

## jawtheshark (198669) | more than 7 years ago | (#16850426)

## Re:computational statistics (5, Funny)

## LizardKing (5245) | more than 7 years ago | (#16851134)

What about the other 23%?

## Re:computational statistics (1)

## chroot_james (833654) | more than 7 years ago | (#16852182)

## Re:computational statistics (4, Interesting)

## Peter Mork (951443) | more than 7 years ago | (#16850342)

allundergrads should be basic statistics. In the decade or so since I completed a math degree, I've used calculus only rarely (the intended implication being that even a mathematician might find little need for calculus). Statistics, on the other hand, are needed to correctly interpret newspaper articles.## Re:computational statistics (2, Interesting)

## nelsonal (549144) | more than 7 years ago | (#16850728)

## Re:computational statistics (1)

## Gr8Apes (679165) | more than 7 years ago | (#16851226)

I suppose it depends upon what you do as to what you'll need. Since what I do now is radically different than what I'd thought I'd be doing when I graduated, I'd say requiring a basic set of math skills (algebra, calculus, statistics) is appropriate.

## Re:computational statistics (1)

## dslauson (914147) | more than 7 years ago | (#16851244)

I've found them both very useful. Actually, in my work, there is a lot of calculation of rates of flow and such, so the calc has been more useful than the statistics. Stats, in general, though, are just as important, especially when it comes to computer learning applications.

I think that what math will come in handy is heavily dependent on where you end up in your career, but having the right tools will also help steer you in a good direction in that career. And, definitely, if you want to go further in school than a bachelor's, you'll need all the math you can get. The problem at most universities is that they can only really have so many required courses and still have students graduating on time, so they leave the rest up to electives.

While I'm on the subject, I'd recommend discrete math, linear algebra, and at least one course that teaches you the fundamentals of logic and proof writing. And, like I said, calculus and statistics.

## Re:computational statistics (5, Interesting)

## arivanov (12034) | more than 7 years ago | (#16850364)

MUST NOTbe taught to CS students unless they have the full one year worth of Probability Theory before that. In fact it is a course thatMUST NOTbe taught to any scientific student who has not taken a full probability theory course first. Unfortunately, many universities especially in the US tend to do that - teaching stats without teaching the probability theory which makes them possible.As far probability theory itself is concerned its knowledge is essential for nearly any task in CS starting from an OS and all the way to transaction systems especially if the system is operating under a resource constraint. The time your request traverses the system, the completion rate, etc are all described by Markov chains and there is a appallingly low percentage of CS people who actually know them and can understand how their systems behave. There is no way in hell you can optimise or even understand a complex system without this knowledge. Unfortunately most Unis now prefer to use this time to teach marketing buzzword bollocks also known as Unified Process, Agile, etc instead.

The second most important math area for a CS student is possibly optimal control. This one is also nowdays omitted from some university curicullae which IMO is an absolute madness.

## Re:computational statistics (1)

## Metasquares (555685) | more than 7 years ago | (#16851216)

## Re:computational statistics (1)

## Peter Mork (951443) | more than 7 years ago | (#16851554)

## ballpark (4, Informative)

## superwiz (655733) | more than 7 years ago | (#16850212)

## Re:ballpark (1)

## imbaczek (690596) | more than 7 years ago | (#16850266)

## Re:ballpark (1)

## superwiz (655733) | more than 7 years ago | (#16851334)

## Re:ballpark (0)

## Anonymous Coward | more than 7 years ago | (#16851272)

Billy has four apples. He gives one to his friend Janet. How many apples does Billy have left?

(sorry, i couldn't resist)

## Re:ballpark (1)

## mikael (484) | more than 7 years ago | (#16851632)

## Re:ballpark (1)

## Coryoth (254751) | more than 7 years ago | (#16851812)

## Re:ballpark (1)

## superwiz (655733) | more than 7 years ago | (#16852246)

## I liked oenology, personally (1, Insightful)

## BadAnalogyGuy (945258) | more than 7 years ago | (#16850216)

But to get back to your question, I don't find any of the math that I took applicable to any of the work I do. I don't write 3D software, music synthesizer software, or calculate missile trajectories, so all that math is lost on me. The most applicable mathy CS thing I learned was covered in an hour regarding big O notation. Along with a good course on data structures, that has been the most beneficial thing I can say I learned.

But that is besides the point. What you do in the real world doesn't necessarily have to be relevant when choosing curriculums (curriculi? curricula?)

Give them the works! Everything from Calc through Topo and everything in between. Not all of them are going to grow up to be rocket scientists, but so what? The more knowledge you give these kids the better. I'm not saying you need to wipe them out or flunk them out or even use the math as a weeding tool, just that what you want to do is give them the tools to look at other sciences and not be befuddled.

There's nothing worse than a CS graduate that doesn't have a full grasp of math.

## Re:I liked oenology, personally (1)

## cperciva (102828) | more than 7 years ago | (#16850290)

Personally, I found a great deal of education in my oenology courses. [...] The most applicable mathy CS thing I learned was covered in an hour regarding big O notation.Is there a connection between oenology and O(n)-ology?

## Re:I liked oenology, personally (2, Funny)

## LizardKing (5245) | more than 7 years ago | (#16851198)

No, but there's a strong connection between onanism and the study of Computer Science.

## Lambda Calculus (0)

## Anonymous Coward | more than 7 years ago | (#16850222)

## All of them! (1)

## BrakesForElves (806095) | more than 7 years ago | (#16850230)

## Re:All of them! (1)

## miyako (632510) | more than 7 years ago | (#16851034)

## Re:All of them! (1)

## Aadain2001 (684036) | more than 7 years ago | (#16851410)

cando much more than just push the data around. In my old University, the CS students took different classes than the engineering students, with focus on discrete math, statistics, and matrix math (such as methods for solving complex problems using matrices). Basically, they learned how to perform therealmath that computers and programs use. Could there be more? Probably, but most higher match classes require a very good background in calculus.## Core Math for Comp Sci. (3, Informative)

## Anonymous Coward | more than 7 years ago | (#16850232)

Logic (Philosophy) -> Discrete Math -> Discrete Math 2

Calculus 1 - 3

I would probably put those as the core of any good CompSci program.

## Re:Core Math for Comp Sci. (2, Interesting)

## Enselic (933809) | more than 7 years ago | (#16850878)

Also, a lot of geometrical problems can be solved using Linear Algebra, things that can be useful in GUI code for instance (like, which of these arbitrary line segments are closest to the cursor, what angle does these lines form, etc etc).

## How far are they going in CS? (5, Informative)

## cperciva (102828) | more than 7 years ago | (#16850268)

For students who just want to get a job as a programmer, I'd say that a first year course in discrete mathematics should be enough; it won't actually teach them anything by itself, but it will increase the odds of them understanding what the smart guy on their team is talking about when he says "this is a standard graph theory problem...".

For students who want to be that guy who tells the rest of the team how to solve problems, I'd suggest two discrete math courses, two calculus courses, a linear algebra course, and either a number theory course or a statistics course.

For students who want to actually do research in computer science: They're in the wrong department. The best preparation for graduate work in computer science is an undergraduate degree in mathematics. If they insist on getting their undergraduate degree in computer science, I'd recommend as an absolute minimum three calculus courses, two general discrete math courses, one linear algebra course, one course in number theory, two courses in statistics, one course in real analysis, one course in complex analysis, two courses in numerical analysis, one course in linear programming, one course in formal languages and automata, one course in graph theory, and one course in combinatorics. Depending upon the student's interests, I'd also recommend courses in group theory, galois theory, and coding theory.

## Re:How far are they going in CS? (2, Insightful)

## Anonymous Brave Guy (457657) | more than 7 years ago | (#16850428)

Wow. I

dohave an undergraduate degree in mathematics, and I'm not sure it covered everything you described there. You'd certainly be lucky to get things like Galois theory taught routinely at undergrad level these days, at least here in the UK.## Re:How far are they going in CS? (1)

## Sage Gaspar (688563) | more than 7 years ago | (#16850732)

More advanced topics in algebra are certainly not out of reach though, my school only had one semester of algebra, but I had a lot of friends at schools with two semesters, and in two semesters there's no reason you can't get to Galois theory.

## Re:How far are they going in CS? (1)

## mdarksbane (587589) | more than 7 years ago | (#16850798)

## Weak CS Undergrad (2, Informative)

## Dareth (47614) | more than 7 years ago | (#16851010)

I highly recommend the MIT Open Courseware [mit.edu] and the Webcasts at Berkley [berkeley.edu] .

Each provides a quite different approach to CS education. Just remember that you did not learn everything you will ever need to know in college. Hopefully your undergrad taught you how to learn new information quickly.

## Re:How far are they going in CS? (0)

## Anonymous Coward | more than 7 years ago | (#16851664)

These are my experiences of doing Math rather than CS, looking back 15 years later:

0. Math was hard. CS looked way easier.

1. Most of what I learned in my Math degree has come in use at one time or another (not that I would have known at the time) - Galois Theory being the exception, although I did have cause to review my Galois Theory notes just last month because I thought it

mightbe relevant to something I was working on (it wasn't)2. I've picked up everything I need to know about CS since by self-teaching; I didn't know the web would take off when I studied Math but it did and now most of CS can be learned online (the rest from books)

3. Learning graduate-level CS with a Math degree looks a lot easier than learning graduate-level Math with a CS degree

The question for me therefore is not "how much Math should a CS student do" but "how much CS should a CS student do"? CS and Math are two sides of the same coin, but the knowledge transfer only goes one way.

I didn't go into CS research, though. I find all this Math useful just for being a games programmer.

## CompSci maths... (3, Insightful)

## filthWisard (1015523) | more than 7 years ago | (#16850272)

## Re:CompSci maths... (1)

## tomhudson (43916) | more than 7 years ago | (#16850676)

## Re:CompSci maths... (1)

## filthWisard (1015523) | more than 7 years ago | (#16851162)

## I hope.... (1)

## WgT2 (591074) | more than 7 years ago | (#16850274)

I hope someone besides me tries to answer this question.

Which courses you take absolutely matter and who cares what learning besides math has helped you; that wasn't what the dear reader is asking us.

That which has helped me the most is Discrete Structures, which wasn't even offered as a math class, but as a CSE class.

## Course style - lazy students... (0)

## Anonymous Coward | more than 7 years ago | (#16850310)

I took EE/CS courses at Southampton Uni (UK). The staff were always trying to make the Maths courses more accessible and were very open to feedback.

However they could never win; the years they offered structured courses, the student feedback demanded self-paced courses (i.e. less lectures.)

Of course, those years they offered self-paced courses, many students struggled (i.e. were lazy - like me) and requested - more structure!

## Statistics & Basic Economics (1)

## eraserewind (446891) | more than 7 years ago | (#16850318)

Adding to that, though it's not exactly maths or CS as such, a better understanding of economics and the practical economic or accounting mechanisms and tools used in business and life would come in handy.

## Re:Statistics & Basic Economics (1)

## Anonymous Brave Guy (457657) | more than 7 years ago | (#16850460)

Do you actually mean statistics, or do you mean probability, optimisation, or other related fields?

## Depends on what you want to do with it (2, Insightful)

## antifoidulus (807088) | more than 7 years ago | (#16850322)

## Re:Depends on what you want to do with it (1)

## jasmak (1007287) | more than 7 years ago | (#16851370)

## Hard to decide (2, Insightful)

## Raliaga (1027504) | more than 7 years ago | (#16850374)

However, we should not forget that it's suposed to be a CS major, so I'd recommend as "priority" ones: Calculus (one-many variables), Linear Algebra, Probability, Statistics, Linear Optimization, Non-linear Optimization, Combinatorial Optimization, Numerical Analysis, Computational Complexity, Graph Theory and Information Theory. As subjects of further study I'd choose some Logic, Abstract Algebra, Functional Analysis, Set Theory and Category Theory.

It is important that a CS student could get as much Math as he/she can, because it helps to provide a useful mental framework for thinking, and because helps to get chances of

rightuse of some mathematical tools.As I see it, many engineering majors are as teaching a student to battle with some weapon, teach some mathematical tecniques related to the subject, and some practical things about the tecnique ("the weapon"). But learning as much as Math as you can, is like to learn how to use a swiss knife: if you know how to use it properly, sky is the limit (you can be a "science McGyver"

## Re:Hard to decide (0)

## Anonymous Coward | more than 7 years ago | (#16852012)

As a geezer in his late 30s returning to school majoring in math with a minor in CS I'd have to agree.

Exactly. And unlike current languages, paradigms, etc math doesn't go obsolete in five years. It's all about exercising the noggin and then getting enough CS coursework in to actually do something with it.

When I worked for the Department of Defense, all of the contract coders who were shit hot software people were

almostall math or physics people. There were a few CS folks, EEs, and one "Systems Engineering" major who were skilled as well, but math and physics folks seemed to dominate.## Why do CS? (3, Insightful)

## Tango42 (662363) | more than 7 years ago | (#16850376)

Can anyone name a job for which a CS degree is the best qualification?

## Re:Why do CS? (1, Insightful)

## Anonymous Coward | more than 7 years ago | (#16850548)

CS Professor of course.

## Re:Why do CS? (2, Insightful)

## Der PC (1026194) | more than 7 years ago | (#16850618)

## Re:Why do CS? (1)

## DoofusOfDeath (636671) | more than 7 years ago | (#16850764)

## Re:Why do CS? (1)

## Manchot (847225) | more than 7 years ago | (#16850908)

## Re:Why do CS? (1)

## DarthChris (960471) | more than 7 years ago | (#16850846)

Before I came to Uni, I was considering doing a joint honours Maths & CS degree. I was advised against it by my A-Level (UK qualification; normally taking ages 16-18) computing teacher, who said that by doing just maths I'd actually end up being a better programmer. If I compare stuff I've written recently, with stuff I did for A-level projects, I'd say this is true - and there was a good year and a half gap where I wasn't programming

anything, so the improvement is not just experience.I think this is the case because, as is so often pointed out, the logic behind mathematics and programming is the same. Maths forces you to learn the logic, whereas CS tends to teach you factual details on how it works etc.

So, what maths modules should be part of a CS degree? It depends on what you want to do with your degree. I would imagine Linear Algebra, Discrete and Logic (at least Propositional, possibly Predicate) to be good in general.## Re:Why do CS? (4, Informative)

## Opportunist (166417) | more than 7 years ago | (#16850916)

What I did get taught was how to write good code. How to make use of binary trees and how to optimize algorithms. How to plan software projects and what problems to expect. How to plan, lay down and manage a network.

As a low level SysAdmin, you certainly won't need a degree to figure out a subnet mask for a single router lan. But networks don't simply scale, they tend to get very tricky and complicated as soon as you have a few layers of routing between them. Not to mention that you won't be able to even plan such a network sensibly if you don't know the theory behind it, how to streamline it and what happens "inside". And yes, that's where the math comes in.

A good university education will give you a heavy dose of theory. And while you won't be able to apply this directly, you will know WHY something works, not just how. And, more important, when it stops working you'll have a clue why it did. And you'll have a plan how to fix it, or at the very least, you'll know where to look.

## Re:Why do CS? (2, Interesting)

## microTodd (240390) | more than 7 years ago | (#16851008)

Compiler developer.

Artificial Intelligence researcher.

Search engine algorithm developer.

I have a Master's in CS. Yes, I agree that at the higher end CS is basically a specialized math degree. But there is that touch of applied math thrown in that separates it from a mathematician or statistician.

Even better, if you pair up a CS degree with something applied (physics, mech engineering, chemistry) you suddenly become someone very valuable to any organization trying to build advanced software. Yes, a biologist could hack out some code to study protein folding, but if you're also a CS guru then you can make a very efficient protein folding algorithm and save zillions of computing hours.

## Activate PUN! (1)

## Lord Bitman (95493) | more than 7 years ago | (#16850398)

PUN Complete!

## Re:Activate PUN! (1)

## Opportunist (166417) | more than 7 years ago | (#16850954)

In their eyes, we're God!

## Basic math skills ... (-1, Troll)

## tomhudson (43916) | more than 7 years ago | (#16850424)

Basic math skills. I mean, come on, if you can't see that a result is obviously off by several orders of magnitude ("gee ... what's magnitude?") by having a rough idea of the desired result in your head ...

And learning the difference between kilometers and miles wouldn't hurt ... Earth to Mars ... oops, missed the damn planet!

And joke theory - for example, "If it takes 3 minutes to cook 1 3-minute egg, how many minutes does it take to cook 3 3-minute eggs?" If you can't see the direct relationship between this question and scheduling several activities that involve waiting on a device or service in parallel, you're in the wrong field.

Some basic reading and writing skills wouldn't hurt, either ("OMG I don't want to write any documentation ... the code is the documentation!" ... 6 day/weeks/months later ... "I haven't got a clue how this works. Who wrote this piece of shit? Me? Oops ...")

## Re:Basic math skills ... (1)

## l33td00d42 (873726) | more than 7 years ago | (#16850748)

## Re:Basic math skills ... (1)

## tomhudson (43916) | more than 7 years ago | (#16850818)

The article you quote bears me out ... it was an error in failing to do a conversion between standard and metric units.

Teach them not to use the good old "hogsheads to the furlong" measuring system. The excuses don't wash. Neither the "1 solar panel" nor the "not using ground tracking" were "unforseen events". They screwed up. Specifically:

Note my original post, where I said that one of the problems is people not being able to recognize errors that are one or more magnitudes in size from the correct answer ...

## Re:Basic math skills ... (0)

## Anonymous Coward | more than 7 years ago | (#16852124)

So tell me Tom, how's the Canadian space program? Oops, that's right, you've got to ride shotgun with the US since you don't really have one eh?

Right about now is when you should trot out the argument about how the US stole the Avro Arrow engineers who helped put the US on the moon. Too bad fools like you never seem to mention that they were almost all of UK extraction and immigrants to Canada after WWII and not indigenously developed. Then you can follow up with the work on the shuttle arm for an encore.

## Re:Basic math skills ... (1)

## orasio (188021) | more than 7 years ago | (#16850868)

I have heard that this joke works when you are studing for obstetrician, too.

And for eugenetics, too.

## Maybe I just misunderstand CS (2, Interesting)

## A beautiful mind (821714) | more than 7 years ago | (#16850436)

The biggest chunk of it all was 6 semesters of Analysis [wikipedia.org] and 4 of numerical analysis [wikipedia.org] .

I was also told that only two other professions get slightly more maths: "applied mathematicians" and physicists.

Am I wrong to assume that CS education is much more maths based in the EU than in the USA?

## Re:Maybe I just misunderstand CS (1)

## drawfour (791912) | more than 7 years ago | (#16850518)

## Re:Maybe I just misunderstand CS (0)

## Anonymous Coward | more than 7 years ago | (#16850576)

## Re:Maybe I just misunderstand CS (1)

## Sage Gaspar (688563) | more than 7 years ago | (#16850788)

## Re:Maybe I just misunderstand CS (1)

## A beautiful mind (821714) | more than 7 years ago | (#16850812)

## Re:Maybe I just misunderstand CS (1)

## Opportunist (166417) | more than 7 years ago | (#16850994)

## Re:Maybe I just misunderstand CS (1)

## Teancum (67324) | more than 7 years ago | (#16851572)

I believe that largly due to this early emphasis on mathmatics, it has skewed the emphasis by some of those professors to more pure mathmatics concepts. While not bad by itself, I did find it boring after a fashion when one of these professors would get caught up with making a mathmatical proof of some CS theory.... particularly when you were in a class like compilers or data algorithms that had little to do with very abstract mathmatical proofs. Those younger professors who had a PhD in CS and spent time working "in the industry" tended to be much more grounded on coding fundimentals and teaching finite number theory instead.

For myself, while I think advanced mathmatics may have usefulness for hardcore

computer science, that is the study of computer algorithms and computational theory, it doesn't have much of a practical application.Of course I view myself as a software engineer seeking practical development of computer algorithms as opposed to a computer scientist that explores theoretical directions of computational concepts. In this regard, I consider software engineers to be very different from computer scientist.

Or more to the point, I think there ought to be a ratio of about 1 computer scientist to about 50 software engineers. Unfortunately, it is presumed that you would get a CS degree if you want to become a computer programmer. But if your school doesn't offer a software engineering degree (very, very rare) you are trained as a computer scientist first and a software engineer maybe as a supplimentary (sometimes optional) course.

## Personally, (1)

## cpux (970708) | more than 7 years ago | (#16850526)

## Formal grammar, predicate calculus, statistics (2, Interesting)

## Twylite (234238) | more than 7 years ago | (#16850540)

Start by making sure you understand the distinction between Computer Science and its related disciplines, and that this is a CS course. Read the overview report from the ACM Curricula Recommendations. [acm.org] .

It is apparent from the ACM's recommendations (amongst others) that a lot of mathematics traditionally covered at universities(such as calculus) is not strongly related to Computer Science. That said, there are many applications of computing that require strong skills in these areas (scientific computing and cryptography for example) so they are not a bad

option.Important numerical and logical fundamentals that support the learning and use of undergraduate Computer Science include:

## Re:Formal grammar, predicate calculus, statistics (1)

## Morphine007 (207082) | more than 7 years ago | (#16850976)

I'd have to agree with the beginning of your post: Calculus isn't all that useful to a CS major. Don't get me wrong, calculus is useful in and of itself, but since computers can't do integrals or derivatives, it's kinda useless. Calculus combined with something like numerical methods, which teach you how to use various methods of approximation and interpolation to get a computer to understand calculus...well... that's a different story. Even then though, I don't tend to use calc or numerical methods for much. Algebra and Galois Fields tend to be the maths I use the most. GFs are especially nice for crypto since GF(2^8) and the operations that are closed over it represent everything you can do to a byte...

Mind you, I'm mostly interested in ai and crypto. Crypto is mostly a hobby, but for ai having a rock solid understanding of lin alg helps in performing things like computer vision (lin alg for the pixel manipulations, trig ftw for the angular calculations), path planning (okay, some calc, but mostly lin alg as we're, again, approximating a continuous curve over a discrete space, so it's summations instead of integrals) motion prediction (same as last) ... etc...

So again, I'd have to say, Algebra is the math that a CS major should be the strongest in. The formal languages, automata, graph theory, etc... is all fairly standard CS stuff. None of it is as much a cornerstone of good coding as lin alg IMHO, but they're all really really nice to have sometimes.

As for the rest of your post, it's pretty obvious that your experience has been with parsers and compilers (or something similar), in which case, the rest of your post is 100% true. However, for my corner of the CS world (ai and robotics) lin alg and trig are t3h sh!t... followed by probs/stats (for stochastic modelling/simulations)....

I guess a "YMMV" belongs at the end of each post in this topic as everyone needs different math tools based on what they're working with.

This should provide a bit of an answer to both the OP and the people asking "what do you need maths for if you're going to be a sysadmin?" (You're either trolling or confused as to what CS guys actually do, so I'll give the benefit of the doubt to you and shed some more insight into what some of us do...)

## Re:Formal grammar, predicate calculus, statistics (1)

## Twylite (234238) | more than 7 years ago | (#16852230)

I have worked with parsers and compilers in the past, but most of my time now is working with crypto ;) That said, I'm an SE by practice although a CS by qualification.

In my line of work SE and CS come together when I get to protocols and algorithms. Formal grammars are essential in describing protocols (think BNF) and modeling for robustness. As an example, getting FIPS certification for crypto hardware requires submitting a finite state model of the firmware.

I have a poor grounding in graph theory and linear algebra (I just apply the crypto algorithms) but have found it useful in optimisation of algorithms.

Statistics, IMHO, is the bridge between theory and reality when it comes to performance. A constant time algorithm can really suck if the constant is large enough ;) Sometimes it is better to use a slow-but-simple algorithm (easy to develop, debug & maintain) and optimise special but common cases, rather than using a complex but higher performance algorithm. Statistics can help you to understand the performance bounds of the application, how it will scale in the real world, etc. It also helps you to understand how numbers can lie, and the difference between good sampling and bad sampling (this microbenchmarks).

...but then CS isn't about good coding, it's about taking over the world (y'know, "science"). IMHO there is nothing better for good coding than to slow down, do a tiny thing at a time, and wonder what path execution will follow when your assumptions are wrong.

## DSP (maybe I'm a bit biased) (1)

## Matt_Bennett (79107) | more than 7 years ago | (#16850660)

There are lots of electrical engineers forced into programming because the Computer Science guys just don't have the math background- and what we often end up with is pretty poorly done code because the coursework behind the engineering degree is lots of math and relatively little code. What I'd really like to see is a combination of better code and better systems to run that code.

## Re:DSP (maybe I'm a bit biased) (1)

## TeknoHog (164938) | more than 7 years ago | (#16851250)

## What do you want to do with your degree? (1)

## Sage Gaspar (688563) | more than 7 years ago | (#16850696)

If you want to go onto grad school, double major in math and take everything you can. Electives and even core requirements probably have heavy overlap. It tends to be one of the easiest combinations in terms of course load. Also consider testing out a fall semester grad class or two in your senior year. These will probably look a lot like math classes. If you can't hack an undergrad math degree, odds are very good that the graduate CS program will kill you.

I have to confess that I have limited experience in computer science myself, but I've seen a couple uses for various areas of mathematics.

I was doing an optimization problem where I was trying to find the maximal distance apart of two points on a given surface along the surface itself. To begin with, in these kinds of optimization problems you want to know when you've found the answer and what kind of accuracy you have. To answer those questions you're going to need estimates and approximations, things that you learn in analysis. If your calculation is of critical importance, you don't want to just eyeball something, you want to know that you've got an answer with the appropriate accuracy.

The surface was basically defined in two different pieces glued together along their boundaries. I needed to calculate lengths along these boundaries where they were joined together. To calculate these lengths explicitly was literally impossible given the types of curves, and I ended up with an integral equation I couldn't resolve. So I used a combination of approximations for the values of the integrals and something like Newton's method from calculus to get a quickly converging answer to a problem that ground Maple to a halt when I tried the naive solution of just plugging it in.

If you're sampling data and using it to estimate the behavior of something, say a flow (like the movement of the wind or a river), you're going to want to know how accurate your data needs to be for your model to produce good results. This is a question in dynamical systems. Granted, this analysis may not be performed by the CS guy, but being able to do this sort of thing combined with having a good knowledge of computers opens a lot of exciting possibilities in science.

Similarly, in robotics, the configuration space of things like different joints on robot arms is a multi-dimensional surface, an object that is studied in differential geometry and topology. Using methods from calculus you can find the critical points in the configuration space, which it is generally a Good Idea to avoid (like a robot with its arm extended straight out) because of the fragility of the tolerance there (again, back to dynamics).

If you have a recursion, there are some fairly standard tricks you can try to apply to obtain a generating function, which can often lead to an easier computation or even a closed-form solution. There is a free text available on the internet, generatingfunctionology, which could be used as the basis for an independent study.

Things like encryption algorithms have found good uses for number theory. Graph theory can model relations between data or routes over a network. Statistics and probability are very useful for all sorts of things. Straight-up algebra and logic courses are great tools to get your mind working, though admittedly a lot of topics in your standard undergrad algebra course might be of limited use unless you're planning on pursuing a graduate degree. DEs and their solutions are great for most scientific applications. Discrete Math is usually the name they give to the mathematics course that is tailored towards computer science applications, so that's almost a no-brainer.

## Statistics and Experimental Design (2, Insightful)

## DoofusOfDeath (636671) | more than 7 years ago | (#16850716)

Here's why...

When starting on my PhD research, I pretty naively thought I'd just write a network simulator to try out my idea and to compare its performance to other network protocols. That would be fairly acceptable in today's CS climate, but STUPID.

People using simulators face a number of questions that they often don't ask, and therefore make their conclusions nearly meaningless. Are there specific hypotheses they're trying to test? How do they know they've performed enough simulation runs to draw conclusions at an acceptable confidence level? Exactly what is the distribution over which the inputs are randomized, and why was distribution chosen? To what extent is the model even validated (ok, this is more of a Modeling and Simulation issue than a stats issue)?

Psych and biology majors have been forced to rigorously answer these questions for a long time. We, the supposedly "mathematically superior" CS majors, have often ignored these details as though they're irrelevant. But if left un-tackled, we can produce crap research whose conclusions have little clear connection to reality. These is even true for when we can afford to do real-world tests and thus are less at the mercy of simulation model inaccuracies. How many real-world tests do we perform before we draw our conclusions? How do we randomize the inputs?

Much of today's network-related research sucks. Not because the ideas being generated are bad, but because the analysis of the new ideas and their comparison to the performance of pre-existing ideas is crap. Without taking stats and experimental design courses, even the reviewers of these papers don't realize that those weaknesses exist.

If you want your network research to be meaningful, test your ideas with meaningful experiments and analysis.

## Lots (2, Informative)

## ggKimmieGal (982958) | more than 7 years ago | (#16850856)

## Basic math skills (0)

## Anonymous Coward | more than 7 years ago | (#16850906)

Dork + No Shower = Typical Programmer

Typical Programmer + Fat + Slob = Slashdot Reader

## How about (0)

## Anonymous Coward | more than 7 years ago | (#16850912)

## All Major Mathematics Courses Should Be Taught (1)

## avapex (1003914) | more than 7 years ago | (#16850924)

I think the most important are the following:

Discrete mathematics, otherwise finite mathematics should be taught because it is the best way to represent a finite machine. A computer is a finite machine with many countable sets.

Calculus is great for computer science. Students who take calculus develop strong problem solving skills. Multivariable calculus should be optionally taught to those who want to design 3D games.

Statistics and probability theory should be taught. Statistics is used to analyze, interpret and present data. Computers are used to perform calculations on data. The combination of statistics and computers facilitate decisions in all areas of science, business and government.

## Math courses (2, Informative)

## ShorePiper82 (1027534) | more than 7 years ago | (#16850942)

## Life, not CS (1)

## cucucu (953756) | more than 7 years ago | (#16851094)

amazingpiece of math is Cantor's diagonal argument [wikipedia.org] . So simple, so beautiful, so insightfull. And such a strong conclusion: infinite comes in many sizes. It's 10 years since I been first exposed to the proof and I am still filled with joy when I contemplate the simplicity and power of its truth.## Graphics Guy (1)

## WilyCoder (736280) | more than 7 years ago | (#16851186)

To contribute to the topic, here is what I took:

Calculus 1-3 (3 was most important for me since it was about 3D analytical geometry)

Differential Equations

Discrete I (combinatorics), Discrete II (Finite Automata & Language Theory)

What I wish I had taken:

Linear algebra (matrix stuff)

Numerical Analysis SOMETHING THAT TAUGHT QUATERNIONS!!!!

## All of them. (1)

## Metasquares (555685) | more than 7 years ago | (#16851260)

## According to Ron Graham and Donald Knuth (2, Interesting)

## robkill (259732) | more than 7 years ago | (#16851342)

Concrete Mathematics [amazon.com]

## 3 words... (3, Insightful)

## RingDev (879105) | more than 7 years ago | (#16851438)

Algebra, geometry, calc, who cares. It's the Proofs that make math apply to Comp Sci. Having obscure formulas memorized means squat. But being able to look at a problem and break it down into the most simple of building blocks, that is a critical skill.

-Rick

## The useful maths I took back in the day... (1)

## Dammital (220641) | more than 7 years ago | (#16851610)

Oh, and some of my pals recommended formal logic. I skipped that, 'cause I wasn't terribly interested in spending a semester playing word games. I don't think I've ever missed it, but someone else who actually took the class might straighten me out here.

Bar none, the best math class I ever took was a freshman seminar with no textbook, no lecture, no assignments and no exams. You were graded 100% on class participation, and the topic was... math. The prof stood off to the side and would start the conversation: "How many integers are there?" might be a typical query. He'd sit back while we discussed the matter in Socratic fashion, sometimes nudging us in a particular direction. That semester we "invented" limits, cardinalities, discontinuous functions and other groovy things. I doubt that this particular class had much direct application in my professional life, but it was the first

funmath I'd ever done in my short life.## At my university... (1)

## mmortal03 (607958) | more than 7 years ago | (#16851618)

From what I have been told, multiple semesters of Numerical Analysis used to be required. I don't know why it was changed. Maybe they thought it was overkill for an undergraduate?

I have heard good arguments for placing Linear Algebra above Calculus in importance in today's digital world, however, it looks like Calculus is still what is being required for a full year.

I personally would like to be able to fit in some sort of Computer Statistical Analysis/Computational Statistics course before I graduate (I am a Software Engineering student, not a Computer Science major, and interested in sports statistics) but I doubt I'll be able to. There is just too much material to cover these days in an undergraduate Engineering curriculum, especially if you, like me, switched your major at some point. I hear that probability theory is a good one to take if you are interested in getting a job in some sort of prediction-based industry.

It seems like there are never too many possibly useful math classes one can take. I'd like to know myself which ones are the most practical, by their industrial application, however.

## Prob and Stat (1)

## Mycroft_514 (701676) | more than 7 years ago | (#16851628)

Even the micros today are going to parallel processors. Calculas? Haven't touched it in 25+ years in the business world of CS.

The other course that was useful was data structures. Tought me to think in linked lists. In one case it taught me to look at the problem from the link point of view. So the process I was on was codeable in 4n lookups, instead of n! + 3n lookups!

Oh, and to all the doubters there. When calculating the processing power of multiple processors, don't forget to subtract off the OS on each processors. Most venders won't tell you about that little probelm when calculating the machine size.

## My most useful classes (1)

## greg1104 (461138) | more than 7 years ago | (#16851650)

Out of the required math classes, two stood out as being particularly helpful for my career in software development. The introductions to logic, graph theory, proof, and other topics in the discrete math course were absolutely vital to understanding more complicated computer science constructs. I recall trying to understand how compilers were built before that time and being completely confused, but everything made perfect sense after completing that class.

The other class was in operations research, a subject I didn't notice anyone bringing up here yet. OR really made an impression on me as it provided a bridge for how to apply several types of mathematical approaches that had seemed completely theoretical to solving the kinds of real-world problems computers are good at helping with. As the most obvious example, I feel that having a solid

practicalunderstanding of how to model a complicated queue or flow across a series of queues is wildly more useful for building software than anything related to big-O analysis will ever be, unless you're one of the rare people writing basic algorithm libraries. My experience is that you'll see dozens of messaging queue issues in business software design for every problem that requires an understanding of complexity analysis. And learning how formally construct decision trees turns into a great tool when you get far enough along that you're managing projects instead of just working on them. I considered it unfortunate that I didn't discover this class of mathematics until very late into my time at school, as I would have gladly taken more of it and benefitted from--something I can't say about statistics or linear algebra, where I felt the basic introduction gave sufficient understanding for normal programming tasks.## Crypto (1)

## Halo- (175936) | more than 7 years ago | (#16851840)

Suddenly I was good at math. Not only that, but I got a whole lot better at computer science. The more advanced classes focus more on how to think logically, and how to operate in procedures. Cryptology is especially important because it is one of those items which most computer scientists will use, but only in passing, and using it badly is often worse than not using it at all. An understanding of cryptology brings with it a lots of logic, set theory, and optimization skills.

## I would hope (1)

## EFGearman (245715) | more than 7 years ago | (#16851984)

At least one, I rewrote the whole thing, because not only did the other coder have the wrong logic in place to try and solve what he wanted to solve, it was also ordered very poorly.

At least one class on probability and statistics would be good, vector math/algebra, a topology course (ok I took that and oddly it helps), trigonometry if going into graphics processing/modeling, and a number of other courses I took but can't remember. The only thing I haven't used in the last year, the rest of the above I have, is some of the higher level calculus.

## Double! (0)

## Anonymous Coward | more than 7 years ago | (#16852066)

I can't speak for the entirety of the technical industry, but I feel pretty comfortable with the following statement: anyone who considers herself a professional Computer Scientist would most likely have benefited from a double major in an appropriate field: stats, math, physics, chemistry, engineering (probably won't have time for one of these), biology, meteorology, oceanography or philosophy. I listed here the subjects with strong analytical or computational components.

A CS degree is always better in a double major.

## Numerical Analysis (1)

## JohnWiney (656829) | more than 7 years ago | (#16852156)