The document outlines the end-term examination details for the Design and Analysis of Algorithm course at DIT University, Dehradun, for the Odd Semester 2022-23. It includes instructions for the exam, a breakdown of questions covering various algorithmic concepts, and specific tasks related to time complexity, sorting algorithms, and dynamic programming. The exam consists of multiple parts, requiring students to demonstrate their understanding of algorithms through problem-solving and programming tasks.
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 ratings0% found this document useful (0 votes)
26 views2 pages
CAF204 DAA Moderated
The document outlines the end-term examination details for the Design and Analysis of Algorithm course at DIT University, Dehradun, for the Odd Semester 2022-23. It includes instructions for the exam, a breakdown of questions covering various algorithmic concepts, and specific tasks related to time complexity, sorting algorithms, and dynamic programming. The exam consists of multiple parts, requiring students to demonstrate their understanding of algorithms through problem-solving and programming tasks.
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/ 2
Subject Code:CAF-204_Moderated Printed Page 1 of 2
DIT UNIVERSITY , DEHRADUN
BCA(REGULAR/BACK) : END TERM EXAMINATION, ODD SEM 2022-23 (SEM III)
Roll No.
Subject Name: Design and Analysis of Algorithm
Time: 3 Hours Total Marks: 100 Note: All questions Subject are compulsory. No student is allowed to leave the examination hall beforePrinted Code:CAF-204_Moderated the completion Page 2 ofof2 the exam. ________________________________________________________________________________________________ ______
Q.1) Attempt all Parts : BTL CO
(a) Compare Time Complexity with Space Complexity with the help of example. L6 CO1 (b Differentiate between Backtracking and Branch and Bound Techniques. L4 CO4 ) (c) Explain n-queen problem with the example of 4x4 technique. L1 CO4 (d Write selection sort algorithm or C program and explain with the help of example. L1 CO2 ) [4 x 5= 20]
Q.2) Attempt all Parts : BTL CO
(a) Solve the following recurrence using Master method: L2 CO2 T (n) = 4T (n/3) + n2 T (n) = 2T (n/2) + n log n (b Difference between Greedy Technique and Dynamic programming with the help of L4 CO3 ) example. (c) Explain matrix chain multiplication. We are given the sequence {4, 10, 3, 12, 20, and L1 CO4 7}. The matrices have size 4 x 10, 10 x 3, 3 x 12, 12 x 20, 20 x 7 and you need to compute M [i,j], 0 ≤ i, j≤ 5. (d What are the characteristics of the algorithm? Explain in detail. L1 CO1 ) [4 x 5= 20]
Q.3) Attempt any two parts : BTL CO
(a) i) Find the shortest path in the below graph from the source vertex A to all other L3 CO3 vertices by using Dijkstra’s algorithm.
ii)What is asymptotic notation explain with the help of example.
(b Explain 0/1 knapsack problem using dynamic programming. Consider the problem L1 CO4 ) having weights and profits are: Weights: {3, 4, 6, 5} Profits: {2, 3, 1, 4} Weight of the knapsack is 8 kg and number of items is 4 (c) Write a merge sort algorithm or C program. Show all the stages of the following data L1 CO3 of array size 12 through which it passes by applying merge sort 45,23,12,24,54,8,7,21,13,14,4,6. [2 x 10= 20]
Q.4) Attempt any two parts : BTL CO
(a) What is the time complexity of the following code: L1 CO1 i) int i, j, k = 0; for (i = n / 2; i <= n; i++) { for (j = 2; j <= n; j = j * 2) { k = k + n / 2; } ii) int a = 0;