Page 1 of 1

Computer science and mathematics

Posted: Wed Jul 28, 2004 10:03 am
by Whatever5k
Hi there.
What do you think: in how far is computer science/programming related to mathematics. Is there a relation at all? Do you need to be a good mathematician to be a good programmer?

This is sort of a poll :)

Re:Computer science and mathematics

Posted: Wed Jul 28, 2004 10:30 am
by Adek336
Well, not intending to offend anyone..

There are two sort of people- those who prefer mathemathics, physics, informathics and those who prefer history, art, humanistic sciences.

Well.. I would call the first group "those, who can think logically" and the second.. well. ;)

From this point of view, you need some common sense to be a good programmer, and as mathemathics IS the common sense and ability to think logically, good programmers are mostly good mathematicians.

Once again, I didn't want to offend anyone, only to give a theme for conversation.

Cheers,
Adrian

Re:Computer science and mathematics

Posted: Wed Jul 28, 2004 10:30 am
by Oliver
hmmm, well..I don't really think that you need mathematicks when you're a programmer. Atleast I don't...
I just learn the code of the program and that's all, don't see anything related to maths :P
But hey....that's just like...my opinion ::)

Re:Computer science and mathematics

Posted: Wed Jul 28, 2004 12:31 pm
by AGI1122
Sorry, but math is very important for programming, maybe not for the basics, but when you want to do real stuff with it then your definatly going to have to be pretty decent with math.

Heck even just AGI programming involves math when adding/substracting x/y coordinates and such for placing the animations and other things.

I think there is a very decent ammount of math involved in programming and you would pretty much have to program "hello world" programs to not have to utilize a little bit of math in your programming.

Algebra is probably the most important math skill I use now with programming.

Re:Computer science and mathematics

Posted: Wed Jul 28, 2004 12:33 pm
by Eero Ränik
I don't think you have to know maths for general programming, but things like 3D-programming and physics programming need it. It would be good if you understood things like random numbers. And of course you need to know simple arithmetics.

Re:Computer science and mathematics

Posted: Wed Jul 28, 2004 4:17 pm
by CESS.tk
The more you know about mathematics, the more decent your code will be. Especially what optimising is concerned.

But for programming in AGI, you won't need a lot of maths.

Re:Computer science and mathematics

Posted: Wed Jul 28, 2004 6:18 pm
by Adek336
You don't need a lot of *doing* maths when programming. Only some substracting/multiplying and others.

However, you will need a lot, a real lot of logical thinking, the ability to link thoughts together, think abstract. Each one of these skills is very needed for both programming and mathemathics. If someone is bad at maths, then it is probably bacause he fails at thinking logic.

Well then, yes.. a good programmer will be a good mathematician. A good mathematician will be a good programmer.

Re:Computer science and mathematics

Posted: Thu Jul 29, 2004 6:22 am
by Whatever5k
Ok, I'll tell you my opinion then...:

Actually it is as Adek336 already said:
You will maybe or in many cases not need mathematical operations like substracting, adding and other arithmetic operations, BUT (and this is _very_ important) you will need to think logical. And that's the root of mathematics. Furthermore, as a programmer you intend to write something beautifully, clean, simple and powerful - that's sort of similar to the aims of mathematicians.
So the most important aspect is the ability to think logically. I do not know about AGI programming, but as an OS developer I find myself often in a situation reminding me of mathematics - it is wonderful.

Besides that, most of the people here (at least many) are hobby programmers. Most of them are still at school I think. They are just coding for fun, experiment and similar. Do not feel offended, but their code is most probably a bit ...poor... . Later, when studying computer science or something similar, you will learn how to program beautifully - and you will sometimes even need mathematical operations (especially in physics).

To cut a long story short:

Good mathematicians are good programmers writing beautiful and clean code.
Less good mathematicians are less good programmers writing less beautiful and less clean code.

Let us be honest, mathematics is the mother of all science :)

Re:Computer science and mathematics

Posted: Thu Jul 29, 2004 10:27 am
by Candy
you need basic math for basic programming. You need moderate math for complex programming. You barely, if ever, need complex math.

Basic math: algebra, making formulae for moving objects, falling objects in 2d, collision detection
Moderate math: the stuff for plain and regular 3d games
Complex math, radiosity calculations, complex encryption schemes, decoding/encoding JPEG streams (discrete cosine transforms, still looking for a definition or explanation)

But, there are a couple of programming things you really don't get in normal math.

Same as in proving a certain theory, you have to defend against all possible methods around your proof (IE, make a decent proof). In code, each possible input value must give a decent response. Not just the legal ones, in case of external functions, ALL input values.

Expand that to OS programming, and they don't even only have to give a decent response, but leave all the internal structures intact too, for other programs sake.

If you're good in math, you could well be good at programming. If you're good at programming, you could well be good at math. They are required, but at a different level. To understand complex math, you don't have to know how to make a Doom 3, in coding stuff. To make the doom3 in coding, you don't have to be that good at math, you can get others to do that for you.

Conclusion: People that do one field have a good chance of being good in the other field, but there's no guarantee. There is still a difference. People that want to do math should stick to matlab or sth similar.

Re:Computer science and mathematics

Posted: Wed Aug 25, 2004 1:07 pm
by mystran
I think computing science as a whole is fundamentally applied mathematics. Many of the things that we don't think are really mathematics, have mathematical methods for manipulating things.. most important branch probably being logic, without which no computing scientiest or even programmer can very far. Whather you use formal logic or some adhoc method is another thing, but fundamentally the logic you need exists as a branch of mathematics.

