0% found this document useful (0 votes)
51 views2 pages

Algo HW

This document contains a home assignment for an algorithms course. It includes 5 questions across two parts. Part A includes questions about implementing Prim's algorithm using a heap, proving the Four Color Theorem using backtracking, and solving a 0/1 knapsack problem using branch and bound. Part B includes designing Huffman codes for symbols with given frequencies, analyzing the complexity of a topological sorting algorithm, and finding a Hamiltonian circuit in a graph using backtracking.

Uploaded by

Bhanu Rana
Copyright
© Attribution Non-Commercial (BY-NC)
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)
51 views2 pages

Algo HW

This document contains a home assignment for an algorithms course. It includes 5 questions across two parts. Part A includes questions about implementing Prim's algorithm using a heap, proving the Four Color Theorem using backtracking, and solving a 0/1 knapsack problem using branch and bound. Part B includes designing Huffman codes for symbols with given frequencies, analyzing the complexity of a topological sorting algorithm, and finding a Hamiltonian circuit in a graph using backtracking.

Uploaded by

Bhanu Rana
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy