• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE-CS-2003

Question 21

Consider the following graph, 


 





Among the following sequences: 
 

(I) a b e g h f 
(II) a b f e h g
(III) a b f h g e 
(IV) a f g h b e  


Which are depth first traversals of the above graph? 
 

  • I, II and IV only 
     

  • I and IV only 
     

  • II, III and IV only 
     

  • I, III and IV only 
     

Question 22

The usual Θ(n2) implementation of Insertion Sort to sort an array uses linear search to identify the position where an element is to be inserted into the already sorted part of the array. If, instead, we use binary search to identify the position, the worst case running time will 1) 2) 3) become Θ(n log n) 4) become Θ(n)
  • remain Θ(n2)
  • become Θ(n (log n)2)
  • become Θ(n log n)
  • become Θ(n)

Question 23

In a heap with n elements with the smallest element at the root, the 7th smallest element can be found in time
  • Θ(n log n)
  • Θ(n)
  • Θ(log n)
  • Θ(1)

Question 24

Which of the following statements is FALSE ?
  • In statically typed language, each variable in a program has a fixed type
  • In un-typed languages, values do not have any types
  • In dynamically typed languages, variables have no types
  • In all statically typed languages, each variable in a program is associated with values of only a single type during the execution of the program

Question 25

Using a larger block size in a fixed block size file system leads to :
  • better disk throughput but poorer disk space utilization
  • better disk throughput and better disk space utilization
  • poorer disk throughput but better disk space utilization
  • poorer disk throughput and poorer disk space utilization

Question 26

In a system with 32 bit virtual addresses and 1 KB page size, use of one-level page tables for virtual to physical address translation is not practical because of
  • the large amount of internal fragmentation
  • the large amount of external fragmentation
  • the large memory overhead in maintaining page tables
  • the large computation overhead in the translation process

Question 27

Which of the following assertions is FALSE about the Internet Protocol (IP) ?
  • It is possible for a computer to have multiple IP addresses
  • IP packets from the same source to the same destination can take different routes in the network
  • IP ensures that a packet is discarded if it is unable to reach its destination within a given number of hops
  • The packet source cannot set the route of an outgoing packets; the route is determined only by the routing tables in the routers on the way

Question 28

Which of the following functionalities must be implemented by a transport protocol over and above the network protocol ?

  • Recovery from packet losses

  • Detection of duplicate packets

  • Packet delivery in the correct order

  • End to end connectivity

Question 29

Which of the following scenarios may lead to an irrecoverable error in a database system ?
  • A transaction writes a data item after it is read by an uncommitted transaction
  • A transaction reads a data item after it is read by an uncommitted transaction
  • A transaction reads a data item after it is written by a committed transaction
  • A transaction reads a data item after it is written by an uncommitted transaction

Question 30

Consider the following SQL query
select distinct al, a2,........., an
from r1, r2,........, rm
where P 
For an arbitrary predicate P, this query is equivalent to which of the following relational algebra expressions ? A: [Tex]\\prod_{a_{1},a_{2},...a_{n}}\\sigma_{\\rho} (r_{1}\\times r_{2}\\times r_{3}....\\times r_{m})[/Tex] B: [Tex]\\prod_{a_{1},a_{2},...a_{n}}\\sigma_{\\rho} (r_{1}\\bowtie r_{2}\\bowtie r_{3}....\\bowtie r_{m})[/Tex] C: [Tex]\\prod_{a_{1},a_{2},...a_{n}}\\sigma_{\\rho} (r_{1}\\cup r_{2}\\cup r_{3}....\\cup r_{m})[/Tex] D: [Tex]\\prod_{a_{1},a_{2},...a_{n}}\\sigma_{\\rho} (r_{1}\\cap r_{2}\\cap r_{3}....\\cap r_{m})[/Tex]
  • A
  • B
  • C
  • D

There are 89 questions to complete.

Last Updated :
Take a part in the ongoing discussion