Problem in algorithm...

Can any one have better idea about the greedy aproach and dynamic programming in algorithm and also give the link from where we find ideas about design technique of algorithm.....



😁

Replies

  • Manish Goyal
    Manish Goyal
    Greedy approach means to choose best among all the possible solutions
    for eg if we consider a knapsack problem
    we have a knapsack of capacity 20kg
    and 3 diamonds
    1 diamond =cost 4 crore, weight 20 kg
    2 diamond =cost 3 crore ,weight 15 kg
    3 diamond =cost 2 crore weight 10 kg
    then According to greedy approach You will go for 1st diamond of 20 kg

    According to dynamic programming,,you will choose best solution by storing all the possible solution in a table and using that you will select best solution

    Of both above mentioned approaches dynamic programming is best for finding optimal solution..
    for further knowledge i will recommend you to go for "Introduction to algorithms "By Kormen

You are reading an archived discussion.

Related Posts

Let us play with time: write a program to find index of smallest no in an array? The one whose program will take minimum execution time and with smallest exe...
Dream Spark Yatra: Chennai(Genuine Microsoft Software for free) Microsoft Dreamspark Yatra - Chennai 2010, is a premier technological event hosted by Microsoft Chennai .NET User Group (Student) and Microsoft Student...
Hi. I 'm a student for Computer Since.i wanted to do a mini project in mobille programming with vb.net. Please help me with any idea.
hi...i am confused now a days , because i want to buy a laptop.i am not decided that which one is the best. because i do'nt want to go the...
TwInbox File Size:- 936 KB If you are a Microsoft ® Outlook ® user, you probably have it open all the time. Now you can have a fully-featured, powerful Twitter...