Slashdot Mirror


What Math do You Use?

e_lehman asks: "I've been associated with MIT's introductory 'Mathematics for Computer Science' course for a number of years. The course has emphasized different topics in different years: logical foundations, proofs, probability, combinatorics, etc. But this is at the whim of instructors. What mathematical topics should we be teaching to budding computer scientists? What mathematics do you actually use or need, working in the computer industry? Here are some candidates: boolean logic, graphs, number theory, combinatorics, proofs, set theory, relations and functions, approximation methods, solving recurrences, generating functions, analysis of state machines, asymptotic analysis, and addition of small integers."

22 of 102 comments (clear)

  1. Useful by rastachops · · Score: 2, Insightful

    A solid grounding in maths is always good. When pushed far enough it caus you to develop different thinking patterns that address problems in new ways. Which are always useful for any problems.

  2. Analysis by prisonernumber7 · · Score: 4, Interesting

    If a CS student is to ever make something useful out of his maths, you should be teaching him analysis:

    - Logic
    - How to set up proofs
    - Full induction
    - Rows (pardon me if this is not the correct english word, something like Sum[v=0,eternity] of 1/v!).
    - Functions (differential, integral)
    - Differential Equations
    - Function theory

    ... and so on.

    Basically anything that will teach them what maths is really about and give them the ability to get along with maths in a scientific way on their own.

    --
    && aemula C. ab stirpe interiit
    1. Re:Analysis by KDan · · Score: 2, Informative

      - Rows (pardon me if this is not the correct english word, something like Sum[v=0,eternity] of 1/v!).

      Series (and summation of series)?

      Daniel

      --
      Carpe Diem
    2. Re:Analysis by Anonymous Coward · · Score: 2, Insightful

      Are you, perchance, a mathematician? Your answer seems to contain the classical mathematical assumption that analysis is the elixir of the gods from whence all other mathematics sprang forth.

      Granted, in most university undergraduate programs we choose real analysis as the place to start teaching "real mathematics" (instead of: insert integral/matrix/etc., turn crank, get output)... but this does not, to me, make analysis intrinsically fundamental. Of course, if you're going to go on to learn things like general topology... then it *is* important... but I do not believe topology is a field of principal importance for computer scientists (yet...).

      The fundamental problem with your assertion is that analysis deals with real numbers. Theoretical computer science is all about *discrete* sets. In fact, if you give me a computer with just a single register that can hold a real number... I can easily show that computer to be capable of computing non-computable (in the sense of the Church-Turing thesis) functions.

      Studying real numbers simply doesn't make sense for computer scientists (at least to start) when the domain in which they will be working is inherently discrete.

      I *heartily* agree that they should see:- Logic, How to set up proofs and Full induction. These are absolutely fundamental.

      However, why teach them about real-valued functions? No computer, nor any reasonable model of computation, can work with real numbers... why take time to develop an inapplicable theory? What would be much more relevant would be to teach the theory of recursive functions... primitive recursion, total and partial recursive functions... *these* are directly applicable to the world of computation.

      Personally, I see fundamental mathematics for computer scientists as being: set theory (preferably axiomatic), logic, combinatorics, some abstract algebra, recursive function theory, formal language theory, automata theory and formal semantics. I think those alone would overburden a modern cirriculum... but then I am of the mind that computer *science* is mathematics... as opposed to the vast majority of my colleauges who seem hell-bent on turning CS into a tradeschool for Visual Basic programmers.

      Still, to be fair to you, I would be overjoyed to see Computer Science programs start requiring a course in analysis. Not so much for the content, but for the exposure to mathematical rigour... something which is sadly in extremely short supply in modern CS cirricula.

    3. Re:Analysis by Ruie · · Score: 2, Insightful
      I would suggest "Foundations of mathematics and logic".

      This has several goals/reasons:
      • teach students the notion of proofs and how to make them. This is very useful for writing correct code ;)

      • expose students to manual computation - this has a different flavor from automated computation and thus you avoid the problem of students being accustomed to some methods so much that they don't stop to think why certain things are done one way and not the other.

      • teach students logic, Godel's theorem is a nice place to discuss difference between human and computer approach to solving problems

      • prepare students for courses on compiler construction, etc..

      • show how to make integers out of sets, rationals out of integers, etc.

      • this course is self contained and thus bypasses the issue of woefully unadequate background of most US students
  3. Jobs aren't the whole story by Scarblac · · Score: 4, Insightful

    I believe that Computer Science != Software Engineering. The job I actually ended up in is a programming job, which means that not all the CS I had is relevant. But that is good - they aren't meant to be the same thing.

    For instance, in CS, to calculate the time efficiency of some algorithm, some really hairy analysis may be needed to decide it's actually O(n log log n). This is important as a part of CS. What is important for CS is not defined by what is important for getting a programming job. The science is important for its own sake, as a branch of math.

    That said, logic, sets, graphs, relations, discrete algebra - the "discrete stuff" so to say, is both what I like best and what I think is central to CS.

    --
    I believe posters are recognized by their sig. So I made one.
    1. Re:Jobs aren't the whole story by Gerry+Gleason · · Score: 2, Informative
      While the theoretical core of CS is not typically of day-to-day value in most industry jobs, a solid background in the fundamentals is part of what makes you a professional and more than a hacker finding things out by trial and error. You don't have to be able to prove things about computability with Turing machines, but you'd better understand the implications of this stuff in terms of what can be computed in a reasonable time (or at all). The bottom line is, it depends on the specifics of your work (job); if you stick to programming and development vs. doing more systems and network engineering jobs, you are going to use a different knowledge set. Of course, the broader your foundation knowledge, the better you will be at the "big picture" stuff, and the more you will be able to function as a system designer and architect.

      So, yes, all the "discrete stuff", as you say, but I view these more as the basic tool box for a programmer, and most people who are cut out for this work will pick up what they need in this area without a lot of formal training. The main reason to go deeper with this area is for a better understanding of cryptology and related stuff, and if you are getting into the "guts" of runtimes and garbage collectors, a more formal understanding of these ideas will be important, but I would say that the "Formal Languages" sutff is more important to programming work.

      We create new "languages" all the time in the course of our work, so knowing what can be recognized and parsed with regular expressions (and the equiv. finite state automatons) vs. context free grammers helps when trying to specify something that is consistent and unambiguous.

      I would also say that the math core (18.01-03 in my day, calculus through differential equations) isn't really essential to much, but probablity and statistics is a lot more important. I would also say that I didn't get much in my formal training that covered the topics important to analysing systems performance. I'm talking about the areas relating to latency vs bandwidth and throughput.

      In retrospect, the "Computational Structures" course (6.032 in my day, which became 6.003 after I took it but before I graduated) lost it's relevance very quickly, or maybe I just forgot what I learned in this course. This was before the emergence of RISC architectures, and there has been enormous change in these areas since then, and I expect this to continue and maybe even intesify in the near future, so I would put more emphasis on these areas. IMHO, one of the main reasons that a lot of interesting new architectures fail (e.g. the connection machine) is that we don't have the basic mental and programming tools to deal with non-vonneuman architectures. Well, this really goes way beyond anything you can address with a course of study, but it would help.

    2. Re:Jobs aren't the whole story by sql*kitten · · Score: 2, Informative

      That said, logic, sets, graphs, relations, discrete algebra - the "discrete stuff" so to say, is both what I like best and what I think is central to CS

      Algebra, set theory (including relational algebra and relational calculus), Boolean algebra, statistics, matrix operations, linear programming.

      I've never had to use PDEs, Tensor stuff or even induction since graduating. Of course it depends what sort of programming you want to do. Systems programmers don't it, but an applications programmer in the engineering industry might well do.

  4. Too far! by Anonymous Coward · · Score: 2, Funny
    addition of small integers

    I know it is supposed to be an academic study, but this is just going to be too demanding. Where could you even find people qualified to teach such exotic stuff?

  5. Math is more than just math by Some+Woman · · Score: 3, Insightful

    I think it's less about how much math you will use and more about how math changes the way you approach problems. Exposure to math teaches people to approach problems systematically and logically. You may think that you're never going to use matrices and eigenvalues in The Real World, but math classes are worth more than mere knowledge.

    --
    My dingo ate your honor student.
  6. Maths I Use? by nathanh · · Score: 5, Informative

    Statistics. I strongly wish I had a deeper grasp of statistics in almost everything I do. Finite state automata and directed acyclic graphs may be all the rage in compsci, but if I compreheneded confidence intervals and probability distributions I'd do much better work than I currently do.

  7. FSMs , Graphs, Numerical Analysis by muonzoo · · Score: 4, Insightful
    The three things that have been powerful and useful to be in almost every application have been:
    • Finite State Machines
      Their analysis, NFA to DFA transformation and the applicability of FSMs to most stateful problems
      (protocols, lexical analysis, communications, etc.)
    • Graph Theory
      Use of graph representations for the analysis of many of the same problems mentioned above
    • Numerical Analysis
      Methods for modeling continuous phenomena discretly.
      (Euler Integration, FEA, Meshing, etc.)

    All these thing consistently make my job easier, more interesting and, continue to provide a level of insight to tricky problems (especially the first two) that exceeds simple 'programming'.

    The two most under appreciated courses of all time in Computer Science education have to be the Theory of Computation (FSMs etc) and the Discrete Mathematics (Graphs, Numerical Analysis, etc). An alarming number of new graduates cannot phathom how to apply this stuff. It's powerful and once you start using it, you'll always see things a little bit more ''completely''.
    1. Re:FSMs , Graphs, Numerical Analysis by grammar+nazi · · Score: 2, Insightful
      I'm not sure that I agree with you Muonzoo. I've worked in two very different industries since graduating, and with the exception of general numerical analysis, I haven't used anything that you mention.

      I worked at a large defense contractor and we developed OCR and hand writing recognition software. We used many ideas from controls systems, including FFTs and many image processing algorithms. Finally we placed our own customized (and patented) neural network over the top to categorize the images based on the results of the other algorithms. 99% of the math that I used for this job was either AI related (Neural networks, Support Vector Machines, Simulated annealing) or image/controls related (scale reduction, FFT, filtering, etc).

      Currently, I work in quantitative finance and I study quantitative finance at NYU. Although the program is *very* mathematical, my computer programming has been limited to solving partial differential equations using Finite Differences and Monte Carlo simulations. Although neither of these seems like a very sophisticated numerical method (compared with FEA and Galerkin methods), there is much math involved in tuning the finer points of both methods.

      Finally, I consider Numerical methods something different from understanding the mathematics of computer science. The numerical methods are something that should not be taught in a Mathematics of CS course. The mathematics would be to understand the underlying PDEs that need to be solved or understanding exactly what each image processing algorithm is telling us.

      I believe that finite state macines and graph theory are useful in computer science from the professor's viewpoint, but when it comes to a practitioner, modeling/PDEs are most widely used.

      --

      Keeping /. free of grammatical errors for ~5 years.
  8. From a 4th year student by rawgod0122 · · Score: 2, Interesting

    I am a student at the University of Minnesota. I have been working with faculity from the physics and computer science departments on and off over the last 4 years. Most of the math we have been taught is not really used in computer science. You have some analysis of run times and memory requirements, but so far nothing that required higher mathmatics. Differental equations have been the most useful to me. They are used in all kinds of different science and analysis of situations (fiscal models are big on them). From what I have seen undergrad CS is an alright intro to the topic, but you do not get to any of the really interesting stuff(iw you need higher level math) until you hit grad school or start working with researchers. Then it is really dependent on who you are working with. I am currently taking a grad course titled "Intro to Parallel Computing" and the most mathmatics we have used so far is stats to look at an omega network... not really exciting or informative.Good class and learning lots of stuff, but not quite there yet. I really think that most of the mathmatics that the students should learn are dependent on the topics they are being taught. Discrete math is very important, but was not very challenging to most of the students that took it. Mostly the mathmatics that are needed for a paticular topic should be taught in the class the topics are presented in. Think along the lines of self contained courses. I know diversity of ones education is important, but sitting through discrete math was a wasted semester. Sets, unions, intersections, and the pigion hole principel are not that hard to understand... and I can not remember when "proving" something was correct was actually useful. (I read a story about how this researcher proved this very short peice of code correct. Three other researchers found MANY errors for how small the code was.) Proving code may have its place but it is not something 99.9% of us are going to be doing with any frequency. What I would have rather seen is software enginering concepts introduced eailer and the chance to actually USE and explore the ideas presented there. /me is still bitter about the poorly run software eng course he took. It was so bad they are totally changing the course. Anyways: -diff eqs are good -software eng good -discrete math good but we DONT need a whole semester -get involved with your profs it is one of the best thing you can do! -The UMN is a great cs school. They listen to their students, have great instructors (we have many that have worked in industry and know their stuff) and is generaly a good place to be (ignoring the code, you are cuddled up next to your sparc station right?) Ben

  9. Definitely set theory, how about crypto? by BadBrainDay · · Score: 4, Insightful

    Set theory is extremely important in "the real world", especially for developers who write in any kind of query language (and really, what developer hasn't had to do that at some point, think SQL, EJB-QL, etc).

    If every developer had a formal background in set theory, I wouldn't see quite so many bad SELECT statements, misuse of joins, etc. Bad queries can be a huge bottleneck in a DB drive application.

    If I had to pick something else, how about a brief (but mathematical) introduction to cryptography? Public key schemes are easy to learn, and very interesting to the average computer science student. We covered this in one of my first math courses in University, and it interested me enough that I went back to take the dedicated crypto course in later years. The knowledge I gained there has been very useful in settig up servers, evaluating products with crypto, etc.

  10. My experience. by Anonymous Coward · · Score: 2, Funny

    After 40 years using math for EVERYTHING in my day to day life, including my professional life, I'm amazed at what is most useful.

    The fact is that, after all this time, the most useful and frequently used math isn't algebra, or geometry or calculous, or statistics. The amazing thing is that most of the math is on my fingers.

  11. Control theory by Anonymous Coward · · Score: 4, Interesting

    My experiences from work...

    There are all kinds of embedded applications that require a lot more knowledge about resonances, loop gain, bode diagrams, filters, etc. than I got in CS.

    Any sort of feedback loop can oscillate or ring if it's designed improperly, and there's a whole science to designing them properly that I wish I'd studied.

    Any sort of modem (includeing cable, DSL, and radio) requires FFTs and filters. Cepstral analysis seems to be incredibly cool given how often it comes up when breaking audio watermarking schemes, but I don't know much about it.

    Group theory comes up a lot in error-correcting codes.

    3-D graphics requires a solid grounding in linear algebra and trigonometry. (And games these days involves feedback loops of NPCs responding to players and each other - see above.)

  12. Don't forget trig! by TheSHAD0W · · Score: 3, Interesting

    Trigonometry, and its applications to linear equations, are important to anyone doing 3D graphics work. It's surprising how many people can't visualize sine, cosine and tangent functions nowadays.

    In grade school I had one CS teacher want me to help a fellow student animate a sprite-based ferris wheel on the screen; I used a simple loop from 0 to pi/2 in small steps, with sin and cos functions to place 4 cars on the wheel. The teacher was amazed at how smoothly the wheel ran, and didn't seem to understand how it all worked...

  13. Useful for culling the herd? by Glonoinha · · Score: 4, Insightful

    A long time ago, in a galaxy far, far away ... I was admitted to the CS/SE honors program at the Univ of Houston. Had some of it paid for, but finances were not the issue - all Freshman honors students had a mandatory 6 hour 'kick your ass' English / History class designed to weed out the wannabes.

    It worked. Neither English nor History were my strong suits and I wasn't about to subject myself to that kind of hammering when I felt that as a software engineer I should be focusing on other things. I didn't enroll at UofH and went to another University in Texas on a full ride scholarship. No 'freshman destroying' 6 hour English class required.

    Perhaps all the math (more hours of math than the math major, as I recall) wasn't about -knowing- diff'eq, four semesters of Calculus, eight discrete maths, three semesters of statistics, etc ... but it was about -learning- those maths. Face it, Differential Equations, the higher layers of Statistics, the higher thought planes of Calculus - those are all some friggin'eh difficult concepts to grasp. DiffEQ is the Star Trek of math - all I remember about that was taking a very evil math equation and saying 'Ok, we morph this through the time-space continuum and in an alternate universe we use their math to solve an equivalent equation and then we bring it back to our universe by applying the Heisenburg principle ... voila - Solved!'

    Think about it - in the event you actually do work for NASA or the NSA or whatever, do you want your group of peers made up of 6 week wonders with just enough MFC training to develop C code on Windows, or do you want a guy that can learn four chapters of advanced calculus in three weeks? Well I generally learned it overnight because I neglected the 'daily attendance' part of a few courses, but you catch my drift.

    Right knowing that somebody got through college with their BS/CS under the Department of Engineering tells me that they do not know FEA (finite element analysis) but it also tells me that they can learn it in a few weeks. Ditto pretty much any language, or OS, or platform. It tells me that they can optimize a boolean expression in their head and if they don't know the answer to something they know where to find out.

    Hard math in college is good - push em until they break. Then push em some more.

    --
    Glonoinha the MebiByte Slayer
  14. Excellent question! by missing_boy · · Score: 2, Interesting
    This is indeed an excellent question, and I will answer it from my perspective: as a computing phycisist.

    The phycist's approach has changed over the last few decades with the improvements of the personal computer. While there used to be "the theorists" and "the experimentalists", there is now a new group: "the computationalists".

    Phycisists are usually well trained in applied mathematics, calculus, applied PDE's, group theory, linear algebra... you name it, but that's not OUR main problem: we suffer from not being great coders. As a computationalist, I can tell you that many a phycisist will apply brute force and rely on the power of computers to get them the answer by the end of the week, rather than writing elegant, efficient code that might give you the answer in an hour! I suppose this is a little off-topic, but keep on focusing on execution time and algorithms, and spread the good word of computer science to other branches of science. Physics, Chemistry and many of the physical sciences rely on computation, and make huge Beowulf clusters and MPI to do their calculations for them. Perhaps they could save a buck or two, OR get results faster by learning a healthy dose of solid computer science.

    Secondly, I just heard a quote from an unknown source: "There's the right answer and the wrong answer. In modelling, there's the third option: the irrelevant answer". Focus on teaching people what is relevant, and what should be solved by other means than sitting behind a computer.

  15. Quantum Mechanics by JohnFluxx · · Score: 2, Insightful

    The most interesting course I've ever done is Quantum Computing.

    A very interesting but very difficult course.

  16. It depend...... by mpechner · · Score: 2, Interesting

    I've been a generalist for the last 21 years. I've worked multiple indiustries, been everything from architect to team lead, grunt, QA and CM Nazi.

    Most of what I use is boolean algabra. Actually a logic class in the philosophy dept was a killer and helped a lot.

    Anything with word problems. The old junior HS if a train going east.... Or the first semester Calc differential equasions. Anything where a problem is stated and a solution has to be found. anything where you have to get from point A to Point B and show how you got there.

    Set theory is needed.

    The Math learned from "The Dragon" book on compilers was good.

    Being able to do hex/octal/binary math is required with debugging sessions and TCP/IP programming.

    Where a lack of math failed me:

    1. Not knowing graph theory caused me to write a name space browser for Corba naming services the hard way.
    2. Not having the understanding of basic calculus caused me to have some slow learning when I was working with RF engineers in the Cellular industry. Took days to get though certain research papers. I'm one of those CS grads that almost didn't make it becuase of that damn'd second semester of Integrals.
    3. Cartography and the math behind map representations slowed me down at a job.