0% found this document useful (0 votes)
41 views6 pages

CS3401 - Algorithms - QB - EVEN - AY - 24 - 25 - Completed

The document is a comprehensive question bank for the B.E. Computer Science and Engineering course on Algorithms, covering various topics across five units. Each unit includes both Part A and Part B questions that assess knowledge on algorithm complexities, graph theory, sorting algorithms, dynamic programming, and NP problems. It serves as a study guide for students to prepare for examinations in the subject.
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)
41 views6 pages

CS3401 - Algorithms - QB - EVEN - AY - 24 - 25 - Completed

The document is a comprehensive question bank for the B.E. Computer Science and Engineering course on Algorithms, covering various topics across five units. Each unit includes both Part A and Part B questions that assess knowledge on algorithm complexities, graph theory, sorting algorithms, dynamic programming, and NP problems. It serves as a study guide for students to prepare for examinations in the subject.
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/ 6

Question Bank

Programme B.E. Computer Science and Engineering


Course Algorithms
Course Code CS3401 Semester 4 Regulation AU R21

Unit I

Part – A

Sl. Blooms
Question
No. Level
1 Define time complexity of an algorithm.

2 List the types of asymptotic notations in analyzing complexity of algorithms.

3 Define recursion relation.

4 Discuss the time and space complexity of insertion sort.

5 State how the running time of an algorithm is measured.

6 Outline the significance of performing worst case analysis of an algorithm.

7 Define the asymptotic notation “Big oh” (0)

8 Define Knuth-Morris-Pratt algorithm.

9 Define an algorithm.

10 Define best,worst,average case time complexity.

Part – B

Sl. Blooms
Question
No. Level
Write an algorithm to perform linear search on an array of ‘N’ numbers. Illustrate the best case,
1
average case and worst case complexity of the linear search algorithm with an example.
What is pattern searching? Outline the steps in the Rabin-Karp algorithm for pattern searching
2
with an example.
Write the algorithm to finding maximum element of an array; perform best, worst and average
3
case complexity with appropriate order notations.
(i) Write and explain naive string mating algorithm.
4
(ii) Suppose T = 1011101110 and p = 111. Find all valid ships.
(i) Explain in detail about various asymptotic notations and its properties.
5
(ii) Use substitution method to show that T(n) = 2T(n/2) + n is O(n log(n)).
With a suitable example, illustrate the time and space complexity analysis of binary search and
6
linear search.
Explain the working of naive string matching algorithm with ABCCDDAEFG as the text input and
7
ODD as the search string.

Page 1 of 6
Course Code & Name CS3401 – ALGORITHMS

Unit II

Part – A

Sl. Blooms
Question
No. Level

1 Outline a directed graph with an example.

2 What are the constraints to represent a transportation network?

3 What is bipartite graph?

4 List the applications of graphs.

5 What is a strongly connected graph? Give an example.

6 Prove that the number of odd degree vertices in a connected graph should be even.

7 Define transitive closure of a directed graph.

8 How to calculate the efficiency of Dijkstra’s algorithm.

9 What do you meant by perfect matching in bipartite graph?

10 Define Floyd-Warshall algorithm.

Part – B

Sl. Blooms
Question
No. Level
1 Outline the Depth First search & Breadth First search algorithms with suitable examples.

2 Explain the Dijkstra’s shortest path algorithm with an example.

3 Write and explain the pseudo code for breadth first search and discuss its time complexity.

4 Write and explain the pseudo code for Floyd Warshall algorithm and write its time complexity.
Write the pseudocode for BFS and DFS traversals on the graph given fig. and compare the time
and space complexity of the two traversals.

Find the Minimum Spanning Tree of the following graph using Kruskal’s algorithm.

Given a graph and a source vertex in the graph, find the shortest paths from the source vertex 0
7
to all vertices in the given graph

Page 2 of 6
Course Code & Name CS3401 – ALGORITHMS

Sl. Blooms
Question
No. Level

Using Ford-Fulkerson algorithm find the maximum possible flow in the network given below

Unit III

Part – A

Sl. Blooms
Question
No. Level

1 Outline divide-and conquer algorithm design paradigm.

2 Define a multistage graph.

3 What is meant by principle of optimality?

4 Write down the steps to build Huffman tree.

5 What kinds of general plan for divide-and-conquer algorithms?

6 State the elements of greedy approach.

7 What are the differences between dynamic programming and divide and conquer approaches?

8 What is the time and space complexity of Merge sort?

9 Define the principle of optimality.

10 Write the difference between the Greedy method and Dynamic programming.

Part – B

Sl. Blooms
Question
No. Level

1 Outline the quick sort algorithm with an example.

What is a Huffman tree? Outline the steps to build a Huffman tree using greedy algorithm design
2
paradigm with an example.
Explain in detail about merge sort. Illustrate the algorithm with a numeric example and provide
3
complete analysis of merge sort algorithm.
4 Explain the dynamic programming approach of matrix multiplication with an example.

