CS502 ASSIGNMENT 2 SOLUTION FALL 2017
Dear VU (Virtual University of Pakistan) Students, here you read and download CS502 (Fundamentals of Algorithms) Assignment No.2 SolutionFall–2017. Assignment Total Marks 20. You can download easily Assignment Solution click the download button and get Assignment Solution. Assignment Open Date 3rd January 2018 and Assignment Closing Date 10th January 2018. You can also like for latest update our Facebook page, YouTube channel and follow on Google+. (VU Ki Duniya) Perviousily Shared CS502 Assignment No.1 Solution fall - 2017
Lectures Covered: This assignment covers Lecture # 23 to 26.
Assignment Objectives:
Objectives of this assignment are:
- To implement Activity Selection Algorithm in real life problems
- Generation of Variable-length codes using Huffman Coding Algorithm
Assignment important istructions
Please read the following instructions carefully before solving & submitting the assignment:
- The assignment will not be accepted after due date.
- Zero marks will be awarded to the assignment that does not open or the file is corrupt.
- The assignment file must be an MS Word (.doc/.docx) file format; Assignment will not be accepted in any other format.
- Zero marks will be awarded to the assignment if copied (from other student or copied from handouts or internet).
- Zero marks will be awarded to the assignment if the Student ID is not mentioned in the assignment file.
- The assignment will not be accepted after due date.
For any query about the assignment, contact only at CS502@vu.edu.pk
Please do not post queries related to assignment on MDB.
ASSIGNMENT Question No.1
In the context of Activity Selection Problem, consider the following set of activities:
You are required to find the optimal solution (using Greedy Algorithm) for the following two greediness approaches:
1. Select the activities that start first and schedule them (5 marks)
2. Select the activities that finish first and schedule them (5 marks)
Note:
No need to provide any pseudo/working code. Just provide the results for each greediness approach of the following two steps in the below mentioned tabular form:
1. Sorted Activities
2. Final Selected Activities ASSIGNMENT Question No.2
Consider the following scenario in which a set of Alphabets along with their frequencies is given. You are required to generate the output binary tree and find the Variable-length codes for the given Alphabets using the provided Huffman Coding Algorithm.
Total File Length: 210
Frequency table:
huffman coding algorithm
1. Consider all pairs:
2. Choose the two lowest frequencies, and make them brothers, with the root having the combined frequency.
3. Iterate.
Note:No need to provide all the steps of the binary tree generation. Only mention the Final Binary Tree and the Variable-length codes for the given Alphabets in tabular form.
Your solution should be strictly according to the below-mentioned template.
solution TEMPLATE
Alphabets: A, B, C, D, E, F
Total File Length: 100
Frequency table:
output tree
DOWNLOAD CS52 ASSIGNMENT SOLUTION
DownloadYou can Also Download Midterm Solved Past Papers referenceby Moaaz and Waqar Sidhu, Final term Solved Past Papers reference by Moaaz and WaqarSidhu, GDB Solutions, Assignment Solutions, and Solved Quizzes files, PPTSlides, Handouts, Final term Short Notes, Mid Term Short Notes and NTS Guidelines.
Post a Comment