61.  Six files Fl, F2, F3, F4, F5 and F6 have 100,200,50,80, 120, 150 number of records respectively. In what order should they be stored so as to optimize access time? Assume each file is accessed with the same frequency. 
a.  Fl, F2, F3, F4, F5, F6 
b.  F2, F6, F5, Fl, F4, F3 
c.  F3, F4, FI, F5, F6, F2 
d.  Ordering is immaterial as all files are accessed with the same frequency 
View Answer Report Discuss Too Difficult! 
Answer: (c).F3, F4, FI, F5, F6, F2

62.  An algorithm is made up of 2 modules Ml and M2. If order of M1 is f(n) and M2 is g(n) then the order of the algorithm is 
a.  f (n) + g (n) 
b.  f (n) x g (n ) 
c.  min (f (n) ,g (n) ) 
d.  max (f (n) ,g (n)) 
View Answer Report Discuss Too Difficult! 
Answer: (d).max (f (n) ,g (n))

63.  The order of an algorithm that finds whether a given Boolean function of 'n' variables, produces a 1 is 
a.  linear 
b.  constant 
c.  exponential 
d.  logarithmic 
View Answer Report Discuss Too Difficult! 
Answer: (b).constant

64.  The running time of an algorithm is given by T(n) = T(n  1) + T(n  2)  T(n  3), if n > 3 n, otherwise. 
a.  n 
b.  log n 
c.  n+1 
d.  None of these 
View Answer Report Discuss Too Difficult! 
Answer: (a).n

65.  A text is made up of the characters a, b, c, d, e each occurring with the probability .12, .4, .15, .08 and .25 respectively. The optimal coding technique will have the average length of 
a.  1.78 
b.  2.03 
c.  2.15 
d.  3.01 
View Answer Report Discuss Too Difficult! 
Answer: (c).2.15

66.  The time complexity of an algorithm T(n), where n is the input size, is given by T( n) = T( n  1) + 1/n if n > 1 The order of this algorithm is 
a.  n 
b.  log n 
c.  n+1 
d.  n1 
View Answer Report Discuss Too Difficult! 
Answer: (b).log n

67.  The concept of order (Big O) is important because 
a.  it can be used to decide the best algorithm that solves a given problem 
b.  it determines the maximum size of a problem that can be solved in a given system, in a given amount of time 
c.  all of the above 
d.  none of these 
View Answer Report Discuss Too Difficult! 
Answer: (c).all of the above

68.  Which of the following sorting algorithms does not have a worst case running time of O(n2)? 
a.  Quick sort 
b.  Bubble sort 
c.  Merge sort 
d.  Insertion sort 
View Answer Report Discuss Too Difficult! 
Answer: (c).Merge sort

69.  Using the standard algorithm, what is the time required to determine that a number n is prime ? 
a.  Linear time 
b.  Constant time 
c.  Quadratic time 
d.  Logarithmic time 
View Answer Report Discuss Too Difficult! 
Answer: (a).Linear time

70.  Let m, n be positive integers. Define Q (m, n) as Q (m, n) = 0, if m>n Then Q (m, 3) is (a div b, gives the quotient when a is divided by b) 
a.  3 x p 
b.  a constant 
c.  p x (m div 3) 
d.  p x (m mod 3) 
View Answer Report Discuss Too Difficult! 
Answer: (c).p x (m div 3)