Demonstrate Quick sort and Merge sort, and arrange the following numbers in increasing order
5
using merge sort. (28, 39, 78, 42, 53, 47, 77, 44, 57, 60).

Page 3 of 6
Course Code & Name CS3401 – ALGORITHMS

Sl. Blooms
Question
No. Level
Solve the following problem using Greedy algorithm. Given activities with their start and finish
6 times, select the maximum number of activities that can be performed by a single person,
assuming that a person can only work on a single activity at a time.
A character-coding problem. A data file of 100,000 characters contains only the characters a-f,
with the frequencies indicated as below\
a b c d e f
7
Frequency
45 13 12 16 9 5
(in thousands)
Show the steps in constructing the final Huffman tree representing the optimal prefix code.

Unit IV

Part – A

Sl. Blooms
Question
No. Level
1 What is backtracking?

2 What are the factors that influence the efficiency of the backtracking algorithm?

3 Write short notes on graph colouring.

4 What is travelling salesman problem? Give an example.

5 With an example, define Hamiltonian circuit.

Why is branch and bound approach found to be appropriate for solving travelling salesman
6
problem?
7 When can a node be terminated in the subset-sum problem?

8 What is a promising node and non-promising node in the state-space tree?

9 Compare backtracking and branch and bound.

10 State the reason for terminating search path at the current node in branch and bound algorithm.

Part – B

Sl. Blooms
Question
No. Level
State the Hamiltonian circuit problem. Outline the steps to find the Hamiltonian circuit using
1
backtracking algorithm design paradigm with an example.
State the Knapsack problem. Outline how Knapsack problem can be solved using branch and
2
bound algorithm design paradigm with an example.

3 Explain about Graph Coloring Algorithm.

Write down the steps to solve Travelling Salesperson problem using branch and bound
4
approach. Explain with an example.
(i) Explain the steps in solving n-queens problem using backtracking approach.
5 (ii) Solve the following subset sum problem using back tracking.
Let S = {3,7,9,13,26,41}; d(sum) = 51.
Discuss briefly about the abstraction for Backtracking method and discuss the backtracking
6
solution to solve 8-Queens problem.

Page 4 of 6
Course Code & Name CS3401 – ALGORITHMS

Unit V

Part – A

Sl. Blooms
Question
No. Level

1 Outline the difference between a tractable problem and an intractable problem.

2 State the quick sort.

3 Differentiate tractable and intractable problems.

4 Write an algorithm to find the kth smallest number.

5 How NP-Hard problems are different from NP-Complete?

6 When is a problem said to be NP- hard? Give an example.

7 An NP-hard problem can be solved in deterministic polynomial time, how?

8 Define NP completeness and NP hard.

9 Define P and NP problems.

10 What do you meant by primality testing?

Part – B

Sl. Blooms
Question
No. Level
1 Elaborate NP-complete problem and NP-hard problem with an example.

2 Outline the algorithm for Knapsack problem using NP-Hard approach


Write short notes on the following :
(i) NP algorithms (4)
3
(ii) NP Hardness
(iii) NP-Completeness
Write short notes on the following :
(i) Problem Reduction (4)
4
(ii) Primality testing
(iii) Randomized sorting
Show that if an algorithm makes atmost a constant number of calls to polynomial time
5 subroutines and performs an additional amount of work that also takes polynomial time, then it
runs in polynomial time.
6 Explain about approximation algorithm for NP-hard problem.

(i) Illustrate polynomial-time approximation scheme for the sum of subsets problem.
7
(ii) Illustrate the working of Miller-Rabin randomized primality test.

Part – C

Sl. Blooms
Question
No. Level
Apply the insertion sort algorithm to sort the following sequence of n numbers stored in an array
A.
1
15,9,1,22,26,19,55,43,99,2
Illustrate each step of the sorting process.
What is dynamic programming? Explain the dynamic programming solution fox' matrix chain
2
multiplication with an example.

Page 5 of 6
Course Code & Name CS3401 – ALGORITHMS

Sl. Blooms
Question
No. Level
Write and explain the Dijikstra’s algorithm. Find the shortest path the following graph using
Dijikstra’s algorithm.

Solve the following instance of Knapsack problem by branch and bound algorithm.

Item Weight Profit

1 5 $40

4 2 7 $35

3 2 $18

4 4 $4

5 5 $10
6 1 $2
How many spurious hits does the Rabin-Karp matcher encounter in the text,
T = 3141592653589793 when Working modulo q = 11 and looking for the pattern P = 26. Briefly
5
write about the processing time, worst-case running time and average-case running time of
Rabin-Karp algorithm.
6 With an example, show the best-case, worst-case and average case analysis of heap sort. `
Run the Bellman-Ford algorithm on the directed graph of the following figure using vertex S as
the source and show the results after each pass of an algorithm.

With an example, Show that the cardinality of a maximum matching M in a bipartite graph G
8
equals the value of a maximum flow f in its corresponding flow network G’.

Page 6 of 6

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