Slashdot Mirror


Math And The Computer Science Major

An anonymous reader writes "What sort of math are CS majors expected to take? Why are these classes useful? Does programming really have that much to do with math? Lineman.Net has published an article that answers these questions and more. If you are considering a CS degree, be sure to give it a look and make sure you are taking steps to prepare for your college career."

12 of 1,203 comments (clear)

  1. Certain types of programming... by tcopeland · · Score: 5, Informative

    ...demand more math than others. Artificial intelligence techniques, for example.

    And what the article said about game programming is right on... trying writing even a simple Brickout clone without knowing basic trigonometry and you'll run into problems.

    1. Re:Certain types of programming... by Cheeko · · Score: 4, Informative

      Not to mention ANYTHING involving 3D graphics, uses very large amounts of linear algebra. And as you get more involved, with physics, collision detection, etc, calculus and statistics can come into play heavily as well.

      Dot products and Cross products are your friends :)

    2. Re:Certain types of programming... by Laxitive · · Score: 5, Informative

      Bullshit. He is as cool as he thinks he is.

      Knowing good math.. makes you a better programmer. I would go as far as to say that computer science _is_ math. Knowing how to hook up a DB to a web front-end is not computer-science. It's a trade skill, like plumbing.

      The difference between some web-scripting guy, and a guy who knows CS, is like difference between an automechanic and an automotive engineer. The engineer might not be able to fix your engine, but he understands the workings of it much better than your average mechanic.

      From my perspective, being some random code-monkey is not too different from working at McDonalds. Pay might be better, but the work is still shit. Having a solid CS grounding lets you work in places and on problems that are actually _interesting_ and challenging. It allows you to actually contribute something new to the body of knowledge associated with computation.. or apply it well to some novel field.

      I can pick up and learn a new language or API given a few months. It would take years of focused study for a random PHP programmer to acquire the knowledge I have.

      Not to say that I'm special or anything.. but I've spent 5 years working my ass off to get myself to a proficient level in this area of study.. and most people who want to reach that same level will also have to spend several years doing it. It's just a question of wether you decide to do it early in your life (university), later in your life, or not at all.

      But it's definitely worth it.

      -Laxitive

  2. Nail on the Head by millahtime · · Score: 5, Informative

    I am an engineer working with programmers and one of the biggest issues I have is getting them to implement some of the complex math in their code. Many struggle with it and that is a huge problem.

  3. I recommend by NixterAg · · Score: 4, Informative

    Let's assume that you are well versed in Trig and Algebra (you should have learned them both in HS). Take, at minimum:

    Discrete Mathematics (some call it Applied Mathematics)
    Calculus
    Number Theory (Cryptography)
    Linear Algebra

    I have a CS degree with a math minor and have been completely surprised at how often I've used the math portion of my education in the workplace. I'd recommend taking a good mathematical modeling course as well, as it typically offers a great mix of math, engineering, and CS.

  4. Re:Computer Science != Programming by tonythepony · · Score: 3, Informative

    Exactly. A computer scientist's need for math is much greater than a programmer's. Coputer science is an applied mathematics. When you design an abstract algorithm and you're technical manager wants to be sure that it necessarilly terminates - it helps if you can write a formal proof - even if just for yourself.

    As for what math you should take - at a minimum you should take an intro to advanced mathematics class. You'll learn like the Principle of Mathematical Induction, how to write proofs, some basic set theory stuff, etc.

    Then take another math course depending on your interests. Interested in using fractals for image compression? Take a course in nonlinear dynamic systems. The point is - if your interested in something you can do with computer science, look for a math course that goes through the underlying theory.

  5. Why Math? Because it makes you THINK! by Azzaron · · Score: 3, Informative

    I went through a computer science undergrad which was part of the math faculty. As such, about a third of my courses were in math... not CS, math.

    At first, I thought along the same lines as many of you. Unless I got into some hardcore graphics coding, I never thought I'd use half of what I was learning. And you know what? I was right.

    However, what took me a while to realize is that this conclusion does not make math courses a waste. Those math courses, full of really tough proofs and theorems, tought me how to think. Every single day I use the thought patterns that I learned in my math courses to perform my programming job much better than if I had not been exposed to those math courses.

    Were the math courses hard as hell? Damn straight! Were they worth it? Definitely :)

  6. Because you need it. by Tangurena · · Score: 3, Informative
    I find that the areas folks are starting to notice more (like data mining) are very heavily into math. Data mining is not just about "who is today's terrorist-de-jour" but more useful to solve problems like "who are our best customers and how can we better serve them?" or "can we make our mediocre customers into good customers?" or "where are our customers?" or "what funny things have been going on?" My latest book purchase is Data Engineering, and the math in it is beyond the capabilities of all my coworkers. Fuzzy logic? duh. Neural networks? duh. Support vector machines? duh. Principal component analysis? duh. Kalman filtering? duh. Without a solid background in math, the book is just a $90 paperweight. Maybe in 10 years it will be all componentized for the code monkeys to use. But I am sure they will use it wrong. I still see things like bubblesort appearing in code I have to fix.

    I don't know about your experience, but I find that post bachelor research in CS to be between 5 and 20 years ahead of industry. Some of the research goes no where, but some becomes the bleeding edge, then the mainstream. Like relational databases. Started (or first written up) as a paper in 1969. If you want to see where theory hits programming, check out game development. That is where most of the new technologies first hit development and get used successfully (the game may suck, but it becomes a showcase for some new techniques). Writing code for the TMS320 (a single chip digital signal processor) is an excercise in math: you spend more time modeling the code in Matlab than you do turning the code into C or assembly.

    I am also finding that graphs (not those blasted pie charts) can be useful in solving complicated problems. And some of the tasks to do, can be described with names like traveling salesman problem or minimum spanning tree. One of the first shocks I ever got in a meeting full of programmers was having to spend most of it explaining graphing algorithms and why algorithm X would solve the problem and why the proposed solution in the meeting would be a bad one. It would be hard to correctly, or quickly, solve a minimum spanning tree problem if you could not recognize it, nor understand what the algorithms were trying to solve. Education is about learning to solve problems and recognizing new situations resembling a problem you already know how to solve. Being uneducated is like only having a hammer to solve problems: you can only fix things by bashing them, good for nails, but not a good tool to use to remove screws and bolts.

    It is also fun to explain to the PHB why something he asks for is totally impossible. Usually it is headbangingly painful.
    Him: This number must be absolutely accurate, no rounding is allowed.
    Me: I can write 2 numbers on your notepad here that cannot be represented the way you describe.
    Him: BS, there ain't no such animal.
    Me: (writing) e and pi.
    Him: (scowling).
    I once tried to explain how .1 cannot be represented as a floating point number, but that ended up being a waste of time. Or how, to answer a question he had would require a time machine.

    Our society does not value intelligence, and has been actively disparaging intellectuals for 200+ years. Our country may have been founded by intellectuals, but de Tocqueville pointed out the disparagement of intellectuals back in 1835 in Democracy in America.

  7. well, start with discreet math by underbider · · Score: 3, Informative
    Take a look at this site. It's a good start for computer science majors

    from there, there're cool things like "modern math", and then you should go deep--way deep: two semesters of linear algebra, graph theory, set theory, algebra, real analysis, numerical methods, mathematical logic, ohh, right, and some more calculus... as a computer science graduate student, I'm hating my self for not taking these classes as undergraduate. (well, or for taking them and not remembering too much) It's all very very useful!!

  8. University != Trade School by ph43thon · · Score: 4, Informative

    Or.. well, it should not. A lot of the responses here mirror the main conception I came across while in University. "Everyone" wants to go to University, but they really just want to learn skills easily acquired at a trade school (not that there's anything wrong with that.) Engineering or CS (notice, it isn't called Computer Programming) majors should be embarrassed to be heard complaining about learning theory. How do you think people figure out new applications? There are entire countries full of hungry people who technically, know how to program. How are you better if that's all you know, too? My assumption is that the people complaining about theory simply find it too hard to understand. Though, the complainers are right, in a way, we don't need that many folks graduating from University. They should just be in some tech school. Oh, and the more mathematics you know, the better. How come most people don't get the fact that since math is just a big glob of abstract structures, you can take different parts and apply them to any application you want?

    p

  9. Math for computer scientists by tim1724 · · Score: 3, Informative
    This is a list of the stuff you should learn, which may not exactly match what your school requires. This assumes you've already had a reasonable mathematics foundation in high school (classical algebra, trigonometry, single-variable calculus, etc.)
    • linear algebra
    • graph theory
    • combinatorics
    • logic
    • abstract algebra (very cool, and useful in a surprising number of ways)
    • multi-variable calculus
    • numerical analysis (I found it boring, unlike everything else on this list, but it can end up being useful)
    It's likely that you will have to take courses in subjects such as differential equations (either for your school's requirements, or as prerequisites for some of the above classes), but I don't think they're particularly useful to most people in CS.
    --
    -- Tim Buchheim
  10. Re:Linear Algebra and Calculus by Derkec · · Score: 4, Informative

    Wow, math was anything but the easiest thing on my university schedule. Calc I&II for Engineers were classes they used to weed out students. That said, I really value what I learned.

    Calc I or better yet, a calc heavy Physics I is the kind of class that will alter how you view the world. It's a must. After that, you might not use a ton of the math you learn in university at work. That said, taking classes in how to program mathmatical algorithms greatly helps me do my job and understand how computers work.

    CS students are blessed/cursed with the likelyhood that some of the math that you learn will be from your CS department. It doesn't make matrix multiplication that much more pleasant, but it is interesting to write a simple search engine algorith that matches a terms in a documents to a vector of search terms.

    I disagree with you on stats class. We were allowed to use Excel to do some of the gruelling number crunching for us once we'd done a handful by hand. Now, I can't do any of it by hand from memory but I'm ok with a book. I do understand what they heck is going on with some basic stats work and have a feeling for how to go about doing some vaguely interesting analysis of things I encounter.

    The number one reason to learn advanced math is so that when you sit down in a movie and they've scribbled jibberish across a chalkboard in the background, you can follow what's being done, or at very least recognize the symbols.