Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expanding Programming Capabilities with Better Math

I have come to the realization that sooner or later I'm going to want to build more complex applications that will make better decisions rather just simple if/else statements.

My math background right now is at basic trigonometry, I would like to gain the skills needed to be able to create and understand algorithms.

From what I have researched I would need to understand and learn the following subjects:

  1. Advanced Algebra
  2. Calculus
  3. Discrete Mathematics

This is the conclusion I have come to. Also I was wondering if there is a site where you can practice this type of Mathematics and track your progress.

Thanks.

like image 881
Cavan Biggs Avatar asked Jul 12 '11 09:07

Cavan Biggs


People also ask

How improving your math skills can help in programming?

The ideas that your statements represent need to make sense to be valid. If you apply the same care when you're writing down mathematical statements, you'll catch your mistakes faster. Even better, if you write your mathematical statements in code, you'll have the computer to help check your work.

Does being good at math make you a better programmer?

Although math is important and has been used in the design of computers, not every kind of programmer today needs to be great at math. Unless you are building an application that involves a ton of image, video or audio processing, you don't need to know math at all! Let me explain why that's the case.

Is good math needed for programming?

You don't need to be good at advanced math to become a good software developer. While some fields of programming require you to have extensive knowledge of mathematics (such as game development and machine learning), you don't need advanced math skills for most coding jobs.

How does math relate to programming?

Many programming tasks involve using standard arithmetic, and almost every program that has been written uses addition, subtraction, multiplication, and division. Many computer programmers will run into simple issues that are solved using algebra. A computer science degree necessitates passing numerous math courses.


2 Answers

Let me list off a few areas and why you should learn them:

Algebra/Number Theory: There are a number of number useful theoretic algorithms out there and at some point you may need to use/modify an existing one. Knowing the theory behind why they work makes it significantly easier to memorize them (and rederive them if you happen to forget ;)). The classic of such an algorithm would be the Euclidean algorithm for finding the greatest common divisor of two numbers. More advanced algorithms like quadratic sieve, etc have many uses in cryptography.

Graph Theory: I hope I don't need to explain this one too much. Graphs are used to solve a many many many different problems in computer science. They are used to represent networks, relationships between objects, as well as a huge class of ad-hoc uses. Algorithms include shortest path, network flow, coloring, etc.

Linear Algebra: Again, there are many scientific uses of linear algebra. I think I can safely say that the primary use of linear algebra is to solve systems of equations. Complicated differential equations are solved using linear algebra. Knowing how to multiply huge matrices and solve huge systems of linear equations are at the heart of many computer simulations. More closely related to everyday computing, computer graphics (especially 3D graphics) are all based on linear algebra.

Calculus: This should also be self-explanatory. You won't get very far in doing anything related to math and science without knowing calculus. While the bane of college students, it really is everywhere in modern science.

Probability: There are a number of probabalistic algorithms that rely on probability to do their dirty work. Also simulations may also use randomness and probability to achieve good results. It's not terribly hard to learn the fundamentals of probability which is all you really need.

Statistics: Whether you're writing a program which calculates statistics and does statistical tests or you're using statistics yourself, it is an immensely helpful tool to decipher and interpret information. Really anyone, not just mathematicians and scientists, should at least have a basic handle of statistics.

Numerical Analysis: This is kind of a catch-all. This is what ties the math and the computer science together. Math works well and good on paper, but when you start discretizing and bounding real numbers, you will run into problems. This is what numerical analysis is for. It describes the different numerical problems you may face in running these mathematical algorithms as well as mathematical/computer science tricks you can use to avoid/fix them.

like image 54
tskuzzy Avatar answered Sep 19 '22 05:09

tskuzzy


Although it's a highly subjective question, for which an answer's correctness cannot properly be evaluated, here are a few pointers:

  • Most algorithms require only one branch of mathematics. If you're looking to build algorithms in a certain problem domain, you may not need to learn all these branches. (If you just want to improve for the sake of it, an answer becomes even harder as obviously everything you learn is valuable.)

  • Check the algorithm competition sites. Some of them, like Project Euler, focus mostly on mathematical problems. Others, (TopCoder, ACM ICPC, spoj,...) focus on all kinds of algorithms.

like image 36
Frank Avatar answered Sep 20 '22 05:09

Frank