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

# CS501 GDB Solution & Discussion Due Date:February 17, 2017.

CS501 GDB Solution & Discussion Due Date:February 17, 2017.

Dear Students!

Graded discussion will be launched on February 16, 2017 and it will remain open for two days. You can post your comments on below mentioned topic till February 17, 2017.

Semester: Fall 2016
Fundamentals of Algorithms – CS502

Instructions:

• A concise, coherent and to the point comment is preferred over lengthy comment having irrelevant details.
• Comments, posted on regular Lesson's MDB or sent through email will NOT be considered in any case. Any request about such an acceptance will not be catered.
• You should post your answer on the Graded Discussion Board (GDB), not on the Moderated Discussion Board (MDB).

Topic

An optimization problem is one in which you want to find, not just a solution, but the best solution. A “greedy algorithm” sometimes works well for optimization problems.

You are required to support or contradict above statement by giving solid reasoning; your comments should not be more than 100 words.

Best of Luck!

+ 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: 1930

.

+ 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

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

Note:-

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.

&

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

A “greedy algorithm” sometimes works well for optimization problems
A greedy algorithm works in phases. At each phase:
You take the best you can get right now, without regard for future consequences
You hope that by choosing a local optimum at each step, you will end up at a global optimum.

can u plz explain it in urdu?

A greedy algorithm is an optimization algorithm which makes a locally optimal decision at each step. The decision is locally optimal, for the immediate step, but not necessarily for all the future steps. Neighbour joining (for building phylogenetic trees), Nearest neighbour (for solving the travelling salesman problem), Dijkstra's algorithm (for shortest path in a graph) are examples of greedy algorithms. In some cases, greedy algorithms yield globally optimal algorithms, in particular if they are optimization problems over matroids, sometimes they only provide an approximation. Greedy algorithms are often used to find approxiamte solutions to difficult problems

kia aappunjabi men btana pasand karen gi Rizwana kousar...

title is wrong, CS502 ka hai GDB

Cs502 gdb solution:

A greedy algorithm works in phases, at each phase:
You take the best you can get right now, without regard for future consequences.
You hope that by choosing a local optimum at each step, you will end up at a global optimum.
Greedy algorithms work by recursively constructing a set of objects from the smallest possible constituent parts. Recursion is an approach to problem solving in which the solution to a particular problem depends on solutions to smaller instances of the same problem.
The advantage of using a greedy algorithm is that solutions to smaller instances of the problem can be straightforward and easy to understand. The disadvantage is that it is entirely possible that the most optimal short-term solution may lead to the worst possible long-term outcome. In many problems, a greedy strategy does not in general produce an optimal solution, but nonetheless a greedy heuristic may yield locally optimal solutions that approximate a global optimal solution in a reasonable time. Greedy algorithms mostly (but not always) fail to find the globally optimal solution, because they usually do not operate exhaustively on all the data.

CS502 GDB Solution

Attachments:

The choice made by a greedy algorithm may depend on choices made so far but not on future choices or all the solutions to the sub problems. It iteratively makes one greedy choice after another, reducing each given problem into a smaller one. In other words, greedy algorithms never reuse its choices. This is the main reason, which is comprehensive and guaranteed to find the solution.

## Latest Activity

Rana Shoaib liked Mirha's profile
5 hours ago
6 hours ago
6 hours ago
khan joined +M.Tariq Malik's group

### PSY502 History & Systems of Psychology

6 hours ago
Mushk liked zohaib iftikhar's blog post ...* MALAIKA KI DUA ...*
6 hours ago
Mushk liked Mani Siddiqui BS VIII's discussion خراب ریاضی
6 hours ago
Mushk liked Awais's discussion دل کے دشمن کو مہمان کر رکھا ھے
6 hours ago
Mushk liked Awais's discussion دل کے دشمن کو مہمان کر رکھا ھے
6 hours ago
9 hours ago
Bs IT\\jawairia sajid posted a discussion

### Eng201 Assignment 1

9 hours ago
Repanzal added a discussion to the group CS615 Software Project Management

### CS615 gdb

10 hours ago
Repanzal joined +M.Tariq Malik's group

10 hours ago

1

2

3