Escolar Documentos
Profissional Documentos
Cultura Documentos
UNIT
NUMBER
OF
TEACHING
HOURS
PART A2 MARKS
PART B5 MARKS
PART C10
MARKS
TOTAL
3*2=6
1*5=5
11
3*2=6
1*5=5
11
10
2*2=4
1*5=5
1*10=10
19
10
1*2=2
2*5=10
1*10=10
22
12
2*2=4
2*10=20
24
12
2*2=4
2*5=10
1*10=10
24
2*2=4
1*5=5
TOTAL
60
15*2=30
8*5=40
5*10=50
120
Module-1 Introduction
2 marks
[3 has to be picked]
1. What is an algorithm?
2. List the characteristics of the algorithm.
3. What is program verification?
4. What is debugging?
5. What is profiling?
6. What is analysis of an algorithm?
7. What is performance analysis of an algorithm?
8. What is posteriori testing?
9. Distinguish between priori and posteriori testing.
10.
Distinguish between performance analysis and performance
measurement.
11.
Define time complexity of an algorithm.
Or
What is time complexity of an algorithm?
12.
Define space complexity of an algorithm.
Or
What is space complexity of an algorithm?
13.
Define big-oh(O) notation. Give one example.
Or
What is big-oh(O) notation? Give one example.
14.
15.
Define theta
Or
What is theta
16.
Given f(n) = 5n+2, prove that f(n) = (n).
17.
Given f(n) = 5n+3, prove that f(n) =O(n).
18.
Given f(n) = 5n+2, prove that f(n) = (n).
19.
Given f(n)= 20n-3, prove that f(n) = O(n).
20.
What is operation count and step count?
21.
Let f(n) = 100n+5, Express f(n) using theta.
22.
Arrange the following time complexities in ascending order O(1),
O(n), O(2), O(n), O(logn), O(nlogn).
5 marks
[1 has to be picked]
11.
12.
13.
Demonstrate that the computing time to multiply the square
matrices is of O(n3).
Module-2: Introduction
2 marks:
[3 has to be picked]
1.
2.
3.
4.
Give the algorithm for calculating the sum of elements in the array.
Give the algorithm for matrix addition.
Give an algorithm for matrix subtraction.
Give the recursive algorithm for calculating the sum of elements of an
array.
5. Give the recursive algorithm for generating first N Fibonacci numbers.
6. Give the algorithm (recursive) for finding the factorial of a number.
7. Give the algorithm for insertion sort.
8. Give the algorithm for bubble sort.
9. Give the time complexity of bubble sort algorithm.
10.
Give the time complexity of selection sort algorithm.
11.
Give the algorithm for linear search.
12.
Give the algorithm for sequential search.
13.
Give the time complexity of linear search.
14.
Give the time complexity of algorithm to calculate the factorial of
a number.
15.
Give the time complexity of recursive algorithm to calculate the
factorial of a number.
16.
Give the time complexity of recursive algorithm for generating
first N Fibonacci numbers.
17.
Give the algorithm to find the transpose of a matrix.
18.
Explain best case of an algorithm.
19.
Explain worst case of an algorithm.
20.
Explain average case of an algorithm.
21.
Give the algorithm for finding the maximum for a given set of
numbers.
22.
Give the algorithm for finding the minimum for a given set of
numbers.
5 marks:
[1 has to be picked]
1. Give the insertion sort algorithm and analyze the time complexity of
the algorithm.
2. Give the bubble sort algorithm and analyze the time complexity.
3. Give the algorithm selection sort (a,n) and analyze the time
complexity.
4. Give the complexity and algorithm for straight maxmin.
5. Give the algorithm for binary search.
11.
Derive the time complexity of recursive of recursive maxmin
algorithm.
12.
13.
Give the algorithm for evaluating a polynomial using horners
method.
14.
15.
Write the algorithm for selection sort and give the time
complexity.
16.
Explain bubble sort technique with an example(consider at least
5 unsorted elements).
17.
18.
19.
Explain insertion sort technique with the help of the
example(consider at least 5 elements).
20.
21.
22.
23.
[2 has to be picked]
[1 has to be picked]
[1 has to be picked]
10.
5 Marks
[2 has to picked]
2 marks:
[2 has to be picked]
16.
10
0
13
8
15
9
0
9
20
10
12
0
15
0
8
8
10
9
0
9
20
10
20
0
2 marks:
[2 has to be picked]
5 marks:
[2 has to be picked]
1. Explain general back tracking method and write control abstraction for
back tracking.
2. Give the iterative back tracking control abstraction.
3. What is 4 queens problems? Explain with the help of diagram.
4. What is 8 queens problem? Explain with the help of a diagram.
5. Write the algorithm for N queens problem.
6. Trace N queens algorithm where N=4.
7. Explain how the four queens problem can be solved using
backtracking.
8. Give the algorithm for finding all solutions of N queens problem.
9. Briefly explain the branch and bound method.
10.
a. Live node.
b. Dead node.
c. E-node.
d. Solution space.
e. Bounding function.
11.
5 marks:
[1 has to be picked]
JAIN UNIVERSITY
MODEL QUESTION PAPER
Analysis and Design of Algorithms (4BCA2)
IV semester BCA
PART A
1. What is an Algorithm?
2. Define Theta notation.
3. What is profiling?
4. Write an Algorithm to print first n elements in a Fibonacci series.
5. Write insertion sort algorithm.
6. Derive time complexity of bubble sort algorithm.
7. What are the disadvantages of divide and conquer method.
8. Give the control abstraction of divide and conquer method.
9. What are the advantages of greedy approach?
10.
What is an adjacency matrix?
11.
Define a path. Give one example.
12.
What is e-node and dead node?
13.
What are the two types of constraints for Backtracking?
14.
What is NP-Hard problem?
15.
What is NP-complete problem?
PART-B
Answer any 6 questions. Each carries 5 marks.
6*5=30
1. What is time complexity? With the help of an example explain how
time complexity is calculated using step count method.
2. Derive the time complexity of recursive binary search algorithm.
3. Give Quick sort Algorithm.
4. Solve the following 0/1 knapsack problem using greedy method.
( Strategy 3 only i.e order by pi/wi ). M=40,N=4
Weights: w1, w2, w3, w4 = 20, 25, 10, 15
Profits: p1, p2, p3, p4 = 50, 40, 85, 45
5. Give Kruskals algorithm.
6. Give the algorithm for solving n queens problem using Backtracking
method.
7. Explain Backtracking. Give the control abstraction of Backtracking.
8. Give the Non-deterministic algorithm for sorting.
PART-C
1.
1
8
11
7
9
2
13
14
14
15
3
4
12
3. Find the optimal tour cost for the below graph (Traveling salesman
problem) using branch and bound method.
4
1
4
1
3
1
2
3
5
10
1
1
3
6
2
5
3
2