Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
4 views1 page

Daa Assignment2

The document outlines an assignment for the Design and Analysis of Algorithm course at Maharaja Agrasen Institute of Technology, detailing the tasks and submission requirements. It includes five algorithm-related questions focusing on activity selection, fractional knapsack, task scheduling, Huffman coding, and graph coloring. The assignment was given on September 22, 2024, and is due on October 3, 2024, with a total of 30 marks.

Uploaded by

Shashikant kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Daa Assignment2

The document outlines an assignment for the Design and Analysis of Algorithm course at Maharaja Agrasen Institute of Technology, detailing the tasks and submission requirements. It includes five algorithm-related questions focusing on activity selection, fractional knapsack, task scheduling, Huffman coding, and graph coloring. The assignment was given on September 22, 2024, and is due on October 3, 2024, with a total of 30 marks.

Uploaded by

Shashikant kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Maharaja Agrasen Institute of Technology, Delhi

Department of Information Technology

Assignment 2
Subject Name: Design and Analysis of Algorithm
Subject Code: CIC 311
Class: 5I123, 5I456, 5I789
Faculty:

Assignment Date Given Due Date Mode of Submission Total Marks COs
No mapped
1 22/9/2024 3/10/2024 Hardcopy 30 CO2
Questions:
Q 1. Apply activity selection algorithm and find the solution on the following activities (S)
S = {p, q, r, s, t, u, v, w, x, y, z} [5][CO2]
start and finished times for proposed activities are (1, 4), (3, 5), (0, 6), 5, 7), (3, 8), 5, 9), (6, 10),
(8, 11), (8, 12), (2, 13) and (12, 14).
Q2.Solve the following Fractional knapsack problem using dynamic programming: [7.5][CO2]
Objects : 1 2 3 4 5 6 7
Profit (P in $) : 5 10 15 7 8 9 4
Weight(w(in Kg) : 1 3 5 4 1 3 2
W (Weight of the knapsack): 15 Kg
Q. 3 Solve the following example using Task Scheduling Algortihm: [7.5][CO2]
ai 1 2 3 4 5 6 7
di 4 2 3 3 2 1 6
wi 70 60 60 40 100 20 10
Q. 4 Find Huffman code for a file containing following characters with given frequency.
[5][CO2]
Character A B C D E F
Frequency(in 11 12 13 14 24 26
thousands)
Q. 5 Solve following graph coloring problem using backtracking approach.(any one) (Solve it
using tree method) [5][CO2]

(a) (b)

You might also like