We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

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

# CS502 GDB No. 1 Spring 2020 Due date 18-08-2020

Fundamentals of Algorithms (CS502)

Dear Students,

GDB of the subject Fundamentals of Algorithms (CS502) is going to upload in a couple of days, before submitting the GDB, please read all instructions thoroughly.

The GDB will remain open for two days (48 hours).

You may submit your GDB from “August 17, 2020 To August 18, 2020, 11:59 PM”.

GDB Topic:

Consider the scenario where you need to climb Margala Hills. You have a map pertaining multiple hiking trails like, trail 1, trail 2 etc. in order to reach at the top of hill. You have limited time and want an optimal choice to climb the hill without getting too much tired. You have the following three strategies in your toolkit to accomplish this task.

a) Dynamic programming

b) Greedy strategy

c) Divide and Conquer strategy

In the given scenario which strategy would be more appropriate and produce optimal solution, comment with proper reasons.

Regards,

Instructor CS502

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

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

Views: 772

### Replies to This Discussion

Our main purpose here discussion not just Solution

Students having same subject can start discussion here to solve assignment, GDB & Quiz and can clear their concepts until solution is provided.

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

Then copy Questions from assignment file and paste in Discussion.

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

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

# Cs 502 GDB Correct Solution spring 2020

CS502 Fundamentals of Algorithms GDB Solution & Discussion Spring 2020

CS502 GDB Solution idea:

In my opinion, a greedy strategy is appropriate for given scenario and gives optimal solution. A greedy algorithm is an algorithm in which at each stage a locally optimal choice is made. A greedy algorithm is therefore one in which no overall strategy is followed, but you simply do whatever looks best at the moment. For example, a mountain climber using the greedy strategy to climb Everest would at every step climb in the steepest direction. From this analogy we get the computational search technique known as hill-climbing.

Hill climbing can often produce a better result than other algorithms when the amount of time available to perform a search is limited, such as with real-time systems, so long as a small number of increments typically converge on a good solution (the optimal solution or a close approximation).

Hill climbing is an anytime algorithm, it can return a valid solution even if it's interrupted at any time before it ends. The basic principle in hill climbing is to guess which change would improve the situation and test the change. Usually, the likely change is a small change, because fig-urinig out a good big change would be way too much work or require guesswork.

## Latest Activity

abdullah mehar joined +M.Tariq Malik's group

### ISL201 Islamic Studies

3 hours ago
abdullah mehar joined +M.Tariq Malik's group

### MTH101 Calculus And Analytical Geometry

6 hours ago
Shah Raiz Khuram Gill, Rizwan Sohail, Dur e Adan and 1 more joined Virtual University of Pakistan
6 hours ago
7 hours ago
7 hours ago
7 hours ago
7 hours ago
7 hours ago

1

2

3

## HELP SUPPORT

This is a member-supported website. Your contribution is greatly appreciated!