In what areas of programming is a knowledge of mathematics helpful?

Viewed 4207

For example, math logic, graph theory.

Everyone around tells me that math is necessary for programmer. I saw a lot of threads where people say that they used linear algebra and some other math, but no one described concrete cases when they used it.

I know that there are similar threads, but I couldn't see any description of such a case.

38 Answers

Machine Vision or Computer Vision requires a thorough knowledge of probability and statistics. Object detection/recognition and many supervised segmentation techniques are based on Bayesian inference. Heavy on linear algebra too.

If you know your math you can use it in many places witch aren't obvious, even advanced math.

Story: A few years back a friend of mine asked me to write an application which would create a photo-mosaic (it was in a time when we couldn't find any free ones, I'm not sure if they were downloadable back than). It took only two days in Delphi, but only because the idea could be easily reduced to a Topological problem. Topology is a rather abstract part of mathematics which among other things are interested in metrics - functions which define a distance between elements of sets/spaces.

So quickly dividing the pictures into, if i remember, 10x6 squares, and measuring the average brightness of each of them, i got, simplifying a bit, arrays like [0,4,5,2,...] which can be treated like vectors. And when you think about the photo-mosaic, you want the vector of the small picture to be as close to the vector of the part of a picture as it can. The only question was finding a nice metric - a nice function that would tell when two pictures did actually look-alike. But the whole algorithm took less than an hour to write down, and after that it was mostly playing with the metric function.

Related