0

I am currently learning about Algorithm Analysis in recursion and iterative functions.

I understand Algorithm Analysis in recursion more so than iterative functions. I am not great at analyzing recursion functions, but I get the jist of it all.

In fact, I am extremely confused when comes to the analysis in iterative functions.

I have searched the site for help on these two topics because I really want to understand and be proficient at Algorithm Analysis. I don't want to just get by. Are there any great sites or good reads that are available to help me understand these topics better in Layman's terms?

I have read about Knuth's book Concrete Mathematics and bought a copy. Are there any other sites or books that may teach these topics better or that I can find and practice online?

Just for example purposes, a practice question I am confused about was a problem like this:

for(i = 1 to n)
{
    for(l = 1 to i)
    for(j = 1 to 3)
    {
         2 operations 
    for(k = 1 to i)
         3 operations
    }
}

I get where to start, but after the initial step all the wheels fall off for me. I will gladly accept any help in directing me in the right direction about these topics.

Thank you all for your time and help.

(I apologize if this too broad of a topic.)

2 Answers 2

1

I think this will help you understand the thing.

http://discrete.gr/complexity/

And Knuth's book and Intoduction to Algorithms by CLRS are the bibles of algorithms. If you want a brief knowledge in algorithms, I personally suggest those two books.

Sign up to request clarification or add additional context in comments.

Comments

1

As a tip for iterative algorithms/functions:

Most of the cases your concern is only one thing: the input size i.e. n. So at glance check how far would a function goes when n is very large. You can roughly estimate the complexity in terms of n.

For a resource, I found myself enjoying reading this lecture notes (its a book more than notes).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.