Top Banner

of 22

Model Qp MC0080 smu

Oct 26, 2014

ReportDownload

Documents

Model Question Paper Subject Code: MC0080 SubjectName: Analysis and Design of Algorithms Credits: 4Marks: 140 Part A (One mark questions) 1.Aprocessisa.ofactivitiesactuallybeingcarriedoutexecuted,tosolvea problem.A) Phase B) Progression C) Sequence D) Series 2. The symbol is used for . A) Update B) Assignment C) Download D) Logical variables 3.= + + + +na a a a ........3 2 1 A) =niia1 B) ia[ C) iaD) iia

4. A function f: N N which is defined as 2) ( x x f = is A) not a function B) Assignment function C) one-one function D) Exponential function 5. A stack is an ordered list in which all insertions and deletions are made at one end, called the A) bottom B) top C) medium D) order 6. The insert operation on a stack is often called A) POP B) PUSH C) FLICK D) LIFO 7. All leaves have the same depth, which is the trees A) Weight B) Breadth C) HeightD) Age 8. A is a collection of Binomial trees A) Binomial forest

B) Binomial push C) Binomial flick D) Binomial heap 9.. is a variant of a nim game and it is played with matchesA) MariendabB) Nimbad C) MarienbadD) Marinedab 10. A terminal node from which there is no legal move is a . positon. A) stable B) losing C) gainingD) unstable 11... is conceptually a top down approach for solving problemsA) DivideB) Backtracking C) Dynamic programming D) Divide and Conquer 12. is a bottom up approach for solving problemA) Backtracking B) Divide and ConquerC) Dynamic programming D) Knapsack

13. Algorithms based on Greedy technique are used for solving A) Linear problemsB) Optimization problemsC) Quadratic problems D) Bi-Quadratic problems 14.Aminimumspanningtreeofaweightedconnectedgraphisits..withthesmallest weightA) Ordered tree B) Spanning treeC) ForestD) Rooted tree 15. Every member of any language is said to be a A) non-string B) alphabetC) stringD) non-alphabet 16. For any set S of strings (S-)- =A) S2 B) S0 C) S- D) -S 17.IfLisalanguageoveranalphabetA,then agrammar forL consistsofasetof grammar rules of the form A) yx

B) xx C) xyD) yy 18. If S is a start symbol for a grammar, then there must be atleast one production of the formA) yyB) Sy C) SSD) yS 19. model is the corresponding grammatical model that matches turing machines in computational power.A) Phase model B) Structure model C) Phrase-structure modelD) Pushdown model 20...isanabstractentityconstitutedofmathematicalobjectslikesetsanda function.A) Auto Machine B) Turing Machine C) Automata MachineD) Finite Machine 21. may consist of various number of loops, nested or in sequence. A) Decidable problem B) Algorithms C) Phrase-structure problem

D) Pushdown problem 22.Halting problem is ..A) decidable B) infinite C) UndecidableD) a Finite Machine 23. The size of a problem is measured in terms of the A) output B) input C) level of problems D) complexity 24. A problem is if it is NP andfor which no polynomialtime deterministic TM solution is known so far. A) NP hardB) FiniteC) SolvableD) NP complete 25. While proving a theorem, if an unrequired lemma is proved, we may ignore it. The only loss is the loss of efforts in proving the lemma. Such a problem is called A) Step problem B) Ignorable problem C) Ignorable step problem D) Deciding problem

26.isamethodofexpressingalgorithmsbyacollectionofgeometricshapeswith imbedded descriptions of algorithmic steps. A) Flow chart B) Chart C) Numerical method D) Differential method 27. The key at reach node is greater than or equal to the key at its A) Forest B) Ancestors C) Children D) Root 28. If n is . we set both the minimum and maximum to the value of the first element, and then we process the rest of the elements in pairs. A) EvenB) OddC) Multiple of two D) Multiple of three 29. In a .. the previous pointer of the head of the list points to the tail, and the next pointer of the tail of the list points to the head. A) Linked list B) Doubled list C) Circular list D) Sorted list 30. The procedure .. finds the first element with key k in list L by a simple linear search, returning a pointer to this element. A) LIST-SEARCH (L, k)

B) LIST-COUNT (L, k) C) LIST-SEARCH (L, k)D) LIST-INSERT (L, k) 31. When two keys HASH to the same slot, we call the situation as A) Hashing B) Collision C) Slotting D) Inserting 32.Thekeysinabinarysearchtreearealwaysstoredinsuchawaysoastosatisfythe A) Binary-search-tree property B) Search-tree property C) Binary-tree property D) Binary-property 33. Basic operations on a binary search tree takes time . (to) the height of the tree. A) Inversely proportional B) Equal C) Proportional D) Three times more 34.A..isabinarysearchtreewithoneextrabitofstoragepernode:itscolor, which can be either RED or BLACK. A) Red tree B) Black tree C) Tree

D) Red-black tree 35. A red black tree with n internal nodes has height of at most A) lg (n + 1) B) n log (n + 1) C) 2 lg (n + 1) D) lg (n + 1)2

36. A . is simply red black tree with additional information stored in each node.A) Order-statistic tree T B) Order tree T C) Statistic tree T D) Derived tree T 37...algorithmsearchesagivenvalueorelementinanalreadysortedarrayby repeatedly dividing the search interval into half. A) Binary B) Binary search C) SortingD) Merge 38. .. is a sorting algorithm which is based on the divide and conquer technique. A) Mergesort B) Integer C) Greedy D) Recursive

