views:

506

answers:

4
+3  A: 

I have found a very good explanation in Introduction to Algorithms.... but you need some mathematics knowledge to understand it.

The lecture (video) for the Introduction to Algorithms course from MIT regarding the Asymptotic Notation is here.

You've beaten me by 30 seconds. Introduction to Algorithms by Cormen, Leiserson and Rivest is the best intro to general algorithms I know about.
Tomek Szpakowicz
I actually started to read it, it touches what i need, but briefly, and then elaborates on other things.i'll take a loot at that lecture, thanks
bks
The introduction to big O notation is short. But then every algorithm in the book is thoroughly analyzed. So the whole book is full of examples and exercises.
Tomek Szpakowicz
+1  A: 

Introduction to Algorithms by Cormen, Leiserson and Rivest is the best general intro to algorithms I know about.

The Design and Analysis of Computer Algorithms by Aho, Hopcroft and Ullman is also good. But harder to digest as an introductory text than Introduction to Algorithms...

And I love Programming Pearls by Jon Bentley. Everyone should read it.

Tomek Szpakowicz
+1  A: 

I would also recommend following these video lectures from MIT, available at: http://academicearth.org/courses/introduction-to-algorithms .

Good Luck!

Clean
thank you, i will take a look at that
bks
A: 

My first advice to you would be that don't move forward to new topics until you get the Complexity part. As for the text to consult, Introduction to Algorithm by Cormen is a good option. See basically there are three ways to express complexity Big-oh, omega and theta notation. The calculation of complexity for iterative algorithms is pretty simple. Go through any book and practice some examples. For recursive algorithm read Masters theorem. Using this theorem you can easily calculate complexity for most of the recursive questions. Search for masters theorem on net and you will find several good tutorials.You can start from here http://en.wikipedia.org/wiki/Master%5Ftheorem.

Duleb
the problem with Cormen, is, for example, that i mostly see the end result of code analysis, which then is translated to O(n) notation, suck as: T (n) = T (2n/3) + 1, which i know that evantually gives you O(n) = log(n), but i need more elaburation on how to determine that formula (and iterative algorithms formulas) from the code itself. perhaps i'm mistaken and the book DOES contain what i'm looking for, thanks for your answer!
bks
This in an example of recursive algorithm. What i will advice is that first understand how recursion work and then go through masters theorem. Masters theorem has got three cases which solves almost all recursive problems.
Duleb
The master theorem concerns recurrence relations of the form: T(n) = aT(n/b) + f(n)This basically implies that we have broken our problem into a subproblems and each subproblem has a size n/b.Here f(n) represent the effort needed to combine the solution of subproblem to get the final complete solution.
Duleb