0% found this document useful (0 votes)
6 views3 pages

Upc Algorithm

The document outlines UPC questions for the Algorithm course at Madha Engineering College, detailing five 16-mark questions for each of the five units covering topics such as asymptotic notations, shortest path algorithms, divide and conquer strategies, backtracking, and NP-hard problems. Additionally, it includes a list of 25 two-mark questions that span various fundamental concepts in algorithms and data structures. The instructions emphasize the need for comprehensive coverage of problem-oriented questions across all units.

Uploaded by

kalai mugill
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)
6 views3 pages

Upc Algorithm

The document outlines UPC questions for the Algorithm course at Madha Engineering College, detailing five 16-mark questions for each of the five units covering topics such as asymptotic notations, shortest path algorithms, divide and conquer strategies, backtracking, and NP-hard problems. Additionally, it includes a list of 25 two-mark questions that span various fundamental concepts in algorithms and data structures. The instructions emphasize the need for comprehensive coverage of problem-oriented questions across all units.

Uploaded by

kalai mugill
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

MADHA ENGINEERING COLLEGE

Dept. of Computer Science and Engineering

II YEAR – CS3401 ALGORITHM – UPC Questions

16 MARKS

UNIT 1 1. Define the asymptotic notations used for best case average case and worst case analysis?
2. (i)Explain properties of BIG (oh) Notation.(8)
(ii) (i) Distinguish between Big Oh, Theta and Omega natation(8)
3. What is meant by recurrence? Give one example to solve recurrence equations.
4. (i)Define Asymptotic notations. Distinguish between Asymptotic notation and Conditional
asymptotic notation(10)
(ii) Explain how the removing condition is done from the conditional asymptotic notation with an
example(6)
5. (i)Solve the following recurrence relation(8)
(1) T(n)=T(n/2)+1, where n=2k for all k> 0
(2) T(n)=T(n/3)+T(2n/3)+cn, where ‘c’ is a constant and ‘n’ is the input size.
(ii)Write an algorithm for finding maximum element of an array,perform best,worst and
average case complexity with appropriate order notations.(8)
UNIT 2 1. Write an algorithm for all pairs shortest path algorithm and what are the time and space
complexity of the algorithm.
2. Explain Floyd algorithm with example. Write down and explain the algorithm to solve all

pairs shortest paths problem


3. (i)How do you construct a minimum spanning tree using Kruskals algorithm?Explain?(4)
(ii)Discuss about the algorithm and pseudocode to find the Minimum Spanning Tree using
Prim’s Algorithm. Find the Minimum Spanning Tree for the graph. Discuss about the
efficiency of the algorithm?(12)
4. (i)Solve the all-Pairs shortest-path problem for the diagraph with the following weight

matrix: (8)
(ii) Apply Kruskal’s algorithm to find a minimum spanning tree of the following graph.

5. How do you compute maximum flow for the following graph using Ford-Fulkerson

method?
UNIT 3 1. (i)What is divide and conquer strategy and explain the binary search with suitable example
Problem?
(ii)Explain in detail in merge sort give an example.
2. Distinguish between Quick sort and Merge sort, and arrange the following numbers in
increasing order using merge sort. (18, 29, 68, 32, 43, 37, 87, 24, 47, 50) .
3. Write an algorithm to perform binary search on a sorted list of elements. Analyze the
algorithm for the best case, average case and worst case.
4. (i)Write an algorithm to construct the optimal binary search tree (or) Discuss the
algorithm for finding a minimum cost binary search trees.(8)
(ii) Explain how dynamic programming is applied to solve travelling salesperson
problem. (8).
5. Write the Huffman’s Algorithm. Construct the Huffman’s tree for the following data and
obtain its Huffman’s Code. (APR/AMY 2017) (A)

Characters A B C D E -

Probability 0.5 0.35 0.5 0.1 0.4 0.2

UNIT 4 1.Describe the backtracking solution to solve 8-Queens problem.


2.Explain the n-Queen’s problem and trace it for n=6?(6)
(i)Explain Hamiltonian cycles. (4)
(ii) With an example, explains Graph Coloring Algorithm (6)
3.(i)Let w= {5, 7, 10, 12, 15, 18, 20} and m=35.Find all possible subet of w whose sum is equivalent to
m.Draw the portion of state space tree for this problem. (8)
(ii) Give the backtracking algorithm for knapsack problem
4.(i) Draw a decision tree and find the number of key comparisons in the worst and average cases for the
three element bubble sort. (8)
(ii) Write backtracking algorithm for 4 queen’s problem and discuss the possible solution. (8)
5.(i)Apply Branch and bound algorithm to solve the travelling salesman problem.

(ii) Find the optimal solution using branch and bound for the following assignment problem

UNIT 5 1. Implement an algorithm for Knapsack problem using NP-Hard approach.


2. Discuss the approximation algorithm for NP hard problem?
3. What is class NP? Discuss about any five problems for which no polynomial time for TSP
problem.
4. Elaborate on the nearest-neighbor algorithm and multifragment- heuristic algorithm for TSP problem.
5. Write an algorithm to solve the travelling salesman problem and prove that it is a 2 time
approximation algorithm.
2 MARKS ALL FIVE UNITS
1.What do you mean by algorithm?
2.What is space complexity?
3.What is time complexity?
4. What is average case efficiency?
5. Define the asymptotic notation “Big oh”?
6. Define recurrence?
7. Define Linear Search?
8. Define a graph?
9. What are directed graphs?
10. Define weighted graph?
11. What are the applications of graphs?
12. Give the Floyd’s algorithm?
13. Define the single source shortest path problem?
14. Give the general plan for divide-and-conquer algorithms.
15. State Master’s theorem
16. What are the differences between dynamic programming and divide and conquer
approaches?
17. Write the general procedure of dynamic programming?
18. Define multistage graphs. Give an example.
19. Differentiate backtracking and Exhaustive search?
20. Define the Hamiltonian cycle.
21. When can a node be terminated in the subset-sum problem?
22. State m color-ability decision problem.
23. Define bounding.
24. What is meant by NP hard and NP complete problem?
25. Define NP completeness and NP hard?

Instructions for preparation of UPC Questions:

1. Each unit should include five important 16-mark questions.

2. For problem-oriented subjects, all types of problem-based questions must be covered.

3. A total of 20 to 25 two-mark questions should be prepared, with equal distribution

across all units.

You might also like