Q.1 what do you mean by Analysis of Algorithm? Write an
Algorithm For Insertion Sort and Analyze it. Q.2 E!lain strassen"s #atri #ulti!li$ation? %ri&e its time $om!leity why this better than ordinary #atri #ulti!li$ation? Q.' what is (reedy A!!roa$h? %oes it always gi&e o!timal solution? E!lain )rus*al"s algo to obtain #S+. Q., %es$ribe the &arious ty!es of notations with eam!le? Q.- finds the o!timal merge !attern for the gi&en &alues '-. 1-. 2/. ,/. 1/ Q.0 illustrate the o!eration of min hea! tree for gi&en &alues 1/. 2/. '/. 1. 2. '. ,. 11. 21. '1. ,1 Q.1 sol&es the following re$urren$e relations and find their $om!leities using #aster #ethod. Q.2 E!ress the following fun$tion using asym!toti$ notations3 4i5 062 n 7 n 2 4ii5 86n4n915 Class Test: 1 Q.1 What is the di&ide and $on:uer #ethod? Sort the following se:uen$e using #erge Sort method -. 2. ,. 1. 1. '. 2. 0 Q2.$onsider the fi&e items along with their res!e$ti&e &alues and weights. I; <I1. I2. I' . I, . I-= W; <-. 1/. 2/. '/. ,/= >; <'/. 2/. 1//. ?/. 10= )na!sa$* has @a!a$ity W;0/. Find the o!timal solution of the !roblem using $on$e!t of fra$tional )na!sa$*. Q.' E!lain the Aob se:uen$ing !roblem with eam!le. Q., Bse strassen"s matri multi!li$ation algo to $om!ute the matri !rodu$t of the following matri$es3 A ; C ; 1 ? 2 - ' 2 - - Assignment: 2 Q1. 4a5 %efine how )na!sa$* Droblem is sol&ed by using dynami$ !rogramming a!!roa$h? 4b5 @onsider n;'. 4w1.w2. w' 5 ; 42 . '. ' 5 4!1. !2. !'5 ; 41. 2. ,5 and #;0 find o!timal solution for gi&en data Q.2 E; Fa. a. b. a. b G . H; Fb. a. b. b G
If I is an J@S of E and H. then find I using %ynami$ Drogramming. Q.' Sol&e the +SD Droblem ha&ing the following $ost matri using Cran$h and Cound A C @ % E 1/ 1- 2/ - E ? 1/ 0 1' E 12 2 2 ? E
A C @ % Q., E!lain the matri $hain multi!li$ation algorithm using dynami$ a!!roa$h. Q.- find the order of !arenthesization for the o!timal $hain multi!li$ation A1 ; '/ 6 '- K A2 ; '- 61- K A' ; 1- 6 -K A, ; - 6 1/K A- ; 1/ 6 2/ K A0 ; 2/ 6 2-K Q.0 Write short note on following3 4i5 Ca$*tra$*ing algorithm 4ii5 Jower bound theory 4iii5 Queen"s !roblem Q.1 use %ynami$ !rogramming a!!roa$h to sol&e the following instan$e of the !roblem. #aimum $a!a$ity3 11 units Lo of items3 - Weights3 1. 2.-.0.1 Drofits3 1. 0. 12. 22. 22 Class Test: 2 Q1. Sol&e the +SD Droblem ha&ing the following $ost matri using Cran$h and Cound
A C @ % E - 2 ' , E 2 ' , 2 E ' 1 0 2 E
A C @ % Q.2 E; FA. C. @. C. %. A. C G . H; FC. %. @. A. C. A G
If I is an J@S of E and H. then find I using %ynami$ Drogramming. Q.' %ifferentiate between (reedy algorithm and %ynami$ Drogramming Assignment: 3 Q.1 E!lain the !refi fun$tion for a String with an eam!le and write )#D mat$her algorithm? Q.2 Write short note on the following3 4i5 Quadrati$ assignment !roblem 4ii5 Coyer #oore algorithm Q.' %es$ribe LaM&e string #at$hing algorithm in detail? Q., E!lain Nabin *ar! algorithm with suitable eam!le? Q.- Bsing )#D algorithm find whether the !attern D ; F 1/1//111G is in tet +; F1//1/1/1//111G or not? Q.0 Sol&e the following assignment !roblem using bran$h and bound for whi$h $ost matri is gi&en below 1 2 ' , 11 12 12 ,/ 1, 1- 1' 22 11 11 1? 2' 11 1, 2/ 22
A C @ % Class Test: 3 Q.1 Derform Nabin )ar! algorithm on gi&en tet +; F 2. '. -. ?. /. 2. '. 1 ,. 1. - G D; F '. 1. ,. 1. - G and modulo :;1 Q.2 E!lain the Coyer #oore algorithm for !attern mat$hing using bad $hara$ter heuristi$ and good suffi heuristi$s with eam!le? Q.' Write the )#D string mat$hing algorithm and also find the !refi fun$tion for the following !attern 3 a b a b b a b a a and Im!lement the algorithm. Assignment: 4 Q1. E!lain the Jas >egas and #onte @arlo algorithm with eam!le? Q.2. E!lain the flow networ* and augmenting !aths? Q'.show the formation of $uts. augmentation !ath. min9flow9ma9 $ut in the following gra!h. Class Test: 4 Q.1 define flow networ* and sol&e the following flow networ* for maimum flow. Q.2 what are the randomized algorithms? What are the ad&antages using this $on$e!t? Q.'. E!lain Nandomized algorithm for #in $ut. Assignment: 5 Q1. What is the use of $oo*"s theorem? Dro&e it with eam!le. Q.2 define the terms D. LD. LD @om!lete and LD hard !roblems Q.' E!lain set $o&er !roblem in detail? Q., assuming '9 @LF satisfiability !roblem to be LD9@om!lete. !ro&e that $li:ue !roblem is also LD9$om!lete !roblem.
Class Test: 5 Q.1 E!lain >erte $o&er and set $o&er !roblem is LD9@om!lete !roblem. Q.2 !ro&e that +SD !roblem is LD O$om!lete !roblem. Q.' E!lain the relation between LD.LD9@om!lete . LD9hard !roblem