Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Being a electronics engineer, I was never exposed to any algorithms. Now I am a experienced programmer and want to learn Algorithms. I started with CLRS. But I was overwhelmed by the maths in the book. So which are the minimum maths topics should I know before I start Algorithms?

Are there any good tutorials or books on this? I did find one book on maths by Donald Knuth, but i guess its too details and tough for beginners.

share|improve this question

closed as off-topic by gnat, Bart van Ingen Schenau, Simon, MichaelT, GlenH7 Feb 9 at 15:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking career or education advice are off topic on Programmers. They are only meaningful to the asker and do not generate lasting value for the broader programming community. Furthermore, in most cases, any answer is going to be a subjective opinion that may not take into account all the nuances of a (your) particular circumstance." – gnat, Simon, MichaelT
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Blogger Steve Yegge has written at length (it's the only way he knows how) on this topic. –  AakashM Feb 5 at 9:47
    
While Knuths works are hard they do give a good indication of what math skills are useful in algoithm and algorithm analysis. If you want a beast (but also arguably the best) check out Knuths first volume of "The Art of Computer Programming" series. The first 100 or so pages are devoted to the maths. You might want to just peek in and find which topics to explore further, but it really is a good indication. –  MartinHaTh Feb 5 at 15:17

1 Answer 1

up vote 6 down vote accepted

I suggest you narrow down your approach. There are so many algorithms, which are heavily reliant on various mathematical aspects, that you essentially will run into a huge time problem when you try to learn all those things.

Instead, think a little bit more about why you want to learn algorithms. What is it that you want to use them for? What are the problem domains you want to tackle?

For example, let's just consider three almost totally different mathematical branches: discrete and non-discrete mathematics, and stochastics.

Discrete mathematics is very good for programmers, as it can mostly be represented naturally on a machine due to its discrete different states. Major examples in the area of related algorithms are graph algorithms, number theory algoritms, etc.

Non-discrete mathematics is allowing for infinitesimal differences in values, which you cannot track on a machine exactly. Therefore, one abstracts over functions and is interested in finding certain points like maxima, minima, intersection points etc. Algorithms in this area range from the area of operations research, with mostly optimization algorithms, all the way to algorithms of a more geometrical nature, like tesselations.

Stochastics on the other hand deals with randomness, and hence, a whole new world of algorithms is based on that. From simple shotgun approaches to more or less involved random walk algorithms. But the distinction is getting harder here, because you can for example find a lot of randomized algorithms in graph theory and number theory as well.

These are just tiny little examples. There are many more interesting areas in maths, just as well as for algorithms, which do not fit into the above.

So in essence, my answer is that your question is misleading. Unless you want to dedicate your whole life to algorithms, you almost always focus on algorithms in a certain area that is most important to you or your work. Some need next to no mathematical background (f.ex., dynamic programming algorithms), whereas others require you to study a lot of mathematics first (easily seen in computer graphics algorithms). So I suggest you to first decide on the direction you want to go, then learn that part (usually hard enough), and if you find it an intriguing enough subject, you can still expand in any other direction later. But do not try to learn all of mathematics just so you can eventually come around to learning algorithms later. You won't ever get there.

A final piece of advice: if you do not yet have a clear enough understanding of the field of algorithms to make these decisions, it may pay off for you to visit one of the "Introduction to Algorithms" (or similar) lectures offered by any number of universities, books, online courses, etc. It doesn't matter if you understand it all. If you miss the required maths, you can still understand the gist of what sort of problems the algorithm could help you with.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.