www.vustudents.ning.com

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

# Graded Discussion Board (GDB) of CS502 Spring 2012

Dynamic Programming is always preferable over greedy approach " Support or contradict this statement with solid arguments.

Note:

A concise, coherent and to the point comment is preferred over lengthy comment having irrelevant details. Your comment must not be more than 5-7 lines. Comments, posted on regular Lesson's MDB or sent through email will NOT be considered. Any request about such an acceptance will not be catered.

launched on July 9, 2012 and it will remain open till July 10, 2012.

Views: 941

### Replies to This Discussion

A greedy algorithm is similar to a dynamic programming algorithm, but the difference is that solutions to the subproblems do not have to be known at each stage; instead a "greedy" choice can be made of what looks best for the moment.

Consider this example.
You are standing at a place A. You are to goto B. There are intermediate places C1,C2 ...
You want to minimize distance travelled.
Greedy Method of Solving
You don’t want to try all intermediate places. You go to the nearest intermediate place. Why? You feel by going to the nearest intermediate place, you will minimize the distance to B.
Dynamic Programming

Syed M. Umair Saulat gud.keep it up & keep sharing

tariq bhai cs501 mai bi khuch help kro gdb mai plzzzzzzzzzzzzzzzz

Thanks bhai

1

2

3

4

5

## Latest Activity

Zubii joined + M.Tariq Malik's group

### MTH401 Differential Equations

6 hours ago
Zubii joined + M.Tariq Malik's group

### CS502 Fundamentals of Algorithms

6 hours ago
Zubii joined + M.Tariq Malik's group