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

Looking For Something at vustudents.ning.com? Click Here to Search


+ 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.


Suppose you were to drive from Lahore to Islamabad along I-70. Your Petrol tank, when full, holds enough petrol to travel m miles, and you have a map that gives distances between petrol stations along the route. Let c1 < c2 < . . .  < cn be the locations of all the petrol stations along the route where ci is the distance from Lahore to the petrol station. You can assume that the distance between neighboring petrol stations is at most m miles. Your goal is to make as few petrol stops as possible along the way.

Point of Discussion:

Keeping in view the above scenario, you need to answer the following questions:

Which is the most efficient algorithm you can find to determine the petrol station you should stop? Justify your answer with solid reasoning.

Moreover specify the time complexity of the algorithm.

Best of Luck!

+ 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?

See Your Saved Posts Timeline

Views: 2681


+ 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)

Replies to This Discussion

Please Discuss here about this GDB.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>



For Important Helping Material related to this subject (Solved MCQs, Short Notes, Solved past Papers, E-Books, FAQ,Short Questions Answers & more). You must view all the featured Discussion in this subject group.

For how you can view all the Featured discussions click on the Back to Subject Name Discussions link below the title of this Discussion & then under featured Discussion corner click on the view all link.

Or visit this link 

Click Here For Detail.


.•°How to Download past papers from study groups°•.


Please Click on the below link to see…

.... How to Find Your Subject Study Group & Join .... 


P.S:    Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”


Greedyalgorithm is suitable for this scenario. Because Greedyalgorithm or measuring algorithm follows the problem solving heuristic of making the locally optimal choice at each stage  for finding a global optimism. For optimal solution Greedy algorithm takes unreasonably steps like divide and conquer, mathematical optimization, randomizedalgorithm. He solves combinatorial problems with properties of matriodes.


Time complexity:

Complete with variables current Time and Number of station.

Current time = 55

Number of station = cs1, cs2…..cs4.

Current time = number of station

55 - 30 =   25     cs1 away from Lahore 30 mints

25 - 15 = 10     cs2 away from Lahore 30+15 mints

10 - 5 =    5       cs3 away from Lahore 30+15+5 mints

5 - 5 =       3      cs4 away from Lahore 30+15+5 + 5 mints


how is current time = 55 ? plz koi explain b krdey ye 

Yaar ye algorithm Dijkstra nahi hoga?? or yeh time suppose kiya hai ya kisi link se copy kiya hai...

mujh bhi ya dijkstra algorithm hi lag raha ha.

Guys Please share idea 


please koi yehi bta de k ye topic konsey chapter main se aya hai ????


Pura toh nahi per kuch help yahan se mil sakti hai,, look at problem statement,, see the link below               http://people.cs.ksu.edu/~subbu/Papers/Minimum%20Stops.pdf


© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service