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

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

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

# ASSIGNMENT NO # 3 FUNDAMENTAL OF ALGORITHM CS 502 DUE DATE 24 JULY

Fundamentals of Algorithms CS502-

Spring 2015

ASSIGNMENT #3

Your assignment must be uploaded/submitted at or before 24thJuly 2015 Uploading instructions Please view the assignment submission process document provided to you by the Virtual University to upload the assignment.

Rules for Marking

It should be clear that your assignment will not get any credit if:

O The assignment is submitted after due date.

O The submitted assignment does not compile or run. Or corrupt file

O The assignment is copied.

O Submit your solution in Microsoft Word document “doc/docx”

Objectives

This assignment will help you to understand the concepts of Knapsack Problem and Huffman encoding.

The grip on these topics will help you to understand the cores of Dynamic Programming and Greedy paradigms and increase your confidence to apply these strategies for real world problems.

Guidelines

1.In order to attempt this assignment you should have full command on Lecture # 17to Lecture # 26

and also read the text book “Introduction to Algorithms” byThomaH.Cormen particularly for Huffman encoding technique for compressing the data.

2.In order to solve this assignment you have strong concepts about following topicsüKnapsack Problem(Dynamic Programming)üRadix Sort Books to read For solution Cormen, Leiserson, Rivest, and Stein (CLRS) 2001, Introduction to Algorithm, (2nd ed.) McGraw Hill.

Estimated Time

4 Hours For Question1 maximum time is 2.5 hours ,divide the time according to your ease 1.5 hour will enough to understand the logics0/1 Dynamic Programming and in 1 hour can design your problem solution according to given scenario; and for second problem focus on the radix sort and you can develop all this in 1.5 hour.

It all depends upon your sheer concentration.

Question# 1(10) Let’s assume,

You are working in Multinational Organization XYZ and your company is going to launch projects at broader level. Your Company has 140 Billion \$ for investment. You area Business analyst in your company and you have to develop the strategy to maximize the earned profit following the given limits; projects Are to be launched in the year 2016.

•First project is about Research and Development of underdeveloped countries which has cost 40 billion \$ and the profit earned will be54 Billion \$, and

•The second project is to launch the Software Industries for security Enhancements in different countries which has cost 60 billion\$ and profit earned will be 40billion \$.

•The Third project is relating to Launch the Industry Plants Nano Technology design for the computing purposes the cost is 70 Billion \$ giving the profit of

72 billion \$

.

•The fourth project is to launch quality Medicine Formation

(Pharmaceutical Oriented) project to serve Humanity and has cost 76

billion

\$ and profit is 84 billion \$ and

•There is also fifth project which is relating to Chemical Industries in many countries which has cost 36 billion \$ giving the profit of 40 billion \$

.

Find out the projects to be selected to earn the maximum profit using

0-1 Knapsack you may assign explicit simple variables for your ease to proceed the calculations.

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

.

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

Attachments:

### Replies to This Discussion

ab ye table to bn gya next kya krna h

table bn gya h next kya krna h Q No1 main any one tell me plzzzzz

CS502

Attachments:

Yeah Assignment ksi py banani hai

koi to complete file paste kre ya phr inbox he kr de

ShariqMayo will u plz send me complete file I didn't check this assignment completely I m very busy some where

assignment MS Word main submit krwni hai

Anyone tell me in me se koi bi project select kr skte ha jis ka maximum profit ho ga wo put krna.Tu pir humy tu sb project ki calculation krni pre gi.

Final table is given by as

 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 P1=40 C1=54 0 0 0 0 54 54 54 54 54 54 54 54 54 54 54 C2=60 P2=40 0 0 0 0 54 54 54 54 54 54 94 94 94 94 94 Selected C3=70 P3=72 0 0 0 0 54 54 54 72 72 72 94 126 126 126 126 C4=76 P4=84 0 0 0 0 54 54 54 72 84 84 94 126 126 138 138 Selected C5=36 P5=40 0 0 0 0 54 54 54 72 94 94 94 126 126 138 138

Next we see that last value in 138 we see that where this 138 comes as it seen easily its come from top and left also. So we can not select this we will select (C4 , P4) = (76 , 84) Now here again in 138 we go four step back here in 94and this 94 is comes from top so we select (C2 , P2) = (60 , 40) again repeating this we process four step back and see that we reach to ( C1 , P1) = (40 , 54) so according to our these assumption we can easily choose by using Knapsack problems.

Project NO 1, Project NO 2 and Project NO 4

ha kuch gar bar ho sakti ha i am not sure about this but i m sharing just my idea whether i m right or wrong

Project No    Cost

1                 40

2                 60

4                 76

Total           176

while we have only 140 Billion \$ in our hand

we will select only 1 and 4 project

## Latest Activity

8 minutes ago
50 minutes ago
56 minutes ago
1 hour ago
1 hour ago
1 hour ago
1 hour ago
1 hour ago

1 hour ago
1 hour ago
1 hour ago
KyaMusibatHai posted a discussion

### Calling all CSS aspirants! Anyone brave enough to wade through CSS's hottest waters?

1 hour ago
1 hour ago
+ M.Tariq Malik posted a discussion

### دل یونہی اہتمام کرتا ہے وہ کہاں اب قیام کرتا ہے

1 hour ago
1 hour ago
1 hour ago
+++STUDENT+++ liked + Iuuoɔǝut+'s discussion Twaja farmaen
1 hour ago
1 hour ago
1 hour ago
1 hour ago

1

2

3