0% found this document useful (0 votes)
9 views

Ada Assignment 2

The document outlines various assignments related to algorithms and data structures, including the n-Queens problem, backtracking techniques for subset sums, branch and bound methods for assignment and knapsack problems, AVL trees, heaps, string matching algorithms, greedy techniques, Dijkstra's algorithm, transitive closure, minimum spanning trees, and Huffman coding. Each assignment requires explanations, examples, and problem-solving using specified algorithms. The document serves as a comprehensive guide for students to apply theoretical concepts in practical scenarios.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Ada Assignment 2

The document outlines various assignments related to algorithms and data structures, including the n-Queens problem, backtracking techniques for subset sums, branch and bound methods for assignment and knapsack problems, AVL trees, heaps, string matching algorithms, greedy techniques, Dijkstra's algorithm, transitive closure, minimum spanning trees, and Huffman coding. Each assignment requires explanations, examples, and problem-solving using specified algorithms. The document serves as a comprehensive guide for students to apply theoretical concepts in practical scenarios.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

ASSIGNMENT 2

Module 5
1. Explain n-Queens problem with example using backtracking approach
2. Apply backtracking technique to solve the instance of the sum of subset problem
S={3,5,6,7} and d=5
3. What are the two additional items require by Branch and bound technique,
compared with backtracking. Solve the following assignment problem using branch
and bound technique, whose cost matrix for assigning four jobs to four persons are
given
9 2 7 8
6 4 3 7
5 8 1 8
7 6 9 4
4. Solve the following instance of the knapsack problem by the branch and bound
algorithm. Construct state space tree
Ite Weight Value
m
1 4 40
2 7 42
3 5 25
4 3 12
The Knapsack Capacity W is 10

Module 3
5. Define AVL tree with an example. Give worst case efficiency of operations on AVL
tree. Construct an AVL tree of the list of keys:5,6,8,3,2,4,7 indicating each step of
key insertion and rotation
6 Define Heap. Explain the bottom-up heap construction algorithm. Apply heap sort
to sort the list of numbers 2,9,7,6,5,8 in ascending order using array representation
7 Design Horspool algorithm for string matching. Apply this algorithm to find the
pattern BARBER in the text:
JIM_SAW_ME_IN_A_BARBERSHOP
8 Define 2-3 tee. Give the worst-case efficiency of operations on 2-3 tree. Build 2-3 tree
for the list of keys 9,5,8,3,2,4,7 by indicating each step of key insertion and node
splits
9 Design Boyer Moore Algorithm for string Matching an Apply Boyer Moore
Algorithm to find the Pattern BAOBAB in the
Text:BESS_KNEW_ABOUT_BAOBAB
Module 4
10. Explain the concept of greedy technique for Prim’s algorithm. Obtain a minimum
spanning tree for the graph shown in fig

11 .Apply Dijkstra’s algorithm to fin the single source shortest path for the given graph
by considering ‘s’ as source vertex. Illustrate each step

12 Define transitive closure. Write Warshall’s algorithm to compute transitive closure.


Illustrate using the following directed graph

13 Define minimum spanning tree. Write Kruskal’s algorithm to find minimum


spanning tree. Illustrate with the following undirected graph

14 Construct Huffman Tree and resulting code for the following

Charact A B C D -
er
Probabil 0.4 0.1 0.2 0.15 0.15
ity
a) Encode the Text: ABACABAD
b) Decode the text:100010111001010

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