4

What areas of math are prerequisite for learning algorithms?

QuantumMechanic
  • 13,795
  • 4
  • 45
  • 66
  • The more math the know, the better off you are, but none of it is a prerequisite. More to the point, this is not an appropriate question for SO. – PengOne Jan 12 '12 at 23:05
  • Which algorithm? A bubble sort, probably nothing. Calculating the Nth prime number without a loop, probably college calculus.. – Mike Christensen Jan 12 '12 at 23:06
  • I dunno if it's possible, but if so I'm thinking it would take a PhD in math :) – Mike Christensen Jan 12 '12 at 23:13
  • Yea I'd agree with the other feedback here. Math is good, more math is better especially if you want a deep understanding of how things work. Depends how far you want to go; like video game engines have all sorts of advanced math. – Mike Christensen Jan 12 '12 at 23:24
  • 3
    Sequences, series, limits, and proof by induction are key parts of a math education for doing algorithmic analysis. Those are topics covered in a typical high school pre-calculus class or perhaps an advanced algebra class in college. – Adrian McCarthy Jan 13 '12 at 00:02

2 Answers2

6

I guess it depends a lot about the kind of algorithm you want to use and how deeply you want to understand them.

  • The understand of the usual basic data structures needs almost no math background.

  • Most of the graphical algorithms requires knowledge of trigonometry and spatial geometry.

  • Algorithms about physics engine are easier to understand if you have some physics basis

  • If you want your program to help you to take decisions, you might need to study operational research which is a really huge sub-fields of math which includes graph theory, game theory, optimisation (which then includes analysis and linera albegra)

In any case, having a logic/mathematical mind obviously helps a lot for the understanding and to check/prove that your code can/cannot work.

SylvainD
  • 1,743
  • 1
  • 11
  • 27
2

If you're talking about simple programming you don't really need a lot of math. At this level, your problem solving and logic abilities are more important, but it's necessary that you get instructed in the basics of problem solving by using flow charts and process planing.

In the other side, math is known to improve your abilities and in some areas you would need to know math to achieve the expected results. For example, to create an animation engine knowing linear algebra is more than useful, so its physics.

Edward B
  • 136
  • 6