Gujarat Technological UniversityWinter 2023 Examination

GTU 3150703 Analysis and Design of Algorithms (ADA) Winter 2023 Paper Solution & PDF

B.E. · Computer Engineering · Semester 5 · Subject Code: 3150703
Download Official GTU PDF
Share:
Total Marks70 MarksExternal theory exam
Passing Marks23 Marks33% minimum cutoff
Exam Duration2.5 Hours10:30 AM – 1:00 PM
Paper Structure5 QuestionsWith internal OR choices
Jump toQ1Q2Q3Q4Q5

Question 1

14 MarksMedium
(a)
What is an algorithm? Explain various properties of an algorithm.
3 Marks
(b)
Solve the following using Master’s theorem:
aT(n) = 2T(n/4) + 1
bT(n)=3T(n/4) + nlgn
4 Marks
(c)
Write selection sort algorithm and compute running time of algorithm.
7 Marks

Question 2

14 MarksMedium
(a)
Explain general characteristics of greedy algorithms.
3 Marks
(b)
What is asymptotic notation? Find out big-oh notation of the f(n) = 3n2+5n+10
4 Marks
(c)

Illustrate the working of the quick sort on input instance: 25, 29, 30, 35, 42, 47, 50, 52, 60. Comment on the nature of input i.e. best case, average case or worst case. Also discuss worst and best case of quick sort algorithm.

7 Marks
OR OPTION
(c)

Give the properties of Heap Tree. Sort the following data using Heap Sort Method: 20, 50, 30, 75, 90, 60, 80, 25, 10, 40.

7 Marks

Question 3

14 MarksMedium
(a)

Sort the List “G,U,J,A,R,A,T,S,A,R,K,A,R” in alphabetical order using merge sort.

3 Marks
(b)

Following are the details of various jobs to be scheduled on multiple processors such that no two processes execute at the same on the same processor. Show schedule of these jobs on minimum number of processors using greedy approach. Jobs J1 J2 J3 J4 J5 J6 J7 Start time 0 3 4 9 7 1 6 Finish time 2 7 7 11 10 5

4 Marks
(c)

Using algorithm find an optimal parenthesization of a matrix chain product whose sequence of dimension is (5,10,3,12,5,50,6) (use dynamic programming).

7 Marks
OR OPTION
(a)

Apply counting sort for the following numbers to sort in ascending order. 3, 1, 2, 3, 3,

3 Marks
(b)

Find the Optimal Huffman code for each symbol in following text ABCCDEBABFFBACBEBDFAAAABCDEEDCCBFEBFCAE

4 Marks
(c)

Solve following knapsack problem using dynamic programming algorithm with given capacity W=5, Weight and Value are as follows (2,12),(1,10),(3,20),(2,15)

7 Marks

Question 4

14 MarksMedium
(a)

Solve the following Task Assignment problem for minimization using following cost matrix. (Cost matrix represents cost of Task T performed by Person P). T1 T2 T3 P1 10 20 25 P2 20 23 26 P3 12 16 25

3 Marks
(b)

Given coins of denominations 2, 3 and 4 with amount to be pay is 5. Find optimal no. of coins and sequence of coins used to pay given amount using dynamic method.

4 Marks
(c)

Write an algorithm to find out the articulation points of an undirected graph. Find out articulation points for the following graph. Consider vertex 0 as the starting point.

7 Marks
OR OPTION
(a)

Find out the NCR (5

3Using Dynamic Method.
3 Marks
(b)

Write the Kruskal’s Algorithm to find out Minimum Spanning Tree. Apply the same and find MST for the graph given below.

4 Marks
(c)

Explain Backtracking Method. What is N-Queens Problem? Give solution of 4- Queens Problem using Backtracking Method.

7 Marks

Question 5

14 MarksMedium
(a)

Demonstrate Binary Search method to search Key = 14, form the array A = <2,4,7,8,10,13,14,60>.

3 Marks
(b)

Solve the following knapsack problem using greedy method. Number of items = 5, knapsack capacity W = 100, weight vector = {50,40,30,20,10} and profit vector = {1,2,3,4,5}.

4 Marks
(c)
Define P, NP, NP-complete, NP-Hard problems. Give examples of each
7 Marks
OR OPTION
(a)
Explain in Brief: Polynomial reduction.
3 Marks
(b)

Traverse the following graph using Breadth First Search Technique. Also draw BFS Tree for a given graph.

4 Marks
(c)
Explain spurious hits in Rabin-Karp string matching algorithm with example.

Working modulo q=13, how many spurious hits does the Rabin-Karp matcher encounter in the text T = 2359023141526739921 when looking for the pattern P = 26739?

7 Marks
College Exam Groups

Studying for Analysis and Design of Algorithms?

Circulate this solved paper with KaTeX formulas and 1-click AI step solvers to your batchmates on WhatsApp or Telegram.

About this Examination Paper & Attribution

Official Gujarat Technological University (GTU) examination paper and step-by-step solutions for Analysis and Design of Algorithms (ADA) (Winter 2023, B.E. · Computer Engineering, Sem 5). Features complete 70-mark regular & remedial examination pattern, official marking distribution across all 5 questions, and direct 1-click official PDF download.

Transcribed for student exam preparation from Gujarat Technological University official examination archives. Questions, syllabus guidelines, and curriculum marking schemes remain the intellectual property of Gujarat Technological University.

Download PDF