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

Algorithms and Data Structures Exam Guide

This document contains questions for an exam on data structures and algorithms. It covers topics such as algorithms, asymptotic analysis, sorting, trees, graphs, dynamic programming, and randomized algorithms. The exam consists of 3 sections worth a total of 100 marks. Section A contains 10 short answer questions worth 2 marks each. Section B contains 5 algorithm writing or problem solving questions worth 10 marks each. Section C contains 2 algorithm writing or problem solving questions worth 15 marks each. Students must answer all questions in Section A and 5 out of 6 questions in Section B. For Section C, they must answer 2 out of 3 questions. The questions cover a wide range of data structures and algorithms topics.

Uploaded by

rajiv.mishra
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)
89 views2 pages

Algorithms and Data Structures Exam Guide

This document contains questions for an exam on data structures and algorithms. It covers topics such as algorithms, asymptotic analysis, sorting, trees, graphs, dynamic programming, and randomized algorithms. The exam consists of 3 sections worth a total of 100 marks. Section A contains 10 short answer questions worth 2 marks each. Section B contains 5 algorithm writing or problem solving questions worth 10 marks each. Section C contains 2 algorithm writing or problem solving questions worth 15 marks each. Students must answer all questions in Section A and 5 out of 6 questions in Section B. For Section C, they must answer 2 out of 3 questions. The questions cover a wide range of data structures and algorithms topics.

Uploaded by

rajiv.mishra
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

GREATER NOIDA INSTITUTE OF TECHNOLOGY, GR.

NOIDA
PUT, 2017-18
3rd Yr (IT).[Link] (V SEMESTER)
DAA (NCS-501)
Time-3:00Hrs [Link]

Section A
Note: Attempt all parts: 2*10 = 20
(A) What do you mean by an algorithm?
(B) Differentiate between Internal sorting & External sorting.
(C) How partitioning affects complexity in quick sort?
(D) What is minimum cost spanning tree?
(E) Discuss characteristics of dynamic programming.
(F) What do you mean by complexity?
(G) Discuss all major asymptotic notations.
(H) Find big oh notation of f(n) = 9n3 + 4n2 + 19n + 3
(I) Differentiate between divide & conquer and dynamic programming.
(J) Explain 0/1 knapsack & fractional knapsack.
Section B
Note: Attempt any 5 parts : 5*10=50
Q1 (a) Write an algorithm to perform merge sort.
Q1 (b) Write algorithm for RB Tree deletion.
Q2 (a) Discuss Strassen’s matrix multiplication with an example.
Q2 (b) Sort the following set of elements using heap sort 11,32,6,19,31,44,26,7,22
Q3 (a) Discuss Dijkstra’s shortest path algorithm.
Q3 (b) Determine schedule for the following set of jobs:
i 1 2 3 4 5 6 7
Si 3 1 5 6 9 11 12
Fi 5 4 8 8 12 14 16

Q4 (a) Write an algorithm to implement prim’s spanning tree.


Q4 (b) Solve the following travelling salesman problem using dynamic programming. Edges (1,2),(1,3),(1,4),
(2,3),(2,4),(3,4) has weights 4,3,7,15,8,2 respectively.

1 3

2 4
Q5 (a) Write an algorithm for n-queens problem.
Q5 (b) Solve the following graph coloring problem with m=3

2 5

1 4
32 6

Q6 What is Randomized algorithm? Explain with suitable example.


Q7 Discuss decision class problem. Differentiate between NPC & NP hard.
Q8(a) Write algorithm of union operation in binomial heap.
Q8(b) Find LCS of X= 100110 and Y= 110110

Section C
Note: Attempt any two parts: 2*15=30
Q1.a) Write algorithm for KMP matcher.
Q1. b) Parenthesize following set of matrices using dynamic programming:
P 4 3 5 2 3 4
Q2.a) Find an optimal solution to the knapsack instance n=7 objects and the capacity
of knapsack m=15. The profits and weights of the objects are (P1,P2,P3, P4, P5,
P6, P7)= (10, 5,15,7,6,18,3) (W1,W2,W3,W4,W5,W6,W7)= (2,3,5,7,1,4,1)
Q2b) Create Red Black tree from following sequence of element: 12,9,40,48,16,4,56,71,90,18,41
Q3a) Create B-tree of degree 3 from following sequence of elements:
11,88,9,3,16,27,31,34,55,6,41,26,30,39,48,17,5,24
Q3b) Match pattern P= 3241 with text T= 2834324167521 for q=11 using Rabin Karp matcher.

You might also like