You are on page 1of 2

LOVELY PROFESSIONAL UNIVERSITY

HOME WORK: #3

School: LSECA Department: CSE/IT

Name of the faculty member: Anup Singh Kushwaha


Course No: CSE408

Course Title: ALGORITHM ANALYSIS AND DESIGN

Class: B.Tech Term: Section:


Batch:

Max. Marks:7 Date of Allotment: 3/24/2011 Date of Submission: 04/01/2011

Part-A

1. Show how Prim’s algorithm can be implemented using heap. What would be the time
complexity of the algorithm.

2. The Four Color Theorem states that any map on a plane can be colored with no more
than four colors, so that no two countries with a common border are the same color.
Proof this using backtracking.

3. Solve the following 0/1 knapsack problem using branch and bound
P=(11,21,31,33), W=(2,11,22,15) ,C=40, n=4

Part-B

4. Design Huffman codes for the following symbols: a,b,c,d,e,f and I having relative
frequencies 2,4,6,8,10,12,16 respectively

5. Topological sorting on a directed acyclic graph may be carried out by removing nodes
with in-degree zero one by one. Design an algorithm for this and analyze its complexity
for both the adjacency matrix and adjacency list representations
6. Find a Hamiltonian circuit in the following graph using backtracking.

B
A

D C

You might also like