We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>
+ Link For Assignments, GDBs & Online Quizzes Solution 
+ 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
How to Add New Discussion in Study Group ? Step By Step Guide Click Here.
Assignment No. 03 
Total Marks: 20
Due Date: 18/01/2013 

Instructions: Please read the following instructions carefully before submitting assignment:
Objectives:
To understand the real applications of greedy algorithm.


For any query about the assignment, contact at cs502@vu.edu.pk 

Assignment Questions 

Question 1: Marks 10
After reviewing the activity scheduling with greedy approach, suppose that instead of always selecting the first activity to finish, we instead select the last activity to start that is compatible with all previously selected activities. Describe how this approach is greedy algorithm and prove that it yields an optimal solution.
Question 2: Marks 10
Mr. Mohsin drives a car from Lahore to Rahim Yar Khan along National Highway, His car’s gas tank, when full, holds enough gas to travel n miles, and his map gives the distance between gas station on his route. Mohsin wishes to make as few gas stops as possible along the way. Give an efficient method by which Mohsin can determine at which gas stations he should stop, and prove that your strategy yields an optimal solution.


BEST OF LUCK 
Tags:
+ How to Follow the New Added Discussions at Your Mail Address?
+ 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?.
+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)
+ Click Here to Search (Looking For something at vustudents.ning.com?) + Click Here To Join (Our facebook study Group)Please Discuss here about this assignment.Thanks
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 tradeof, 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 fixedsize 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 :)
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????????????????????
© 2020 Created by + M.Tariq Malik. Powered by
Promote Us  Report an Issue  Privacy Policy  Terms of Service
VU Students reserves the right to delete profile, which does not show any Activity at site nor has not activity more than 01 month.
We are usergenerated contents site. All product, videos, pictures & others contents on vustudents.ning.com don't seem to be beneath our Copyrights & belong to their respected owners & freely available on public domains. We believe in Our Policy & do according to them. If Any content is offensive in your Copyrights then please email at m.tariqmalik@gmail.com or Contact us at contact Page with copyright detail & We will happy to remove it immediately.
Management: Admins ::: Moderators
Awards Badges List  Moderators Group
All Members  Featured Members  Top Reputation Members  Angels Members  Intellectual Members  Criteria for Selection
Become a Team Member  Safety Guidelines for New  Site FAQ & Rules  Safety Matters  Online Safety  Rules For Blog Post