1) What You Mean by Divide and Conquer Strategy? 2) Write Control Abstraction For Ordering Paradigm
1) What You Mean by Divide and Conquer Strategy? 2) Write Control Abstraction For Ordering Paradigm
&p1+ p2+ p34p%) 3 &1-+ "+ 1"+ %+ $+ 1*+ 3) &!1+ !2+ !34!%) 3 &2+ 3+ "+ %+ 1+ 4+ 1)
CS %%51 - $ESIGN AN$ ANALYSIS OF ALGORITHMS ANS*ER ALL THE +,ESTIONS Ma"(s: - .
") 2ind a minimum cost path from s to t in the multistage graph for the follo!ing graph. &12)
1) 2)
3) 4) ")
$)
What you mean by divide and conquer strategy? Write control abstraction for ordering paradigm.
What is the time complexity of binary search? ifference bet!een greedy method and dynamic programming. #tate the principle of optimality.
efine optimal binary search tree.
%)
Write an algorithm and explain the problem of finding the maximum and minimum items in a set of n elements. &12)
&'() 2) a) )rrange the follo!ing numbers in increasing order using merge sort. &1*+ 2,+ $*+ 32+ 43+ 3%+ *%+ 24+ 4%+ "-) &$) b) Write an algorithm and time complexity of merge sort. &$) 3) a) evice the problem to ma.e a change for (s. 1$"" using greedy strategy. /he coins available are 01---+ "--+ 1--+ "-+ 2-+ 1-+ "1. &4) b)#uppose you have $ containers !hose !eights are "-+ 1-+ 3-+ 2-+ $-+ " and a ship !hose capacity is 1--. 2ind an optimal solution. &*) 4) efine greedy algorithm and find an optimal solution to the .napsac. instance n3%+ m31". &12)