You are on page 1of 2

Government Engineering College, Rajkot

Computer Engineering Department


Subject: Analysis and Design of Algorithms
Subject Code: 3150703
th
B.E. Semester: 5

Assignment – Graph, B&B, String Matching

1. Traverse following graph using BFS algorithm.

2. Traverse above graph using DFS algorithm. Also find tree edges, back edges, forward
edges and cross edges.
3. Define Articulation point, biconnected components and bridge. Find all of them in
following graph

.
4. Find Strongly Connected Components of following graph.

5. Find optimal solution to following knapsack problem using branch and bound method.

Item Weight Profit


No.
1 4 40
2 7 42
3 5 25
4 3 12
Weight Capacity = 10

6. Find all occurrences of pattern P = 0001 in text T = 000010001010001 using naïve string
matching algorithm.
7. Working modulo q=11, how many spurious hits does the Rabin Karp matcher encounter
in the text T = 125892658762632589 when looking for the pattern P = 58?
8. Construct the string matching automaton for the pattern P = aabab and illustrate its
operation on the text string T = aaababaabaababaab
9. Illustrate operation of Knuth Morris Pratt string matching algorithm for pattern P = abaa
and text T = abaababaaba

You might also like