![]() |
![]() ![]() ![]() ![]() ![]() |
![]() ![]() |
![]() |
![]() |
![]() ![]() |
Author | Message |
Priya
Groupie ![]() Joined: 04Jan2007 Online Status: Offline Posts: 82 |
![]() ![]() ![]() Posted: 13Feb2007 at 11:30am |
GATE – 2003 COMPUTER SCIENCE & ENGINEERING PAPER-I
Time Allowed: 3 Hours Maximum Marks: 150
Read the following instructions carefully
Q. 1 - 30 CARRY ONE MARK EACH
1. Consider the following C function. float f,(float x, int y) { float p, s; int i; for (s=1, p=1, i=1; i < y; i ++) { p*= x/i; s+=p; } return s; }
For large values of y, the return value of the function f best approximates
2. Assume the following C variable declaration int *A [10], B [10][10]; Of the following expressions
which will not give compile-time errors if used as left hand sides of assignment statements in a C program ?
3. Let P(E) denote the probability of the event E. Given P(A)= 1, P(B) = 1/2, the values of P(A \ B) and P(B / A) respectively are
5. n couples are invited to a party with the condition that every husband should be accompanied by his wife. However, a wife need not be accompanied by her husband. The number of different gatherings possible at the party is (a)
2 n
6. Let T(n) be the number of different binary search trees on n distinct elements. Then T(n) =
7. Consider the set å * of all strings over the alphabet å = (0, 1). å * with the concatenation operator for strings
8. Let G be an arbitrary graph with n nodes and k components. If a vertex is removed from G, the number of components in the resultant graph must necessarily lie between
9. Assuming all numbers are in 2's complement representation, which of the following numbers is divisible by 11111011 ?
10. For a pipelined CPU with a single ALU, consider the following situations
Which of the above can cause a hazard?
11. Consider an array multiplier for multiplying two n bit numbers. If each gate in the circuit has a unit delay, the total delay of the multiplier is
12. Ram and Shyam have been asked to show that a certain problem Õis NP-complete. Ram shows a polynomial time reduction from the 3-SAT problem to Õ, and Shyam shows a polynomial time reduction from Õ to 3-SAT. Which of the following can be inferred from these reductions?
13. Nobody knows yet if P = NP. Consider the language L defined as follows:
Which of the following statements is true?
14. The regular expression 0* (10*)* denotes the same set as
15. If the strings of a language L .can be effectively enumerated in lexicographic (i.e., alphabetic) order, which of the following statements is true? (a) L is necessarily finite (b) L is regular but not necessarily finite (c) L is context free but not necessarily regular (d) L is recursive but not necessarily context free
16. Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar ? (a) Removing left recursion alone (b) Factoring the grammar alone (c) Removing left recursion and factoring the grammar (d) None of the above
17. Assume that the SLR parser for a grammar G has n 1 states and the LALR parser for G has n 2 states. The relationship between n l and n 2 is (a) n 1 is necessarily less than n2 (b) n 1 is necessarily equal to n2 (c) n 1 is necessarily greater than n2 (d) none of the above
18. In a bottom-up evaluation of a syntax directed definition, inherited attributes can (a) always be evaluated (b) be evaluated only if the definition is L-attributed (c) be evaluated only if the definition has synthesized attributes (d) never be evaluated
19. Suppose the numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially empty binary search tree. The binary search tree uses the usual ordering on natural numbers. What is the in-order traversal sequence of the resultant tree?
20. Consider the following three claims
Which of these claims are correct? (a) I and II (b) I and III (c) II and III (d) I, II and III
21. Consider the following graph
Among the following sequences
Which are depth first traversals of the above graph? (a) I, II and IV only (b) I and IV only (e) II, III and IV only (d) I, III and IV only 22. The usual Q (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 (a) remain Q (n 2) (b) become Q (n (log n) 2) (e) become Q (n log n) (d) become Q (n)
23. In a heap with n elements with the smallest element at the root, the 7 th smallest element can be found in time
24. Which of the following statements is FALSE? (a) In statically typed language, each variable in a program has a fixed type (b) In un-typed languages, values do not have any types (c) In dynamically typed languages, variables have no types (d) 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
25. Using a larger block size in a fixed block size file system leads to
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 (a) the large amount of internal fragmentation (b) the large amount of external fragmentation (c) the large memory overhead in maintaining page tables (d) the large computation overhead in the translation process
27. Which of the following assertions is FALSE about the Internet Protocol (IP)? (a) It is possible for a computer to have multiple IP addresses (b) IP packets from the same source to the same destination can take different routes in the network (c) IP ensures that a packet is discarded if it is unable to reach its destination within a given number of hops (d) 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
28. Which of the following functionalities must be implemented by a transport protocol over and above the network protocol? (a) Recovery from packet losses (b) Detection of duplicate packets (c) Packet delivery in the correct order (d) End to end connectivity
29. Which of the following scenarios may lead to an irrecoverable error in a database system?
30. Consider the following SQL query select distinct a 1. a 2, ...... , a n from r 1, r 2……….., r m where P
For an arbitrary predicate P, this query is equivalent to which of the following relational algebra expressions? (a) (b) (c) (d) |
|
For More Sample Papers Visit:
http://onestopgate.com/gate-preparation/ Post Resume: Click here to Upload your Resume & Apply for Jobs |
|
![]() |
|
![]() ![]() |
||
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
|
© Vyom Technosoft Pvt. Ltd. All Rights Reserved.