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

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

Study Groups By Subject code Wise (Click Below on your university link & Join Your Subject Group)

[ + VU Study Groups Subject Code Wise ]  [ + COMSATS Virtual Campus Study Groups Subject Code Wise ]

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

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

Views: 1659

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

## Forum Categorizes

Job's & Careers (Latest Jobs)

Scholarship (Latest Scholarships)

Internship (Latest Internships)

::::::::::: More Categorizes :::::::::::

## Latest Activity

6 minutes ago
6 minutes ago
Amna Wazeer Bs(cs), Programmer (MSCS) and 2 other members joined + M.Tariq Malik's group

### CS508 Modern Programming Languages

15 minutes ago
15 minutes ago
Maher Eng Shahzad Tufail Mcs posted a video

### Urdu Naat(Rehmat e DoJahan)Akhtar Qureshi.By Visaal

GREAT URDU NAAT E PAK WITH ALHAAJ AKHTAR QURESHI IN QTV .. http://www.VisaaleYaar.com ~~~^~~~PEGHAM E MUHABBAT HAY ~ JAHAN TAK PUHNCHAY~~~^~~~ VISAAL E YAAR
16 minutes ago
+Roman Reigns (the phenom) posted a photo

### programmer

16 minutes ago
17 minutes ago
Hania Ali replied to hasan ali's discussion cs312 in the group CS312 Database Modeling and Design
30 minutes ago
Hafiz faisal safder and SaiM khan joined + M.Tariq Malik's group

35 minutes ago
41 minutes ago
46 minutes ago

1

2

3

## Member of The Month

### 1. + M.Tariq Malik

Pakistan, Pakistan