39. E[T(n)] =A) E[X] B) n E[X] C) n + E[X] D) n[X] 40. Current best upper bound for multiplying matrices is approximately A)( )376 . 22n O B)( )376 . 23n OC)( )376 . 2n OD)( ) n O Part B (Two mark questions) 41. State true(T) or false(F) Thenotationforthecontrolmechanismfordirectsequencingisobtainedbywritingofthe instructions, i. Together on successive lines, or even on the same line if there is enough space on a line.ii.Separatedbysomestatementseparator,saysemi-colons,andintheorderofintended execution.A) (i) T (ii) T B) (i) F (ii) F C) (i) T (ii) F D) (i) F (ii) T 42. State true(T) or false(F) (i) A procedure, which can call itself, is said to be recursive procedure/algorithm. (ii) The problem which has atleast one algorithmic solution, is called a computable problem. A)(i) T (ii) T B)(i) F (ii) F

C)(i) T (ii) F D)(i) F (ii) T 43. State true(T) or false(F) i. Exp(1.5, 3) = 3.375 ii. For any constants b and c with b > 1,= ncnbnlim 0A) (i) T (ii) T B) (i) F (ii) F C) (i) T (ii) F D) (i) F(ii) T 44. State true(T) or false(F) (i)c b bca a alog log log + = (ii) abbalog1log =A) (i) T (ii) T B) (i) F (ii) F C) (i) T (ii) F D) (i) F (ii) T 45. State true(T) or false(F) i. The FIFO property of a queue causes it to operate like a line of people in the registrars office. ii.The queue has only a head.A) (i) T(ii) T B) (i) F(ii) F C) (i) T(ii) F D) (i) F(ii) T

46. State true(T) or false(F) (i) A linked list is a data structure in which the objects are arranged in a quadratic order (ii) If the list is sorted the elements can appear in any order. A) (i) T (ii) T B) (i) F (ii) F C) (i) T (ii) F D) (i) F (ii) T 47. State true(T) or false(F) i.ThenumberofdiskaccessesrequiredformostoperationsonaB-treeisinversely proportional to the height of the B-tree ii. A binomial tree Bk is an ordered tree defined recursively. A) (i) T(ii) T B) (i) F(ii) F C) (i) T(ii) F D) (i) F(ii) T 48. State true(T) or false(F) (i) For a binomial tree Bk there are 2k nodes. (ii) The only node with greater degree in Bk than in Bk1 is the root. A) (i) T (ii) T B) (i) F (ii) F C) (i) T (ii) F D) (i) F (ii) T 49. State true(T) or false (F) i. Traversing a tree means exploring all the nodes in the tree starting with the root and exploring the nodes in some order.

ii.Inapostordertraversal,wefirstvisittheleftsubtree,thenallthenodesintherightsubtree and the root is not traversed.A) (i) T(ii) T B) (i) F(ii) F C) (i) T(ii) F D) (i) F(ii) T 50. State true(T) or false(F) (i) Preconditioning is also useful when only a few instances of a problem need to be solved. (ii) In depth-first search algorithm we timestamp each vertex. A) (i) T (ii) T B) (i) F (ii) F C) (i) T (ii) F D) (i) F (ii) T 51. State true(T) or false (F) i.Theprincipleofoptimalitystatesthatcomponentsofagloballyoptimumsolutionmust themselves be optimal. ii. Matrix multiplication is a binary operationA) (i) T(ii) T B) (i) F(ii) F C) (i) T(ii) F D) (i) F(ii) T 52. State true(T) or false(F) (i) If one arrangement is optimal for A1, A2, .,An then it will be optimal for any pairings of (A1, A2,..,Ak) and (Ak+1 An) (ii) Matrix multiplication isnot associative A) (i) T (ii) T B) (i) F (ii) F

C) (i) T (ii) F D) (i) F (ii) T 53. State true(T) or false (F) i. The minimum spanning tree problem is the problem of finding a maximum spanning tree for a given weighted connected graphii. A given connected graph with n vertices, must have exactly (n1) edges. A) (i) T(ii) T B) (i) F(ii) F C) (i) T(ii) F D) (i) F(ii) T 54. State true(T) or false(F) (i) Output function depends upon the particular algorithm used for the purpose. (ii) The Algorithm due to Kruskal builds up a minimum spanning tree by adding edges to form a sequence of expanding subtrees.A) (i) T (ii) T B) (i) F (ii) F C) (i) T (ii) F D) (i) F (ii) T 55. State true(T) or false (F) i. If L is any language, then, L . = . L = Lii. R(S+T) = RS + RT A) (i) T(ii) T B) (i) F(ii) F C) (i) T(ii) F D) (i) F(ii) T

56. State true(T) or false(F) (i) A null string is represented by . (ii) Plus operation is called as positive closureA) (i) T (ii) T B) (i) F (ii) F C) (i) T (ii) F D) (i) F (ii) T 57. State true(T) or false (F) i. A string made up of terminals and /or non-terminals is called a sentential form.ii. A production is called recursive if its left side occurs on its right side.A) (i) T(ii) T B) (i) F(ii) F C) (i) T(ii) F D) (i) F(ii) T 58. State true(T) or false(F) (i) A grammar for a finite language must be recursive. (ii) The