Actually, it's very hard to come up with a CS concept which wasn't really mathematical in nature. Ofcourse there are things like layout and graphics desing, or human computer interaction (or usability) which are more social and artistic in nature, but to build anything concrete with computers, one needs mathematics in some form or another.

When people say that "you don't necessarily need mathematics for programming" they are usually really saying either "you don't need formal mathematics" or "you don't need to be good in traditional branches of mathematics like arithmetics, calculus or geometry." In fact, things like logic, graph-theory, algebras, coalgebras, category theory, weird calculi (including the all so useful lambda-calculus) and such are all fields that I believe are much closer to what is "computing science".

On the other hand, you can get very far with nothing but basic logic (although basic arithmetics is nice too). And I believe that here-in lies the basic difference between "computing science" and "pure mathematics." Where as mathematics as a field of science is usually aiming to build new theories and to prove unproven existing theorems, computing science as an applied science, is fundamentally interested in finding solutions for concrete problems.

Sometimes finding such solutions might benefit from existing mathematical methods. Sometimes it might be beneficial to develop completely new mathematical methods to solve problems that existing models can't accurately model. But for computing science, mathematics is fundamentally just a tool, just like an editor, debugger, UML charts, or design documents. It's often useful, but you can get away without.

Personally, I've found a "love" towards mathematics only through computing science. The great thing about mathematics (as a tool) is that it's fundamentally just a set of symbolic rewriting rules, which means that if you can model a problem as mathematics, and rewrite it (after a few iterations) into a form which you can then understand and use, you don't really need to understand what happened in between the original problem and the solution.

After all, a mathematical proof basicly says that "there exists a series of established rewriting rules from an existing proved theorem or a basic axiom to whatever we want to prove."

For example, to prove that a^0 = 1, we might use the existing rewriting rules (a^x)*(a^y) = a^(x+y). Since a/a = 1, and a/a is the same as (a^1)/(a^1) and 1/(a^1) is a^-1, we can rewrite a/a as a^1*a^-1, and finally a^(1-1) which is a^0. Whether it makes sense to prove that a^0 = 1 after first assuming that (a^x)(a^y)=a^(x+y) is irrelevant here, the point is that what we do is really nothing but rewriting whatever we want to prove with an existing set of rules.

Ofcourse you sometimes need to use some reasoning as well, and sometimes you'd want to contradict what you are trying to prove first, and prove that such a contradiction is not valid, thus validating the original theorem, but fundamentally, this is just a question of applying a negation rewrite.

I believe the reason many people fear mathematics is fundamentally because mathematics in school is usually teached as "a skill" of numeric manipulation (most likely for historic reasons), strictly connected with natural phenomena, while in fact, fundamentally mathematics is about rewriting things so that we can use a model of something to reason about the properties of that model.

Re:Computer science and mathematics

Posted: Thu Sep 09, 2004 7:07 am
by Solar
I believe abless has actually asked two questions without realizing it.
In how far is computer science/programming related to mathematics.
Computer Science - or "Informatik" as it's called here in Germany - has to do lots with mathematics. Not in the meaning of doing calculations, but formal proof, theoretical optimizations etc.

Programming, on the other hand, is a field which is - quite surprisingly to most - more or less unrelated to the "science" of computing. You can spend your whole life as professional programmer, juggling entity relationship models, class inheritances and abstract factories without ever touching "deeper" maths.

Any self-respecting VP of Human Resources knows that the best way to screw up your team is to employ a Computer Scientist and expect him to churn out C++ or Java code.

You have to realize that Computer Science is a science - which has to do with theory, formalism, and research.

Many of those lurking around in this forum actually combine both skill sets, but a sizeable number don't. I, for one, absolutely suck at maths.

Yet still I earn a good living as C++ coder in a major German bank. How come? Easy: Usually the customer specifies any formulas. All I had to do was implementing a function that applies that formula in a way that doesn't yield to floating point over-/underflow, and put that into object-oriented relation to the SOAP server code, database backend and interface logic. If I don't know some mathematical detail, I ask the customer, or look it up at leisure.

Many "geeks" will cry out in dismay, but you can be a Computer Scientist without having ever touched a compiler, and you can be a Programmer without being able to do ad-hoc vector calculations. Combining both helps matters, and puts you at the top of the food chain, but you can get by quite decently by specializing in only one.

Just know what your limits are. CS airheads that think a pretty UML graph is 90% of the software are getting laughed at behind their back. After the groaning quiets down. ;)

Re:Computer science and mathematics

Posted: Fri Sep 10, 2004 10:50 am
by Andrew_Baker
I used programming to pass math class. We'd be given long, tedious algebra homework like polynomials. Once you had solved 10-20, you'd pretty much learned how to solve them all, but our teacher would give us 50 or so... Booooooooooring.

So, I just coded up the problems and put them into a loop until they gave the proper answers.

I have a friend who went one step further and programmed his programmable calculator to provide him with both the answer and the steps to accomplish the answer, so programming actually taught him math...

Re:Computer science and mathematics

Posted: Wed Sep 15, 2004 1:27 am
by kernel_journeyman
You certainly don't need mathematics for everyday programming, only basic arithmetic.

It is not true that being an excellent mathematician makes you an excellent programmer. Programming is a discipline in its own right that takes years to master. (Just to split hairs, inasmuch as you can "master" something which can't be proven to be correct at this time...) It is also absurd to suggest that being a great programmer automatically makes you a great mathematician.

The two ways of thinking are similar, but that is all.