We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

# CS502 Fundamentals of Algorithms Assignment No .03 Solutions and Discussions Fall 2012 Due Date: 18/01/2013

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

Views: 3750

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

### Replies to This Discussion

Our main purpose here discussion not just Solution

What are the best applications of greedy algorithm?

Greedy algorithms are fast. Therefore, if it can be proven that they yield the global optimum for a certain problem, they will be the method of choice. The technique is used in the following graph algorithms which have many practical applications:

1. Dijkstra's algorithm for finding shortest path to all nodes given a start node
2. Prim's algorithm for finding a minimum spanning tree
3. Huffman trees for data compression

The problem with the greedy approach is that most of the time you obtain only some local optimum and not the global one. In such cases you might want to consider a more powerful "tool" like Dynamic Programming. There is a time trade-of, though.

There are cases when, even though greedy algorithms does not guarantee the global optimum, we still might want to use them to get a good approximation for the answer to the problem. For example consider the following situation:

You have a set of n items and you want to place them in several fixed-size boxes. Your goal is to minimize the number of boxes used. A greedy approach where you process the items in the order they are first given, placing them in the first box they fit in, is not optimum but it never takes more than twice the actual minimum number of boxes

AOA

Dear All it would be great if the Pin Pointed discussion may be initiated.

Regards,

The answer of first question in the previous assingment see :)

Attachments:

nice find !!

both are different questions

AOA

1st question solve kar leya hai 2nd solve ni keya muj 2nd ki samaj ni a rahi hai...

aaj last date hai....

koi 2nd question ka idea hi dai dain

I think Question 2 is about Minimum Spanning Tree topic.

try to solv n share ali.....................

any one who have an idea how to solve this????????????????????

muj lagta hai 2nd question choose karna hai gas station
2nd question mein mohsin ko choose karna hai best station kn sa hai or wo km se km station par ruky
is ka method batana hai

## Latest Activity

2 hours ago
2 hours ago
+ ! ! ! ! ! A ϻ e l꧂ liked + "αяsαℓ " Ќąƶµяɨ •"'s discussion Computer Science
4 hours ago
+ ! ! ! ! ! A ϻ e l꧂ updated their profile
4 hours ago
stylo posted a discussion

### mcd403 final term paper 15 feb,2020

4 hours ago
5 hours ago
6 hours ago
6 hours ago
6 hours ago
+ "αяsαℓ " Ќąƶµяɨ •" posted a discussion

### Computer Science

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

6 hours ago

1

2

3