Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

15527

Reg. No.
V Semester B.C.A.
Degree Examination, March/April -
COMPUTER SCIENCE
Analysis and Design of Algorithm
Paper : BCA 504T
(CBCS Scheme)
Time : 3 Hours
Instructions to Candidates: Maximum Marks :70
Answer all sections.

I.
SECTION - A
Answer any Ten questions.
1. Define Algorithm. Mention the (10×2=20)
2. characteristics of algorithm.
Distinguish between Debugging and
3. State the different efficiency classes. profiling.
4
Define Knapsack problem.
5 What is minimum cost spanning tree?
6 Define subgraph with an example.
7 How graph can be represented using
8 What is flow shop scheduling? adjacency matrix? Give an example.
9. Define complete Binary tree with an example.
10. What is Back tracking?
11. What is Graph coloring
12. Define problem?
Hamiltonian cycle.
SECTION - B
II Answer any Five questions.
13
Explain time and space complexity of an (5x10=50)
Explain different control structures. algorithm with an example. (5)
Write a recursive algorithm for binary search (5)
complexity. method. Derive its time
b Trace the merge sort algorithm for the data :40, 10, (5)
80, 50, 30, 20, 70, 60.(5)

[PTO.
(2) 15527

Apply Prim's algorithm for the following graph. (5)

20 25

35

Find minimum weight spanning tree by kruskal's algorithm. (5)

16. Write the Dijkstra's Algorithm and find the shortest path from node 1to all other
nodes. (10)

2
17. Find the minimum cost path from S to t in the multistage graph using forward
(10)

b
(3) 15527
Draw and explainthe state space tree for graph coloring when n=3, m=3 (n
is a number of vertices and m is number of colors).
Write aprogram to sort an array using Quick sort technique. State its efficiency.
Define Tree. Traverse the following tree in preorder, postorder and in order.(6)

Write a short notes on 4-Queen's problem. (4)


20. Consider the graph starting at vertex a. Traverse the graph by DFS and BFS. Dravw
the DFS and BFS spanning trees.

You might also like